Core/Movement: Correct distance checking
Port From (https://github.com/TrinityCore/TrinityCore/commit/30cfe3741ab937057f87043a4ed089258d836323)
This commit is contained in:
@@ -88,11 +88,7 @@ namespace Game.Movement
|
|||||||
}
|
}
|
||||||
|
|
||||||
// First check distance
|
// First check distance
|
||||||
if (owner.IsCreature() && owner.ToCreature().CanFly())
|
|
||||||
targetMoved = !GetTarget().IsInDist(destination.X, destination.Y, destination.Z, distance);
|
targetMoved = !GetTarget().IsInDist(destination.X, destination.Y, destination.Z, distance);
|
||||||
else
|
|
||||||
targetMoved = !GetTarget().IsInDist2d(destination.X, destination.Y, distance);
|
|
||||||
|
|
||||||
|
|
||||||
// then, if the target is in range, check also Line of Sight.
|
// then, if the target is in range, check also Line of Sight.
|
||||||
if (!targetMoved)
|
if (!targetMoved)
|
||||||
|
|||||||
Reference in New Issue
Block a user