fix(Scripts/Spell): properly script collapsing cave aura (#10092)

* cherry-pick commit (8d1a5fa126)

Co-authored-by: Sorikoff <46191832+Sorikoff@users.noreply.github.com>
This commit is contained in:
Kitzunu
2022-01-25 01:18:47 +01:00
committed by GitHub
parent 9a16d321ce
commit 1c0019ec18
3 changed files with 26 additions and 8 deletions

View File

@@ -1067,21 +1067,40 @@ public:
}
};
enum CollapsingCave
{
SPELL_COLLAPSING_CAVE = 55486
};
// 55693 - Remove Collapsing Cave Aura
class spell_q12823_remove_collapsing_cave_aura : public SpellScript
{
PrepareSpellScript(spell_q12823_remove_collapsing_cave_aura);
void HandleScriptEffect(SpellEffIndex /* effIndex */)
{
GetHitUnit()->RemoveAurasDueToSpell(SPELL_COLLAPSING_CAVE);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_q12823_remove_collapsing_cave_aura::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
void AddSC_storm_peaks()
{
// Ours
new npc_frosthound();
new npc_iron_watcher();
new npc_time_lost_proto_drake();
new npc_wild_wyrm();
new spell_q13003_thursting_hodirs_spear();
new spell_q13007_iron_colossus();
// Theirs
new npc_roxi_ramrocket();
new npc_brunnhildar_prisoner();
new npc_freed_protodrake();
new npc_icefang();
new npc_hyldsmeet_protodrake();
new spell_close_rift();
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
}