Scripts/Misc: added base instance scripts and definitions for all 4.3 Cataclysm dungeons

This commit is contained in:
Ovahlord
2023-12-22 11:24:28 +01:00
parent 575a37a703
commit c336a6b53a
8 changed files with 343 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
DELETE FROM `instance_template` WHERE `map` IN (940, 939, 938);
INSERT INTO `instance_template` (`map`, `parent`, `script`) VALUES
(940, 1, 'instance_hour_of_twilight'),
(939, 1, 'instance_well_of_eternity'),
(938, 1, 'instance_end_time');

View File

@@ -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 _End_Time_h__
#define _End_Time_h__
#include "CreatureAIImpl.h"
constexpr char const* DataHeader = "ET";
constexpr char const* ETScriptName = "instance_end_time";
constexpr uint32 const EncounterCount = 5;
enum ETWDataTypes
{
// Encounters
BOSS_ECHO_OF_BAINE = 0,
BOSS_ECHO_OF_SYLVANAS = 1,
BOSS_ECHO_OF_JAINA = 2,
BOSS_ECHO_OF_TYRANDE = 3,
BOSS_MUROZOND = 4
};
enum ETCreatureIds
{
// Bosses
NPC_MUROZOND = 54432
};
template <class AI, class T>
inline AI* GetEndTimeAI(T* obj)
{
return GetInstanceAI<AI>(obj, ETScriptName);
}
#define RegisterEndTimeCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetEndTimeAI)
#endif // _End_Time_h__

View File

@@ -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 "end_time.h"
#include "InstanceScript.h"
ObjectData const creatureData[] =
{
{ NPC_MUROZOND, BOSS_MUROZOND },
{ 0, 0 } // END
};
DungeonEncounterData const encounters[] =
{
{ BOSS_ECHO_OF_BAINE, {{ 1881 }} },
{ BOSS_ECHO_OF_SYLVANAS, {{ 1882 }} },
{ BOSS_ECHO_OF_JAINA, {{ 1883 }} },
{ BOSS_ECHO_OF_TYRANDE, {{ 1884 }} },
{ BOSS_MUROZOND, {{ 1271 }} }
};
class instance_end_time : public InstanceMapScript
{
public:
instance_end_time() : InstanceMapScript(ETScriptName, 938) { }
struct instance_end_time_InstanceMapScript : public InstanceScript
{
instance_end_time_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
LoadObjectData(creatureData, nullptr);
LoadDungeonEncounterData(encounters);
}
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_end_time_InstanceMapScript(map);
}
};
void AddSC_instance_end_time()
{
new instance_end_time();
}

View File

@@ -0,0 +1,49 @@
/*
* 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 _Hour_of_Twilight_h__
#define _Hour_of_Twilight_h__
#include "CreatureAIImpl.h"
constexpr char const* DataHeader = "HOT";
constexpr char const* HoTScriptName = "instance_throne_of_the_four_winds";
constexpr uint32 const EncounterCount = 3;
enum TotFWDataTypes
{
// Encounters
BOSS_ARCURION = 0,
BOSS_ASIRA_DAWNSLAYER = 1,
BOSS_ARCHBISHOP_BENEDICTUS = 2
};
enum TotFWCreatureIds
{
// Bosses
};
template <class AI, class T>
inline AI* GetThroneOfTheFourWindsAI(T* obj)
{
return GetInstanceAI<AI>(obj, HoTScriptName);
}
#define RegisterThroneOfTheFourWindsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetThroneOfTheFourWindsAI)
#endif // _Hour_of_Twilight_h__

View File

@@ -0,0 +1,53 @@
/*
* 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 "hour_of_twilight.h"
#include "InstanceScript.h"
DungeonEncounterData const encounters[] =
{
{ BOSS_ARCURION, {{ 1337 }} },
{ BOSS_ASIRA_DAWNSLAYER, {{ 1340 }} },
{ BOSS_ARCHBISHOP_BENEDICTUS, {{ 1339 }} }
};
class instance_hour_of_twilight : public InstanceMapScript
{
public:
instance_hour_of_twilight() : InstanceMapScript(HoTScriptName, 940) { }
struct instance_hour_of_twilight_InstanceMapScript : public InstanceScript
{
instance_hour_of_twilight_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
LoadDungeonEncounterData(encounters);
}
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_hour_of_twilight_InstanceMapScript(map);
}
};
void AddSC_instance_hour_of_twilight()
{
new instance_hour_of_twilight();
}

View File

@@ -0,0 +1,60 @@
/*
* 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 "well_of_eternity.h"
#include "InstanceScript.h"
ObjectData const creatureData[] =
{
{ NPC_PEROTHARN, BOSS_PEROTHARN },
{ 0, 0 } // END
};
DungeonEncounterData const encounters[] =
{
{ BOSS_PEROTHARN, {{ 1272 }} },
{ BOSS_QUEEN_AZSHARA, {{ 1273 }} },
{ BOSS_MANNOROTH, {{ 1274 }} }
};
class instance_well_of_eternityy : public InstanceMapScript
{
public:
instance_well_of_eternityy() : InstanceMapScript(WoEScriptName, 939) { }
struct instance_well_of_eternityy_InstanceMapScript : public InstanceScript
{
instance_well_of_eternityy_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
LoadObjectData(creatureData, nullptr);
LoadDungeonEncounterData(encounters);
}
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_well_of_eternityy_InstanceMapScript(map);
}
};
void AddSC_instance_well_of_eternity()
{
new instance_well_of_eternityy();
}

View File

@@ -0,0 +1,50 @@
/*
* 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 _Well_of_Eternity_h__
#define _Well_of_Eternity_h__
#include "CreatureAIImpl.h"
constexpr char const* DataHeader = "WOE";
constexpr char const* WoEScriptName = "instance_well_of_eternity";
constexpr uint32 const EncounterCount = 3;
enum WoEDataTypes
{
// Encounters
BOSS_PEROTHARN = 0,
BOSS_QUEEN_AZSHARA = 1,
BOSS_MANNOROTH = 2
};
enum WoECreatureIds
{
// Bosses
NPC_PEROTHARN = 55085
};
template <class AI, class T>
inline AI* GetWellOfEnernityAI(T* obj)
{
return GetInstanceAI<AI>(obj, WoEScriptName);
}
#define RegisterWellOfEternityCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetWellOfEnernityAI)
#endif // _Well_of_Eternity_h__

View File

@@ -52,6 +52,12 @@ void AddSC_boss_mal_ganis();
void AddSC_boss_meathook();
void AddSC_culling_of_stratholme();
void AddSC_instance_culling_of_stratholme();
// CoT End Time
void AddSC_instance_end_time();
// CoT Hour of Twilight
void AddSC_instance_hour_of_twilight();
// CoT Well of Eternity
void AddSC_instance_well_of_eternity();
// Dire Maul
void AddSC_instance_dire_maul();
// Dragon Soul
@@ -181,6 +187,12 @@ void AddKalimdorScripts()
AddSC_boss_meathook();
AddSC_culling_of_stratholme();
AddSC_instance_culling_of_stratholme();
// CoT End Time
AddSC_instance_end_time();
// CoT Hour of Twilight
AddSC_instance_hour_of_twilight();
// CoT Well of Eternity
AddSC_instance_well_of_eternity();
// Dire Maul
AddSC_instance_dire_maul();
// Dragon Soul