Scripts/Pet: Fixed Mirror Image trying attacking invalid targets

(cherry picked from commit 456aaf2cea)
This commit is contained in:
Keader
2020-05-30 11:31:53 -03:00
committed by Shauren
parent 2029d21f73
commit 08d3bc7488

View File

@@ -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);
}