Core/Movement: correct logic wrongly ported
Port From (https://github.com/TrinityCore/TrinityCore/commit/1c5287032affb1a402b0a6091b75997ef56e556c)
This commit is contained in:
@@ -73,11 +73,7 @@ namespace Game.Movement
|
|||||||
|
|
||||||
// our target might have gone away
|
// our target might have gone away
|
||||||
Unit target = _abstractFollower.GetTarget();
|
Unit target = _abstractFollower.GetTarget();
|
||||||
if (!target)
|
if (target == null || !target.IsInWorld)
|
||||||
return false;
|
|
||||||
|
|
||||||
// the owner might've selected a different target (feels like we shouldn't check this here...)
|
|
||||||
if (owner.GetVictim() != target)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// the owner might be unable to move (rooted or casting), pause movement
|
// the owner might be unable to move (rooted or casting), pause movement
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ namespace Game.Movement
|
|||||||
|
|
||||||
// our target might have gone away
|
// our target might have gone away
|
||||||
Unit target = _abstractFollower.GetTarget();
|
Unit target = _abstractFollower.GetTarget();
|
||||||
if (target == null)
|
if (target == null || !target.IsInWorld)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (owner.HasUnitState(UnitState.NotMove) || owner.IsMovementPreventedByCasting())
|
if (owner.HasUnitState(UnitState.NotMove) || owner.IsMovementPreventedByCasting())
|
||||||
|
|||||||
Reference in New Issue
Block a user