mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-15 13:35:08 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user