fix(Core/Scripts): Mirror Image should stop attacking invisible targets (#25027)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-03-09 13:31:23 -05:00
committed by GitHub
parent e10e823e60
commit 3fea857143

View File

@@ -171,7 +171,7 @@ struct npc_pet_mage_mirror_image : CasterAI
{
Unit* selection = owner->ToPlayer()->GetSelectedUnit();
if (selection)
if (selection && me->CanSeeOrDetect(selection))
{
me->GetThreatMgr().ResetAllThreat();
me->AddThreat(selection, 1000000.0f);
@@ -208,10 +208,10 @@ struct npc_pet_mage_mirror_image : CasterAI
if (checktarget >= 1000)
{
if (me->GetVictim()->HasBreakableByDamageCrowdControlAura() || !me->GetVictim()->IsAlive())
if (!me->GetVictim()->IsAlive() || me->GetVictim()->HasBreakableByDamageCrowdControlAura() || !me->CanSeeOrDetect(me->GetVictim()))
{
MySelectNextTarget();
me->InterruptNonMeleeSpells(true); // Stop casting if target is CC or not Alive.
me->InterruptNonMeleeSpells(true);
return;
}
}