diff options
Diffstat (limited to 'src')
3 files changed, 122 insertions, 2 deletions
diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.h b/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.h new file mode 100644 index 00000000000..42018fd04f4 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.h @@ -0,0 +1,54 @@ +/* + * 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 _Grim_Batol_h__ +#define _Grim_Batol_h__ + +#include "CreatureAIImpl.h" + +constexpr char const* DataHeader = "GB"; +constexpr char const* GBTScriptName = "instance_grim_batol"; + +constexpr uint32 const EncounterCount = 4; + +enum GBDataTypes +{ + // Encounters + BOSS_GENERAL_UMBRISS = 0, + BOSS_FORGEMASTER_THRONGUS = 1, + BOSS_DRAHGA_SHADOWBURNER = 2, + BOSS_ERUDAX = 3 +}; + +enum GBCreatureIds +{ + // Bosses + NPC_GENERAL_UMBRISS = 39625, + NPC_FORGEMASTER_THRONGUS = 40177, + NPC_DRAHGA_SHADOWBURNER = 40319, + NPC_ERUDAX = 40484 +}; + +template <class AI, class T> +inline AI* GetGrimBatolAI(T* obj) +{ + return GetInstanceAI<AI>(obj, GBTScriptName); +} + +#define RegisterGrimBatolCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetGrimBatolAI) + +#endif // _Grim_Batol_h__ diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/instance_grim_batol.cpp b/src/server/scripts/EasternKingdoms/GrimBatol/instance_grim_batol.cpp new file mode 100644 index 00000000000..97f37527c1d --- /dev/null +++ b/src/server/scripts/EasternKingdoms/GrimBatol/instance_grim_batol.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 "grim_batol.h" +#include "InstanceScript.h" + +ObjectData const creatureData[] = +{ + { NPC_GENERAL_UMBRISS, BOSS_GENERAL_UMBRISS }, + { NPC_FORGEMASTER_THRONGUS, BOSS_FORGEMASTER_THRONGUS }, + { NPC_DRAHGA_SHADOWBURNER, BOSS_DRAHGA_SHADOWBURNER }, + { NPC_ERUDAX, BOSS_ERUDAX }, + { 0, 0 } // END +}; + +DungeonEncounterData const encounters[] = +{ + { BOSS_GENERAL_UMBRISS, {{ 1051 }} }, + { BOSS_FORGEMASTER_THRONGUS, {{ 1050 }} }, + { BOSS_DRAHGA_SHADOWBURNER, {{ 1048 }} }, + { BOSS_ERUDAX, {{ 1049 }} } +}; + +class instance_grim_batol : public InstanceMapScript +{ +public: + instance_grim_batol() : InstanceMapScript(GBTScriptName, 670) { } + + struct instance_grim_batol_InstanceMapScript : public InstanceScript + { + instance_grim_batol_InstanceMapScript(InstanceMap* map) : InstanceScript(map) + { + SetHeaders(DataHeader); + SetBossNumber(EncounterCount); + LoadObjectData(creatureData, nullptr); + LoadDungeonEncounterData(encounters); + } + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_grim_batol_InstanceMapScript(map); + } +}; + +void AddSC_instance_grim_batol() +{ + new instance_grim_batol(); +} diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp index bdcc9cd728b..ae6039cd25b 100644 --- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp @@ -75,6 +75,7 @@ void AddSC_instance_deadmines(); void AddSC_boss_mr_smite(); void AddSC_gnomeregan(); //Gnomeregan void AddSC_instance_gnomeregan(); +void AddSC_instance_grim_batol(); //Grim Batol void AddSC_boss_attumen(); //Karazhan void AddSC_boss_curator(); void AddSC_boss_maiden_of_virtue(); @@ -167,7 +168,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_instance_throne_of_the_tides(); //Throne of the Tides void AddSC_boss_akilzon(); //Zul'Aman void AddSC_boss_halazzi(); void AddSC_boss_hex_lord_malacrass(); @@ -271,6 +272,7 @@ void AddEasternKingdomsScripts() AddSC_instance_deadmines(); AddSC_gnomeregan(); //Gnomeregan AddSC_instance_gnomeregan(); + AddSC_instance_grim_batol(); //Grim Batol AddSC_boss_attumen(); //Karazhan AddSC_boss_curator(); AddSC_boss_maiden_of_virtue(); @@ -359,7 +361,7 @@ void AddEasternKingdomsScripts() AddSC_boss_hogger(); AddSC_boss_randolph_moloch(); AddSC_boss_lord_overheat(); - AddSC_instance_throne_of_the_tides(); + AddSC_instance_throne_of_the_tides(); //Throne of the Tides AddSC_boss_archaedas(); //Uldaman AddSC_boss_ironaya(); AddSC_uldaman(); |