From c70c2d782af6bfd2dfd5a532de1da506353a1573 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) --- 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 a1ea0efddcf..30d004eb819 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -1294,29 +1294,28 @@ class spell_player_mount_wyrm : public SpellScriptLoader } }; -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