mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Pet: Fixed Mirror Image trying attacking invalid targets
(cherry picked from commit 456aaf2cea)
This commit is contained in:
@@ -174,7 +174,7 @@ class npc_pet_mage_mirror_image : public CreatureScript
|
||||
bool CanAIAttack(Unit const* who) const override
|
||||
{
|
||||
Unit* owner = me->GetOwner();
|
||||
return owner && who->IsAlive() &&
|
||||
return owner && who->IsAlive() && me->IsValidAttackTarget(who) &&
|
||||
!who->HasBreakableByDamageCrowdControlAura() &&
|
||||
who->IsInCombatWith(owner) && ScriptedAI::CanAIAttack(who);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user