Core/Movement: Fix RandomMovementGenerator for swimming creatures

Port From (https://github.com/TrinityCore/TrinityCore/commit/1f34964df45520da16e5acc139a3ed179acd0569)
This commit is contained in:
hondacrx
2022-03-11 09:49:10 -05:00
parent 1f532c17a2
commit 45a7c342c3
@@ -162,7 +162,8 @@ namespace Game.Movement
}
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);
return;