update (source): Establish chapter 3 dk script (#12549)

* update (source): Establish chapter 3 dk scripts

Per source notes
 Xinef: Should be in chapter III
We establish chapter 3 script for scarelet enclaved and to make the easy of future development in terms of organization

* Update: (script) Spell Script Loader to Register Spell Script

* update: (script): typo
This commit is contained in:
M'Dic
2022-08-03 16:54:21 -04:00
committed by GitHub
parent 0f36736d42
commit a4c809f13c
3 changed files with 44 additions and 30 deletions

View File

@@ -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();
}

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
#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);
}

View File

@@ -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();