diff options
author | Ovahlord <dreadkiller@gmx.de> | 2023-12-22 07:09:42 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2023-12-22 08:40:11 +0100 |
commit | 16b7c3cca9a17f06f3f78e5a18afe4653983ccac (patch) | |
tree | 68f7c87170a1de752f362db54f29caa156250e35 /src/server/scripts/Kalimdor | |
parent | dc881c94e19874fc7fca56f7f884a3025c6abe4b (diff) |
Scripts/Misc: added instance scripts and base definitions for all Cataclysm 4.0 raids
Diffstat (limited to 'src/server/scripts/Kalimdor')
3 files changed, 115 insertions, 0 deletions
diff --git a/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/instance_throne_of_the_four_winds.cpp b/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/instance_throne_of_the_four_winds.cpp new file mode 100644 index 00000000000..01b5a8afc71 --- /dev/null +++ b/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/instance_throne_of_the_four_winds.cpp @@ -0,0 +1,59 @@ +/* + * 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_four_winds.h" +#include "InstanceScript.h" + +ObjectData const creatureData[] = +{ + { NPC_ALAKIR, BOSS_ALAKIR }, + { 0, 0 } // END +}; + +DungeonEncounterData const encounters[] = +{ + { BOSS_CONCLAVE_OF_WIND, {{ 1035 }} }, + { BOSS_ALAKIR, {{ 1034 }} } +}; + +class instance_throne_of_the_four_winds : public InstanceMapScript +{ +public: + instance_throne_of_the_four_winds() : InstanceMapScript(TotFWScriptName, 754) { } + + struct instance_throne_of_the_four_winds_InstanceMapScript : public InstanceScript + { + instance_throne_of_the_four_winds_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_four_winds_InstanceMapScript(map); + } +}; + +void AddSC_instance_throne_of_the_four_winds() +{ + new instance_throne_of_the_four_winds(); +} diff --git a/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/throne_of_the_four_winds.h b/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/throne_of_the_four_winds.h new file mode 100644 index 00000000000..990082f42b0 --- /dev/null +++ b/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/throne_of_the_four_winds.h @@ -0,0 +1,52 @@ +/* + * 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_Four_Winds_h__ +#define _Throne_of_the_Four_Winds_h__ + +#include "CreatureAIImpl.h" + +constexpr char const* DataHeader = "TFW"; +constexpr char const* TotFWScriptName = "instance_throne_of_the_four_winds"; + +constexpr uint32 const EncounterCount = 2; + +enum TotFWDataTypes +{ + // Encounters + BOSS_CONCLAVE_OF_WIND = 0, + BOSS_ALAKIR = 1 +}; + +enum TotFWCreatureIds +{ + // Bosses + NPC_ANSHAL = 45870, + NPC_NEZIR = 45871, + NPC_ROHASH = 45872, + NPC_ALAKIR = 46753 +}; + +template <class AI, class T> +inline AI* GetThroneOfTheFourWindsAI(T* obj) +{ + return GetInstanceAI<AI>(obj, TotFWScriptName); +} + +#define RegisterThroneOfTheFourWindsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetThroneOfTheFourWindsAI) + +#endif // _Throne_of_the_Four_Winds_h__ diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp index 277348eefc8..990c2b3b51b 100644 --- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp +++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp @@ -95,6 +95,8 @@ void AddSC_boss_twinemperors(); void AddSC_boss_ouro(); void AddSC_npc_anubisath_sentinel(); void AddSC_instance_temple_of_ahnqiraj(); +// Throne of the Four Winds +void AddSC_instance_throne_of_the_four_winds(); // The Lost City of the Tol'vir void AddSC_boss_general_husam(); void AddSC_boss_lockmaw(); @@ -220,6 +222,8 @@ void AddKalimdorScripts() AddSC_boss_ouro(); AddSC_npc_anubisath_sentinel(); AddSC_instance_temple_of_ahnqiraj(); + // Throne of the Four Winds + AddSC_instance_throne_of_the_four_winds(); // The Lost City of the Tol'vir AddSC_boss_general_husam(); AddSC_boss_lockmaw(); |