aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2025-05-09 01:10:43 +0300
committerGitHub <noreply@github.com>2025-05-09 00:10:43 +0200
commit5ed83ed27c676ae2dcf661409550ce0fcbffe5c8 (patch)
tree111c87a9626a542fec10a6b41cecba7b0d353784 /src/server/scripts/Kalimdor
parent7b0d1f09135999958e850dd67ed9c5b1eaf16536 (diff)
Scripts/Spells: Get rid of some database spell scripts (#30915)
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp74
-rw-r--r--src/server/scripts/Kalimdor/kalimdor_script_loader.cpp2
2 files changed, 76 insertions, 0 deletions
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp
new file mode 100644
index 00000000000..998138c40d7
--- /dev/null
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp
@@ -0,0 +1,74 @@
+/*
+ * This file is part of the TrinityCore 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 General Public License as published by the
+ * Free Software Foundation; either version 2 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 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 "ScriptMgr.h"
+#include "SpellScript.h"
+#include "Unit.h"
+
+enum Spells
+{
+ SPELL_TELEPORT_TO_TWIN_EMPS_EFFECT = 29181,
+ SPELL_TELEPORT_TO_FINAL_CHAMBER_EFFECT = 29190
+};
+
+// 29182 - Teleport to Twin Emperors
+class spell_temple_of_ahnqiraj_teleport_to_twin_emperors : public SpellScript
+{
+ PrepareSpellScript(spell_temple_of_ahnqiraj_teleport_to_twin_emperors);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_TELEPORT_TO_TWIN_EMPS_EFFECT });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_TELEPORT_TO_TWIN_EMPS_EFFECT);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_temple_of_ahnqiraj_teleport_to_twin_emperors::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 29188 - Teleport to Final Chamber
+class spell_temple_of_ahnqiraj_teleport_to_final_chamber : public SpellScript
+{
+ PrepareSpellScript(spell_temple_of_ahnqiraj_teleport_to_final_chamber);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_TELEPORT_TO_FINAL_CHAMBER_EFFECT });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_TELEPORT_TO_FINAL_CHAMBER_EFFECT);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_temple_of_ahnqiraj_teleport_to_final_chamber::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+void AddSC_temple_of_ahnqiraj()
+{
+ RegisterSpellScript(spell_temple_of_ahnqiraj_teleport_to_twin_emperors);
+ RegisterSpellScript(spell_temple_of_ahnqiraj_teleport_to_final_chamber);
+}
diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
index 7f0d324e920..4506c2e4b7f 100644
--- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
+++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
@@ -95,6 +95,7 @@ void AddSC_boss_twinemperors();
void AddSC_boss_ouro();
void AddSC_npc_anubisath_sentinel();
void AddSC_instance_temple_of_ahnqiraj();
+void AddSC_temple_of_ahnqiraj();
// Wailing caverns
void AddSC_wailing_caverns();
void AddSC_instance_wailing_caverns();
@@ -208,6 +209,7 @@ void AddKalimdorScripts()
AddSC_boss_ouro();
AddSC_npc_anubisath_sentinel();
AddSC_instance_temple_of_ahnqiraj();
+ AddSC_temple_of_ahnqiraj();
// Wailing caverns
AddSC_wailing_caverns();
AddSC_instance_wailing_caverns();