diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index dc6a899d0..e376e3fd1 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -1220,33 +1220,6 @@ public: }; }; -class spell_q12779_an_end_to_all_things : public SpellScriptLoader -{ -public: - spell_q12779_an_end_to_all_things() : SpellScriptLoader("spell_q12779_an_end_to_all_things") { } - - class spell_q12779_an_end_to_all_things_SpellScript : public SpellScript - { - PrepareSpellScript(spell_q12779_an_end_to_all_things_SpellScript); - - void HandleScriptEffect(SpellEffIndex /*effIndex*/) - { - if (GetHitUnit()) - GetHitUnit()->CastSpell(GetCaster(), GetEffectValue(), true); - } - - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_q12779_an_end_to_all_things_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_q12779_an_end_to_all_things_SpellScript(); - } -}; - void AddSC_the_scarlet_enclave_c2() { new npc_crusade_persuaded(); @@ -1254,7 +1227,4 @@ void AddSC_the_scarlet_enclave_c2() new npc_koltira_deathweaver(); new npc_high_inquisitor_valroth(); new npc_a_special_surprise(); - - // Xinef: Should be in chapter III - new spell_q12779_an_end_to_all_things(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp new file mode 100644 index 000000000..7504b35cf --- /dev/null +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp @@ -0,0 +1,42 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "Player.h" +#include "ScriptMgr.h" +#include "SpellInfo.h" +#include "SpellScript.h" + +class spell_q12779_an_end_to_all_things : public SpellScript +{ + PrepareSpellScript(spell_q12779_an_end_to_all_things); + + void HandleScriptEffect(SpellEffIndex /*effIndex*/) + { + if (GetHitUnit()) + GetHitUnit()->CastSpell(GetCaster(), GetEffectValue(), true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_q12779_an_end_to_all_things::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + +void AddSC_the_scarlet_enclave_c3() +{ + RegisterSpellScript(spell_q12779_an_end_to_all_things); +} diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp index cfe1b9ec3..e8cf955c9 100644 --- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp @@ -97,6 +97,7 @@ void AddSC_instance_molten_core(); void AddSC_the_scarlet_enclave(); //Scarlet Enclave void AddSC_the_scarlet_enclave_c1(); void AddSC_the_scarlet_enclave_c2(); +void AddSC_the_scarlet_enclave_c3(); void AddSC_the_scarlet_enclave_c5(); void AddSC_instance_scarlet_monastery(); //Scarlet Monastery void AddSC_boss_kirtonos_the_herald(); @@ -247,6 +248,7 @@ void AddEasternKingdomsScripts() AddSC_the_scarlet_enclave(); //Scarlet Enclave AddSC_the_scarlet_enclave_c1(); AddSC_the_scarlet_enclave_c2(); + AddSC_the_scarlet_enclave_c3(); AddSC_the_scarlet_enclave_c5(); AddSC_instance_scarlet_monastery(); //Scarlet Monastery AddSC_boss_kirtonos_the_herald();