Core/Movement: Fix RandomMovementGenerator for swimming creatures
Port From (https://github.com/TrinityCore/TrinityCore/commit/1f34964df45520da16e5acc139a3ed179acd0569)
This commit is contained in:
@@ -162,7 +162,8 @@ namespace Game.Movement
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool result = _path.CalculatePath(position.GetPositionX(), position.GetPositionY(), position.GetPositionZ());
|
bool result = _path.CalculatePath(position.GetPositionX(), position.GetPositionY(), position.GetPositionZ());
|
||||||
if (!result || _path.GetPathType().HasFlag(PathType.NoPath) || _path.GetPathType().HasFlag(PathType.Shortcut) || _path.GetPathType().HasFlag(PathType.FarFromPoly))
|
// PATHFIND_FARFROMPOLY shouldn't be checked as creatures in water are most likely far from poly
|
||||||
|
if (!result || _path.GetPathType().HasFlag(PathType.NoPath) || _path.GetPathType().HasFlag(PathType.Shortcut))// || _path.GetPathType().HasFlag(PathType.FarFromPoly))
|
||||||
{
|
{
|
||||||
_timer.Reset(100);
|
_timer.Reset(100);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user