Core/Movement: correct logic wrongly ported

Port From (https://github.com/TrinityCore/TrinityCore/commit/1c5287032affb1a402b0a6091b75997ef56e556c)
This commit is contained in:
hondacrx
2021-11-23 20:51:22 -05:00
parent 6110585521
commit d674238f7d
2 changed files with 2 additions and 6 deletions
@@ -73,11 +73,7 @@ namespace Game.Movement
// our target might have gone away
Unit target = _abstractFollower.GetTarget();
if (!target)
return false;
// the owner might've selected a different target (feels like we shouldn't check this here...)
if (owner.GetVictim() != target)
if (target == null || !target.IsInWorld)
return false;
// 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
Unit target = _abstractFollower.GetTarget();
if (target == null)
if (target == null || !target.IsInWorld)
return false;
if (owner.HasUnitState(UnitState.NotMove) || owner.IsMovementPreventedByCasting())