Core/Movement: restored a victim check to prevent some issues with passive mobs chasing their former victim after a cast

This commit is contained in:
Ovahlord
2019-11-20 10:42:00 +01:00
parent 6a0a78d047
commit 8afbceffd4

View File

@@ -77,6 +77,10 @@ bool ChaseMovementGenerator::Update(Unit* owner, uint32 diff)
if (!target || !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;
// the owner might be unable to move (rooted or casting), pause movement
if (owner->HasUnitState(UNIT_STATE_NOT_MOVE) || owner->IsMovementPreventedByCasting())
{