fix(Scripts/TempestKeep): Kael pyroblast target only main target (#18531)

This commit is contained in:
Andrew
2024-03-11 20:14:00 -03:00
committed by GitHub
parent 5542102117
commit 3a87b5a85e
2 changed files with 24 additions and 0 deletions

View File

@@ -1303,6 +1303,25 @@ class spell_kaelthas_summon_nether_vapor : public SpellScript
}
};
class spell_kael_pyroblast : public SpellScript
{
PrepareSpellScript(spell_kael_pyroblast);
void FilterTargets(std::list<WorldObject*>& targets)
{
if (GetCaster()->GetVictim())
{
if (Unit* victim = GetCaster()->GetVictim())
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), false));
}
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kael_pyroblast::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
void AddSC_boss_kaelthas()
{
RegisterTheEyeAI(boss_kaelthas);
@@ -1320,5 +1339,6 @@ void AddSC_boss_kaelthas()
RegisterSpellScript(spell_kaelthas_gravity_lapse);
RegisterSpellScript(spell_kaelthas_nether_beam);
RegisterSpellScript(spell_kaelthas_summon_nether_vapor);
RegisterSpellScript(spell_kael_pyroblast);
}