fix(Core/Scripts): Ikiss polymorph target (#16409)

This commit is contained in:
Angelo Venturini
2023-05-31 23:20:53 -03:00
committed by GitHub
parent 79d6f4e233
commit 746aa5b493

View File

@@ -104,7 +104,14 @@ struct boss_talon_king_ikiss : public BossAI
context.Repeat(7s, 12s);
}).Schedule(8s, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_POLYMORPH);
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_POLYMORPH);
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* target) -> bool
{
return target && !target->IsImmunedToSpell(spellInfo);
}))
{
DoCast(target, SPELL_POLYMORPH);
}
context.Repeat(15s, 17500ms);
});