From fbf1a054858c45e2a1562eead4a90dfdf02d5e71 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 9 Aug 2021 11:39:19 -0400 Subject: [PATCH] Core/Movement: Correct distance checking Port From (https://github.com/TrinityCore/TrinityCore/commit/30cfe3741ab937057f87043a4ed089258d836323) --- Source/Game/Movement/Generators/TargetMovement.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/Game/Movement/Generators/TargetMovement.cs b/Source/Game/Movement/Generators/TargetMovement.cs index 2daacc3d1..1a28e4510 100644 --- a/Source/Game/Movement/Generators/TargetMovement.cs +++ b/Source/Game/Movement/Generators/TargetMovement.cs @@ -88,11 +88,7 @@ namespace Game.Movement } // First check distance - if (owner.IsCreature() && owner.ToCreature().CanFly()) - targetMoved = !GetTarget().IsInDist(destination.X, destination.Y, destination.Z, distance); - else - targetMoved = !GetTarget().IsInDist2d(destination.X, destination.Y, distance); - + targetMoved = !GetTarget().IsInDist(destination.X, destination.Y, destination.Z, distance); // then, if the target is in range, check also Line of Sight. if (!targetMoved)