Scripts/Grim Batol: added base instance script and definitions

This commit is contained in:
Ovahlord
2023-12-22 12:21:19 +01:00
parent 12f6ac21d9
commit cb5eb983b0
4 changed files with 125 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `instance_template` WHERE `map`= 670;
INSERT INTO `instance_template` (`map`, `parent`, `script`) VALUES
(670, 0, 'instance_grim_batol');

View File

@@ -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__

View File

@@ -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();
}

View File

@@ -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();