Core/Movement: Fix some undermap issues with random movement/fear/blink
Port From (https://github.com/TrinityCore/TrinityCore/commit/4fcc4a330044e84baa1f58ff13e1b4ea7775eb66)
This commit is contained in:
@@ -90,7 +90,7 @@ namespace Game.Movement
|
||||
}
|
||||
|
||||
bool result = _path.CalculatePath(destination.GetPositionX(), destination.GetPositionY(), destination.GetPositionZ());
|
||||
if (!result || _path.GetPathType().HasAnyFlag(PathType.NoPath))
|
||||
if (!result || _path.GetPathType().HasAnyFlag(PathType.NoPath) || _path.GetPathType().HasAnyFlag(PathType.Shortcut))
|
||||
{
|
||||
_timer.Reset(100);
|
||||
return true;
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace Game.Movement
|
||||
}
|
||||
|
||||
bool result = _path.CalculatePath(destination.GetPositionX(), destination.GetPositionY(), destination.GetPositionZ());
|
||||
if (!result || _path.GetPathType().HasAnyFlag(PathType.NoPath))
|
||||
if (!result || _path.GetPathType().HasAnyFlag(PathType.NoPath) || _path.GetPathType().HasAnyFlag(PathType.Shortcut))
|
||||
{
|
||||
_timer.Reset(100);
|
||||
return;
|
||||
|
||||
@@ -529,14 +529,14 @@ namespace Game.Movement
|
||||
// @todo check the exact cases
|
||||
Log.outDebug(LogFilter.Maps, "++ PathGenerator.BuildPointPath FAILED! path sized {0} returned\n", pointCount);
|
||||
BuildShortcut();
|
||||
pathType = PathType.NoPath;
|
||||
pathType |= PathType.NoPath;
|
||||
return;
|
||||
}
|
||||
else if (pointCount == _pointPathLimit)
|
||||
{
|
||||
Log.outDebug(LogFilter.Maps, "++ PathGenerator.BuildPointPath FAILED! path sized {0} returned, lower than limit set to {1}\n", pointCount, _pointPathLimit);
|
||||
BuildShortcut();
|
||||
pathType = PathType.Short;
|
||||
pathType |= PathType.Short;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace Game.Movement
|
||||
}
|
||||
|
||||
bool result = _path.CalculatePath(position.GetPositionX(), position.GetPositionY(), position.GetPositionZ());
|
||||
if (!result || _path.GetPathType().HasAnyFlag(PathType.NoPath))
|
||||
if (!result || _path.GetPathType().HasAnyFlag(PathType.NoPath) || _path.GetPathType().HasAnyFlag(PathType.Shortcut))
|
||||
{
|
||||
_timer.Reset(100);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user