diff options
4 files changed, 121 insertions, 0 deletions
diff --git a/sql/updates/world/master/2023_12-22_07_world.sql b/sql/updates/world/master/2023_12-22_07_world.sql new file mode 100644 index 00000000000..b083e052c83 --- /dev/null +++ b/sql/updates/world/master/2023_12-22_07_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `instance_template` WHERE `map`= 657; +INSERT INTO `instance_template` (`map`, `parent`, `script`) VALUES +(657, 1, 'instance_vortex_pinnacle'); diff --git a/src/server/scripts/Kalimdor/VortexPinnacle/instance_vortex_pinnacle.cpp b/src/server/scripts/Kalimdor/VortexPinnacle/instance_vortex_pinnacle.cpp new file mode 100644 index 00000000000..5cfc57b39cb --- /dev/null +++ b/src/server/scripts/Kalimdor/VortexPinnacle/instance_vortex_pinnacle.cpp @@ -0,0 +1,62 @@ +/* + * 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 "vortex_pinnacle.h" +#include "InstanceScript.h" + +ObjectData const creatureData[] = +{ + { NPC_GRAND_VIZIER_ERTAN, BOSS_GRAND_VIZIER_ERTAN }, + { NPC_ALTAIRUS, BOSS_ALTAIRUS }, + { NPC_ASAAD, BOSS_ASAAD }, + { 0, 0 } // END +}; + +DungeonEncounterData const encounters[] = +{ + { BOSS_GRAND_VIZIER_ERTAN, {{ 1043 }} }, + { BOSS_ALTAIRUS, {{ 1041 }} }, + { BOSS_ASAAD, {{ 1042 }} } +}; + +class instance_vortex_pinnacle : public InstanceMapScript +{ +public: + instance_vortex_pinnacle() : InstanceMapScript(VPScriptName, 657) { } + + struct instance_vortex_pinnacle_InstanceMapScript : public InstanceScript + { + instance_vortex_pinnacle_InstanceMapScript(InstanceMap* map) : InstanceScript(map) + { + SetHeaders(DataHeader); + SetBossNumber(EncounterCount); + LoadObjectData(creatureData, nullptr); + LoadDungeonEncounterData(encounters); + } + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_vortex_pinnacle_InstanceMapScript(map); + } +}; + +void AddSC_instance_vortex_pinnacle() +{ + new instance_vortex_pinnacle(); +} diff --git a/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.h b/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.h new file mode 100644 index 00000000000..4153b1888a6 --- /dev/null +++ b/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.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 _Vortex_Pinnacle_h__ +#define _Vortex_Pinnacle_h__ + +#include "CreatureAIImpl.h" + +constexpr char const* DataHeader = "VP"; +constexpr char const* VPScriptName = "instance_vortex_pinnacle"; + +constexpr uint32 const EncounterCount = 3; + +enum TotFWDataTypes +{ + // Encounters + BOSS_GRAND_VIZIER_ERTAN = 0, + BOSS_ALTAIRUS = 1, + BOSS_ASAAD = 2 +}; + +enum TotFWCreatureIds +{ + // Bosses + NPC_GRAND_VIZIER_ERTAN = 43878, + NPC_ALTAIRUS = 43873, + NPC_ASAAD = 43875 +}; + +template <class AI, class T> +inline AI* GetVortexPinnacleAI(T* obj) +{ + return GetInstanceAI<AI>(obj, VPScriptName); +} + +#define RegisterVortexPinnacleCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetVortexPinnacleAI) + +#endif // _Vortex_Pinnacle_h__ diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp index 245570267e1..f76ef867ae1 100644 --- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp +++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp @@ -109,6 +109,8 @@ void AddSC_instance_throne_of_the_four_winds(); void AddSC_boss_general_husam(); void AddSC_boss_lockmaw(); void AddSC_instance_lost_city_of_the_tolvir(); +// The Vortex Pinnacle +void AddSC_instance_vortex_pinnacle(); // Wailing caverns void AddSC_wailing_caverns(); void AddSC_instance_wailing_caverns(); @@ -244,6 +246,8 @@ void AddKalimdorScripts() AddSC_boss_general_husam(); AddSC_boss_lockmaw(); AddSC_instance_lost_city_of_the_tolvir(); + // The Vortex Pinnacle + AddSC_instance_vortex_pinnacle(); // Wailing caverns AddSC_wailing_caverns(); AddSC_instance_wailing_caverns(); |