aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2023-12-22 12:08:25 +0100
committerOvahlord <dreadkiller@gmx.de>2023-12-22 12:08:25 +0100
commite8a922356678b2fddd90683c864fcd919a21781f (patch)
tree3e24203dc8d461d2db1455c1cd65fba99f0f8522 /src
parentddcaaa61a569aa6185603bd7b2614bfa72dfd612 (diff)
Scripts/Throne of the Tides: added base instance script and definitions
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp64
-rw-r--r--src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h64
-rw-r--r--src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp2
3 files changed, 130 insertions, 0 deletions
diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp
new file mode 100644
index 00000000000..052299dbb3a
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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 "throne_of_the_tides.h"
+#include "InstanceScript.h"
+
+ObjectData const creatureData[] =
+{
+ { NPC_LADY_NAZJAR, BOSS_LADY_NAZJAR },
+ { NPC_COMMANDER_ULTHOK, BOSS_COMMANDER_ULTHOK },
+ { NPC_MINDBENDER_GURSHA, BOSS_MINDBENDER_GURSHA },
+ { NPC_OZUMAT, DATA_OZUMAT },
+ { 0, 0 } // END
+};
+
+DungeonEncounterData const encounters[] =
+{
+ { BOSS_LADY_NAZJAR, {{ 1045 }} },
+ { BOSS_COMMANDER_ULTHOK, {{ 1044 }} },
+ { BOSS_MINDBENDER_GURSHA, {{ 1046 }} },
+ { BOSS_OZUMAT, {{ 1047 }} }
+};
+
+class instance_throne_of_the_tides : public InstanceMapScript
+{
+public:
+ instance_throne_of_the_tides() : InstanceMapScript(TotTScriptName, 643) { }
+
+ struct instance_throne_of_the_tides_InstanceMapScript : public InstanceScript
+ {
+ instance_throne_of_the_tides_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
+ {
+ SetHeaders(DataHeader);
+ SetBossNumber(EncounterCount);
+ LoadObjectData(creatureData, nullptr);
+ LoadDungeonEncounterData(encounters);
+ }
+ };
+
+ InstanceScript* GetInstanceScript(InstanceMap* map) const override
+ {
+ return new instance_throne_of_the_tides_InstanceMapScript(map);
+ }
+};
+
+void AddSC_instance_throne_of_the_tides()
+{
+ new instance_throne_of_the_tides();
+}
diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h
new file mode 100644
index 00000000000..4735c45b2fa
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h
@@ -0,0 +1,64 @@
+/*
+ * 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 _Throne_of_the_Tides_h__
+#define _Throne_of_the_Tides_h__
+
+#include "CreatureAIImpl.h"
+
+constexpr char const* DataHeader = "TOTT";
+constexpr char const* TotTScriptName = "instance_throne_of_the_tides";
+
+constexpr uint32 const EncounterCount = 4;
+
+enum TotTDataTypes
+{
+ // Encounters
+ BOSS_LADY_NAZJAR = 0,
+ BOSS_COMMANDER_ULTHOK = 1,
+ BOSS_MINDBENDER_GURSHA = 2,
+ BOSS_OZUMAT = 3,
+
+ /*Ozumat*/
+ DATA_OZUMAT
+};
+
+enum TotTCreatureIds
+{
+ // Bosses
+ NPC_LADY_NAZJAR = 40586,
+ NPC_COMMANDER_ULTHOK = 40765,
+ NPC_MINDBENDER_GURSHA = 40788,
+ NPC_OZUMAT = 44566
+};
+
+enum TotTGameObjectIds
+{
+ GO_DOODAD_ABYSSAL_MAW_DOOR_1 = 204338,
+ GO_DOODAD_ABYSSAL_MAW_DOOR_2 = 204339,
+ GO_DOODAD_ABYSSAL_MAW_DOOR_4 = 204341
+};
+
+template <class AI, class T>
+inline AI* GetThroneOfTheTidesAI(T* obj)
+{
+ return GetInstanceAI<AI>(obj, TotTScriptName);
+}
+
+#define RegisterThroneOfTheTidesCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetThroneOfTheTidesAI)
+
+#endif // _Throne_of_the_Tides_h__
diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
index 2bfac4ef094..bdcc9cd728b 100644
--- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
+++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
@@ -167,6 +167,7 @@ void AddSC_instance_the_stockade(); //The Stockade
void AddSC_boss_hogger();
void AddSC_boss_randolph_moloch();
void AddSC_boss_lord_overheat();
+void AddSC_instance_throne_of_the_tides();
void AddSC_boss_akilzon(); //Zul'Aman
void AddSC_boss_halazzi();
void AddSC_boss_hex_lord_malacrass();
@@ -358,6 +359,7 @@ void AddEasternKingdomsScripts()
AddSC_boss_hogger();
AddSC_boss_randolph_moloch();
AddSC_boss_lord_overheat();
+ AddSC_instance_throne_of_the_tides();
AddSC_boss_archaedas(); //Uldaman
AddSC_boss_ironaya();
AddSC_uldaman();