mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
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:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user