mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Creatures: Enable swimming creatures to chase targets in 3d (#18298)
Closes #11060
This commit is contained in:
@@ -183,7 +183,7 @@ bool TargetedMovementGeneratorMedium<T, D>::DoUpdate(T* owner, uint32 time_diff)
|
||||
transport->CalculatePassengerPosition(dest.x, dest.y, dest.z);
|
||||
|
||||
// First check distance
|
||||
if (owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->CanFly())
|
||||
if (owner->GetTypeId() == TYPEID_UNIT && (owner->ToCreature()->CanFly() || owner->ToCreature()->CanSwim()))
|
||||
targetMoved = !i_target->IsWithinDist3d(dest.x, dest.y, dest.z, allowed_dist);
|
||||
else
|
||||
targetMoved = !i_target->IsWithinDist2d(dest.x, dest.y, allowed_dist);
|
||||
|
||||
Reference in New Issue
Block a user