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

@@ -0,0 +1,4 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1641693211435782900');
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q12823_remove_collapsing_cave_aura';
INSERT INTO `spell_script_names` VALUES (55693,'spell_q12823_remove_collapsing_cave_aura');

View File

@@ -3806,11 +3806,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
{
switch (m_spellInfo->Id)
{
case 55693: // Remove Collapsing Cave Aura
if (!unitTarget)
return;
unitTarget->RemoveAurasDueToSpell(m_spellInfo->Effects[effIndex].CalcValue());
break;
// Bending Shinbone
case 8856:
{

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);
}