From 1fd0ba816f317cd298c1efe7a64deb6ad891256d Mon Sep 17 00:00:00 2001 From: Sorikoff <46191832+Sorikoff@users.noreply.github.com> Date: Fri, 2 Aug 2019 19:34:09 +0300 Subject: Scripts/Spells: Devour Humanoid (#23660) (cherry picked from commit 0d53a0ba981a2471fcd951465f6be5d073fddd38) --- .../scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index f02097a3408..eb95cd1c68b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -23,6 +23,7 @@ #include "Player.h" #include "ScriptedEscortAI.h" #include "SpellInfo.h" +#include "SpellScript.h" //How to win friends and influence enemies // texts signed for creature 28939 but used for 28939, 28940, 28610 @@ -745,6 +746,21 @@ public: }; }; +class spell_death_knight_devour_humanoid : public SpellScript +{ + PrepareSpellScript(spell_death_knight_devour_humanoid); + + void HandleScriptEffect(SpellEffIndex /* effIndex */) + { + GetHitUnit()->CastSpell(GetCaster(), GetEffectValue(), true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_death_knight_devour_humanoid::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_the_scarlet_enclave_c2() { new npc_crusade_persuaded(); @@ -752,4 +768,5 @@ void AddSC_the_scarlet_enclave_c2() new npc_koltira_deathweaver(); new npc_high_inquisitor_valroth(); new npc_a_special_surprise(); + RegisterSpellScript(spell_death_knight_devour_humanoid); } -- cgit v1.2.3