aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeader <keader.android@gmail.com>2020-05-30 11:31:53 -0300
committerShauren <shauren.trinity@gmail.com>2022-01-06 19:41:22 +0100
commit08d3bc7488da35999afbfc4e093491b388dcd124 (patch)
treec03df8d446ee25bdd72e3b11526700aa8479c3cf /src
parent2029d21f7392e7b32c307c73180af3359d18706b (diff)
Scripts/Pet: Fixed Mirror Image trying attacking invalid targets
(cherry picked from commit 456aaf2cea40160ad8f8b2504a003a1991db741a)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Pet/pet_mage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp
index f626159a650..d1cedaa0e69 100644
--- a/src/server/scripts/Pet/pet_mage.cpp
+++ b/src/server/scripts/Pet/pet_mage.cpp
@@ -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);
}