fix(Scripts/HyjalSummit): Adjust Air Burst cast targetting. (#19488)

Init.
This commit is contained in:
Benjamin Jackson
2024-08-01 18:57:32 -04:00
committed by GitHub
parent f2680d994b
commit 7569a3bf1b
2 changed files with 6 additions and 22 deletions

View File

@@ -0,0 +1 @@
DELETE FROM `spell_script_names` WHERE `spell_id` = 32014;

View File

@@ -267,9 +267,11 @@ struct boss_archimonde : public BossAI
Talk(SAY_AGGRO); Talk(SAY_AGGRO);
ScheduleTimedEvent(25s, 35s, [&] ScheduleTimedEvent(25s, 35s, [&]
{ {
scheduler.DelayGroup(GROUP_FEAR, 5s); if (DoCastRandomTarget(SPELL_AIR_BURST, 1) == SPELL_CAST_OK)
Talk(SAY_AIR_BURST); {
DoCastRandomTarget(SPELL_AIR_BURST); scheduler.DelayGroup(GROUP_FEAR, 5s);
Talk(SAY_AIR_BURST);
}
}, 25s, 40s); }, 25s, 40s);
ScheduleTimedEvent(8s, [&] ScheduleTimedEvent(8s, [&]
{ {
@@ -471,24 +473,6 @@ class spell_red_sky_effect : public SpellScript
} }
}; };
class spell_air_burst : public SpellScript
{
PrepareSpellScript(spell_air_burst);
void FilterTargets(std::list<WorldObject*>& targets)
{
if (Unit* victim = GetCaster()->GetVictim())
{
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
}
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_air_burst::FilterTargets, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
class spell_doomfire : public AuraScript class spell_doomfire : public AuraScript
{ {
PrepareAuraScript(spell_doomfire); PrepareAuraScript(spell_doomfire);
@@ -519,7 +503,6 @@ class spell_doomfire : public AuraScript
void AddSC_boss_archimonde() void AddSC_boss_archimonde()
{ {
RegisterSpellScript(spell_red_sky_effect); RegisterSpellScript(spell_red_sky_effect);
RegisterSpellScript(spell_air_burst);
RegisterSpellScript(spell_doomfire); RegisterSpellScript(spell_doomfire);
RegisterHyjalAI(boss_archimonde); RegisterHyjalAI(boss_archimonde);
RegisterHyjalAI(npc_ancient_wisp); RegisterHyjalAI(npc_ancient_wisp);