From cf95274ace6e1b3e05a91f245cf245b5598475eb Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 7 Dec 2019 16:57:16 +0100 Subject: Quest: Weakness to Lightning Closes #23916 (cherry picked from commit 6db4bf66715a775ab85c7e82e9b9733c891e450e) --- src/server/scripts/Spells/spell_quest.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src') diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index e4551d33bb6..7c6d7276343 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -2971,6 +2971,27 @@ public: } }; +class spell_q11896_weakness_to_lightning_46444 : public SpellScript +{ + PrepareSpellScript(spell_q11896_weakness_to_lightning_46444); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Unit* target = GetHitUnit()) + { + if (Unit* owner = target->GetOwner()) + { + target->CastSpell(owner, GetEffectValue(), true); + } + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_q11896_weakness_to_lightning_46444::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + /*###### ## Quest 14386 Leader of the Pack ######*/ @@ -3060,6 +3081,7 @@ void AddSC_quest_spell_scripts() RegisterSpellScript(spell_q13264_q13276_q13288_q13289_area_restrict_abom); RegisterSpellScript(spell_q13264_q13276_q13288_q13289_assign_credit_to_master); RegisterSpellScript(spell_q12690_burst_at_the_seams_52510); + RegisterSpellScript(spell_q11896_weakness_to_lightning_46444); new spell_q12308_escape_from_silverbrook_summon_worgen(); new spell_q12308_escape_from_silverbrook(); new spell_q12641_death_comes_from_on_high(); -- cgit v1.2.3