Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon (#24036)
* Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon Fix path generator returning shortcuts when start and end are on the same polygon by handling this case as if start and end were on 2 different polygons. This will ensure BuildPointPath() gets called which calls FindSmoothPath(), making sure each step is not longer than SMOOTH_PATH_STEP_SIZE (4 yards) * Change ingame cast error message to SPELL_FAILED_NOPATH from SPELL_FAILED_OUT_OF_RANGE if the generated path is too long
This commit is contained in:
1 parent
fbe4abf3be
commit
cad41332ba
4 files changed
+21
-17
No files matched your search
@@ -881,16 +881,8 @@ namespace MMAP
|
||||
return static_cast<uint32>(m_mapid) != mapID;
|
||||
|
||||
if (m_skipContinents)
|
||||
switch (mapID)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 530:
|
||||
case 571:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (isContinentMap(mapID))
|
||||
return true;
|
||||
|
||||
if (m_skipJunkMaps)
|
||||
switch (mapID)
|
||||
@@ -992,6 +984,20 @@ namespace MMAP
|
||||
}
|
||||
}
|
||||
|
||||
bool MapBuilder::isContinentMap(uint32 mapID)
|
||||
{
|
||||
switch (mapID)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 530:
|
||||
case 571:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
bool MapBuilder::shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user