aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2023-12-22 10:18:17 +0100
committerOvahlord <dreadkiller@gmx.de>2023-12-22 10:18:17 +0100
commit575a37a703028f413572907f591a9a7fad6fc734 (patch)
tree8189e7f959fd019752e0f146ef1d2a0428fd4b70 /src/server/scripts/Kalimdor
parent16b7c3cca9a17f06f3f78e5a18afe4653983ccac (diff)
Scripts/Dragon Soul: added base instance script and definitions
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/dragon_soul.h67
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/instance_dragon_soul.cpp58
-rw-r--r--src/server/scripts/Kalimdor/kalimdor_script_loader.cpp4
3 files changed, 129 insertions, 0 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/dragon_soul.h b/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/dragon_soul.h
new file mode 100644
index 00000000000..21b5d212b62
--- /dev/null
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/dragon_soul.h
@@ -0,0 +1,67 @@
+/*
+ * 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/>.
+ */
+
+#ifndef _Dragon_Soul_h__
+#define _Dragon_Soul_h__
+
+#include "CreatureAIImpl.h"
+
+constexpr char const* DataHeader = "DS";
+constexpr char const* DSScriptName = "instance_dragon_soul";
+
+constexpr uint32 const EncounterCount = 8;
+
+enum DSDataTypes
+{
+ // Encounters
+ BOSS_MORCHOK = 0,
+ BOSS_WARLORD_ZONOZZ = 1,
+ BOSS_YORSAHJ_THE_UNSLEEPING = 2,
+ BOSS_HAGARA_THE_STORMBINDER = 3,
+ BOSS_ULTRAXION = 4,
+ BOSS_WARMASTER_BLACKHORN = 5,
+ BOSS_SPINE_OF_DEATHWING = 6,
+ BOSS_MADNESS_OF_DEATHWING = 7
+};
+
+enum DSMapObjIds
+{
+ // Spine of Deathwing
+ /*
+ * Data Values:
+ * 1, 0, 60, 0, 0, 0 -- Talk
+ * 1, 0, 213, 0, 0, 0 -- Scream in Agony
+ */
+ MAP_OBJ_ID_SPINE_OF_DEATHWING_HEAD = 6574436,
+
+ // Warmaster Blackhorn
+ /*
+ * Data Values:
+ * 1, 1, [(0 - 100)], 0, 0, 0 -- Skybox cloud speed
+ */
+ MAP_OBJ_ID_SKYFIRE_SKYBOX = 6858573
+};
+
+template <class AI, class T>
+inline AI* GetDragonSoulAI(T* obj)
+{
+ return GetInstanceAI<AI>(obj, DSScriptName);
+}
+
+#define RegisterDragonSoulCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetDragonSoulAI)
+
+#endif // _Dragon_Soul_h__
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/instance_dragon_soul.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/instance_dragon_soul.cpp
new file mode 100644
index 00000000000..1f48b08846a
--- /dev/null
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/instance_dragon_soul.cpp
@@ -0,0 +1,58 @@
+/*
+ * 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 "dragon_soul.h"
+#include "InstanceScript.h"
+
+DungeonEncounterData const encounters[] =
+{
+ { BOSS_MORCHOK, {{ 1292 }} },
+ { BOSS_WARLORD_ZONOZZ, {{ 1294 }} },
+ { BOSS_YORSAHJ_THE_UNSLEEPING, {{ 1295 }} },
+ { BOSS_HAGARA_THE_STORMBINDER, {{ 1296 }} },
+ { BOSS_ULTRAXION, {{ 1297 }} },
+ { BOSS_WARMASTER_BLACKHORN, {{ 1298 }} },
+ { BOSS_SPINE_OF_DEATHWING, {{ 1291 }} },
+ { BOSS_MADNESS_OF_DEATHWING, {{ 1299 }} }
+};
+
+class instance_dragon_soul : public InstanceMapScript
+{
+public:
+ instance_dragon_soul() : InstanceMapScript(DSScriptName, 967) { }
+
+ struct instance_dragon_soul_InstanceMapScript : public InstanceScript
+ {
+ instance_dragon_soul_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
+ {
+ SetHeaders(DataHeader);
+ SetBossNumber(EncounterCount);
+ LoadDungeonEncounterData(encounters);
+ }
+ };
+
+ InstanceScript* GetInstanceScript(InstanceMap* map) const override
+ {
+ return new instance_dragon_soul_InstanceMapScript(map);
+ }
+};
+
+void AddSC_instance_dragon_soul()
+{
+ new instance_dragon_soul();
+}
diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
index 990c2b3b51b..5f2a9067b8b 100644
--- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
+++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
@@ -54,6 +54,8 @@ void AddSC_culling_of_stratholme();
void AddSC_instance_culling_of_stratholme();
// Dire Maul
void AddSC_instance_dire_maul();
+// Dragon Soul
+void AddSC_instance_dragon_soul();
// Ragefire Chasm
void AddSC_instance_ragefire_chasm();
// Maraudon
@@ -181,6 +183,8 @@ void AddKalimdorScripts()
AddSC_instance_culling_of_stratholme();
// Dire Maul
AddSC_instance_dire_maul();
+ // Dragon Soul
+ AddSC_instance_dragon_soul();
// Ragefire Chasm
AddSC_instance_ragefire_chasm();
//Maraudon