diff --git a/sql/updates/world/custom/custom_2018_11_18_00_world.sql b/sql/updates/world/custom/custom_2018_11_18_00_world.sql new file mode 100644 index 0000000000..15e901e8c9 --- /dev/null +++ b/sql/updates/world/custom/custom_2018_11_18_00_world.sql @@ -0,0 +1 @@ +UPDATE `instance_template` SET `script`= 'instance_blackwing_descent' WHERE `map`= 669; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.h new file mode 100644 index 0000000000..9a0b912921 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * 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_BLACKWING_DESCENT_H +#define DEF_BLACKWING_DESCENT_H + +#include "CreatureAIImpl.h" + +#define DataHeader "BWD" +#define BWDScriptName "instance_blackwing_descent" + +uint32 const EncounterCount = 6; + +enum BWDDataTypes +{ + // Bosses + DATA_MAGMAW = 0, + DATA_OMNOTRON_DEFENSE_SYSTEM = 1, + DATA_CHIMAERON = 2, + DATA_ATRAMEDES = 3, + DATA_MALORIAK = 4, + DATA_NEFARIANS_END = 5 +}; + +enum BWDCreatureIds +{ + // Bosses + BOSS_MAGMAW = 41570, + BOSS_MAGMATRON = 42178, + BOSS_ARCANOTRON = 42166, + BOSS_TOXITRON = 42180, + BOSS_ELECTRON = 42179, + BOSS_CHIMAERON = 43296, + BOSS_ATRAMEDES = 41442, + BOSS_MALORIAK = 41378, + BOSS_NEFARIAN = 41376 +}; + +enum BWDGameObjectIds +{ +}; + +template +inline AI* GetBlackwingDescentAI(T* obj) +{ + return GetInstanceAI(obj, BWDcriptName); +} + +#define RegisterBlackwingDescentCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetBlackwingDescentAI) + +#endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/instance_blackwing_descent.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/instance_blackwing_descent.cpp new file mode 100644 index 0000000000..8be40a7a4a --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/instance_blackwing_descent.cpp @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * 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 "Creature.h" +#include "GameObject.h" +#include "InstanceScript.h" +#include "blackwing_descent.h" + +ObjectData const creatureData[] = +{ + { 0, 0 } // END +}; + +ObjectData const gameobjectData[] = +{ + { 0, 0 } // END +}; + +DoorData const doorData[] = +{ + { 0, 0, DOOR_TYPE_ROOM } // END +}; + +class instance_blackwing_descent : public InstanceMapScript +{ + public: + instance_blackwing_descent() : InstanceMapScript(BWDScriptName, 669) { } + + struct instance_blackwing_descent_InstanceMapScript : public InstanceScript + { + instance_blackwing_descent_InstanceMapScript(InstanceMap* map) : InstanceScript(map) + { + SetHeaders(DataHeader); + SetBossNumber(EncounterCount); + LoadObjectData(creatureData, gameobjectData); + LoadDoorData(doorData); + Initialize(); + } + + void Initialize() + { + } + + void OnCreatureCreate(Creature* creature) override + { + InstanceScript::OnCreatureCreate(creature); + + /* + switch (creature->GetEntry()) + { + default: + break; + } + */ + } + + void OnGameObjectCreate(GameObject* go) override + { + InstanceScript::OnGameObjectCreate(go); + } + + bool SetBossState(uint32 type, EncounterState state) override + { + if (!InstanceScript::SetBossState(type, state)) + return false; + + return true; + } + + /* + void SetData(uint32 type, uint32 data) override + { + switch (type) + { + default: + break; + } + } + */ + + /* + uint32 GetData(uint32 type) const override + { + switch (type) + { + } + + return 0; + } + */ + + /* + void WriteSaveDataMore(std::ostringstream& data) override + { + } + */ + + /* + void ReadSaveDataMore(std::istringstream& data) override + { + } + */ + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_blackwing_descent_InstanceMapScript(map); + } +}; + +void AddSC_instance_blackwing_descent() +{ + new instance_blackwing_descent(); +} diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp index 6266b6bb51..40d7d00268 100644 --- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp @@ -73,6 +73,7 @@ void AddSC_boss_flamegor(); void AddSC_boss_chromaggus(); void AddSC_boss_nefarian(); void AddSC_instance_blackwing_lair(); +void AddSC_instance_blackwing_descent(); //Blackwing Descent void AddSC_instance_deadmines(); //Deadmines void AddSC_boss_glubtok(); void AddSC_boss_helix_gearbreaker(); @@ -294,6 +295,7 @@ void AddEasternKingdomsScripts() AddSC_boss_chromaggus(); AddSC_boss_nefarian(); AddSC_instance_blackwing_lair(); + AddSC_instance_blackwing_descent(); //Blackwing Descent AddSC_instance_deadmines(); //Deadmines AddSC_boss_glubtok(); AddSC_boss_helix_gearbreaker();