From c3b213172315240bc62f99b5e61c23bfbaf3826e Mon Sep 17 00:00:00 2001 From: offl <11556157+offl@users.noreply.github.com> Date: Tue, 1 Mar 2022 21:52:41 +0200 Subject: Scripts/Quest: Update 'A Flawless Plan' (#27841) (cherry picked from commit c70c2d782af6bfd2dfd5a532de1da506353a1573) --- src/server/scripts/Northrend/zone_storm_peaks.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index 4e13ee5a0ef..e20cd91fc74 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -1386,29 +1386,28 @@ public: } }; -enum CollapsingCave -{ - SPELL_COLLAPSING_CAVE = 55486 -}; +/*###### +## Quest 12823: A Flawless Plan +######*/ // 55693 - Remove Collapsing Cave Aura class spell_q12823_remove_collapsing_cave_aura : public SpellScript { PrepareSpellScript(spell_q12823_remove_collapsing_cave_aura); - bool Validate(SpellInfo const* /*spellInfo*/) override + bool Validate(SpellInfo const* spellInfo) override { - return ValidateSpellInfo({ SPELL_COLLAPSING_CAVE }); + return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) }); } - void HandleScriptEffect(SpellEffIndex /* effIndex */) + void HandleScript(SpellEffIndex /*effIndex*/) { - GetHitUnit()->RemoveAurasDueToSpell(SPELL_COLLAPSING_CAVE); + GetHitUnit()->RemoveAurasDueToSpell(uint32(GetEffectValue())); } void Register() override { - OnEffectHitTarget += SpellEffectFn(spell_q12823_remove_collapsing_cave_aura::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffectHitTarget += SpellEffectFn(spell_q12823_remove_collapsing_cave_aura::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; -- cgit v1.2.3