From b0c37fa08eae027e8d8b3005a0a241c23c9dc405 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 8 Jan 2020 02:34:23 +0100 Subject: [PATCH] Scripts/CoT: added instance script files for End Time, Well of Eternity, Hour of Twilight and Dragon Soul in preparation for the instance lock rewrite portover --- .../custom/custom_2020_01_08_00_world.sql | 4 ++ .../CavernsOfTime/DragonSoul/dragon_soul.h | 57 +++++++++++++++++ .../DragonSoul/instance_dragon_soul.cpp | 62 +++++++++++++++++++ .../Kalimdor/CavernsOfTime/EndTime/end_time.h | 54 ++++++++++++++++ .../EndTime/instance_end_time.cpp | 62 +++++++++++++++++++ .../HourOfTwilight/hour_of_twilight.h | 52 ++++++++++++++++ .../instance_hour_of_twilight.cpp | 62 +++++++++++++++++++ .../instance_well_of_eternity.cpp | 62 +++++++++++++++++++ .../WellOfEternity/well_of_eternity.h | 52 ++++++++++++++++ .../Kalimdor/kalimdor_script_loader.cpp | 6 ++ 10 files changed, 473 insertions(+) create mode 100644 sql/updates/world/custom/custom_2020_01_08_00_world.sql create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/dragon_soul.h create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/instance_dragon_soul.cpp create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/EndTime/end_time.h create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/EndTime/instance_end_time.cpp create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/HourOfTwilight/hour_of_twilight.h create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/HourOfTwilight/instance_hour_of_twilight.cpp create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/WellOfEternity/instance_well_of_eternity.cpp create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/WellOfEternity/well_of_eternity.h diff --git a/sql/updates/world/custom/custom_2020_01_08_00_world.sql b/sql/updates/world/custom/custom_2020_01_08_00_world.sql new file mode 100644 index 00000000000..14f807c0b5b --- /dev/null +++ b/sql/updates/world/custom/custom_2020_01_08_00_world.sql @@ -0,0 +1,4 @@ +UPDATE `instance_template` SET `script`= 'instance_end_time' WHERE `map`= 938; +UPDATE `instance_template` SET `script`= 'instance_well_of_eternity' WHERE `map`= 939; +UPDATE `instance_template` SET `script`= 'instance_hour_of_twilight' WHERE `map`= 940; +UPDATE `instance_template` SET `script`= 'instance_dragon_soul' WHERE `map`= 967; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/dragon_soul.h b/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/dragon_soul.h new file mode 100644 index 00000000000..604f0286498 --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/dragon_soul.h @@ -0,0 +1,57 @@ +/* + * 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 . + */ + +#ifndef DEF_DRAGONSOUL_H +#define DEF_DRAGONSOUL_H + +#include "Define.h" + +#define DataHeader "DS" +#define DSScriptName "instance_dragon_soul" + +uint32 const EncounterCount = 8; + +enum DSDataTypes +{ + // Bosses + DATA_MORCHOK = 0, + DATA_WARLORD_ZONOZZ = 1, + DATA_YORSAHJ_THE_UNSLEEPING = 2, + DATA_HAGARA_THE_STORMBINDER = 3, + DATA_ULTRAXION = 4, + DATA_WARMASTER_BLACKHORN = 5, + DATA_SPINE_OF_DEATHWING = 6, + DATA_MADNESS_OF_DEATHWING = 7 +}; + +enum DSCreatures +{ +}; + +enum DSGameObjectIds +{ +}; + +template +AI* GetDragonSoulAI(Creature* creature) +{ + return GetInstanceAI(creature, DSScriptName); +} + +#define RegisterDragonSoulCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetDragonSoulAI) + +#endif // DEF_DRAGONSOUL_H diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/instance_dragon_soul.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/instance_dragon_soul.cpp new file mode 100644 index 00000000000..76f0a36f212 --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DragonSoul/instance_dragon_soul.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 . + */ + +#include "ScriptMgr.h" +#include "InstanceScript.h" +#include "dragon_soul.h" + +ObjectData const creatureData[] = +{ + { 0, 0 } // END +}; + +ObjectData const gameobjectData[] = +{ + { 0, 0 } // END +}; + +DoorData const doorData[] = +{ + { 0, 0, DOOR_TYPE_ROOM } // END +}; + +class instance_dragon_soul : public InstanceMapScript +{ +public: + instance_dragon_soul() : InstanceMapScript(DSScriptName, 967) { } + + struct instance_dragon_soul_InstanceMapScript : public InstanceScript + { + instance_dragon_soul_InstanceMapScript(InstanceMap* map) : InstanceScript(map) + { + SetHeaders(DataHeader); + SetBossNumber(EncounterCount); + LoadDoorData(doorData); + LoadObjectData(creatureData, gameobjectData); + } + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_dragon_soul_InstanceMapScript(map); + } +}; + +void AddSC_instance_dragon_soul() +{ + new instance_dragon_soul(); +} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EndTime/end_time.h b/src/server/scripts/Kalimdor/CavernsOfTime/EndTime/end_time.h new file mode 100644 index 00000000000..3410b8a88c8 --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EndTime/end_time.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 . + */ + +#ifndef DEF_ENDTIME_H +#define DEF_ENDTIME_H + +#include "Define.h" + +#define DataHeader "ET" +#define ETScriptName "instance_end_time" + +uint32 const EncounterCount = 5; + +enum ETDataTypes +{ + // Bosses + DATA_ECHO_OF_BAINE = 0, + DATA_ECHO_OF_JANA = 1, + DATA_ECHO_OF_SYLVANAS = 2, + DATA_ECHO_OF_TYRANDE = 3, + DATA_MUROZOND = 4 +}; + +enum ETCreatures +{ +}; + +enum ETGameObjectIds +{ +}; + +template +AI* GetEndTimeAI(Creature* creature) +{ + return GetInstanceAI(creature, ETScriptName); +} + +#define RegisterEndTimeCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetEndTimeAI) + +#endif // DEF_ENDTIME_H diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EndTime/instance_end_time.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EndTime/instance_end_time.cpp new file mode 100644 index 00000000000..bda90c8e455 --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EndTime/instance_end_time.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 . + */ + +#include "ScriptMgr.h" +#include "InstanceScript.h" +#include "end_time.h" + +ObjectData const creatureData[] = +{ + { 0, 0 } // END +}; + +ObjectData const gameobjectData[] = +{ + { 0, 0 } // END +}; + +DoorData const doorData[] = +{ + { 0, 0, DOOR_TYPE_ROOM } // END +}; + +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); + LoadDoorData(doorData); + LoadObjectData(creatureData, gameobjectData); + } + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_end_time_InstanceMapScript(map); + } +}; + +void AddSC_instance_end_time() +{ + new instance_end_time(); +} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/HourOfTwilight/hour_of_twilight.h b/src/server/scripts/Kalimdor/CavernsOfTime/HourOfTwilight/hour_of_twilight.h new file mode 100644 index 00000000000..bdf64b56e8c --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/HourOfTwilight/hour_of_twilight.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 . + */ + +#ifndef DEF_HOUROFTWILIGHT_H +#define DEF_HOUROFTWILIGHT_H + +#include "Define.h" + +#define DataHeader "HOT" +#define HOTScriptName "instance_hour_of_twilight" + +uint32 const EncounterCount = 3; + +enum HOTDataTypes +{ + // Bosses + DATA_ARCURION = 0, + DATA_ASIRA_DAWNSLAYER = 1, + DATA_ARCHBISHOP_BENEDICTUS = 2 +}; + +enum HOTCreatures +{ +}; + +enum HOTGameObjectIds +{ +}; + +template +AI* GetHourOfTwilightAI(Creature* creature) +{ + return GetInstanceAI(creature, HOTScriptName); +} + +#define RegisterHourOfTwilightCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetHourOfTwilightAI) + +#endif // DEF_HOUROFTWILIGHT_H diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/HourOfTwilight/instance_hour_of_twilight.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/HourOfTwilight/instance_hour_of_twilight.cpp new file mode 100644 index 00000000000..8760d08437b --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/HourOfTwilight/instance_hour_of_twilight.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 . + */ + +#include "ScriptMgr.h" +#include "InstanceScript.h" +#include "hour_of_twilight.h" + +ObjectData const creatureData[] = +{ + { 0, 0 } // END +}; + +ObjectData const gameobjectData[] = +{ + { 0, 0 } // END +}; + +DoorData const doorData[] = +{ + { 0, 0, DOOR_TYPE_ROOM } // END +}; + +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); + LoadDoorData(doorData); + LoadObjectData(creatureData, gameobjectData); + } + }; + + 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(); +} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/WellOfEternity/instance_well_of_eternity.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/WellOfEternity/instance_well_of_eternity.cpp new file mode 100644 index 00000000000..97f8be4de2c --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/WellOfEternity/instance_well_of_eternity.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 . + */ + +#include "ScriptMgr.h" +#include "InstanceScript.h" +#include "well_of_eternity.h" + +ObjectData const creatureData[] = +{ + { 0, 0 } // END +}; + +ObjectData const gameobjectData[] = +{ + { 0, 0 } // END +}; + +DoorData const doorData[] = +{ + { 0, 0, DOOR_TYPE_ROOM } // END +}; + +class instance_well_of_eternity : public InstanceMapScript +{ +public: + instance_well_of_eternity() : InstanceMapScript(WOEScriptName, 939) { } + + struct instance_well_of_eternity_InstanceMapScript : public InstanceScript + { + instance_well_of_eternity_InstanceMapScript(InstanceMap* map) : InstanceScript(map) + { + SetHeaders(DataHeader); + SetBossNumber(EncounterCount); + LoadDoorData(doorData); + LoadObjectData(creatureData, gameobjectData); + } + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_well_of_eternity_InstanceMapScript(map); + } +}; + +void AddSC_instance_well_of_eternity() +{ + new instance_well_of_eternity(); +} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/WellOfEternity/well_of_eternity.h b/src/server/scripts/Kalimdor/CavernsOfTime/WellOfEternity/well_of_eternity.h new file mode 100644 index 00000000000..53b2280518b --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/WellOfEternity/well_of_eternity.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 . + */ + +#ifndef DEF_WELLOFETERNITY_H +#define DEF_WELLOFETERNITY_H + +#include "Define.h" + +#define DataHeader "WOE" +#define WOEScriptName "instance_well_of_eternity" + +uint32 const EncounterCount = 3; + +enum WOEDataTypes +{ + // Bosses + DATA_PEROTHARN = 0, + DATA_QUEEN_AZSHARA = 1, + DATA_MANNOROTH_AND_VAROTHEN = 2 +}; + +enum WOECreatures +{ +}; + +enum WOEGameObjectIds +{ +}; + +template +AI* GetWellOfEternityAI(Creature* creature) +{ + return GetInstanceAI(creature, WOEScriptName); +} + +#define RegisterWellOfEternityCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetWellOfEternityAI) + +#endif // DEF_WELLOFETERNITY_H diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp index f216a707bcc..18a99a3e7f5 100644 --- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp +++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp @@ -47,6 +47,9 @@ void AddSC_boss_mal_ganis(); void AddSC_boss_meathook(); void AddSC_culling_of_stratholme(); void AddSC_instance_culling_of_stratholme(); +void AddSC_instance_end_time(); //CoT End Time +void AddSC_instance_well_of_eternity(); //CoT Well of Eternity +void AddSC_instance_hour_of_twilight(); //CoT Hour of Twilight void AddSC_instance_dire_maul(); //Dire Maul void AddSC_instance_ragefire_chasm(); //Ragefire Chasm void AddSC_boss_celebras_the_cursed(); //Maraudon @@ -174,6 +177,9 @@ void AddKalimdorScripts() AddSC_boss_meathook(); AddSC_culling_of_stratholme(); AddSC_instance_culling_of_stratholme(); + AddSC_instance_end_time(); //CoT End Time + AddSC_instance_well_of_eternity(); //CoT Well of Eternity + AddSC_instance_hour_of_twilight(); //CoT Hour of Twilight AddSC_instance_dire_maul(); //Dire Maul AddSC_instance_ragefire_chasm(); //Ragefire Chasm AddSC_boss_celebras_the_cursed(); //Maraudon