From f5e4fd67c3ce100507daffa042fa72ae01fa8ffc Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 7 Aug 2013 10:50:06 -0230 Subject: Scripting: Moved Lord Valthalak from EAI to CPP. Moved all Blackrock Instances to Blackrock Mountain Dir. --- src/server/game/Scripting/ScriptLoader.cpp | 2 + .../BlackrockDepths/blackrock_depths.cpp | 1350 -------------------- .../BlackrockDepths/blackrock_depths.h | 64 - .../BlackrockDepths/boss_ambassador_flamelash.cpp | 90 -- .../BlackrockDepths/boss_anubshiah.cpp | 113 -- .../boss_emperor_dagran_thaurissan.cpp | 123 -- .../BlackrockDepths/boss_general_angerforge.cpp | 129 -- .../BlackrockDepths/boss_gorosh_the_dervish.cpp | 83 -- .../BlackrockDepths/boss_grizzle.cpp | 87 -- .../boss_high_interrogator_gerstahn.cpp | 103 -- .../BlackrockDepths/boss_magmus.cpp | 95 -- .../BlackrockDepths/boss_moira_bronzebeard.cpp | 94 -- .../BlackrockDepths/boss_tomb_of_seven.cpp | 256 ---- .../BlackrockDepths/instance_blackrock_depths.cpp | 463 ------- .../BlackrockDepths/blackrock_depths.cpp | 1350 ++++++++++++++++++++ .../BlackrockDepths/blackrock_depths.h | 64 + .../BlackrockDepths/boss_ambassador_flamelash.cpp | 90 ++ .../BlackrockDepths/boss_anubshiah.cpp | 113 ++ .../boss_emperor_dagran_thaurissan.cpp | 123 ++ .../BlackrockDepths/boss_general_angerforge.cpp | 129 ++ .../BlackrockDepths/boss_gorosh_the_dervish.cpp | 83 ++ .../BlackrockDepths/boss_grizzle.cpp | 87 ++ .../boss_high_interrogator_gerstahn.cpp | 103 ++ .../BlackrockDepths/boss_magmus.cpp | 95 ++ .../BlackrockDepths/boss_moira_bronzebeard.cpp | 94 ++ .../BlackrockDepths/boss_tomb_of_seven.cpp | 256 ++++ .../BlackrockDepths/instance_blackrock_depths.cpp | 463 +++++++ .../BlackrockSpire/blackrock_spire.h | 120 ++ .../BlackrockSpire/boss_drakkisath.cpp | 112 ++ .../BlackrockSpire/boss_gizrul_the_slavener.cpp | 112 ++ .../BlackrockMountain/BlackrockSpire/boss_gyth.cpp | 172 +++ .../BlackrockSpire/boss_halycon.cpp | 111 ++ .../BlackrockSpire/boss_highlord_omokk.cpp | 101 ++ .../BlackrockSpire/boss_lord_valthalak.cpp | 138 ++ .../BlackrockSpire/boss_mother_smolderweb.cpp | 106 ++ .../BlackrockSpire/boss_overlord_wyrmthalak.cpp | 136 ++ .../BlackrockSpire/boss_pyroguard_emberseer.cpp | 453 +++++++ .../BlackrockSpire/boss_quartermaster_zigris.cpp | 99 ++ .../BlackrockSpire/boss_rend_blackhand.cpp | 447 +++++++ .../boss_shadow_hunter_voshgajin.cpp | 108 ++ .../BlackrockSpire/boss_the_beast.cpp | 106 ++ .../BlackrockSpire/boss_urok_doomhowl.cpp | 108 ++ .../BlackrockSpire/boss_warmaster_voone.cpp | 127 ++ .../BlackrockSpire/instance_blackrock_spire.cpp | 671 ++++++++++ .../BlackwingLair/blackwing_lair.h | 81 ++ .../BlackwingLair/boss_broodlord_lashlayer.cpp | 126 ++ .../BlackwingLair/boss_chromaggus.cpp | 292 +++++ .../BlackwingLair/boss_ebonroc.cpp | 102 ++ .../BlackwingLair/boss_firemaw.cpp | 104 ++ .../BlackwingLair/boss_flamegor.cpp | 110 ++ .../BlackwingLair/boss_nefarian.cpp | 584 +++++++++ .../BlackwingLair/boss_razorgore.cpp | 213 +++ .../BlackwingLair/boss_vaelastrasz.cpp | 242 ++++ .../BlackwingLair/instance_blackwing_lair.cpp | 355 +++++ .../MoltenCore/boss_baron_geddon.cpp | 125 ++ .../BlackrockMountain/MoltenCore/boss_garr.cpp | 160 +++ .../BlackrockMountain/MoltenCore/boss_gehennas.cpp | 110 ++ .../BlackrockMountain/MoltenCore/boss_golemagg.cpp | 190 +++ .../BlackrockMountain/MoltenCore/boss_lucifron.cpp | 108 ++ .../BlackrockMountain/MoltenCore/boss_magmadar.cpp | 122 ++ .../MoltenCore/boss_majordomo_executus.cpp | 217 ++++ .../BlackrockMountain/MoltenCore/boss_ragnaros.cpp | 353 +++++ .../BlackrockMountain/MoltenCore/boss_shazzrah.cpp | 129 ++ .../MoltenCore/boss_sulfuron_harbinger.cpp | 216 ++++ .../MoltenCore/instance_molten_core.cpp | 264 ++++ .../BlackrockMountain/MoltenCore/molten_core.h | 72 ++ .../BlackrockSpire/blackrock_spire.h | 118 -- .../BlackrockSpire/boss_drakkisath.cpp | 112 -- .../BlackrockSpire/boss_gizrul_the_slavener.cpp | 112 -- .../EasternKingdoms/BlackrockSpire/boss_gyth.cpp | 172 --- .../BlackrockSpire/boss_halycon.cpp | 111 -- .../BlackrockSpire/boss_highlord_omokk.cpp | 101 -- .../BlackrockSpire/boss_mother_smolderweb.cpp | 106 -- .../BlackrockSpire/boss_overlord_wyrmthalak.cpp | 136 -- .../BlackrockSpire/boss_pyroguard_emberseer.cpp | 453 ------- .../BlackrockSpire/boss_quartermaster_zigris.cpp | 99 -- .../BlackrockSpire/boss_rend_blackhand.cpp | 447 ------- .../boss_shadow_hunter_voshgajin.cpp | 108 -- .../BlackrockSpire/boss_the_beast.cpp | 106 -- .../BlackrockSpire/boss_urok_doomhowl.cpp | 108 -- .../BlackrockSpire/boss_warmaster_voone.cpp | 127 -- .../BlackrockSpire/instance_blackrock_spire.cpp | 659 ---------- .../EasternKingdoms/BlackwingLair/blackwing_lair.h | 81 -- .../BlackwingLair/boss_broodlord_lashlayer.cpp | 126 -- .../BlackwingLair/boss_chromaggus.cpp | 292 ----- .../EasternKingdoms/BlackwingLair/boss_ebonroc.cpp | 102 -- .../EasternKingdoms/BlackwingLair/boss_firemaw.cpp | 104 -- .../BlackwingLair/boss_flamegor.cpp | 110 -- .../BlackwingLair/boss_nefarian.cpp | 584 --------- .../BlackwingLair/boss_razorgore.cpp | 213 --- .../BlackwingLair/boss_vaelastrasz.cpp | 242 ---- .../BlackwingLair/instance_blackwing_lair.cpp | 355 ----- src/server/scripts/EasternKingdoms/CMakeLists.txt | 103 +- .../MoltenCore/boss_baron_geddon.cpp | 125 -- .../EasternKingdoms/MoltenCore/boss_garr.cpp | 160 --- .../EasternKingdoms/MoltenCore/boss_gehennas.cpp | 110 -- .../EasternKingdoms/MoltenCore/boss_golemagg.cpp | 190 --- .../EasternKingdoms/MoltenCore/boss_lucifron.cpp | 108 -- .../EasternKingdoms/MoltenCore/boss_magmadar.cpp | 122 -- .../MoltenCore/boss_majordomo_executus.cpp | 217 ---- .../EasternKingdoms/MoltenCore/boss_ragnaros.cpp | 353 ----- .../EasternKingdoms/MoltenCore/boss_shazzrah.cpp | 129 -- .../MoltenCore/boss_sulfuron_harbinger.cpp | 216 ---- .../MoltenCore/instance_molten_core.cpp | 264 ---- .../EasternKingdoms/MoltenCore/molten_core.h | 72 -- 105 files changed, 10606 insertions(+), 10451 deletions(-) delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp create mode 100644 src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp delete mode 100644 src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h (limited to 'src') diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index c67a0aec4be..73bdc84b963 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -127,6 +127,7 @@ void AddSC_boss_gyth(); void AddSC_boss_rend_blackhand(); void AddSC_boss_gizrul_the_slavener(); void AddSC_boss_urok_doomhowl(); +void AddSC_boss_lord_valthalak(); void AddSC_instance_blackrock_spire(); void AddSC_boss_razorgore(); //Blackwing lair void AddSC_boss_vaelastrasz(); @@ -771,6 +772,7 @@ void AddEasternKingdomsScripts() AddSC_boss_rend_blackhand(); AddSC_boss_gizrul_the_slavener(); AddSC_boss_urok_doomhowl(); + AddSC_boss_lord_valthalak(); AddSC_instance_blackrock_spire(); AddSC_boss_razorgore(); //Blackwing lair AddSC_boss_vaelastrasz(); diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp deleted file mode 100644 index e9a6b15dcf8..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ /dev/null @@ -1,1350 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" -#include "blackrock_depths.h" -#include "Player.h" -#include "WorldSession.h" - -//go_shadowforge_brazier -class go_shadowforge_brazier : public GameObjectScript -{ -public: - go_shadowforge_brazier() : GameObjectScript("go_shadowforge_brazier") { } - - bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE - { - if (InstanceScript* instance = go->GetInstanceScript()) - { - if (instance->GetData(TYPE_LYCEUM) == IN_PROGRESS) - instance->SetData(TYPE_LYCEUM, DONE); - else - instance->SetData(TYPE_LYCEUM, IN_PROGRESS); - // If used brazier open linked doors (North or South) - if (go->GetGUID() == instance->GetData64(DATA_SF_BRAZIER_N)) - instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_N), true); - else if (go->GetGUID() == instance->GetData64(DATA_SF_BRAZIER_S)) - instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_S), true); - } - return false; - } -}; - -// npc_grimstone -enum Grimstone -{ - NPC_GRIMSTONE = 10096, - NPC_THELDREN = 16059, - - //4 or 6 in total? 1+2+1 / 2+2+2 / 3+3. Depending on this, code should be changed. - MAX_NPC_AMOUNT = 4 -}; - -uint32 RingMob[]= -{ - 8925, // Dredge Worm - 8926, // Deep Stinger - 8927, // Dark Screecher - 8928, // Burrowing Thundersnout - 8933, // Cave Creeper - 8932, // Borer Beetle -}; - -uint32 RingBoss[]= -{ - 9027, // Gorosh - 9028, // Grizzle - 9029, // Eviscerator - 9030, // Ok'thor - 9031, // Anub'shiah - 9032, // Hedrum -}; - -class at_ring_of_law : public AreaTriggerScript -{ -public: - at_ring_of_law() : AreaTriggerScript("at_ring_of_law") { } - - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE - { - if (InstanceScript* instance = player->GetInstanceScript()) - { - if (instance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || instance->GetData(TYPE_RING_OF_LAW) == DONE) - return false; - - instance->SetData(TYPE_RING_OF_LAW, IN_PROGRESS); - player->SummonCreature(NPC_GRIMSTONE, 625.559f, -205.618f, -52.735f, 2.609f, TEMPSUMMON_DEAD_DESPAWN, 0); - - return false; - } - return false; - } -}; - -// npc_grimstone -enum GrimstoneTexts -{ - SAY_TEXT1 = 0, - SAY_TEXT2 = 1, - SAY_TEXT3 = 2, - SAY_TEXT4 = 3, - SAY_TEXT5 = 4, - SAY_TEXT6 = 5 -}; - -/// @todo implement quest part of event (different end boss) -class npc_grimstone : public CreatureScript -{ -public: - npc_grimstone() : CreatureScript("npc_grimstone") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_grimstoneAI(creature); - } - - struct npc_grimstoneAI : public npc_escortAI - { - npc_grimstoneAI(Creature* creature) : npc_escortAI(creature) - { - instance = creature->GetInstanceScript(); - MobSpawnId = rand()%6; - } - - InstanceScript* instance; - - uint8 EventPhase; - uint32 Event_Timer; - - uint8 MobSpawnId; - uint8 MobCount; - uint32 MobDeath_Timer; - - uint64 RingMobGUID[4]; - uint64 RingBossGUID; - - bool CanWalk; - - void Reset() OVERRIDE - { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - EventPhase = 0; - Event_Timer = 1000; - - MobCount = 0; - MobDeath_Timer = 0; - - for (uint8 i = 0; i < MAX_NPC_AMOUNT; ++i) - RingMobGUID[i] = 0; - - RingBossGUID = 0; - - CanWalk = false; - } - - /// @todo move them to center - void SummonRingMob() - { - if (Creature* tmp = me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0)) - RingMobGUID[MobCount] = tmp->GetGUID(); - - ++MobCount; - - if (MobCount == MAX_NPC_AMOUNT) - MobDeath_Timer = 2500; - } - - /// @todo move them to center - void SummonRingBoss() - { - if (Creature* tmp = me->SummonCreature(RingBoss[rand()%6], 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0)) - RingBossGUID = tmp->GetGUID(); - - MobDeath_Timer = 2500; - } - - void WaypointReached(uint32 waypointId) OVERRIDE - { - switch (waypointId) - { - case 0: - Talk(SAY_TEXT1); - CanWalk = false; - Event_Timer = 5000; - break; - case 1: - Talk(SAY_TEXT2); - CanWalk = false; - Event_Timer = 5000; - break; - case 2: - CanWalk = false; - break; - case 3: - Talk(SAY_TEXT3); - break; - case 4: - Talk(SAY_TEXT4); - CanWalk = false; - Event_Timer = 5000; - break; - case 5: - if (instance) - { - instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me); - instance->SetData(TYPE_RING_OF_LAW, DONE); - TC_LOG_DEBUG(LOG_FILTER_TSCR, "npc_grimstone: event reached end and set complete."); - } - break; - } - } - - void HandleGameObject(uint32 id, bool open) - { - instance->HandleGameObject(instance->GetData64(id), open); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!instance) - return; - - if (MobDeath_Timer) - { - if (MobDeath_Timer <= diff) - { - MobDeath_Timer = 2500; - - if (RingBossGUID) - { - Creature* boss = Unit::GetCreature(*me, RingBossGUID); - if (boss && !boss->IsAlive() && boss->isDead()) - { - RingBossGUID = 0; - Event_Timer = 5000; - MobDeath_Timer = 0; - return; - } - return; - } - - for (uint8 i = 0; i < MAX_NPC_AMOUNT; ++i) - { - Creature* mob = Unit::GetCreature(*me, RingMobGUID[i]); - if (mob && !mob->IsAlive() && mob->isDead()) - { - RingMobGUID[i] = 0; - --MobCount; - - //seems all are gone, so set timer to continue and discontinue this - if (!MobCount) - { - Event_Timer = 5000; - MobDeath_Timer = 0; - } - } - } - } else MobDeath_Timer -= diff; - } - - if (Event_Timer) - { - if (Event_Timer <= diff) - { - switch (EventPhase) - { - case 0: - Talk(SAY_TEXT5); - HandleGameObject(DATA_ARENA4, false); - Start(false, false); - CanWalk = true; - Event_Timer = 0; - break; - case 1: - CanWalk = true; - Event_Timer = 0; - break; - case 2: - Event_Timer = 2000; - break; - case 3: - HandleGameObject(DATA_ARENA1, true); - Event_Timer = 3000; - break; - case 4: - CanWalk = true; - me->SetVisible(false); - SummonRingMob(); - Event_Timer = 8000; - break; - case 5: - SummonRingMob(); - SummonRingMob(); - Event_Timer = 8000; - break; - case 6: - SummonRingMob(); - Event_Timer = 0; - break; - case 7: - me->SetVisible(true); - HandleGameObject(DATA_ARENA1, false); - Talk(SAY_TEXT6); - CanWalk = true; - Event_Timer = 0; - break; - case 8: - HandleGameObject(DATA_ARENA2, true); - Event_Timer = 5000; - break; - case 9: - me->SetVisible(false); - SummonRingBoss(); - Event_Timer = 0; - break; - case 10: - //if quest, complete - HandleGameObject(DATA_ARENA2, false); - HandleGameObject(DATA_ARENA3, true); - HandleGameObject(DATA_ARENA4, true); - CanWalk = true; - Event_Timer = 0; - break; - } - ++EventPhase; - } else Event_Timer -= diff; - } - - if (CanWalk) - npc_escortAI::UpdateAI(diff); - } - }; -}; - -// npc_phalanx -enum PhalanxSpells -{ - SPELL_THUNDERCLAP = 8732, - SPELL_FIREBALLVOLLEY = 22425, - SPELL_MIGHTYBLOW = 14099 -}; - -class npc_phalanx : public CreatureScript -{ -public: - npc_phalanx() : CreatureScript("npc_phalanx") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_phalanxAI(creature); - } - - struct npc_phalanxAI : public ScriptedAI - { - npc_phalanxAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ThunderClap_Timer; - uint32 FireballVolley_Timer; - uint32 MightyBlow_Timer; - - void Reset() OVERRIDE - { - ThunderClap_Timer = 12000; - FireballVolley_Timer = 0; - MightyBlow_Timer = 15000; - } - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //ThunderClap_Timer - if (ThunderClap_Timer <= diff) - { - DoCastVictim(SPELL_THUNDERCLAP); - ThunderClap_Timer = 10000; - } else ThunderClap_Timer -= diff; - - //FireballVolley_Timer - if (HealthBelowPct(51)) - { - if (FireballVolley_Timer <= diff) - { - DoCastVictim(SPELL_FIREBALLVOLLEY); - FireballVolley_Timer = 15000; - } else FireballVolley_Timer -= diff; - } - - //MightyBlow_Timer - if (MightyBlow_Timer <= diff) - { - DoCastVictim(SPELL_MIGHTYBLOW); - MightyBlow_Timer = 10000; - } else MightyBlow_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; -}; - -// npc_kharan_mighthammer -enum KharamQuests -{ - QUEST_4001 = 4001, - QUEST_4342 = 4342 -}; - -#define GOSSIP_ITEM_KHARAN_1 "I need to know where the princess are, Kharan!" -#define GOSSIP_ITEM_KHARAN_2 "All is not lost, Kharan!" -#define GOSSIP_ITEM_KHARAN_3 "Gor'shak is my friend, you can trust me." -#define GOSSIP_ITEM_KHARAN_4 "Not enough, you need to tell me more." -#define GOSSIP_ITEM_KHARAN_5 "So what happened?" -#define GOSSIP_ITEM_KHARAN_6 "Continue..." -#define GOSSIP_ITEM_KHARAN_7 "So you suspect that someone on the inside was involved? That they were tipped off?" -#define GOSSIP_ITEM_KHARAN_8 "Continue with your story please." -#define GOSSIP_ITEM_KHARAN_9 "Indeed." -#define GOSSIP_ITEM_KHARAN_10 "The door is open, Kharan. You are a free man." - -class npc_kharan_mighthammer : public CreatureScript -{ -public: - npc_kharan_mighthammer() : CreatureScript("npc_kharan_mighthammer") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->SEND_GOSSIP_MENU(2475, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - player->SEND_GOSSIP_MENU(2476, creature->GetGUID()); - break; - - case GOSSIP_ACTION_INFO_DEF+3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - player->SEND_GOSSIP_MENU(2477, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(2478, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - player->SEND_GOSSIP_MENU(2479, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); - player->SEND_GOSSIP_MENU(2480, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); - player->SEND_GOSSIP_MENU(2481, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+8: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); - player->SEND_GOSSIP_MENU(2482, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+9: - player->CLOSE_GOSSIP_MENU(); - if (player->GetTeam() == HORDE) - player->AreaExploredOrEventHappens(QUEST_4001); - else - player->AreaExploredOrEventHappens(QUEST_4342); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - if (player->GetQuestStatus(4342) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - - if (player->GetTeam() == HORDE) - player->SEND_GOSSIP_MENU(2473, creature->GetGUID()); - else - player->SEND_GOSSIP_MENU(2474, creature->GetGUID()); - - return true; - } -}; - -// npc_lokhtos_darkbargainer -enum LokhtosItems -{ - ITEM_THRORIUM_BROTHERHOOD_CONTRACT = 18628, - ITEM_SULFURON_INGOT = 17203 -}; - -enum LokhtosQuests -{ - QUEST_A_BINDING_CONTRACT = 7604 -}; - -enum LokhtosSpells -{ - SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND = 23059 -}; - -#define GOSSIP_ITEM_SHOW_ACCESS "Show me what I have access to, Lothos." -#define GOSSIP_ITEM_GET_CONTRACT "Get Thorium Brotherhood Contract" - -class npc_lokhtos_darkbargainer : public CreatureScript -{ -public: - npc_lokhtos_darkbargainer() : CreatureScript("npc_lokhtos_darkbargainer") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - { - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false); - } - if (action == GOSSIP_ACTION_TRADE) - player->GetSession()->SendListInventory(creature->GetGUID()); - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (creature->IsVendor() && player->GetReputationRank(59) >= REP_FRIENDLY) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - if (player->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 && - !player->HasItemCount(ITEM_THRORIUM_BROTHERHOOD_CONTRACT, 1, true) && - player->HasItemCount(ITEM_SULFURON_INGOT)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GET_CONTRACT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - } - - if (player->GetReputationRank(59) < REP_FRIENDLY) - player->SEND_GOSSIP_MENU(3673, creature->GetGUID()); - else - player->SEND_GOSSIP_MENU(3677, creature->GetGUID()); - - return true; - } -}; - -// npc_dughal_stormwing -enum DughalQuests -{ - QUEST_JAIL_BREAK = 4322 -}; - -#define SAY_DUGHAL_FREE "Thank you, $N! I'm free!!!" -#define GOSSIP_DUGHAL "You're free, Dughal! Get out of here!" - -/* -class npc_dughal_stormwing : public CreatureScript -{ -public: - npc_dughal_stormwing() : CreatureScript("npc_dughal_stormwing") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - npc_dughal_stormwingAI* dughal_stormwingAI = new npc_dughal_stormwingAI(creature); - - dughal_stormwingAI->AddWaypoint(0, 280.42f, -82.86f, -77.12f, 0); - dughal_stormwingAI->AddWaypoint(1, 287.64f, -87.01f, -76.79f, 0); - dughal_stormwingAI->AddWaypoint(2, 354.63f, -64.95f, -67.53f, 0); - - return dughal_stormwingAI; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - { - player->CLOSE_GOSSIP_MENU(); - CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID()); - creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(2846, creature->GetGUID()); - } - return true; - } - - struct npc_dughal_stormwingAI : public npc_escortAI - { - npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) {} - - void WaypointReached(uint32 waypointId) OVERRIDE - { - switch (waypointId) - { - case 0: - me->Say(SAY_DUGHAL_FREE, LANG_UNIVERSAL, PlayerGUID); - break; - case 1: - instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_OBJECTIVE_COMPLETED); - break; - case 2: - me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED); - break; - } - } - - void EnterCombat(Unit* who) OVERRIDE {} - void Reset() OVERRIDE {} - - void JustDied(Unit* killer) OVERRIDE - { - if (IsBeingEscorted && killer == me) - { - me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED); - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return; - if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_ENDED) - { - me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - else - { - me->SetVisible(true); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - npc_escortAI::UpdateAI(diff); - } - }; -}; - - */ - -// npc_marshal_windsor -#define SAY_WINDSOR_AGGRO1 "You locked up the wrong Marshal. Prepare to be destroyed!" -#define SAY_WINDSOR_AGGRO2 "I bet you're sorry now, aren't you !?!!" -#define SAY_WINDSOR_AGGRO3 "You better hold me back $N or they are going to feel some prison house beatings." -#define SAY_WINDSOR_1 "Let's get a move on. My gear should be in the storage area up this way..." -#define SAY_WINDSOR_4_1 "Check that cell, $N. If someone is alive in there, we need to get them out." -#define SAY_WINDSOR_4_2 "Get him out of there!" -#define SAY_WINDSOR_4_3 "Good work! We're almost there, $N. This way." -#define SAY_WINDSOR_6 "This is it, $N. My stuff should be in that room. Cover me, I'm going in!" -#define SAY_WINDSOR_9 "Ah, there it is!" - -enum MarshalWindsor -{ - NPC_REGINALD_WINDSOR = 9682 -}; - -/* -Player* playerStart; -class npc_marshal_windsor : public CreatureScript -{ -public: - npc_marshal_windsor() : CreatureScript("npc_marshal_windsor") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(creature); - - marshal_windsorAI->AddWaypoint(0, 316.336f, -225.528f, -77.7258f, 7000); - marshal_windsorAI->AddWaypoint(1, 316.336f, -225.528f, -77.7258f, 2000); - marshal_windsorAI->AddWaypoint(2, 322.96f, -207.13f, -77.87f, 0); - marshal_windsorAI->AddWaypoint(3, 281.05f, -172.16f, -75.12f, 0); - marshal_windsorAI->AddWaypoint(4, 272.19f, -139.14f, -70.61f, 0); - marshal_windsorAI->AddWaypoint(5, 283.62f, -116.09f, -70.21f, 0); - marshal_windsorAI->AddWaypoint(6, 296.18f, -94.30f, -74.08f, 0); - marshal_windsorAI->AddWaypoint(7, 294.57f, -93.11f, -74.08f, 0); - marshal_windsorAI->AddWaypoint(8, 314.31f, -74.31f, -76.09f, 0); - marshal_windsorAI->AddWaypoint(9, 360.22f, -62.93f, -66.77f, 0); - marshal_windsorAI->AddWaypoint(10, 383.38f, -69.40f, -63.25f, 0); - marshal_windsorAI->AddWaypoint(11, 389.99f, -67.86f, -62.57f, 0); - marshal_windsorAI->AddWaypoint(12, 400.98f, -72.01f, -62.31f, 0); - marshal_windsorAI->AddWaypoint(13, 404.22f, -62.30f, -63.50f, 2300); - marshal_windsorAI->AddWaypoint(14, 404.22f, -62.30f, -63.50f, 1500); - marshal_windsorAI->AddWaypoint(15, 407.65f, -51.86f, -63.96f, 0); - marshal_windsorAI->AddWaypoint(16, 403.61f, -51.71f, -63.92f, 1000); - marshal_windsorAI->AddWaypoint(17, 403.61f, -51.71f, -63.92f, 2000); - marshal_windsorAI->AddWaypoint(18, 403.61f, -51.71f, -63.92f, 1000); - marshal_windsorAI->AddWaypoint(19, 403.61f, -51.71f, -63.92f, 0); - - return marshal_windsorAI; - } - - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE - { - if (quest->GetQuestId() == 4322) - { - PlayerStart = player; - if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) - { - CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID()); - instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS); - creature->setFaction(11); - } - } - return false; - } - - struct npc_marshal_windsorAI : public npc_escortAI - { - npc_marshal_windsorAI(Creature* creature) : npc_escortAI(creature) - { - instance = creature->GetInstanceScript(); - } - - void WaypointReached(uint32 waypointId) OVERRIDE - { - switch (waypointId) - { - case 1: - me->Say(SAY_WINDSOR_1, LANG_UNIVERSAL, PlayerGUID); - break; - case 7: - me->HandleEmoteCommand(EMOTE_STATE_POINT); - me->Say(SAY_WINDSOR_4_1, LANG_UNIVERSAL, PlayerGUID); - IsOnHold = true; - break; - case 10: - me->setFaction(534); - break; - case 12: - me->Say(SAY_WINDSOR_6, LANG_UNIVERSAL, PlayerGUID); - instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_IN_PROGRESS); - break; - case 13: - me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK - break; - case 14: - instance->SetData(DATA_GATE_SR, 0); - me->setFaction(11); - break; - case 16: - me->Say(SAY_WINDSOR_9, LANG_UNIVERSAL, PlayerGUID); - break; - case 17: - me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK - break; - case 18: - instance->SetData(DATA_GATE_SC, 0); - break; - case 19: - me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->SummonCreature(NPC_REGINALD_WINDSOR, 403.61f, -51.71f, -63.92f, 3.600434f, TEMPSUMMON_DEAD_DESPAWN, 0); - instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_ENDED); - break; - } - } - - void EnterCombat(Unit* who) OVERRIDE - { - switch (urand(0, 2)) - { - case 0: - me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); - break; - case 1: - me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); - break; - case 2: - me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID); - break; - } - } - - void Reset() OVERRIDE {} - - void JustDied(Unit* slayer) OVERRIDE - { - instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) - return; - - if (instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) - SetEscortPaused(false); - - if (!instance->GetData(DATA_GATE_D) && instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_NOT_STARTED) - { - me->Say(SAY_WINDSOR_4_2, LANG_UNIVERSAL, PlayerGUID); - instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_BEFORE_START); - } - if (instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) - { - me->Say(SAY_WINDSOR_4_3, LANG_UNIVERSAL, PlayerGUID); - instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED); - } - if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_SUPPLY_ROOM) == ENCOUNTER_STATE_ENDED) - { - me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - else - { - me->SetVisible(true); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - npc_escortAI::UpdateAI(diff); - } - }; -}; - - */ - -// npc_marshal_reginald_windsor -#define SAY_REGINALD_WINDSOR_0_1 "Can you feel the power, $N??? It's time to ROCK!" -#define SAY_REGINALD_WINDSOR_0_2 "Now we just have to free Tobias and we can get out of here. This way!" -#define SAY_REGINALD_WINDSOR_5_1 "Open it." -#define SAY_REGINALD_WINDSOR_5_2 "I never did like those two. Let's get moving." -#define SAY_REGINALD_WINDSOR_7_1 "Open it and be careful this time!" -#define SAY_REGINALD_WINDSOR_7_2 "That intolerant dirtbag finally got what was coming to him. Good riddance!" -#define SAY_REGINALD_WINDSOR_7_3 "Alright, let's go." -#define SAY_REGINALD_WINDSOR_13_1 "Open it. We need to hurry up. I can smell those Dark Irons coming a mile away and I can tell you one thing, they're COMING!" -#define SAY_REGINALD_WINDSOR_13_2 "Administering fists of fury on Crest Killer!" -#define SAY_REGINALD_WINDSOR_13_3 "He has to be in the last cell. Unless... they killed him." -#define SAY_REGINALD_WINDSOR_14_1 "Get him out of there!" -#define SAY_REGINALD_WINDSOR_14_2 "Excellent work, $N. Let's find the exit. I think I know the way. Follow me!" -#define SAY_REGINALD_WINDSOR_20_1 "We made it!" -#define SAY_REGINALD_WINDSOR_20_2 "Meet me at Maxwell's encampment. We'll go over the next stages of the plan there and figure out a way to decode my tablets without the decryption ring." - -enum MarshalReginaldWindor -{ - NPC_SHILL_DINGER = 9678, - NPC_CREST_KILLER = 9680 -}; - -/* -int wp = 0; -class npc_marshal_reginald_windsor : public CreatureScript -{ -public: - npc_marshal_reginald_windsor() : CreatureScript("npc_marshal_reginald_windsor") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(creature); - - marshal_reginald_windsorAI->AddWaypoint(0, 403.61f, -52.71f, -63.92f, 4000); - marshal_reginald_windsorAI->AddWaypoint(1, 403.61f, -52.71f, -63.92f, 4000); - marshal_reginald_windsorAI->AddWaypoint(2, 406.33f, -54.87f, -63.95f, 0); - marshal_reginald_windsorAI->AddWaypoint(3, 407.99f, -73.91f, -62.26f, 0); - marshal_reginald_windsorAI->AddWaypoint(4, 557.03f, -119.71f, -61.83f, 0); - marshal_reginald_windsorAI->AddWaypoint(5, 573.40f, -124.39f, -65.07f, 0); - marshal_reginald_windsorAI->AddWaypoint(6, 593.91f, -130.29f, -69.25f, 0); - marshal_reginald_windsorAI->AddWaypoint(7, 593.21f, -132.16f, -69.25f, 0); - marshal_reginald_windsorAI->AddWaypoint(8, 593.21f, -132.16f, -69.25f, 3000); - marshal_reginald_windsorAI->AddWaypoint(9, 622.81f, -135.55f, -71.92f, 0); - marshal_reginald_windsorAI->AddWaypoint(10, 634.68f, -151.29f, -70.32f, 0); - marshal_reginald_windsorAI->AddWaypoint(11, 635.06f, -153.25f, -70.32f, 0); - marshal_reginald_windsorAI->AddWaypoint(12, 635.06f, -153.25f, -70.32f, 3000); - marshal_reginald_windsorAI->AddWaypoint(13, 635.06f, -153.25f, -70.32f, 1500); - marshal_reginald_windsorAI->AddWaypoint(14, 655.25f, -172.39f, -73.72f, 0); - marshal_reginald_windsorAI->AddWaypoint(15, 654.79f, -226.30f, -83.06f, 0); - marshal_reginald_windsorAI->AddWaypoint(16, 622.85f, -268.85f, -83.96f, 0); - marshal_reginald_windsorAI->AddWaypoint(17, 579.45f, -275.56f, -80.44f, 0); - marshal_reginald_windsorAI->AddWaypoint(18, 561.19f, -266.85f, -75.59f, 0); - marshal_reginald_windsorAI->AddWaypoint(19, 547.91f, -253.92f, -70.34f, 0); - marshal_reginald_windsorAI->AddWaypoint(20, 549.20f, -252.40f, -70.34f, 0); - marshal_reginald_windsorAI->AddWaypoint(21, 549.20f, -252.40f, -70.34f, 4000); - marshal_reginald_windsorAI->AddWaypoint(22, 555.33f, -269.16f, -74.40f, 0); - marshal_reginald_windsorAI->AddWaypoint(23, 554.31f, -270.88f, -74.40f, 0); - marshal_reginald_windsorAI->AddWaypoint(24, 554.31f, -270.88f, -74.40f, 4000); - marshal_reginald_windsorAI->AddWaypoint(25, 536.10f, -249.60f, -67.47f, 0); - marshal_reginald_windsorAI->AddWaypoint(26, 520.94f, -216.65f, -59.28f, 0); - marshal_reginald_windsorAI->AddWaypoint(27, 505.99f, -148.74f, -62.17f, 0); - marshal_reginald_windsorAI->AddWaypoint(28, 484.21f, -56.24f, -62.43f, 0); - marshal_reginald_windsorAI->AddWaypoint(29, 470.39f, -6.01f, -70.10f, 0); - marshal_reginald_windsorAI->AddWaypoint(30, 451.27f, 30.85f, -70.07f, 0); - marshal_reginald_windsorAI->AddWaypoint(31, 452.45f, 29.85f, -70.37f, 1500); - marshal_reginald_windsorAI->AddWaypoint(32, 452.45f, 29.85f, -70.37f, 7000); - marshal_reginald_windsorAI->AddWaypoint(33, 452.45f, 29.85f, -70.37f, 10000); - marshal_reginald_windsorAI->AddWaypoint(34, 451.27f, 31.85f, -70.07f, 0); - - return marshal_reginald_windsorAI; - } - - struct npc_marshal_reginald_windsorAI : public npc_escortAI - { - npc_marshal_reginald_windsorAI(Creature* creature) : npc_escortAI(creature) - { - } - - void WaypointReached(uint32 waypointId) OVERRIDE - { - wp = waypointId; - switch (waypointId) - { - case 0: - me->setFaction(11); - me->Say(SAY_REGINALD_WINDSOR_0_1, LANG_UNIVERSAL, PlayerGUID); - break; - case 1: - me->Say(SAY_REGINALD_WINDSOR_0_2, LANG_UNIVERSAL, PlayerGUID); - break; - case 7: - me->HandleEmoteCommand(EMOTE_STATE_POINT); - me->Say(SAY_REGINALD_WINDSOR_5_1, LANG_UNIVERSAL, PlayerGUID); - IsOnHold=true; - break; - case 8: - me->Say(SAY_REGINALD_WINDSOR_5_2, LANG_UNIVERSAL, PlayerGUID); - break; - case 11: - me->HandleEmoteCommand(EMOTE_STATE_POINT); - me->Say(SAY_REGINALD_WINDSOR_7_1, LANG_UNIVERSAL, PlayerGUID); - IsOnHold=true; - break; - case 12: - me->Say(SAY_REGINALD_WINDSOR_7_2, LANG_UNIVERSAL, PlayerGUID); - break; - case 13: - me->Say(SAY_REGINALD_WINDSOR_7_3, LANG_UNIVERSAL, PlayerGUID); - break; - case 20: - me->HandleEmoteCommand(EMOTE_STATE_POINT); - me->Say(SAY_REGINALD_WINDSOR_13_1, LANG_UNIVERSAL, PlayerGUID); - IsOnHold=true; - break; - case 21: - me->Say(SAY_REGINALD_WINDSOR_13_3, LANG_UNIVERSAL, PlayerGUID); - break; - case 23: - me->HandleEmoteCommand(EMOTE_STATE_POINT); - me->Say(SAY_REGINALD_WINDSOR_14_1, LANG_UNIVERSAL, PlayerGUID); - IsOnHold=true; - break; - case 24: - me->Say(SAY_REGINALD_WINDSOR_14_2, LANG_UNIVERSAL, PlayerGUID); - break; - case 31: - me->Say(SAY_REGINALD_WINDSOR_20_1, LANG_UNIVERSAL, PlayerGUID); - break; - case 32: - me->Say(SAY_REGINALD_WINDSOR_20_2, LANG_UNIVERSAL, PlayerGUID); - PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK, me); - instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED); - break; - } - } - - void MoveInLineOfSight(Unit* who) OVERRIDE - - { - if (HasEscortState(STATE_ESCORT_ESCORTING)) - return; - - if (Player* player = who->ToPlayer()) - { - if (player->GetQuestStatus(4322) == QUEST_STATUS_INCOMPLETE) - { - float Radius = 10.0f; - if (me->IsWithinDistInMap(who, Radius)) - { - SetEscortPaused(false); - Start(true, false, who->GetGUID()); - } - } - } - } - - void EnterCombat(Unit* who) OVERRIDE - { - switch (urand(0, 2)) - { - case 0: - me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); - break; - case 1: - me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); - break; - case 2: - me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID); - break; - } - } - void Reset() OVERRIDE {} - - void JustDied(Unit* slayer) OVERRIDE - { - instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) - return; - - if (wp == 7) - { - if (!instance->GetData(DATA_GATE_J) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED) - { - instance->SetData(DATA_NPC_JAZ, 1); - instance->SetData(DATA_JAZ, ENCOUNTER_STATE_IN_PROGRESS); - } - if (instance->GetData(DATA_NPC_JAZ) && instance->GetData(DATA_NPC_OGRABISI) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS) - { - SetEscortPaused(false); - instance->SetData(DATA_JAZ, ENCOUNTER_STATE_ENDED); - } - } - else if (wp == 11) - { - if (!instance->GetData(DATA_GATE_S) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED) - { - instance->SetData(DATA_NPC_SHILL, 1); - instance->SetData(DATA_SHILL, ENCOUNTER_STATE_IN_PROGRESS); - } - if (instance->GetData(DATA_NPC_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS) - { - instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED); - SetEscortPaused(false); - } - } - else if (wp == 20) - { - if (!instance->GetData(DATA_GATE_C) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED) - { - instance->SetData(DATA_NPC_CREST, 1); - me->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID); - instance->SetData(DATA_CREST, ENCOUNTER_STATE_IN_PROGRESS); - } - if (instance->GetData(DATA_NPC_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS) - { - SetEscortPaused(false); - instance->SetData(DATA_CREST, ENCOUNTER_STATE_ENDED); - } - } - if (instance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) SetEscortPaused(false); - npc_escortAI::UpdateAI(diff); - } - }; -}; -*/ - -// npc_tobias_seecher -#define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!" - -/* -class npc_tobias_seecher : public CreatureScript -{ -public: - npc_tobias_seecher() : CreatureScript("npc_tobias_seecher") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - npc_tobias_seecherAI* tobias_seecherAI = new npc_tobias_seecherAI(creature); - - tobias_seecherAI->AddWaypoint(0, 549.21f, -281.07f, -75.27f); - tobias_seecherAI->AddWaypoint(1, 554.39f, -267.39f, -73.68f); - tobias_seecherAI->AddWaypoint(2, 533.59f, -249.38f, -67.04f); - tobias_seecherAI->AddWaypoint(3, 519.44f, -217.02f, -59.34f); - tobias_seecherAI->AddWaypoint(4, 506.55f, -153.49f, -62.34f); - - return tobias_seecherAI; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - { - player->CLOSE_GOSSIP_MENU(); - CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID()); - creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_IN_PROGRESS); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Get out of here, Tobias, you're free!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(2847, creature->GetGUID()); - } - return true; - } - - struct npc_tobias_seecherAI : public npc_escortAI - { - npc_tobias_seecherAI(Creature* creature) : npc_escortAI(creature) {} - - void EnterCombat(Unit* who) OVERRIDE {} - void Reset() OVERRIDE {} - - void JustDied(Unit* killer) OVERRIDE - { - if (IsBeingEscorted && killer == me) - { - me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED); - } - } - - void WaypointReached(uint32 waypointId) OVERRIDE - { - switch (waypointId) - { - case 0: - me->Say(SAY_TOBIAS_FREE, LANG_UNIVERSAL, PlayerGUID); - break; - case 2: - instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_OBJECTIVE_COMPLETED); - break; - case 4: - me->SetVisible(false); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED); - break; - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) - return; - - if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_ENDED) - { - me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - else - { - me->SetVisible(true); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - npc_escortAI::UpdateAI(diff); - } - }; -}; - -*/ - -// npc_rocknot -enum RocknotSays -{ - SAY_GOT_BEER = 0 -}; - -enum RocknotSpells -{ - SPELL_DRUNKEN_RAGE = 14872 -}; - -enum RocknotQuests -{ - QUEST_ALE = 4295 -}; - -class npc_rocknot : public CreatureScript -{ -public: - npc_rocknot() : CreatureScript("npc_rocknot") { } - - bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/) OVERRIDE - { - InstanceScript* instance = creature->GetInstanceScript(); - if (!instance) - return true; - - if (instance->GetData(TYPE_BAR) == DONE || instance->GetData(TYPE_BAR) == SPECIAL) - return true; - - if (quest->GetQuestId() == QUEST_ALE) - { - if (instance->GetData(TYPE_BAR) != IN_PROGRESS) - instance->SetData(TYPE_BAR, IN_PROGRESS); - - instance->SetData(TYPE_BAR, SPECIAL); - - //keep track of amount in instance script, returns SPECIAL if amount ok and event in progress - if (instance->GetData(TYPE_BAR) == SPECIAL) - { - creature->AI()->Talk(SAY_GOT_BEER); - creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false); - - if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI())) - escortAI->Start(false, false); - } - } - - return true; - } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_rocknotAI(creature); - } - - struct npc_rocknotAI : public npc_escortAI - { - npc_rocknotAI(Creature* creature) : npc_escortAI(creature) - { - instance = creature->GetInstanceScript(); - } - - InstanceScript* instance; - - uint32 BreakKeg_Timer; - uint32 BreakDoor_Timer; - - void Reset() OVERRIDE - { - if (HasEscortState(STATE_ESCORT_ESCORTING)) - return; - - BreakKeg_Timer = 0; - BreakDoor_Timer = 0; - } - - void DoGo(uint32 id, uint32 state) - { - if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(id))) - go->SetGoState((GOState)state); - } - - void WaypointReached(uint32 waypointId) OVERRIDE - { - if (!instance) - return; - - switch (waypointId) - { - case 1: - me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); - break; - case 2: - me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); - break; - case 3: - me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); - break; - case 4: - me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); - break; - case 5: - me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); - BreakKeg_Timer = 2000; - break; - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!instance) - return; - - if (BreakKeg_Timer) - { - if (BreakKeg_Timer <= diff) - { - DoGo(DATA_GO_BAR_KEG, 0); - BreakKeg_Timer = 0; - BreakDoor_Timer = 1000; - } else BreakKeg_Timer -= diff; - } - - if (BreakDoor_Timer) - { - if (BreakDoor_Timer <= diff) - { - DoGo(DATA_GO_BAR_DOOR, 2); - DoGo(DATA_GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future - //spell by trap has effect61, this indicate the bar go hostile - - if (Unit* tmp = Unit::GetUnit(*me, instance->GetData64(DATA_PHALANX))) - tmp->setFaction(14); - - //for later, this event(s) has alot more to it. - //optionally, DONE can trigger bar to go hostile. - instance->SetData(TYPE_BAR, DONE); - - BreakDoor_Timer = 0; - } else BreakDoor_Timer -= diff; - } - - npc_escortAI::UpdateAI(diff); - } - }; -}; - -void AddSC_blackrock_depths() -{ - new go_shadowforge_brazier(); - new at_ring_of_law(); - new npc_grimstone(); - new npc_phalanx(); - new npc_kharan_mighthammer(); - new npc_lokhtos_darkbargainer(); - new npc_rocknot(); - // Fix us - /*new npc_dughal_stormwing(); - new npc_tobias_seecher(); - new npc_marshal_windsor(); - new npc_marshal_reginald_windsor(); - */ -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h deleted file mode 100644 index b279012bbf7..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2008-2013 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_BRD_H -#define DEF_BRD_H - -enum FactionIds -{ - FACTION_NEUTRAL = 734, - FACTION_HOSTILE = 754, - FACTION_FRIEND = 35 -}; - -enum DataTypes -{ - TYPE_RING_OF_LAW = 1, - TYPE_VAULT = 2, - TYPE_BAR = 3, - TYPE_TOMB_OF_SEVEN = 4, - TYPE_LYCEUM = 5, - TYPE_IRON_HALL = 6, - - DATA_EMPEROR = 10, - DATA_PHALANX = 11, - - DATA_ARENA1 = 12, - DATA_ARENA2 = 13, - DATA_ARENA3 = 14, - DATA_ARENA4 = 15, - - DATA_GO_BAR_KEG = 16, - DATA_GO_BAR_KEG_TRAP = 17, - DATA_GO_BAR_DOOR = 18, - DATA_GO_CHALICE = 19, - - DATA_GHOSTKILL = 20, - DATA_EVENSTARTER = 21, - - DATA_GOLEM_DOOR_N = 22, - DATA_GOLEM_DOOR_S = 23, - - DATA_THRONE_DOOR = 24, - - DATA_SF_BRAZIER_N = 25, - DATA_SF_BRAZIER_S = 26, - DATA_MOIRA = 27, -}; - -#endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp deleted file mode 100644 index 3a4f734429c..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" - -enum Spells -{ - SPELL_FIREBLAST = 15573 -}; - -class boss_ambassador_flamelash : public CreatureScript -{ -public: - boss_ambassador_flamelash() : CreatureScript("boss_ambassador_flamelash") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_ambassador_flamelashAI(creature); - } - - struct boss_ambassador_flamelashAI : public ScriptedAI - { - boss_ambassador_flamelashAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 FireBlast_Timer; - uint32 Spirit_Timer; - - void Reset() OVERRIDE - { - FireBlast_Timer = 2000; - Spirit_Timer = 24000; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void SummonSpirits(Unit* victim) - { - if (Creature* Spirit = DoSpawnCreature(9178, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) - Spirit->AI()->AttackStart(victim); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //FireBlast_Timer - if (FireBlast_Timer <= diff) - { - DoCastVictim(SPELL_FIREBLAST); - FireBlast_Timer = 7000; - } else FireBlast_Timer -= diff; - - //Spirit_Timer - if (Spirit_Timer <= diff) - { - SummonSpirits(me->GetVictim()); - SummonSpirits(me->GetVictim()); - SummonSpirits(me->GetVictim()); - SummonSpirits(me->GetVictim()); - - Spirit_Timer = 30000; - } else Spirit_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_ambassador_flamelash() -{ - new boss_ambassador_flamelash(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp deleted file mode 100644 index 63a94ca616a..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" - -enum Spells -{ - SPELL_SHADOWBOLT = 17228, - SPELL_CURSEOFTONGUES = 15470, - SPELL_CURSEOFWEAKNESS = 17227, - SPELL_DEMONARMOR = 11735, - SPELL_ENVELOPINGWEB = 15471 -}; - -class boss_anubshiah : public CreatureScript -{ -public: - boss_anubshiah() : CreatureScript("boss_anubshiah") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_anubshiahAI(creature); - } - - struct boss_anubshiahAI : public ScriptedAI - { - boss_anubshiahAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ShadowBolt_Timer; - uint32 CurseOfTongues_Timer; - uint32 CurseOfWeakness_Timer; - uint32 DemonArmor_Timer; - uint32 EnvelopingWeb_Timer; - - void Reset() OVERRIDE - { - ShadowBolt_Timer = 7000; - CurseOfTongues_Timer = 24000; - CurseOfWeakness_Timer = 12000; - DemonArmor_Timer = 3000; - EnvelopingWeb_Timer = 16000; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //ShadowBolt_Timer - if (ShadowBolt_Timer <= diff) - { - DoCastVictim(SPELL_SHADOWBOLT); - ShadowBolt_Timer = 7000; - } else ShadowBolt_Timer -= diff; - - //CurseOfTongues_Timer - if (CurseOfTongues_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_CURSEOFTONGUES); - CurseOfTongues_Timer = 18000; - } else CurseOfTongues_Timer -= diff; - - //CurseOfWeakness_Timer - if (CurseOfWeakness_Timer <= diff) - { - DoCastVictim(SPELL_CURSEOFWEAKNESS); - CurseOfWeakness_Timer = 45000; - } else CurseOfWeakness_Timer -= diff; - - //DemonArmor_Timer - if (DemonArmor_Timer <= diff) - { - DoCast(me, SPELL_DEMONARMOR); - DemonArmor_Timer = 300000; - } else DemonArmor_Timer -= diff; - - //EnvelopingWeb_Timer - if (EnvelopingWeb_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_ENVELOPINGWEB); - EnvelopingWeb_Timer = 12000; - } else EnvelopingWeb_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_anubshiah() -{ - new boss_anubshiah(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp deleted file mode 100644 index 25f93a2b6b7..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackrock_depths.h" - -enum Yells -{ - SAY_AGGRO = 0, - SAY_SLAY = 1 -}; - -enum Spells -{ - SPELL_HANDOFTHAURISSAN = 17492, - SPELL_AVATAROFFLAME = 15636 -}; - -class boss_emperor_dagran_thaurissan : public CreatureScript -{ -public: - boss_emperor_dagran_thaurissan() : CreatureScript("boss_emperor_dagran_thaurissan") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_draganthaurissanAI(creature); - } - - struct boss_draganthaurissanAI : public ScriptedAI - { - boss_draganthaurissanAI(Creature* creature) : ScriptedAI(creature) - { - instance = me->GetInstanceScript(); - } - - InstanceScript* instance; - uint32 HandOfThaurissan_Timer; - uint32 AvatarOfFlame_Timer; - //uint32 Counter; - - void Reset() OVERRIDE - { - HandOfThaurissan_Timer = 4000; - AvatarOfFlame_Timer = 25000; - //Counter= 0; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - Talk(SAY_AGGRO); - me->CallForHelp(VISIBLE_RANGE); - } - - void KilledUnit(Unit* /*victim*/) OVERRIDE - { - Talk(SAY_SLAY); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MOIRA) : 0)) - { - Moira->AI()->EnterEvadeMode(); - Moira->setFaction(35); - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - if (HandOfThaurissan_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_HANDOFTHAURISSAN); - - //3 Hands of Thaurissan will be casted - //if (Counter < 3) - //{ - // HandOfThaurissan_Timer = 1000; - // ++Counter; - //} - //else - //{ - HandOfThaurissan_Timer = 5000; - //Counter = 0; - //} - } else HandOfThaurissan_Timer -= diff; - - //AvatarOfFlame_Timer - if (AvatarOfFlame_Timer <= diff) - { - DoCastVictim(SPELL_AVATAROFFLAME); - AvatarOfFlame_Timer = 18000; - } else AvatarOfFlame_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_draganthaurissan() -{ - new boss_emperor_dagran_thaurissan(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp deleted file mode 100644 index 80bfa651301..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" - -enum Spells -{ - SPELL_MIGHTYBLOW = 14099, - SPELL_HAMSTRING = 9080, - SPELL_CLEAVE = 20691 -}; - -class boss_general_angerforge : public CreatureScript -{ -public: - boss_general_angerforge() : CreatureScript("boss_general_angerforge") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_general_angerforgeAI(creature); - } - - struct boss_general_angerforgeAI : public ScriptedAI - { - boss_general_angerforgeAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 MightyBlow_Timer; - uint32 HamString_Timer; - uint32 Cleave_Timer; - uint32 Adds_Timer; - bool Medics; - - void Reset() OVERRIDE - { - MightyBlow_Timer = 8000; - HamString_Timer = 12000; - Cleave_Timer = 16000; - Adds_Timer = 0; - Medics = false; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void SummonAdds(Unit* victim) - { - if (Creature* SummonedAdd = DoSpawnCreature(8901, float(irand(-14, 14)), float(irand(-14, 14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) - SummonedAdd->AI()->AttackStart(victim); - } - - void SummonMedics(Unit* victim) - { - if (Creature* SummonedMedic = DoSpawnCreature(8894, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) - SummonedMedic->AI()->AttackStart(victim); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //MightyBlow_Timer - if (MightyBlow_Timer <= diff) - { - DoCastVictim(SPELL_MIGHTYBLOW); - MightyBlow_Timer = 18000; - } else MightyBlow_Timer -= diff; - - //HamString_Timer - if (HamString_Timer <= diff) - { - DoCastVictim(SPELL_HAMSTRING); - HamString_Timer = 15000; - } else HamString_Timer -= diff; - - //Cleave_Timer - if (Cleave_Timer <= diff) - { - DoCastVictim(SPELL_CLEAVE); - Cleave_Timer = 9000; - } else Cleave_Timer -= diff; - - //Adds_Timer - if (HealthBelowPct(21)) - { - if (Adds_Timer <= diff) - { - // summon 3 Adds every 25s - SummonAdds(me->GetVictim()); - SummonAdds(me->GetVictim()); - SummonAdds(me->GetVictim()); - - Adds_Timer = 25000; - } else Adds_Timer -= diff; - } - - //Summon Medics - if (!Medics && HealthBelowPct(21)) - { - SummonMedics(me->GetVictim()); - SummonMedics(me->GetVictim()); - Medics = true; - } - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_general_angerforge() -{ - new boss_general_angerforge(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp deleted file mode 100644 index d79c4d191b6..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" - -enum Spells -{ - SPELL_WHIRLWIND = 15589, - SPELL_MORTALSTRIKE = 24573 -}; - -class boss_gorosh_the_dervish : public CreatureScript -{ -public: - boss_gorosh_the_dervish() : CreatureScript("boss_gorosh_the_dervish") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_gorosh_the_dervishAI(creature); - } - - struct boss_gorosh_the_dervishAI : public ScriptedAI - { - boss_gorosh_the_dervishAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 WhirlWind_Timer; - uint32 MortalStrike_Timer; - - void Reset() OVERRIDE - { - WhirlWind_Timer = 12000; - MortalStrike_Timer = 22000; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - } - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //WhirlWind_Timer - if (WhirlWind_Timer <= diff) - { - DoCast(me, SPELL_WHIRLWIND); - WhirlWind_Timer = 15000; - } else WhirlWind_Timer -= diff; - - //MortalStrike_Timer - if (MortalStrike_Timer <= diff) - { - DoCastVictim(SPELL_MORTALSTRIKE); - MortalStrike_Timer = 15000; - } else MortalStrike_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_gorosh_the_dervish() -{ - new boss_gorosh_the_dervish(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp deleted file mode 100644 index 504fca44c4c..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" - -enum Grizzle -{ - SPELL_GROUNDTREMOR = 6524, - SPELL_FRENZY = 28371, - EMOTE_FRENZY_KILL = 0 -}; - -class boss_grizzle : public CreatureScript -{ -public: - boss_grizzle() : CreatureScript("boss_grizzle") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_grizzleAI(creature); - } - - struct boss_grizzleAI : public ScriptedAI - { - boss_grizzleAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 GroundTremor_Timer; - uint32 Frenzy_Timer; - - void Reset() OVERRIDE - { - GroundTremor_Timer = 12000; - Frenzy_Timer =0; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //GroundTremor_Timer - if (GroundTremor_Timer <= diff) - { - DoCastVictim(SPELL_GROUNDTREMOR); - GroundTremor_Timer = 8000; - } else GroundTremor_Timer -= diff; - - //Frenzy_Timer - if (HealthBelowPct(51)) - { - if (Frenzy_Timer <= diff) - { - DoCast(me, SPELL_FRENZY); - Talk(EMOTE_FRENZY_KILL); - - Frenzy_Timer = 15000; - } else Frenzy_Timer -= diff; - } - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_grizzle() -{ - new boss_grizzle(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp deleted file mode 100644 index 7a98cc321dc..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" - -enum Spells -{ - SPELL_SHADOWWORDPAIN = 10894, - SPELL_MANABURN = 10876, - SPELL_PSYCHICSCREAM = 8122, - SPELL_SHADOWSHIELD = 22417 -}; - -class boss_high_interrogator_gerstahn : public CreatureScript -{ -public: - boss_high_interrogator_gerstahn() : CreatureScript("boss_high_interrogator_gerstahn") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_high_interrogator_gerstahnAI(creature); - } - - struct boss_high_interrogator_gerstahnAI : public ScriptedAI - { - boss_high_interrogator_gerstahnAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ShadowWordPain_Timer; - uint32 ManaBurn_Timer; - uint32 PsychicScream_Timer; - uint32 ShadowShield_Timer; - - void Reset() OVERRIDE - { - ShadowWordPain_Timer = 4000; - ManaBurn_Timer = 14000; - PsychicScream_Timer = 32000; - ShadowShield_Timer = 8000; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //ShadowWordPain_Timer - if (ShadowWordPain_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_SHADOWWORDPAIN); - ShadowWordPain_Timer = 7000; - } else ShadowWordPain_Timer -= diff; - - //ManaBurn_Timer - if (ManaBurn_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_MANABURN); - ManaBurn_Timer = 10000; - } else ManaBurn_Timer -= diff; - - //PsychicScream_Timer - if (PsychicScream_Timer <= diff) - { - DoCastVictim(SPELL_PSYCHICSCREAM); - PsychicScream_Timer = 30000; - } else PsychicScream_Timer -= diff; - - //ShadowShield_Timer - if (ShadowShield_Timer <= diff) - { - DoCast(me, SPELL_SHADOWSHIELD); - ShadowShield_Timer = 25000; - } else ShadowShield_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_high_interrogator_gerstahn() -{ - new boss_high_interrogator_gerstahn(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp deleted file mode 100644 index 998e7b17897..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" - -enum Spells -{ - SPELL_FIERYBURST = 13900, - SPELL_WARSTOMP = 24375 -}; - -enum Misc -{ - DATA_THRONE_DOOR = 24 // not id or guid of doors but number of enum in blackrock_depths.h -}; - -class boss_magmus : public CreatureScript -{ -public: - boss_magmus() : CreatureScript("boss_magmus") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_magmusAI(creature); - } - - struct boss_magmusAI : public ScriptedAI - { - boss_magmusAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 FieryBurst_Timer; - uint32 WarStomp_Timer; - - void Reset() OVERRIDE - { - FieryBurst_Timer = 5000; - WarStomp_Timer =0; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //FieryBurst_Timer - if (FieryBurst_Timer <= diff) - { - DoCastVictim(SPELL_FIERYBURST); - FieryBurst_Timer = 6000; - } else FieryBurst_Timer -= diff; - - //WarStomp_Timer - if (HealthBelowPct(51)) - { - if (WarStomp_Timer <= diff) - { - DoCastVictim(SPELL_WARSTOMP); - WarStomp_Timer = 8000; - } else WarStomp_Timer -= diff; - } - - DoMeleeAttackIfReady(); - } - // When he die open door to last chamber - void JustDied(Unit* killer) OVERRIDE - { - if (InstanceScript* instance = killer->GetInstanceScript()) - instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true); - } - }; -}; - -void AddSC_boss_magmus() -{ - new boss_magmus(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp deleted file mode 100644 index 9021649a61e..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" - -enum Spells -{ - SPELL_HEAL = 10917, - SPELL_RENEW = 10929, - SPELL_SHIELD = 10901, - SPELL_MINDBLAST = 10947, - SPELL_SHADOWWORDPAIN = 10894, - SPELL_SMITE = 10934 -}; - -class boss_moira_bronzebeard : public CreatureScript -{ -public: - boss_moira_bronzebeard() : CreatureScript("boss_moira_bronzebeard") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_moira_bronzebeardAI(creature); - } - - struct boss_moira_bronzebeardAI : public ScriptedAI - { - boss_moira_bronzebeardAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 Heal_Timer; - uint32 MindBlast_Timer; - uint32 ShadowWordPain_Timer; - uint32 Smite_Timer; - - void Reset() OVERRIDE - { - Heal_Timer = 12000; //These times are probably wrong - MindBlast_Timer = 16000; - ShadowWordPain_Timer = 2000; - Smite_Timer = 8000; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //MindBlast_Timer - if (MindBlast_Timer <= diff) - { - DoCastVictim(SPELL_MINDBLAST); - MindBlast_Timer = 14000; - } else MindBlast_Timer -= diff; - - //ShadowWordPain_Timer - if (ShadowWordPain_Timer <= diff) - { - DoCastVictim(SPELL_SHADOWWORDPAIN); - ShadowWordPain_Timer = 18000; - } else ShadowWordPain_Timer -= diff; - - //Smite_Timer - if (Smite_Timer <= diff) - { - DoCastVictim(SPELL_SMITE); - Smite_Timer = 10000; - } else Smite_Timer -= diff; - } - }; -}; - -void AddSC_boss_moira_bronzebeard() -{ - new boss_moira_bronzebeard(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp deleted file mode 100644 index 55e6862bda7..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "blackrock_depths.h" -#include "Player.h" - -enum Spells -{ - SPELL_SMELT_DARK_IRON = 14891, - SPELL_LEARN_SMELT = 14894, -}; - -enum Quests -{ - QUEST_SPECTRAL_CHALICE = 4083 -}; - -enum Misc -{ - DATA_SKILLPOINT_MIN = 230 -}; - -#define GOSSIP_ITEM_TEACH_1 "Teach me the art of smelting dark iron" -#define GOSSIP_ITEM_TEACH_2 "Continue..." -#define GOSSIP_ITEM_TEACH_3 "[PH] Continue..." -#define GOSSIP_ITEM_TRIBUTE "I want to pay tribute" - -class boss_gloomrel : public CreatureScript -{ -public: - boss_gloomrel() : CreatureScript("boss_gloomrel") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - player->SEND_GOSSIP_MENU(2606, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+11: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_LEARN_SMELT, false); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); - player->SEND_GOSSIP_MENU(2604, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+22: - player->CLOSE_GOSSIP_MENU(); - if (InstanceScript* instance = creature->GetInstanceScript()) - { - //are 5 minutes expected? go template may have data to despawn when used at quest - instance->DoRespawnGameObject(instance->GetData64(DATA_GO_CHALICE), MINUTE*5); - } - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - if (player->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 1 && player->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN && !player->HasSpell(SPELL_SMELT_DARK_IRON)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (player->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 0 && player->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } -}; - -enum DoomrelSpells -{ - SPELL_SHADOWBOLTVOLLEY = 15245, - SPELL_IMMOLATE = 12742, - SPELL_CURSEOFWEAKNESS = 12493, - SPELL_DEMONARMOR = 13787, - SPELL_SUMMON_VOIDWALKERS = 15092 -}; - -#define GOSSIP_ITEM_CHALLENGE "Your bondage is at an end, Doom'rel. I challenge you!" -#define GOSSIP_SELECT_DOOMREL "[PH] Continue..." - -class boss_doomrel : public CreatureScript -{ -public: - boss_doomrel() : CreatureScript("boss_doomrel") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_DOOMREL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->SEND_GOSSIP_MENU(2605, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->CLOSE_GOSSIP_MENU(); - //start event here - creature->setFaction(FACTION_HOSTILE); - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); - creature->AI()->AttackStart(player); - InstanceScript* instance = creature->GetInstanceScript(); - if (instance) - instance->SetData64(DATA_EVENSTARTER, player->GetGUID()); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(2601, creature->GetGUID()); - - return true; - } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_doomrelAI(creature); - } - - struct boss_doomrelAI : public ScriptedAI - { - boss_doomrelAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - } - - InstanceScript* instance; - uint32 ShadowVolley_Timer; - uint32 Immolate_Timer; - uint32 CurseOfWeakness_Timer; - uint32 DemonArmor_Timer; - bool Voidwalkers; - - void Reset() OVERRIDE - { - ShadowVolley_Timer = 10000; - Immolate_Timer = 18000; - CurseOfWeakness_Timer = 5000; - DemonArmor_Timer = 16000; - Voidwalkers = false; - - me->setFaction(FACTION_FRIEND); - - // was set before event start, so set again - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); - - if (instance) - { - if (instance->GetData(DATA_GHOSTKILL) >= 7) - me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); - else - me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - } - - void EnterEvadeMode() OVERRIDE - { - me->RemoveAllAuras(); - me->DeleteThreatList(); - me->CombatStop(true); - me->LoadCreaturesAddon(); - if (me->IsAlive()) - me->GetMotionMaster()->MoveTargetedHome(); - me->SetLootRecipient(NULL); - if (instance) - instance->SetData64(DATA_EVENSTARTER, 0); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - if (instance) - instance->SetData(DATA_GHOSTKILL, 1); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - //ShadowVolley_Timer - if (ShadowVolley_Timer <= diff) - { - DoCastVictim(SPELL_SHADOWBOLTVOLLEY); - ShadowVolley_Timer = 12000; - } else ShadowVolley_Timer -= diff; - - //Immolate_Timer - if (Immolate_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_IMMOLATE); - - Immolate_Timer = 25000; - } else Immolate_Timer -= diff; - - //CurseOfWeakness_Timer - if (CurseOfWeakness_Timer <= diff) - { - DoCastVictim(SPELL_CURSEOFWEAKNESS); - CurseOfWeakness_Timer = 45000; - } else CurseOfWeakness_Timer -= diff; - - //DemonArmor_Timer - if (DemonArmor_Timer <= diff) - { - DoCast(me, SPELL_DEMONARMOR); - DemonArmor_Timer = 300000; - } else DemonArmor_Timer -= diff; - - //Summon Voidwalkers - if (!Voidwalkers && HealthBelowPct(51)) - { - DoCastVictim(SPELL_SUMMON_VOIDWALKERS, true); - Voidwalkers = true; - } - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_tomb_of_seven() -{ - new boss_gloomrel(); - new boss_doomrel(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp deleted file mode 100644 index b9ff40f8285..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "InstanceScript.h" -#include "blackrock_depths.h" - -#define TIMER_TOMBOFTHESEVEN 15000 -#define MAX_ENCOUNTER 6 - -enum Creatures -{ - NPC_EMPEROR = 9019, - NPC_PHALANX = 9502, - NPC_ANGERREL = 9035, - NPC_DOPEREL = 9040, - NPC_HATEREL = 9034, - NPC_VILEREL = 9036, - NPC_SEETHREL = 9038, - NPC_GLOOMREL = 9037, - NPC_DOOMREL = 9039, - NPC_MAGMUS = 9938, - NPC_MOIRA = 8929 -}; - -enum GameObjects -{ - GO_ARENA1 = 161525, - GO_ARENA2 = 161522, - GO_ARENA3 = 161524, - GO_ARENA4 = 161523, - GO_SHADOW_LOCK = 161460, - GO_SHADOW_MECHANISM = 161461, - GO_SHADOW_GIANT_DOOR = 157923, - GO_SHADOW_DUMMY = 161516, - GO_BAR_KEG_SHOT = 170607, - GO_BAR_KEG_TRAP = 171941, - GO_BAR_DOOR = 170571, - GO_TOMB_ENTER = 170576, - GO_TOMB_EXIT = 170577, - GO_LYCEUM = 170558, - GO_SF_N = 174745, // Shadowforge Brazier North - GO_SF_S = 174744, // Shadowforge Brazier South - GO_GOLEM_ROOM_N = 170573, // Magmus door North - GO_GOLEM_ROOM_S = 170574, // Magmus door Soutsh - GO_THRONE_ROOM = 170575, // Throne door - GO_SPECTRAL_CHALICE = 164869, - GO_CHEST_SEVEN = 169243 -}; - -class instance_blackrock_depths : public InstanceMapScript -{ -public: - instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths", 230) { } - - InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE - { - return new instance_blackrock_depths_InstanceMapScript(map); - } - - struct instance_blackrock_depths_InstanceMapScript : public InstanceScript - { - instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map) {} - - uint32 encounter[MAX_ENCOUNTER]; - std::string str_data; - - uint64 EmperorGUID; - uint64 PhalanxGUID; - uint64 MagmusGUID; - uint64 MoiraGUID; - - uint64 GoArena1GUID; - uint64 GoArena2GUID; - uint64 GoArena3GUID; - uint64 GoArena4GUID; - uint64 GoShadowLockGUID; - uint64 GoShadowMechGUID; - uint64 GoShadowGiantGUID; - uint64 GoShadowDummyGUID; - uint64 GoBarKegGUID; - uint64 GoBarKegTrapGUID; - uint64 GoBarDoorGUID; - uint64 GoTombEnterGUID; - uint64 GoTombExitGUID; - uint64 GoLyceumGUID; - uint64 GoSFSGUID; - uint64 GoSFNGUID; - uint64 GoGolemNGUID; - uint64 GoGolemSGUID; - uint64 GoThroneGUID; - uint64 GoChestGUID; - uint64 GoSpectralChaliceGUID; - - uint32 BarAleCount; - uint32 GhostKillCount; - uint64 TombBossGUIDs[7]; - uint64 TombEventStarterGUID; - uint32 TombTimer; - uint32 TombEventCounter; - - void Initialize() - { - memset(&encounter, 0, sizeof(encounter)); - - EmperorGUID = 0; - PhalanxGUID = 0; - MagmusGUID = 0; - MoiraGUID = 0; - - GoArena1GUID = 0; - GoArena2GUID = 0; - GoArena3GUID = 0; - GoArena4GUID = 0; - GoShadowLockGUID = 0; - GoShadowMechGUID = 0; - GoShadowGiantGUID = 0; - GoShadowDummyGUID = 0; - GoBarKegGUID = 0; - GoBarKegTrapGUID = 0; - GoBarDoorGUID = 0; - GoTombEnterGUID = 0; - GoTombExitGUID = 0; - GoLyceumGUID = 0; - GoSFSGUID = 0; - GoSFNGUID = 0; - GoGolemNGUID = 0; - GoGolemSGUID = 0; - GoThroneGUID = 0; - GoChestGUID = 0; - GoSpectralChaliceGUID = 0; - - BarAleCount = 0; - GhostKillCount = 0; - TombEventStarterGUID = 0; - TombTimer = TIMER_TOMBOFTHESEVEN; - TombEventCounter = 0; - - for (uint8 i = 0; i < 7; ++i) - TombBossGUIDs[i] = 0; - } - - void OnCreatureCreate(Creature* creature) - { - switch (creature->GetEntry()) - { - case NPC_EMPEROR: EmperorGUID = creature->GetGUID(); break; - case NPC_PHALANX: PhalanxGUID = creature->GetGUID(); break; - case NPC_MOIRA: MoiraGUID = creature->GetGUID(); break; - case NPC_DOOMREL: TombBossGUIDs[0] = creature->GetGUID(); break; - case NPC_DOPEREL: TombBossGUIDs[1] = creature->GetGUID(); break; - case NPC_HATEREL: TombBossGUIDs[2] = creature->GetGUID(); break; - case NPC_VILEREL: TombBossGUIDs[3] = creature->GetGUID(); break; - case NPC_SEETHREL: TombBossGUIDs[4] = creature->GetGUID(); break; - case NPC_GLOOMREL: TombBossGUIDs[5] = creature->GetGUID(); break; - case NPC_ANGERREL: TombBossGUIDs[6] = creature->GetGUID(); break; - case NPC_MAGMUS: - MagmusGUID = creature->GetGUID(); - if (!creature->IsAlive()) - HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss - break; - } - } - - void OnGameObjectCreate(GameObject* go) - { - switch (go->GetEntry()) - { - case GO_ARENA1: GoArena1GUID = go->GetGUID(); break; - case GO_ARENA2: GoArena2GUID = go->GetGUID(); break; - case GO_ARENA3: GoArena3GUID = go->GetGUID(); break; - case GO_ARENA4: GoArena4GUID = go->GetGUID(); break; - case GO_SHADOW_LOCK: GoShadowLockGUID = go->GetGUID(); break; - case GO_SHADOW_MECHANISM: GoShadowMechGUID = go->GetGUID(); break; - case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = go->GetGUID(); break; - case GO_SHADOW_DUMMY: GoShadowDummyGUID = go->GetGUID(); break; - case GO_BAR_KEG_SHOT: GoBarKegGUID = go->GetGUID(); break; - case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = go->GetGUID(); break; - case GO_BAR_DOOR: GoBarDoorGUID = go->GetGUID(); break; - case GO_TOMB_ENTER: GoTombEnterGUID = go->GetGUID(); break; - case GO_TOMB_EXIT: - GoTombExitGUID = go->GetGUID(); - if (GhostKillCount >= 7) - HandleGameObject(0, true, go); - else - HandleGameObject(0, false, go); - break; - case GO_LYCEUM: GoLyceumGUID = go->GetGUID(); break; - case GO_SF_S: GoSFSGUID = go->GetGUID(); break; - case GO_SF_N: GoSFNGUID = go->GetGUID(); break; - case GO_GOLEM_ROOM_N: GoGolemNGUID = go->GetGUID(); break; - case GO_GOLEM_ROOM_S: GoGolemSGUID = go->GetGUID(); break; - case GO_THRONE_ROOM: GoThroneGUID = go->GetGUID(); break; - case GO_CHEST_SEVEN: GoChestGUID = go->GetGUID(); break; - case GO_SPECTRAL_CHALICE: GoSpectralChaliceGUID = go->GetGUID(); break; - } - } - - void SetData64(uint32 type, uint64 data) OVERRIDE - { - TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data); - - switch (type) - { - case DATA_EVENSTARTER: - TombEventStarterGUID = data; - if (!TombEventStarterGUID) - TombOfSevenReset();//reset - else - TombOfSevenStart();//start - break; - } - } - - void SetData(uint32 type, uint32 data) OVERRIDE - { - TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data); - - switch (type) - { - case TYPE_RING_OF_LAW: - encounter[0] = data; - break; - case TYPE_VAULT: - encounter[1] = data; - break; - case TYPE_BAR: - if (data == SPECIAL) - ++BarAleCount; - else - encounter[2] = data; - break; - case TYPE_TOMB_OF_SEVEN: - encounter[3] = data; - break; - case TYPE_LYCEUM: - encounter[4] = data; - break; - case TYPE_IRON_HALL: - encounter[5] = data; - break; - case DATA_GHOSTKILL: - GhostKillCount += data; - break; - } - - if (data == DONE || GhostKillCount >= 7) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << encounter[0] << ' ' << encounter[1] << ' ' << encounter[2] << ' ' - << encounter[3] << ' ' << encounter[4] << ' ' << encounter[5] << ' ' << GhostKillCount; - - str_data = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } - } - - uint32 GetData(uint32 type) const OVERRIDE - { - switch (type) - { - case TYPE_RING_OF_LAW: - return encounter[0]; - case TYPE_VAULT: - return encounter[1]; - case TYPE_BAR: - if (encounter[2] == IN_PROGRESS && BarAleCount == 3) - return SPECIAL; - else - return encounter[2]; - case TYPE_TOMB_OF_SEVEN: - return encounter[3]; - case TYPE_LYCEUM: - return encounter[4]; - case TYPE_IRON_HALL: - return encounter[5]; - case DATA_GHOSTKILL: - return GhostKillCount; - } - return 0; - } - - uint64 GetData64(uint32 data) const OVERRIDE - { - switch (data) - { - case DATA_EMPEROR: - return EmperorGUID; - case DATA_PHALANX: - return PhalanxGUID; - case DATA_MOIRA: - return MoiraGUID; - case DATA_ARENA1: - return GoArena1GUID; - case DATA_ARENA2: - return GoArena2GUID; - case DATA_ARENA3: - return GoArena3GUID; - case DATA_ARENA4: - return GoArena4GUID; - case DATA_GO_BAR_KEG: - return GoBarKegGUID; - case DATA_GO_BAR_KEG_TRAP: - return GoBarKegTrapGUID; - case DATA_GO_BAR_DOOR: - return GoBarDoorGUID; - case DATA_EVENSTARTER: - return TombEventStarterGUID; - case DATA_SF_BRAZIER_N: - return GoSFNGUID; - case DATA_SF_BRAZIER_S: - return GoSFSGUID; - case DATA_THRONE_DOOR: - return GoThroneGUID; - case DATA_GOLEM_DOOR_N: - return GoGolemNGUID; - case DATA_GOLEM_DOOR_S: - return GoGolemSGUID; - case DATA_GO_CHALICE: - return GoSpectralChaliceGUID; - } - return 0; - } - - std::string GetSaveData() - { - return str_data; - } - - void Load(const char* in) - { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(in); - - std::istringstream loadStream(in); - loadStream >> encounter[0] >> encounter[1] >> encounter[2] >> encounter[3] - >> encounter[4] >> encounter[5] >> GhostKillCount; - - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (encounter[i] == IN_PROGRESS) - encounter[i] = NOT_STARTED; - if (GhostKillCount > 0 && GhostKillCount < 7) - GhostKillCount = 0;//reset tomb of seven event - if (GhostKillCount >= 7) - GhostKillCount = 7; - - OUT_LOAD_INST_DATA_COMPLETE; - } - - void TombOfSevenEvent() - { - if (GhostKillCount < 7 && TombBossGUIDs[TombEventCounter]) - { - if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter])) - { - boss->setFaction(FACTION_HOSTILE); - boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); - if (Unit* target = boss->SelectNearestTarget(500)) - boss->AI()->AttackStart(target); - } - } - } - - void TombOfSevenReset() - { - HandleGameObject(GoTombExitGUID, false);//event reseted, close exit door - HandleGameObject(GoTombEnterGUID, true);//event reseted, open entrance door - for (uint8 i = 0; i < 7; ++i) - { - if (Creature* boss = instance->GetCreature(TombBossGUIDs[i])) - { - if (!boss->IsAlive()) - {//do not call EnterEvadeMode(), it will create infinit loops - boss->Respawn(); - boss->RemoveAllAuras(); - boss->DeleteThreatList(); - boss->CombatStop(true); - boss->LoadCreaturesAddon(); - boss->GetMotionMaster()->MoveTargetedHome(); - boss->SetLootRecipient(NULL); - } - boss->setFaction(FACTION_FRIEND); - } - } - GhostKillCount = 0; - TombEventStarterGUID = 0; - TombEventCounter = 0; - TombTimer = TIMER_TOMBOFTHESEVEN; - SetData(TYPE_TOMB_OF_SEVEN, NOT_STARTED); - } - - void TombOfSevenStart() - { - HandleGameObject(GoTombExitGUID, false);//event started, close exit door - HandleGameObject(GoTombEnterGUID, false);//event started, close entrance door - SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS); - } - - void TombOfSevenEnd() - { - DoRespawnGameObject(GoChestGUID, DAY); - HandleGameObject(GoTombExitGUID, true);//event done, open exit door - HandleGameObject(GoTombEnterGUID, true);//event done, open entrance door - TombEventStarterGUID = 0; - SetData(TYPE_TOMB_OF_SEVEN, DONE); - } - void Update(uint32 diff) - { - if (TombEventStarterGUID && GhostKillCount < 7) - { - if (TombTimer <= diff) - { - TombTimer = TIMER_TOMBOFTHESEVEN; - ++TombEventCounter; - TombOfSevenEvent(); - // Check Killed bosses - for (uint8 i = 0; i < 7; ++i) - { - if (Creature* boss = instance->GetCreature(TombBossGUIDs[i])) - { - if (!boss->IsAlive()) - { - GhostKillCount = i+1; - } - } - } - } else TombTimer -= diff; - } - if (GhostKillCount >= 7 && TombEventStarterGUID) - TombOfSevenEnd(); - } - }; -}; - -void AddSC_instance_blackrock_depths() -{ - new instance_blackrock_depths(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp new file mode 100644 index 00000000000..e9a6b15dcf8 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp @@ -0,0 +1,1350 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ScriptedCreature.h" +#include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" +#include "blackrock_depths.h" +#include "Player.h" +#include "WorldSession.h" + +//go_shadowforge_brazier +class go_shadowforge_brazier : public GameObjectScript +{ +public: + go_shadowforge_brazier() : GameObjectScript("go_shadowforge_brazier") { } + + bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE + { + if (InstanceScript* instance = go->GetInstanceScript()) + { + if (instance->GetData(TYPE_LYCEUM) == IN_PROGRESS) + instance->SetData(TYPE_LYCEUM, DONE); + else + instance->SetData(TYPE_LYCEUM, IN_PROGRESS); + // If used brazier open linked doors (North or South) + if (go->GetGUID() == instance->GetData64(DATA_SF_BRAZIER_N)) + instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_N), true); + else if (go->GetGUID() == instance->GetData64(DATA_SF_BRAZIER_S)) + instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_S), true); + } + return false; + } +}; + +// npc_grimstone +enum Grimstone +{ + NPC_GRIMSTONE = 10096, + NPC_THELDREN = 16059, + + //4 or 6 in total? 1+2+1 / 2+2+2 / 3+3. Depending on this, code should be changed. + MAX_NPC_AMOUNT = 4 +}; + +uint32 RingMob[]= +{ + 8925, // Dredge Worm + 8926, // Deep Stinger + 8927, // Dark Screecher + 8928, // Burrowing Thundersnout + 8933, // Cave Creeper + 8932, // Borer Beetle +}; + +uint32 RingBoss[]= +{ + 9027, // Gorosh + 9028, // Grizzle + 9029, // Eviscerator + 9030, // Ok'thor + 9031, // Anub'shiah + 9032, // Hedrum +}; + +class at_ring_of_law : public AreaTriggerScript +{ +public: + at_ring_of_law() : AreaTriggerScript("at_ring_of_law") { } + + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE + { + if (InstanceScript* instance = player->GetInstanceScript()) + { + if (instance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || instance->GetData(TYPE_RING_OF_LAW) == DONE) + return false; + + instance->SetData(TYPE_RING_OF_LAW, IN_PROGRESS); + player->SummonCreature(NPC_GRIMSTONE, 625.559f, -205.618f, -52.735f, 2.609f, TEMPSUMMON_DEAD_DESPAWN, 0); + + return false; + } + return false; + } +}; + +// npc_grimstone +enum GrimstoneTexts +{ + SAY_TEXT1 = 0, + SAY_TEXT2 = 1, + SAY_TEXT3 = 2, + SAY_TEXT4 = 3, + SAY_TEXT5 = 4, + SAY_TEXT6 = 5 +}; + +/// @todo implement quest part of event (different end boss) +class npc_grimstone : public CreatureScript +{ +public: + npc_grimstone() : CreatureScript("npc_grimstone") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_grimstoneAI(creature); + } + + struct npc_grimstoneAI : public npc_escortAI + { + npc_grimstoneAI(Creature* creature) : npc_escortAI(creature) + { + instance = creature->GetInstanceScript(); + MobSpawnId = rand()%6; + } + + InstanceScript* instance; + + uint8 EventPhase; + uint32 Event_Timer; + + uint8 MobSpawnId; + uint8 MobCount; + uint32 MobDeath_Timer; + + uint64 RingMobGUID[4]; + uint64 RingBossGUID; + + bool CanWalk; + + void Reset() OVERRIDE + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + EventPhase = 0; + Event_Timer = 1000; + + MobCount = 0; + MobDeath_Timer = 0; + + for (uint8 i = 0; i < MAX_NPC_AMOUNT; ++i) + RingMobGUID[i] = 0; + + RingBossGUID = 0; + + CanWalk = false; + } + + /// @todo move them to center + void SummonRingMob() + { + if (Creature* tmp = me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0)) + RingMobGUID[MobCount] = tmp->GetGUID(); + + ++MobCount; + + if (MobCount == MAX_NPC_AMOUNT) + MobDeath_Timer = 2500; + } + + /// @todo move them to center + void SummonRingBoss() + { + if (Creature* tmp = me->SummonCreature(RingBoss[rand()%6], 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0)) + RingBossGUID = tmp->GetGUID(); + + MobDeath_Timer = 2500; + } + + void WaypointReached(uint32 waypointId) OVERRIDE + { + switch (waypointId) + { + case 0: + Talk(SAY_TEXT1); + CanWalk = false; + Event_Timer = 5000; + break; + case 1: + Talk(SAY_TEXT2); + CanWalk = false; + Event_Timer = 5000; + break; + case 2: + CanWalk = false; + break; + case 3: + Talk(SAY_TEXT3); + break; + case 4: + Talk(SAY_TEXT4); + CanWalk = false; + Event_Timer = 5000; + break; + case 5: + if (instance) + { + instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me); + instance->SetData(TYPE_RING_OF_LAW, DONE); + TC_LOG_DEBUG(LOG_FILTER_TSCR, "npc_grimstone: event reached end and set complete."); + } + break; + } + } + + void HandleGameObject(uint32 id, bool open) + { + instance->HandleGameObject(instance->GetData64(id), open); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!instance) + return; + + if (MobDeath_Timer) + { + if (MobDeath_Timer <= diff) + { + MobDeath_Timer = 2500; + + if (RingBossGUID) + { + Creature* boss = Unit::GetCreature(*me, RingBossGUID); + if (boss && !boss->IsAlive() && boss->isDead()) + { + RingBossGUID = 0; + Event_Timer = 5000; + MobDeath_Timer = 0; + return; + } + return; + } + + for (uint8 i = 0; i < MAX_NPC_AMOUNT; ++i) + { + Creature* mob = Unit::GetCreature(*me, RingMobGUID[i]); + if (mob && !mob->IsAlive() && mob->isDead()) + { + RingMobGUID[i] = 0; + --MobCount; + + //seems all are gone, so set timer to continue and discontinue this + if (!MobCount) + { + Event_Timer = 5000; + MobDeath_Timer = 0; + } + } + } + } else MobDeath_Timer -= diff; + } + + if (Event_Timer) + { + if (Event_Timer <= diff) + { + switch (EventPhase) + { + case 0: + Talk(SAY_TEXT5); + HandleGameObject(DATA_ARENA4, false); + Start(false, false); + CanWalk = true; + Event_Timer = 0; + break; + case 1: + CanWalk = true; + Event_Timer = 0; + break; + case 2: + Event_Timer = 2000; + break; + case 3: + HandleGameObject(DATA_ARENA1, true); + Event_Timer = 3000; + break; + case 4: + CanWalk = true; + me->SetVisible(false); + SummonRingMob(); + Event_Timer = 8000; + break; + case 5: + SummonRingMob(); + SummonRingMob(); + Event_Timer = 8000; + break; + case 6: + SummonRingMob(); + Event_Timer = 0; + break; + case 7: + me->SetVisible(true); + HandleGameObject(DATA_ARENA1, false); + Talk(SAY_TEXT6); + CanWalk = true; + Event_Timer = 0; + break; + case 8: + HandleGameObject(DATA_ARENA2, true); + Event_Timer = 5000; + break; + case 9: + me->SetVisible(false); + SummonRingBoss(); + Event_Timer = 0; + break; + case 10: + //if quest, complete + HandleGameObject(DATA_ARENA2, false); + HandleGameObject(DATA_ARENA3, true); + HandleGameObject(DATA_ARENA4, true); + CanWalk = true; + Event_Timer = 0; + break; + } + ++EventPhase; + } else Event_Timer -= diff; + } + + if (CanWalk) + npc_escortAI::UpdateAI(diff); + } + }; +}; + +// npc_phalanx +enum PhalanxSpells +{ + SPELL_THUNDERCLAP = 8732, + SPELL_FIREBALLVOLLEY = 22425, + SPELL_MIGHTYBLOW = 14099 +}; + +class npc_phalanx : public CreatureScript +{ +public: + npc_phalanx() : CreatureScript("npc_phalanx") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_phalanxAI(creature); + } + + struct npc_phalanxAI : public ScriptedAI + { + npc_phalanxAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 ThunderClap_Timer; + uint32 FireballVolley_Timer; + uint32 MightyBlow_Timer; + + void Reset() OVERRIDE + { + ThunderClap_Timer = 12000; + FireballVolley_Timer = 0; + MightyBlow_Timer = 15000; + } + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //ThunderClap_Timer + if (ThunderClap_Timer <= diff) + { + DoCastVictim(SPELL_THUNDERCLAP); + ThunderClap_Timer = 10000; + } else ThunderClap_Timer -= diff; + + //FireballVolley_Timer + if (HealthBelowPct(51)) + { + if (FireballVolley_Timer <= diff) + { + DoCastVictim(SPELL_FIREBALLVOLLEY); + FireballVolley_Timer = 15000; + } else FireballVolley_Timer -= diff; + } + + //MightyBlow_Timer + if (MightyBlow_Timer <= diff) + { + DoCastVictim(SPELL_MIGHTYBLOW); + MightyBlow_Timer = 10000; + } else MightyBlow_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; +}; + +// npc_kharan_mighthammer +enum KharamQuests +{ + QUEST_4001 = 4001, + QUEST_4342 = 4342 +}; + +#define GOSSIP_ITEM_KHARAN_1 "I need to know where the princess are, Kharan!" +#define GOSSIP_ITEM_KHARAN_2 "All is not lost, Kharan!" +#define GOSSIP_ITEM_KHARAN_3 "Gor'shak is my friend, you can trust me." +#define GOSSIP_ITEM_KHARAN_4 "Not enough, you need to tell me more." +#define GOSSIP_ITEM_KHARAN_5 "So what happened?" +#define GOSSIP_ITEM_KHARAN_6 "Continue..." +#define GOSSIP_ITEM_KHARAN_7 "So you suspect that someone on the inside was involved? That they were tipped off?" +#define GOSSIP_ITEM_KHARAN_8 "Continue with your story please." +#define GOSSIP_ITEM_KHARAN_9 "Indeed." +#define GOSSIP_ITEM_KHARAN_10 "The door is open, Kharan. You are a free man." + +class npc_kharan_mighthammer : public CreatureScript +{ +public: + npc_kharan_mighthammer() : CreatureScript("npc_kharan_mighthammer") { } + + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE + { + player->PlayerTalkClass->ClearMenus(); + switch (action) + { + case GOSSIP_ACTION_INFO_DEF+1: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + player->SEND_GOSSIP_MENU(2475, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + player->SEND_GOSSIP_MENU(2476, creature->GetGUID()); + break; + + case GOSSIP_ACTION_INFO_DEF+3: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + player->SEND_GOSSIP_MENU(2477, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(2478, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + player->SEND_GOSSIP_MENU(2479, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + player->SEND_GOSSIP_MENU(2480, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); + player->SEND_GOSSIP_MENU(2481, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+8: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); + player->SEND_GOSSIP_MENU(2482, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+9: + player->CLOSE_GOSSIP_MENU(); + if (player->GetTeam() == HORDE) + player->AreaExploredOrEventHappens(QUEST_4001); + else + player->AreaExploredOrEventHappens(QUEST_4342); + break; + } + return true; + } + + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE + { + if (creature->IsQuestGiver()) + player->PrepareQuestMenu(creature->GetGUID()); + + if (player->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + if (player->GetQuestStatus(4342) == QUEST_STATUS_INCOMPLETE) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + if (player->GetTeam() == HORDE) + player->SEND_GOSSIP_MENU(2473, creature->GetGUID()); + else + player->SEND_GOSSIP_MENU(2474, creature->GetGUID()); + + return true; + } +}; + +// npc_lokhtos_darkbargainer +enum LokhtosItems +{ + ITEM_THRORIUM_BROTHERHOOD_CONTRACT = 18628, + ITEM_SULFURON_INGOT = 17203 +}; + +enum LokhtosQuests +{ + QUEST_A_BINDING_CONTRACT = 7604 +}; + +enum LokhtosSpells +{ + SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND = 23059 +}; + +#define GOSSIP_ITEM_SHOW_ACCESS "Show me what I have access to, Lothos." +#define GOSSIP_ITEM_GET_CONTRACT "Get Thorium Brotherhood Contract" + +class npc_lokhtos_darkbargainer : public CreatureScript +{ +public: + npc_lokhtos_darkbargainer() : CreatureScript("npc_lokhtos_darkbargainer") { } + + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE + { + player->PlayerTalkClass->ClearMenus(); + if (action == GOSSIP_ACTION_INFO_DEF + 1) + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false); + } + if (action == GOSSIP_ACTION_TRADE) + player->GetSession()->SendListInventory(creature->GetGUID()); + + return true; + } + + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE + { + if (creature->IsQuestGiver()) + player->PrepareQuestMenu(creature->GetGUID()); + + if (creature->IsVendor() && player->GetReputationRank(59) >= REP_FRIENDLY) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + if (player->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 && + !player->HasItemCount(ITEM_THRORIUM_BROTHERHOOD_CONTRACT, 1, true) && + player->HasItemCount(ITEM_SULFURON_INGOT)) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GET_CONTRACT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + if (player->GetReputationRank(59) < REP_FRIENDLY) + player->SEND_GOSSIP_MENU(3673, creature->GetGUID()); + else + player->SEND_GOSSIP_MENU(3677, creature->GetGUID()); + + return true; + } +}; + +// npc_dughal_stormwing +enum DughalQuests +{ + QUEST_JAIL_BREAK = 4322 +}; + +#define SAY_DUGHAL_FREE "Thank you, $N! I'm free!!!" +#define GOSSIP_DUGHAL "You're free, Dughal! Get out of here!" + +/* +class npc_dughal_stormwing : public CreatureScript +{ +public: + npc_dughal_stormwing() : CreatureScript("npc_dughal_stormwing") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + npc_dughal_stormwingAI* dughal_stormwingAI = new npc_dughal_stormwingAI(creature); + + dughal_stormwingAI->AddWaypoint(0, 280.42f, -82.86f, -77.12f, 0); + dughal_stormwingAI->AddWaypoint(1, 287.64f, -87.01f, -76.79f, 0); + dughal_stormwingAI->AddWaypoint(2, 354.63f, -64.95f, -67.53f, 0); + + return dughal_stormwingAI; + } + + bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) OVERRIDE + { + player->PlayerTalkClass->ClearMenus(); + if (action == GOSSIP_ACTION_INFO_DEF + 1) + { + player->CLOSE_GOSSIP_MENU(); + CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID()); + creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS); + } + return true; + } + + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE + { + if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->SEND_GOSSIP_MENU(2846, creature->GetGUID()); + } + return true; + } + + struct npc_dughal_stormwingAI : public npc_escortAI + { + npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) {} + + void WaypointReached(uint32 waypointId) OVERRIDE + { + switch (waypointId) + { + case 0: + me->Say(SAY_DUGHAL_FREE, LANG_UNIVERSAL, PlayerGUID); + break; + case 1: + instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_OBJECTIVE_COMPLETED); + break; + case 2: + me->SetVisible(false); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED); + break; + } + } + + void EnterCombat(Unit* who) OVERRIDE {} + void Reset() OVERRIDE {} + + void JustDied(Unit* killer) OVERRIDE + { + if (IsBeingEscorted && killer == me) + { + me->SetVisible(false); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED); + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return; + if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_ENDED) + { + me->SetVisible(false); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + else + { + me->SetVisible(true); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + npc_escortAI::UpdateAI(diff); + } + }; +}; + + */ + +// npc_marshal_windsor +#define SAY_WINDSOR_AGGRO1 "You locked up the wrong Marshal. Prepare to be destroyed!" +#define SAY_WINDSOR_AGGRO2 "I bet you're sorry now, aren't you !?!!" +#define SAY_WINDSOR_AGGRO3 "You better hold me back $N or they are going to feel some prison house beatings." +#define SAY_WINDSOR_1 "Let's get a move on. My gear should be in the storage area up this way..." +#define SAY_WINDSOR_4_1 "Check that cell, $N. If someone is alive in there, we need to get them out." +#define SAY_WINDSOR_4_2 "Get him out of there!" +#define SAY_WINDSOR_4_3 "Good work! We're almost there, $N. This way." +#define SAY_WINDSOR_6 "This is it, $N. My stuff should be in that room. Cover me, I'm going in!" +#define SAY_WINDSOR_9 "Ah, there it is!" + +enum MarshalWindsor +{ + NPC_REGINALD_WINDSOR = 9682 +}; + +/* +Player* playerStart; +class npc_marshal_windsor : public CreatureScript +{ +public: + npc_marshal_windsor() : CreatureScript("npc_marshal_windsor") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(creature); + + marshal_windsorAI->AddWaypoint(0, 316.336f, -225.528f, -77.7258f, 7000); + marshal_windsorAI->AddWaypoint(1, 316.336f, -225.528f, -77.7258f, 2000); + marshal_windsorAI->AddWaypoint(2, 322.96f, -207.13f, -77.87f, 0); + marshal_windsorAI->AddWaypoint(3, 281.05f, -172.16f, -75.12f, 0); + marshal_windsorAI->AddWaypoint(4, 272.19f, -139.14f, -70.61f, 0); + marshal_windsorAI->AddWaypoint(5, 283.62f, -116.09f, -70.21f, 0); + marshal_windsorAI->AddWaypoint(6, 296.18f, -94.30f, -74.08f, 0); + marshal_windsorAI->AddWaypoint(7, 294.57f, -93.11f, -74.08f, 0); + marshal_windsorAI->AddWaypoint(8, 314.31f, -74.31f, -76.09f, 0); + marshal_windsorAI->AddWaypoint(9, 360.22f, -62.93f, -66.77f, 0); + marshal_windsorAI->AddWaypoint(10, 383.38f, -69.40f, -63.25f, 0); + marshal_windsorAI->AddWaypoint(11, 389.99f, -67.86f, -62.57f, 0); + marshal_windsorAI->AddWaypoint(12, 400.98f, -72.01f, -62.31f, 0); + marshal_windsorAI->AddWaypoint(13, 404.22f, -62.30f, -63.50f, 2300); + marshal_windsorAI->AddWaypoint(14, 404.22f, -62.30f, -63.50f, 1500); + marshal_windsorAI->AddWaypoint(15, 407.65f, -51.86f, -63.96f, 0); + marshal_windsorAI->AddWaypoint(16, 403.61f, -51.71f, -63.92f, 1000); + marshal_windsorAI->AddWaypoint(17, 403.61f, -51.71f, -63.92f, 2000); + marshal_windsorAI->AddWaypoint(18, 403.61f, -51.71f, -63.92f, 1000); + marshal_windsorAI->AddWaypoint(19, 403.61f, -51.71f, -63.92f, 0); + + return marshal_windsorAI; + } + + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE + { + if (quest->GetQuestId() == 4322) + { + PlayerStart = player; + if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) + { + CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID()); + instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS); + creature->setFaction(11); + } + } + return false; + } + + struct npc_marshal_windsorAI : public npc_escortAI + { + npc_marshal_windsorAI(Creature* creature) : npc_escortAI(creature) + { + instance = creature->GetInstanceScript(); + } + + void WaypointReached(uint32 waypointId) OVERRIDE + { + switch (waypointId) + { + case 1: + me->Say(SAY_WINDSOR_1, LANG_UNIVERSAL, PlayerGUID); + break; + case 7: + me->HandleEmoteCommand(EMOTE_STATE_POINT); + me->Say(SAY_WINDSOR_4_1, LANG_UNIVERSAL, PlayerGUID); + IsOnHold = true; + break; + case 10: + me->setFaction(534); + break; + case 12: + me->Say(SAY_WINDSOR_6, LANG_UNIVERSAL, PlayerGUID); + instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_IN_PROGRESS); + break; + case 13: + me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK + break; + case 14: + instance->SetData(DATA_GATE_SR, 0); + me->setFaction(11); + break; + case 16: + me->Say(SAY_WINDSOR_9, LANG_UNIVERSAL, PlayerGUID); + break; + case 17: + me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK + break; + case 18: + instance->SetData(DATA_GATE_SC, 0); + break; + case 19: + me->SetVisible(false); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->SummonCreature(NPC_REGINALD_WINDSOR, 403.61f, -51.71f, -63.92f, 3.600434f, TEMPSUMMON_DEAD_DESPAWN, 0); + instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_ENDED); + break; + } + } + + void EnterCombat(Unit* who) OVERRIDE + { + switch (urand(0, 2)) + { + case 0: + me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); + break; + case 1: + me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); + break; + case 2: + me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID); + break; + } + } + + void Reset() OVERRIDE {} + + void JustDied(Unit* slayer) OVERRIDE + { + instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) + return; + + if (instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) + SetEscortPaused(false); + + if (!instance->GetData(DATA_GATE_D) && instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_NOT_STARTED) + { + me->Say(SAY_WINDSOR_4_2, LANG_UNIVERSAL, PlayerGUID); + instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_BEFORE_START); + } + if (instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) + { + me->Say(SAY_WINDSOR_4_3, LANG_UNIVERSAL, PlayerGUID); + instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED); + } + if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_SUPPLY_ROOM) == ENCOUNTER_STATE_ENDED) + { + me->SetVisible(false); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + else + { + me->SetVisible(true); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + npc_escortAI::UpdateAI(diff); + } + }; +}; + + */ + +// npc_marshal_reginald_windsor +#define SAY_REGINALD_WINDSOR_0_1 "Can you feel the power, $N??? It's time to ROCK!" +#define SAY_REGINALD_WINDSOR_0_2 "Now we just have to free Tobias and we can get out of here. This way!" +#define SAY_REGINALD_WINDSOR_5_1 "Open it." +#define SAY_REGINALD_WINDSOR_5_2 "I never did like those two. Let's get moving." +#define SAY_REGINALD_WINDSOR_7_1 "Open it and be careful this time!" +#define SAY_REGINALD_WINDSOR_7_2 "That intolerant dirtbag finally got what was coming to him. Good riddance!" +#define SAY_REGINALD_WINDSOR_7_3 "Alright, let's go." +#define SAY_REGINALD_WINDSOR_13_1 "Open it. We need to hurry up. I can smell those Dark Irons coming a mile away and I can tell you one thing, they're COMING!" +#define SAY_REGINALD_WINDSOR_13_2 "Administering fists of fury on Crest Killer!" +#define SAY_REGINALD_WINDSOR_13_3 "He has to be in the last cell. Unless... they killed him." +#define SAY_REGINALD_WINDSOR_14_1 "Get him out of there!" +#define SAY_REGINALD_WINDSOR_14_2 "Excellent work, $N. Let's find the exit. I think I know the way. Follow me!" +#define SAY_REGINALD_WINDSOR_20_1 "We made it!" +#define SAY_REGINALD_WINDSOR_20_2 "Meet me at Maxwell's encampment. We'll go over the next stages of the plan there and figure out a way to decode my tablets without the decryption ring." + +enum MarshalReginaldWindor +{ + NPC_SHILL_DINGER = 9678, + NPC_CREST_KILLER = 9680 +}; + +/* +int wp = 0; +class npc_marshal_reginald_windsor : public CreatureScript +{ +public: + npc_marshal_reginald_windsor() : CreatureScript("npc_marshal_reginald_windsor") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(creature); + + marshal_reginald_windsorAI->AddWaypoint(0, 403.61f, -52.71f, -63.92f, 4000); + marshal_reginald_windsorAI->AddWaypoint(1, 403.61f, -52.71f, -63.92f, 4000); + marshal_reginald_windsorAI->AddWaypoint(2, 406.33f, -54.87f, -63.95f, 0); + marshal_reginald_windsorAI->AddWaypoint(3, 407.99f, -73.91f, -62.26f, 0); + marshal_reginald_windsorAI->AddWaypoint(4, 557.03f, -119.71f, -61.83f, 0); + marshal_reginald_windsorAI->AddWaypoint(5, 573.40f, -124.39f, -65.07f, 0); + marshal_reginald_windsorAI->AddWaypoint(6, 593.91f, -130.29f, -69.25f, 0); + marshal_reginald_windsorAI->AddWaypoint(7, 593.21f, -132.16f, -69.25f, 0); + marshal_reginald_windsorAI->AddWaypoint(8, 593.21f, -132.16f, -69.25f, 3000); + marshal_reginald_windsorAI->AddWaypoint(9, 622.81f, -135.55f, -71.92f, 0); + marshal_reginald_windsorAI->AddWaypoint(10, 634.68f, -151.29f, -70.32f, 0); + marshal_reginald_windsorAI->AddWaypoint(11, 635.06f, -153.25f, -70.32f, 0); + marshal_reginald_windsorAI->AddWaypoint(12, 635.06f, -153.25f, -70.32f, 3000); + marshal_reginald_windsorAI->AddWaypoint(13, 635.06f, -153.25f, -70.32f, 1500); + marshal_reginald_windsorAI->AddWaypoint(14, 655.25f, -172.39f, -73.72f, 0); + marshal_reginald_windsorAI->AddWaypoint(15, 654.79f, -226.30f, -83.06f, 0); + marshal_reginald_windsorAI->AddWaypoint(16, 622.85f, -268.85f, -83.96f, 0); + marshal_reginald_windsorAI->AddWaypoint(17, 579.45f, -275.56f, -80.44f, 0); + marshal_reginald_windsorAI->AddWaypoint(18, 561.19f, -266.85f, -75.59f, 0); + marshal_reginald_windsorAI->AddWaypoint(19, 547.91f, -253.92f, -70.34f, 0); + marshal_reginald_windsorAI->AddWaypoint(20, 549.20f, -252.40f, -70.34f, 0); + marshal_reginald_windsorAI->AddWaypoint(21, 549.20f, -252.40f, -70.34f, 4000); + marshal_reginald_windsorAI->AddWaypoint(22, 555.33f, -269.16f, -74.40f, 0); + marshal_reginald_windsorAI->AddWaypoint(23, 554.31f, -270.88f, -74.40f, 0); + marshal_reginald_windsorAI->AddWaypoint(24, 554.31f, -270.88f, -74.40f, 4000); + marshal_reginald_windsorAI->AddWaypoint(25, 536.10f, -249.60f, -67.47f, 0); + marshal_reginald_windsorAI->AddWaypoint(26, 520.94f, -216.65f, -59.28f, 0); + marshal_reginald_windsorAI->AddWaypoint(27, 505.99f, -148.74f, -62.17f, 0); + marshal_reginald_windsorAI->AddWaypoint(28, 484.21f, -56.24f, -62.43f, 0); + marshal_reginald_windsorAI->AddWaypoint(29, 470.39f, -6.01f, -70.10f, 0); + marshal_reginald_windsorAI->AddWaypoint(30, 451.27f, 30.85f, -70.07f, 0); + marshal_reginald_windsorAI->AddWaypoint(31, 452.45f, 29.85f, -70.37f, 1500); + marshal_reginald_windsorAI->AddWaypoint(32, 452.45f, 29.85f, -70.37f, 7000); + marshal_reginald_windsorAI->AddWaypoint(33, 452.45f, 29.85f, -70.37f, 10000); + marshal_reginald_windsorAI->AddWaypoint(34, 451.27f, 31.85f, -70.07f, 0); + + return marshal_reginald_windsorAI; + } + + struct npc_marshal_reginald_windsorAI : public npc_escortAI + { + npc_marshal_reginald_windsorAI(Creature* creature) : npc_escortAI(creature) + { + } + + void WaypointReached(uint32 waypointId) OVERRIDE + { + wp = waypointId; + switch (waypointId) + { + case 0: + me->setFaction(11); + me->Say(SAY_REGINALD_WINDSOR_0_1, LANG_UNIVERSAL, PlayerGUID); + break; + case 1: + me->Say(SAY_REGINALD_WINDSOR_0_2, LANG_UNIVERSAL, PlayerGUID); + break; + case 7: + me->HandleEmoteCommand(EMOTE_STATE_POINT); + me->Say(SAY_REGINALD_WINDSOR_5_1, LANG_UNIVERSAL, PlayerGUID); + IsOnHold=true; + break; + case 8: + me->Say(SAY_REGINALD_WINDSOR_5_2, LANG_UNIVERSAL, PlayerGUID); + break; + case 11: + me->HandleEmoteCommand(EMOTE_STATE_POINT); + me->Say(SAY_REGINALD_WINDSOR_7_1, LANG_UNIVERSAL, PlayerGUID); + IsOnHold=true; + break; + case 12: + me->Say(SAY_REGINALD_WINDSOR_7_2, LANG_UNIVERSAL, PlayerGUID); + break; + case 13: + me->Say(SAY_REGINALD_WINDSOR_7_3, LANG_UNIVERSAL, PlayerGUID); + break; + case 20: + me->HandleEmoteCommand(EMOTE_STATE_POINT); + me->Say(SAY_REGINALD_WINDSOR_13_1, LANG_UNIVERSAL, PlayerGUID); + IsOnHold=true; + break; + case 21: + me->Say(SAY_REGINALD_WINDSOR_13_3, LANG_UNIVERSAL, PlayerGUID); + break; + case 23: + me->HandleEmoteCommand(EMOTE_STATE_POINT); + me->Say(SAY_REGINALD_WINDSOR_14_1, LANG_UNIVERSAL, PlayerGUID); + IsOnHold=true; + break; + case 24: + me->Say(SAY_REGINALD_WINDSOR_14_2, LANG_UNIVERSAL, PlayerGUID); + break; + case 31: + me->Say(SAY_REGINALD_WINDSOR_20_1, LANG_UNIVERSAL, PlayerGUID); + break; + case 32: + me->Say(SAY_REGINALD_WINDSOR_20_2, LANG_UNIVERSAL, PlayerGUID); + PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK, me); + instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED); + break; + } + } + + void MoveInLineOfSight(Unit* who) OVERRIDE + + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + if (Player* player = who->ToPlayer()) + { + if (player->GetQuestStatus(4322) == QUEST_STATUS_INCOMPLETE) + { + float Radius = 10.0f; + if (me->IsWithinDistInMap(who, Radius)) + { + SetEscortPaused(false); + Start(true, false, who->GetGUID()); + } + } + } + } + + void EnterCombat(Unit* who) OVERRIDE + { + switch (urand(0, 2)) + { + case 0: + me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); + break; + case 1: + me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); + break; + case 2: + me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID); + break; + } + } + void Reset() OVERRIDE {} + + void JustDied(Unit* slayer) OVERRIDE + { + instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) + return; + + if (wp == 7) + { + if (!instance->GetData(DATA_GATE_J) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED) + { + instance->SetData(DATA_NPC_JAZ, 1); + instance->SetData(DATA_JAZ, ENCOUNTER_STATE_IN_PROGRESS); + } + if (instance->GetData(DATA_NPC_JAZ) && instance->GetData(DATA_NPC_OGRABISI) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS) + { + SetEscortPaused(false); + instance->SetData(DATA_JAZ, ENCOUNTER_STATE_ENDED); + } + } + else if (wp == 11) + { + if (!instance->GetData(DATA_GATE_S) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED) + { + instance->SetData(DATA_NPC_SHILL, 1); + instance->SetData(DATA_SHILL, ENCOUNTER_STATE_IN_PROGRESS); + } + if (instance->GetData(DATA_NPC_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS) + { + instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED); + SetEscortPaused(false); + } + } + else if (wp == 20) + { + if (!instance->GetData(DATA_GATE_C) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED) + { + instance->SetData(DATA_NPC_CREST, 1); + me->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID); + instance->SetData(DATA_CREST, ENCOUNTER_STATE_IN_PROGRESS); + } + if (instance->GetData(DATA_NPC_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS) + { + SetEscortPaused(false); + instance->SetData(DATA_CREST, ENCOUNTER_STATE_ENDED); + } + } + if (instance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) SetEscortPaused(false); + npc_escortAI::UpdateAI(diff); + } + }; +}; +*/ + +// npc_tobias_seecher +#define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!" + +/* +class npc_tobias_seecher : public CreatureScript +{ +public: + npc_tobias_seecher() : CreatureScript("npc_tobias_seecher") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + npc_tobias_seecherAI* tobias_seecherAI = new npc_tobias_seecherAI(creature); + + tobias_seecherAI->AddWaypoint(0, 549.21f, -281.07f, -75.27f); + tobias_seecherAI->AddWaypoint(1, 554.39f, -267.39f, -73.68f); + tobias_seecherAI->AddWaypoint(2, 533.59f, -249.38f, -67.04f); + tobias_seecherAI->AddWaypoint(3, 519.44f, -217.02f, -59.34f); + tobias_seecherAI->AddWaypoint(4, 506.55f, -153.49f, -62.34f); + + return tobias_seecherAI; + } + + bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) OVERRIDE + { + player->PlayerTalkClass->ClearMenus(); + if (action == GOSSIP_ACTION_INFO_DEF + 1) + { + player->CLOSE_GOSSIP_MENU(); + CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID()); + creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_IN_PROGRESS); + } + return true; + } + + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE + { + if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Get out of here, Tobias, you're free!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->SEND_GOSSIP_MENU(2847, creature->GetGUID()); + } + return true; + } + + struct npc_tobias_seecherAI : public npc_escortAI + { + npc_tobias_seecherAI(Creature* creature) : npc_escortAI(creature) {} + + void EnterCombat(Unit* who) OVERRIDE {} + void Reset() OVERRIDE {} + + void JustDied(Unit* killer) OVERRIDE + { + if (IsBeingEscorted && killer == me) + { + me->SetVisible(false); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED); + } + } + + void WaypointReached(uint32 waypointId) OVERRIDE + { + switch (waypointId) + { + case 0: + me->Say(SAY_TOBIAS_FREE, LANG_UNIVERSAL, PlayerGUID); + break; + case 2: + instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_OBJECTIVE_COMPLETED); + break; + case 4: + me->SetVisible(false); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED); + break; + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) + return; + + if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_ENDED) + { + me->SetVisible(false); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + else + { + me->SetVisible(true); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + npc_escortAI::UpdateAI(diff); + } + }; +}; + +*/ + +// npc_rocknot +enum RocknotSays +{ + SAY_GOT_BEER = 0 +}; + +enum RocknotSpells +{ + SPELL_DRUNKEN_RAGE = 14872 +}; + +enum RocknotQuests +{ + QUEST_ALE = 4295 +}; + +class npc_rocknot : public CreatureScript +{ +public: + npc_rocknot() : CreatureScript("npc_rocknot") { } + + bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/) OVERRIDE + { + InstanceScript* instance = creature->GetInstanceScript(); + if (!instance) + return true; + + if (instance->GetData(TYPE_BAR) == DONE || instance->GetData(TYPE_BAR) == SPECIAL) + return true; + + if (quest->GetQuestId() == QUEST_ALE) + { + if (instance->GetData(TYPE_BAR) != IN_PROGRESS) + instance->SetData(TYPE_BAR, IN_PROGRESS); + + instance->SetData(TYPE_BAR, SPECIAL); + + //keep track of amount in instance script, returns SPECIAL if amount ok and event in progress + if (instance->GetData(TYPE_BAR) == SPECIAL) + { + creature->AI()->Talk(SAY_GOT_BEER); + creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false); + + if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI())) + escortAI->Start(false, false); + } + } + + return true; + } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_rocknotAI(creature); + } + + struct npc_rocknotAI : public npc_escortAI + { + npc_rocknotAI(Creature* creature) : npc_escortAI(creature) + { + instance = creature->GetInstanceScript(); + } + + InstanceScript* instance; + + uint32 BreakKeg_Timer; + uint32 BreakDoor_Timer; + + void Reset() OVERRIDE + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + BreakKeg_Timer = 0; + BreakDoor_Timer = 0; + } + + void DoGo(uint32 id, uint32 state) + { + if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(id))) + go->SetGoState((GOState)state); + } + + void WaypointReached(uint32 waypointId) OVERRIDE + { + if (!instance) + return; + + switch (waypointId) + { + case 1: + me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + break; + case 2: + me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); + break; + case 3: + me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); + break; + case 4: + me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + break; + case 5: + me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + BreakKeg_Timer = 2000; + break; + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!instance) + return; + + if (BreakKeg_Timer) + { + if (BreakKeg_Timer <= diff) + { + DoGo(DATA_GO_BAR_KEG, 0); + BreakKeg_Timer = 0; + BreakDoor_Timer = 1000; + } else BreakKeg_Timer -= diff; + } + + if (BreakDoor_Timer) + { + if (BreakDoor_Timer <= diff) + { + DoGo(DATA_GO_BAR_DOOR, 2); + DoGo(DATA_GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future + //spell by trap has effect61, this indicate the bar go hostile + + if (Unit* tmp = Unit::GetUnit(*me, instance->GetData64(DATA_PHALANX))) + tmp->setFaction(14); + + //for later, this event(s) has alot more to it. + //optionally, DONE can trigger bar to go hostile. + instance->SetData(TYPE_BAR, DONE); + + BreakDoor_Timer = 0; + } else BreakDoor_Timer -= diff; + } + + npc_escortAI::UpdateAI(diff); + } + }; +}; + +void AddSC_blackrock_depths() +{ + new go_shadowforge_brazier(); + new at_ring_of_law(); + new npc_grimstone(); + new npc_phalanx(); + new npc_kharan_mighthammer(); + new npc_lokhtos_darkbargainer(); + new npc_rocknot(); + // Fix us + /*new npc_dughal_stormwing(); + new npc_tobias_seecher(); + new npc_marshal_windsor(); + new npc_marshal_reginald_windsor(); + */ +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h new file mode 100644 index 00000000000..b279012bbf7 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2008-2013 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_BRD_H +#define DEF_BRD_H + +enum FactionIds +{ + FACTION_NEUTRAL = 734, + FACTION_HOSTILE = 754, + FACTION_FRIEND = 35 +}; + +enum DataTypes +{ + TYPE_RING_OF_LAW = 1, + TYPE_VAULT = 2, + TYPE_BAR = 3, + TYPE_TOMB_OF_SEVEN = 4, + TYPE_LYCEUM = 5, + TYPE_IRON_HALL = 6, + + DATA_EMPEROR = 10, + DATA_PHALANX = 11, + + DATA_ARENA1 = 12, + DATA_ARENA2 = 13, + DATA_ARENA3 = 14, + DATA_ARENA4 = 15, + + DATA_GO_BAR_KEG = 16, + DATA_GO_BAR_KEG_TRAP = 17, + DATA_GO_BAR_DOOR = 18, + DATA_GO_CHALICE = 19, + + DATA_GHOSTKILL = 20, + DATA_EVENSTARTER = 21, + + DATA_GOLEM_DOOR_N = 22, + DATA_GOLEM_DOOR_S = 23, + + DATA_THRONE_DOOR = 24, + + DATA_SF_BRAZIER_N = 25, + DATA_SF_BRAZIER_S = 26, + DATA_MOIRA = 27, +}; + +#endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp new file mode 100644 index 00000000000..3a4f734429c --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" + +enum Spells +{ + SPELL_FIREBLAST = 15573 +}; + +class boss_ambassador_flamelash : public CreatureScript +{ +public: + boss_ambassador_flamelash() : CreatureScript("boss_ambassador_flamelash") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_ambassador_flamelashAI(creature); + } + + struct boss_ambassador_flamelashAI : public ScriptedAI + { + boss_ambassador_flamelashAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 FireBlast_Timer; + uint32 Spirit_Timer; + + void Reset() OVERRIDE + { + FireBlast_Timer = 2000; + Spirit_Timer = 24000; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void SummonSpirits(Unit* victim) + { + if (Creature* Spirit = DoSpawnCreature(9178, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) + Spirit->AI()->AttackStart(victim); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //FireBlast_Timer + if (FireBlast_Timer <= diff) + { + DoCastVictim(SPELL_FIREBLAST); + FireBlast_Timer = 7000; + } else FireBlast_Timer -= diff; + + //Spirit_Timer + if (Spirit_Timer <= diff) + { + SummonSpirits(me->GetVictim()); + SummonSpirits(me->GetVictim()); + SummonSpirits(me->GetVictim()); + SummonSpirits(me->GetVictim()); + + Spirit_Timer = 30000; + } else Spirit_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_ambassador_flamelash() +{ + new boss_ambassador_flamelash(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp new file mode 100644 index 00000000000..63a94ca616a --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" + +enum Spells +{ + SPELL_SHADOWBOLT = 17228, + SPELL_CURSEOFTONGUES = 15470, + SPELL_CURSEOFWEAKNESS = 17227, + SPELL_DEMONARMOR = 11735, + SPELL_ENVELOPINGWEB = 15471 +}; + +class boss_anubshiah : public CreatureScript +{ +public: + boss_anubshiah() : CreatureScript("boss_anubshiah") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_anubshiahAI(creature); + } + + struct boss_anubshiahAI : public ScriptedAI + { + boss_anubshiahAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 ShadowBolt_Timer; + uint32 CurseOfTongues_Timer; + uint32 CurseOfWeakness_Timer; + uint32 DemonArmor_Timer; + uint32 EnvelopingWeb_Timer; + + void Reset() OVERRIDE + { + ShadowBolt_Timer = 7000; + CurseOfTongues_Timer = 24000; + CurseOfWeakness_Timer = 12000; + DemonArmor_Timer = 3000; + EnvelopingWeb_Timer = 16000; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //ShadowBolt_Timer + if (ShadowBolt_Timer <= diff) + { + DoCastVictim(SPELL_SHADOWBOLT); + ShadowBolt_Timer = 7000; + } else ShadowBolt_Timer -= diff; + + //CurseOfTongues_Timer + if (CurseOfTongues_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_CURSEOFTONGUES); + CurseOfTongues_Timer = 18000; + } else CurseOfTongues_Timer -= diff; + + //CurseOfWeakness_Timer + if (CurseOfWeakness_Timer <= diff) + { + DoCastVictim(SPELL_CURSEOFWEAKNESS); + CurseOfWeakness_Timer = 45000; + } else CurseOfWeakness_Timer -= diff; + + //DemonArmor_Timer + if (DemonArmor_Timer <= diff) + { + DoCast(me, SPELL_DEMONARMOR); + DemonArmor_Timer = 300000; + } else DemonArmor_Timer -= diff; + + //EnvelopingWeb_Timer + if (EnvelopingWeb_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_ENVELOPINGWEB); + EnvelopingWeb_Timer = 12000; + } else EnvelopingWeb_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_anubshiah() +{ + new boss_anubshiah(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp new file mode 100644 index 00000000000..25f93a2b6b7 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackrock_depths.h" + +enum Yells +{ + SAY_AGGRO = 0, + SAY_SLAY = 1 +}; + +enum Spells +{ + SPELL_HANDOFTHAURISSAN = 17492, + SPELL_AVATAROFFLAME = 15636 +}; + +class boss_emperor_dagran_thaurissan : public CreatureScript +{ +public: + boss_emperor_dagran_thaurissan() : CreatureScript("boss_emperor_dagran_thaurissan") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_draganthaurissanAI(creature); + } + + struct boss_draganthaurissanAI : public ScriptedAI + { + boss_draganthaurissanAI(Creature* creature) : ScriptedAI(creature) + { + instance = me->GetInstanceScript(); + } + + InstanceScript* instance; + uint32 HandOfThaurissan_Timer; + uint32 AvatarOfFlame_Timer; + //uint32 Counter; + + void Reset() OVERRIDE + { + HandOfThaurissan_Timer = 4000; + AvatarOfFlame_Timer = 25000; + //Counter= 0; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + Talk(SAY_AGGRO); + me->CallForHelp(VISIBLE_RANGE); + } + + void KilledUnit(Unit* /*victim*/) OVERRIDE + { + Talk(SAY_SLAY); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MOIRA) : 0)) + { + Moira->AI()->EnterEvadeMode(); + Moira->setFaction(35); + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + if (HandOfThaurissan_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_HANDOFTHAURISSAN); + + //3 Hands of Thaurissan will be casted + //if (Counter < 3) + //{ + // HandOfThaurissan_Timer = 1000; + // ++Counter; + //} + //else + //{ + HandOfThaurissan_Timer = 5000; + //Counter = 0; + //} + } else HandOfThaurissan_Timer -= diff; + + //AvatarOfFlame_Timer + if (AvatarOfFlame_Timer <= diff) + { + DoCastVictim(SPELL_AVATAROFFLAME); + AvatarOfFlame_Timer = 18000; + } else AvatarOfFlame_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_draganthaurissan() +{ + new boss_emperor_dagran_thaurissan(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp new file mode 100644 index 00000000000..80bfa651301 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" + +enum Spells +{ + SPELL_MIGHTYBLOW = 14099, + SPELL_HAMSTRING = 9080, + SPELL_CLEAVE = 20691 +}; + +class boss_general_angerforge : public CreatureScript +{ +public: + boss_general_angerforge() : CreatureScript("boss_general_angerforge") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_general_angerforgeAI(creature); + } + + struct boss_general_angerforgeAI : public ScriptedAI + { + boss_general_angerforgeAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 MightyBlow_Timer; + uint32 HamString_Timer; + uint32 Cleave_Timer; + uint32 Adds_Timer; + bool Medics; + + void Reset() OVERRIDE + { + MightyBlow_Timer = 8000; + HamString_Timer = 12000; + Cleave_Timer = 16000; + Adds_Timer = 0; + Medics = false; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void SummonAdds(Unit* victim) + { + if (Creature* SummonedAdd = DoSpawnCreature(8901, float(irand(-14, 14)), float(irand(-14, 14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) + SummonedAdd->AI()->AttackStart(victim); + } + + void SummonMedics(Unit* victim) + { + if (Creature* SummonedMedic = DoSpawnCreature(8894, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) + SummonedMedic->AI()->AttackStart(victim); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //MightyBlow_Timer + if (MightyBlow_Timer <= diff) + { + DoCastVictim(SPELL_MIGHTYBLOW); + MightyBlow_Timer = 18000; + } else MightyBlow_Timer -= diff; + + //HamString_Timer + if (HamString_Timer <= diff) + { + DoCastVictim(SPELL_HAMSTRING); + HamString_Timer = 15000; + } else HamString_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer <= diff) + { + DoCastVictim(SPELL_CLEAVE); + Cleave_Timer = 9000; + } else Cleave_Timer -= diff; + + //Adds_Timer + if (HealthBelowPct(21)) + { + if (Adds_Timer <= diff) + { + // summon 3 Adds every 25s + SummonAdds(me->GetVictim()); + SummonAdds(me->GetVictim()); + SummonAdds(me->GetVictim()); + + Adds_Timer = 25000; + } else Adds_Timer -= diff; + } + + //Summon Medics + if (!Medics && HealthBelowPct(21)) + { + SummonMedics(me->GetVictim()); + SummonMedics(me->GetVictim()); + Medics = true; + } + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_general_angerforge() +{ + new boss_general_angerforge(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp new file mode 100644 index 00000000000..d79c4d191b6 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" + +enum Spells +{ + SPELL_WHIRLWIND = 15589, + SPELL_MORTALSTRIKE = 24573 +}; + +class boss_gorosh_the_dervish : public CreatureScript +{ +public: + boss_gorosh_the_dervish() : CreatureScript("boss_gorosh_the_dervish") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_gorosh_the_dervishAI(creature); + } + + struct boss_gorosh_the_dervishAI : public ScriptedAI + { + boss_gorosh_the_dervishAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 WhirlWind_Timer; + uint32 MortalStrike_Timer; + + void Reset() OVERRIDE + { + WhirlWind_Timer = 12000; + MortalStrike_Timer = 22000; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + } + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //WhirlWind_Timer + if (WhirlWind_Timer <= diff) + { + DoCast(me, SPELL_WHIRLWIND); + WhirlWind_Timer = 15000; + } else WhirlWind_Timer -= diff; + + //MortalStrike_Timer + if (MortalStrike_Timer <= diff) + { + DoCastVictim(SPELL_MORTALSTRIKE); + MortalStrike_Timer = 15000; + } else MortalStrike_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_gorosh_the_dervish() +{ + new boss_gorosh_the_dervish(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp new file mode 100644 index 00000000000..504fca44c4c --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" + +enum Grizzle +{ + SPELL_GROUNDTREMOR = 6524, + SPELL_FRENZY = 28371, + EMOTE_FRENZY_KILL = 0 +}; + +class boss_grizzle : public CreatureScript +{ +public: + boss_grizzle() : CreatureScript("boss_grizzle") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_grizzleAI(creature); + } + + struct boss_grizzleAI : public ScriptedAI + { + boss_grizzleAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 GroundTremor_Timer; + uint32 Frenzy_Timer; + + void Reset() OVERRIDE + { + GroundTremor_Timer = 12000; + Frenzy_Timer =0; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //GroundTremor_Timer + if (GroundTremor_Timer <= diff) + { + DoCastVictim(SPELL_GROUNDTREMOR); + GroundTremor_Timer = 8000; + } else GroundTremor_Timer -= diff; + + //Frenzy_Timer + if (HealthBelowPct(51)) + { + if (Frenzy_Timer <= diff) + { + DoCast(me, SPELL_FRENZY); + Talk(EMOTE_FRENZY_KILL); + + Frenzy_Timer = 15000; + } else Frenzy_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_grizzle() +{ + new boss_grizzle(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp new file mode 100644 index 00000000000..7a98cc321dc --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" + +enum Spells +{ + SPELL_SHADOWWORDPAIN = 10894, + SPELL_MANABURN = 10876, + SPELL_PSYCHICSCREAM = 8122, + SPELL_SHADOWSHIELD = 22417 +}; + +class boss_high_interrogator_gerstahn : public CreatureScript +{ +public: + boss_high_interrogator_gerstahn() : CreatureScript("boss_high_interrogator_gerstahn") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_high_interrogator_gerstahnAI(creature); + } + + struct boss_high_interrogator_gerstahnAI : public ScriptedAI + { + boss_high_interrogator_gerstahnAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 ShadowWordPain_Timer; + uint32 ManaBurn_Timer; + uint32 PsychicScream_Timer; + uint32 ShadowShield_Timer; + + void Reset() OVERRIDE + { + ShadowWordPain_Timer = 4000; + ManaBurn_Timer = 14000; + PsychicScream_Timer = 32000; + ShadowShield_Timer = 8000; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //ShadowWordPain_Timer + if (ShadowWordPain_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_SHADOWWORDPAIN); + ShadowWordPain_Timer = 7000; + } else ShadowWordPain_Timer -= diff; + + //ManaBurn_Timer + if (ManaBurn_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_MANABURN); + ManaBurn_Timer = 10000; + } else ManaBurn_Timer -= diff; + + //PsychicScream_Timer + if (PsychicScream_Timer <= diff) + { + DoCastVictim(SPELL_PSYCHICSCREAM); + PsychicScream_Timer = 30000; + } else PsychicScream_Timer -= diff; + + //ShadowShield_Timer + if (ShadowShield_Timer <= diff) + { + DoCast(me, SPELL_SHADOWSHIELD); + ShadowShield_Timer = 25000; + } else ShadowShield_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_high_interrogator_gerstahn() +{ + new boss_high_interrogator_gerstahn(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp new file mode 100644 index 00000000000..998e7b17897 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" + +enum Spells +{ + SPELL_FIERYBURST = 13900, + SPELL_WARSTOMP = 24375 +}; + +enum Misc +{ + DATA_THRONE_DOOR = 24 // not id or guid of doors but number of enum in blackrock_depths.h +}; + +class boss_magmus : public CreatureScript +{ +public: + boss_magmus() : CreatureScript("boss_magmus") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_magmusAI(creature); + } + + struct boss_magmusAI : public ScriptedAI + { + boss_magmusAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 FieryBurst_Timer; + uint32 WarStomp_Timer; + + void Reset() OVERRIDE + { + FieryBurst_Timer = 5000; + WarStomp_Timer =0; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //FieryBurst_Timer + if (FieryBurst_Timer <= diff) + { + DoCastVictim(SPELL_FIERYBURST); + FieryBurst_Timer = 6000; + } else FieryBurst_Timer -= diff; + + //WarStomp_Timer + if (HealthBelowPct(51)) + { + if (WarStomp_Timer <= diff) + { + DoCastVictim(SPELL_WARSTOMP); + WarStomp_Timer = 8000; + } else WarStomp_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } + // When he die open door to last chamber + void JustDied(Unit* killer) OVERRIDE + { + if (InstanceScript* instance = killer->GetInstanceScript()) + instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true); + } + }; +}; + +void AddSC_boss_magmus() +{ + new boss_magmus(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp new file mode 100644 index 00000000000..9021649a61e --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" + +enum Spells +{ + SPELL_HEAL = 10917, + SPELL_RENEW = 10929, + SPELL_SHIELD = 10901, + SPELL_MINDBLAST = 10947, + SPELL_SHADOWWORDPAIN = 10894, + SPELL_SMITE = 10934 +}; + +class boss_moira_bronzebeard : public CreatureScript +{ +public: + boss_moira_bronzebeard() : CreatureScript("boss_moira_bronzebeard") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_moira_bronzebeardAI(creature); + } + + struct boss_moira_bronzebeardAI : public ScriptedAI + { + boss_moira_bronzebeardAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 Heal_Timer; + uint32 MindBlast_Timer; + uint32 ShadowWordPain_Timer; + uint32 Smite_Timer; + + void Reset() OVERRIDE + { + Heal_Timer = 12000; //These times are probably wrong + MindBlast_Timer = 16000; + ShadowWordPain_Timer = 2000; + Smite_Timer = 8000; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void UpdateAI(uint32 diff) OVERRIDE + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //MindBlast_Timer + if (MindBlast_Timer <= diff) + { + DoCastVictim(SPELL_MINDBLAST); + MindBlast_Timer = 14000; + } else MindBlast_Timer -= diff; + + //ShadowWordPain_Timer + if (ShadowWordPain_Timer <= diff) + { + DoCastVictim(SPELL_SHADOWWORDPAIN); + ShadowWordPain_Timer = 18000; + } else ShadowWordPain_Timer -= diff; + + //Smite_Timer + if (Smite_Timer <= diff) + { + DoCastVictim(SPELL_SMITE); + Smite_Timer = 10000; + } else Smite_Timer -= diff; + } + }; +}; + +void AddSC_boss_moira_bronzebeard() +{ + new boss_moira_bronzebeard(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp new file mode 100644 index 00000000000..55e6862bda7 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp @@ -0,0 +1,256 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "blackrock_depths.h" +#include "Player.h" + +enum Spells +{ + SPELL_SMELT_DARK_IRON = 14891, + SPELL_LEARN_SMELT = 14894, +}; + +enum Quests +{ + QUEST_SPECTRAL_CHALICE = 4083 +}; + +enum Misc +{ + DATA_SKILLPOINT_MIN = 230 +}; + +#define GOSSIP_ITEM_TEACH_1 "Teach me the art of smelting dark iron" +#define GOSSIP_ITEM_TEACH_2 "Continue..." +#define GOSSIP_ITEM_TEACH_3 "[PH] Continue..." +#define GOSSIP_ITEM_TRIBUTE "I want to pay tribute" + +class boss_gloomrel : public CreatureScript +{ +public: + boss_gloomrel() : CreatureScript("boss_gloomrel") { } + + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE + { + player->PlayerTalkClass->ClearMenus(); + switch (action) + { + case GOSSIP_ACTION_INFO_DEF+1: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + player->SEND_GOSSIP_MENU(2606, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+11: + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player, SPELL_LEARN_SMELT, false); + break; + case GOSSIP_ACTION_INFO_DEF+2: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); + player->SEND_GOSSIP_MENU(2604, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+22: + player->CLOSE_GOSSIP_MENU(); + if (InstanceScript* instance = creature->GetInstanceScript()) + { + //are 5 minutes expected? go template may have data to despawn when used at quest + instance->DoRespawnGameObject(instance->GetData64(DATA_GO_CHALICE), MINUTE*5); + } + break; + } + return true; + } + + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE + { + if (player->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 1 && player->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN && !player->HasSpell(SPELL_SMELT_DARK_IRON)) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + if (player->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 0 && player->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + + player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); + return true; + } +}; + +enum DoomrelSpells +{ + SPELL_SHADOWBOLTVOLLEY = 15245, + SPELL_IMMOLATE = 12742, + SPELL_CURSEOFWEAKNESS = 12493, + SPELL_DEMONARMOR = 13787, + SPELL_SUMMON_VOIDWALKERS = 15092 +}; + +#define GOSSIP_ITEM_CHALLENGE "Your bondage is at an end, Doom'rel. I challenge you!" +#define GOSSIP_SELECT_DOOMREL "[PH] Continue..." + +class boss_doomrel : public CreatureScript +{ +public: + boss_doomrel() : CreatureScript("boss_doomrel") { } + + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE + { + player->PlayerTalkClass->ClearMenus(); + switch (action) + { + case GOSSIP_ACTION_INFO_DEF+1: + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_DOOMREL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + player->SEND_GOSSIP_MENU(2605, creature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + player->CLOSE_GOSSIP_MENU(); + //start event here + creature->setFaction(FACTION_HOSTILE); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + creature->AI()->AttackStart(player); + InstanceScript* instance = creature->GetInstanceScript(); + if (instance) + instance->SetData64(DATA_EVENSTARTER, player->GetGUID()); + break; + } + return true; + } + + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->SEND_GOSSIP_MENU(2601, creature->GetGUID()); + + return true; + } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_doomrelAI(creature); + } + + struct boss_doomrelAI : public ScriptedAI + { + boss_doomrelAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + InstanceScript* instance; + uint32 ShadowVolley_Timer; + uint32 Immolate_Timer; + uint32 CurseOfWeakness_Timer; + uint32 DemonArmor_Timer; + bool Voidwalkers; + + void Reset() OVERRIDE + { + ShadowVolley_Timer = 10000; + Immolate_Timer = 18000; + CurseOfWeakness_Timer = 5000; + DemonArmor_Timer = 16000; + Voidwalkers = false; + + me->setFaction(FACTION_FRIEND); + + // was set before event start, so set again + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + + if (instance) + { + if (instance->GetData(DATA_GHOSTKILL) >= 7) + me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + else + me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + } + + void EnterEvadeMode() OVERRIDE + { + me->RemoveAllAuras(); + me->DeleteThreatList(); + me->CombatStop(true); + me->LoadCreaturesAddon(); + if (me->IsAlive()) + me->GetMotionMaster()->MoveTargetedHome(); + me->SetLootRecipient(NULL); + if (instance) + instance->SetData64(DATA_EVENSTARTER, 0); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + if (instance) + instance->SetData(DATA_GHOSTKILL, 1); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + //ShadowVolley_Timer + if (ShadowVolley_Timer <= diff) + { + DoCastVictim(SPELL_SHADOWBOLTVOLLEY); + ShadowVolley_Timer = 12000; + } else ShadowVolley_Timer -= diff; + + //Immolate_Timer + if (Immolate_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_IMMOLATE); + + Immolate_Timer = 25000; + } else Immolate_Timer -= diff; + + //CurseOfWeakness_Timer + if (CurseOfWeakness_Timer <= diff) + { + DoCastVictim(SPELL_CURSEOFWEAKNESS); + CurseOfWeakness_Timer = 45000; + } else CurseOfWeakness_Timer -= diff; + + //DemonArmor_Timer + if (DemonArmor_Timer <= diff) + { + DoCast(me, SPELL_DEMONARMOR); + DemonArmor_Timer = 300000; + } else DemonArmor_Timer -= diff; + + //Summon Voidwalkers + if (!Voidwalkers && HealthBelowPct(51)) + { + DoCastVictim(SPELL_SUMMON_VOIDWALKERS, true); + Voidwalkers = true; + } + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_tomb_of_seven() +{ + new boss_gloomrel(); + new boss_doomrel(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp new file mode 100644 index 00000000000..b9ff40f8285 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -0,0 +1,463 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "InstanceScript.h" +#include "blackrock_depths.h" + +#define TIMER_TOMBOFTHESEVEN 15000 +#define MAX_ENCOUNTER 6 + +enum Creatures +{ + NPC_EMPEROR = 9019, + NPC_PHALANX = 9502, + NPC_ANGERREL = 9035, + NPC_DOPEREL = 9040, + NPC_HATEREL = 9034, + NPC_VILEREL = 9036, + NPC_SEETHREL = 9038, + NPC_GLOOMREL = 9037, + NPC_DOOMREL = 9039, + NPC_MAGMUS = 9938, + NPC_MOIRA = 8929 +}; + +enum GameObjects +{ + GO_ARENA1 = 161525, + GO_ARENA2 = 161522, + GO_ARENA3 = 161524, + GO_ARENA4 = 161523, + GO_SHADOW_LOCK = 161460, + GO_SHADOW_MECHANISM = 161461, + GO_SHADOW_GIANT_DOOR = 157923, + GO_SHADOW_DUMMY = 161516, + GO_BAR_KEG_SHOT = 170607, + GO_BAR_KEG_TRAP = 171941, + GO_BAR_DOOR = 170571, + GO_TOMB_ENTER = 170576, + GO_TOMB_EXIT = 170577, + GO_LYCEUM = 170558, + GO_SF_N = 174745, // Shadowforge Brazier North + GO_SF_S = 174744, // Shadowforge Brazier South + GO_GOLEM_ROOM_N = 170573, // Magmus door North + GO_GOLEM_ROOM_S = 170574, // Magmus door Soutsh + GO_THRONE_ROOM = 170575, // Throne door + GO_SPECTRAL_CHALICE = 164869, + GO_CHEST_SEVEN = 169243 +}; + +class instance_blackrock_depths : public InstanceMapScript +{ +public: + instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths", 230) { } + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_blackrock_depths_InstanceMapScript(map); + } + + struct instance_blackrock_depths_InstanceMapScript : public InstanceScript + { + instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map) {} + + uint32 encounter[MAX_ENCOUNTER]; + std::string str_data; + + uint64 EmperorGUID; + uint64 PhalanxGUID; + uint64 MagmusGUID; + uint64 MoiraGUID; + + uint64 GoArena1GUID; + uint64 GoArena2GUID; + uint64 GoArena3GUID; + uint64 GoArena4GUID; + uint64 GoShadowLockGUID; + uint64 GoShadowMechGUID; + uint64 GoShadowGiantGUID; + uint64 GoShadowDummyGUID; + uint64 GoBarKegGUID; + uint64 GoBarKegTrapGUID; + uint64 GoBarDoorGUID; + uint64 GoTombEnterGUID; + uint64 GoTombExitGUID; + uint64 GoLyceumGUID; + uint64 GoSFSGUID; + uint64 GoSFNGUID; + uint64 GoGolemNGUID; + uint64 GoGolemSGUID; + uint64 GoThroneGUID; + uint64 GoChestGUID; + uint64 GoSpectralChaliceGUID; + + uint32 BarAleCount; + uint32 GhostKillCount; + uint64 TombBossGUIDs[7]; + uint64 TombEventStarterGUID; + uint32 TombTimer; + uint32 TombEventCounter; + + void Initialize() + { + memset(&encounter, 0, sizeof(encounter)); + + EmperorGUID = 0; + PhalanxGUID = 0; + MagmusGUID = 0; + MoiraGUID = 0; + + GoArena1GUID = 0; + GoArena2GUID = 0; + GoArena3GUID = 0; + GoArena4GUID = 0; + GoShadowLockGUID = 0; + GoShadowMechGUID = 0; + GoShadowGiantGUID = 0; + GoShadowDummyGUID = 0; + GoBarKegGUID = 0; + GoBarKegTrapGUID = 0; + GoBarDoorGUID = 0; + GoTombEnterGUID = 0; + GoTombExitGUID = 0; + GoLyceumGUID = 0; + GoSFSGUID = 0; + GoSFNGUID = 0; + GoGolemNGUID = 0; + GoGolemSGUID = 0; + GoThroneGUID = 0; + GoChestGUID = 0; + GoSpectralChaliceGUID = 0; + + BarAleCount = 0; + GhostKillCount = 0; + TombEventStarterGUID = 0; + TombTimer = TIMER_TOMBOFTHESEVEN; + TombEventCounter = 0; + + for (uint8 i = 0; i < 7; ++i) + TombBossGUIDs[i] = 0; + } + + void OnCreatureCreate(Creature* creature) + { + switch (creature->GetEntry()) + { + case NPC_EMPEROR: EmperorGUID = creature->GetGUID(); break; + case NPC_PHALANX: PhalanxGUID = creature->GetGUID(); break; + case NPC_MOIRA: MoiraGUID = creature->GetGUID(); break; + case NPC_DOOMREL: TombBossGUIDs[0] = creature->GetGUID(); break; + case NPC_DOPEREL: TombBossGUIDs[1] = creature->GetGUID(); break; + case NPC_HATEREL: TombBossGUIDs[2] = creature->GetGUID(); break; + case NPC_VILEREL: TombBossGUIDs[3] = creature->GetGUID(); break; + case NPC_SEETHREL: TombBossGUIDs[4] = creature->GetGUID(); break; + case NPC_GLOOMREL: TombBossGUIDs[5] = creature->GetGUID(); break; + case NPC_ANGERREL: TombBossGUIDs[6] = creature->GetGUID(); break; + case NPC_MAGMUS: + MagmusGUID = creature->GetGUID(); + if (!creature->IsAlive()) + HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss + break; + } + } + + void OnGameObjectCreate(GameObject* go) + { + switch (go->GetEntry()) + { + case GO_ARENA1: GoArena1GUID = go->GetGUID(); break; + case GO_ARENA2: GoArena2GUID = go->GetGUID(); break; + case GO_ARENA3: GoArena3GUID = go->GetGUID(); break; + case GO_ARENA4: GoArena4GUID = go->GetGUID(); break; + case GO_SHADOW_LOCK: GoShadowLockGUID = go->GetGUID(); break; + case GO_SHADOW_MECHANISM: GoShadowMechGUID = go->GetGUID(); break; + case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = go->GetGUID(); break; + case GO_SHADOW_DUMMY: GoShadowDummyGUID = go->GetGUID(); break; + case GO_BAR_KEG_SHOT: GoBarKegGUID = go->GetGUID(); break; + case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = go->GetGUID(); break; + case GO_BAR_DOOR: GoBarDoorGUID = go->GetGUID(); break; + case GO_TOMB_ENTER: GoTombEnterGUID = go->GetGUID(); break; + case GO_TOMB_EXIT: + GoTombExitGUID = go->GetGUID(); + if (GhostKillCount >= 7) + HandleGameObject(0, true, go); + else + HandleGameObject(0, false, go); + break; + case GO_LYCEUM: GoLyceumGUID = go->GetGUID(); break; + case GO_SF_S: GoSFSGUID = go->GetGUID(); break; + case GO_SF_N: GoSFNGUID = go->GetGUID(); break; + case GO_GOLEM_ROOM_N: GoGolemNGUID = go->GetGUID(); break; + case GO_GOLEM_ROOM_S: GoGolemSGUID = go->GetGUID(); break; + case GO_THRONE_ROOM: GoThroneGUID = go->GetGUID(); break; + case GO_CHEST_SEVEN: GoChestGUID = go->GetGUID(); break; + case GO_SPECTRAL_CHALICE: GoSpectralChaliceGUID = go->GetGUID(); break; + } + } + + void SetData64(uint32 type, uint64 data) OVERRIDE + { + TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data); + + switch (type) + { + case DATA_EVENSTARTER: + TombEventStarterGUID = data; + if (!TombEventStarterGUID) + TombOfSevenReset();//reset + else + TombOfSevenStart();//start + break; + } + } + + void SetData(uint32 type, uint32 data) OVERRIDE + { + TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data); + + switch (type) + { + case TYPE_RING_OF_LAW: + encounter[0] = data; + break; + case TYPE_VAULT: + encounter[1] = data; + break; + case TYPE_BAR: + if (data == SPECIAL) + ++BarAleCount; + else + encounter[2] = data; + break; + case TYPE_TOMB_OF_SEVEN: + encounter[3] = data; + break; + case TYPE_LYCEUM: + encounter[4] = data; + break; + case TYPE_IRON_HALL: + encounter[5] = data; + break; + case DATA_GHOSTKILL: + GhostKillCount += data; + break; + } + + if (data == DONE || GhostKillCount >= 7) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << encounter[0] << ' ' << encounter[1] << ' ' << encounter[2] << ' ' + << encounter[3] << ' ' << encounter[4] << ' ' << encounter[5] << ' ' << GhostKillCount; + + str_data = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 type) const OVERRIDE + { + switch (type) + { + case TYPE_RING_OF_LAW: + return encounter[0]; + case TYPE_VAULT: + return encounter[1]; + case TYPE_BAR: + if (encounter[2] == IN_PROGRESS && BarAleCount == 3) + return SPECIAL; + else + return encounter[2]; + case TYPE_TOMB_OF_SEVEN: + return encounter[3]; + case TYPE_LYCEUM: + return encounter[4]; + case TYPE_IRON_HALL: + return encounter[5]; + case DATA_GHOSTKILL: + return GhostKillCount; + } + return 0; + } + + uint64 GetData64(uint32 data) const OVERRIDE + { + switch (data) + { + case DATA_EMPEROR: + return EmperorGUID; + case DATA_PHALANX: + return PhalanxGUID; + case DATA_MOIRA: + return MoiraGUID; + case DATA_ARENA1: + return GoArena1GUID; + case DATA_ARENA2: + return GoArena2GUID; + case DATA_ARENA3: + return GoArena3GUID; + case DATA_ARENA4: + return GoArena4GUID; + case DATA_GO_BAR_KEG: + return GoBarKegGUID; + case DATA_GO_BAR_KEG_TRAP: + return GoBarKegTrapGUID; + case DATA_GO_BAR_DOOR: + return GoBarDoorGUID; + case DATA_EVENSTARTER: + return TombEventStarterGUID; + case DATA_SF_BRAZIER_N: + return GoSFNGUID; + case DATA_SF_BRAZIER_S: + return GoSFSGUID; + case DATA_THRONE_DOOR: + return GoThroneGUID; + case DATA_GOLEM_DOOR_N: + return GoGolemNGUID; + case DATA_GOLEM_DOOR_S: + return GoGolemSGUID; + case DATA_GO_CHALICE: + return GoSpectralChaliceGUID; + } + return 0; + } + + std::string GetSaveData() + { + return str_data; + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> encounter[0] >> encounter[1] >> encounter[2] >> encounter[3] + >> encounter[4] >> encounter[5] >> GhostKillCount; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (encounter[i] == IN_PROGRESS) + encounter[i] = NOT_STARTED; + if (GhostKillCount > 0 && GhostKillCount < 7) + GhostKillCount = 0;//reset tomb of seven event + if (GhostKillCount >= 7) + GhostKillCount = 7; + + OUT_LOAD_INST_DATA_COMPLETE; + } + + void TombOfSevenEvent() + { + if (GhostKillCount < 7 && TombBossGUIDs[TombEventCounter]) + { + if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter])) + { + boss->setFaction(FACTION_HOSTILE); + boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + if (Unit* target = boss->SelectNearestTarget(500)) + boss->AI()->AttackStart(target); + } + } + } + + void TombOfSevenReset() + { + HandleGameObject(GoTombExitGUID, false);//event reseted, close exit door + HandleGameObject(GoTombEnterGUID, true);//event reseted, open entrance door + for (uint8 i = 0; i < 7; ++i) + { + if (Creature* boss = instance->GetCreature(TombBossGUIDs[i])) + { + if (!boss->IsAlive()) + {//do not call EnterEvadeMode(), it will create infinit loops + boss->Respawn(); + boss->RemoveAllAuras(); + boss->DeleteThreatList(); + boss->CombatStop(true); + boss->LoadCreaturesAddon(); + boss->GetMotionMaster()->MoveTargetedHome(); + boss->SetLootRecipient(NULL); + } + boss->setFaction(FACTION_FRIEND); + } + } + GhostKillCount = 0; + TombEventStarterGUID = 0; + TombEventCounter = 0; + TombTimer = TIMER_TOMBOFTHESEVEN; + SetData(TYPE_TOMB_OF_SEVEN, NOT_STARTED); + } + + void TombOfSevenStart() + { + HandleGameObject(GoTombExitGUID, false);//event started, close exit door + HandleGameObject(GoTombEnterGUID, false);//event started, close entrance door + SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS); + } + + void TombOfSevenEnd() + { + DoRespawnGameObject(GoChestGUID, DAY); + HandleGameObject(GoTombExitGUID, true);//event done, open exit door + HandleGameObject(GoTombEnterGUID, true);//event done, open entrance door + TombEventStarterGUID = 0; + SetData(TYPE_TOMB_OF_SEVEN, DONE); + } + void Update(uint32 diff) + { + if (TombEventStarterGUID && GhostKillCount < 7) + { + if (TombTimer <= diff) + { + TombTimer = TIMER_TOMBOFTHESEVEN; + ++TombEventCounter; + TombOfSevenEvent(); + // Check Killed bosses + for (uint8 i = 0; i < 7; ++i) + { + if (Creature* boss = instance->GetCreature(TombBossGUIDs[i])) + { + if (!boss->IsAlive()) + { + GhostKillCount = i+1; + } + } + } + } else TombTimer -= diff; + } + if (GhostKillCount >= 7 && TombEventStarterGUID) + TombOfSevenEnd(); + } + }; +}; + +void AddSC_instance_blackrock_depths() +{ + new instance_blackrock_depths(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h new file mode 100644 index 00000000000..e2295521a5b --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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_BLACKROCK_SPIRE_H +#define DEF_BLACKROCK_SPIRE_H + +uint32 const EncounterCount = 23; + +#define BRSScriptName "instance_blackrock_spire" + +enum DataTypes +{ + DATA_HIGHLORD_OMOKK = 0, + DATA_SHADOW_HUNTER_VOSHGAJIN = 1, + DATA_WARMASTER_VOONE = 2, + DATA_MOTHER_SMOLDERWEB = 3, + DATA_UROK_DOOMHOWL = 4, + DATA_QUARTERMASTER_ZIGRIS = 5, + DATA_GIZRUL_THE_SLAVENER = 6, + DATA_HALYCON = 7, + DATA_OVERLORD_WYRMTHALAK = 8, + DATA_PYROGAURD_EMBERSEER = 9, + DATA_WARCHIEF_REND_BLACKHAND = 10, + DATA_GYTH = 11, + DATA_THE_BEAST = 12, + DATA_GENERAL_DRAKKISATH = 13, + DATA_LORD_VALTHALAK = 14, + // Extra + DATA_DRAGONSPIRE_ROOM = 15, + DATA_HALL_RUNE_1 = 16, + DATA_HALL_RUNE_2 = 17, + DATA_HALL_RUNE_3 = 18, + DATA_HALL_RUNE_4 = 19, + DATA_HALL_RUNE_5 = 20, + DATA_HALL_RUNE_6 = 21, + DATA_HALL_RUNE_7 = 22 +}; + +enum CreaturesIds +{ + NPC_HIGHLORD_OMOKK = 9196, + NPC_SHADOW_HUNTER_VOSHGAJIN = 9236, + NPC_WARMASTER_VOONE = 9237, + NPC_MOTHER_SMOLDERWEB = 10596, + NPC_UROK_DOOMHOWL = 10584, + NPC_QUARTERMASTER_ZIGRIS = 9736, + NPC_GIZRUL_THE_SLAVENER = 10268, + NPC_HALYCON = 10220, + NPC_OVERLORD_WYRMTHALAK = 9568, + NPC_PYROGAURD_EMBERSEER = 9816, + NPC_WARCHIEF_REND_BLACKHAND = 10429, + NPC_GYTH = 10339, + NPC_THE_BEAST = 10430, + NPC_GENERAL_DRAKKISATH = 10363, + NPC_BLACKHAND_DREADWEAVER = 9817, + NPC_BLACKHAND_SUMMONER = 9818, + NPC_BLACKHAND_VETERAN = 9819, + NPC_BLACKHAND_INCARCERATOR = 10316, + NPC_LORD_VICTOR_NEFARIUS = 10162 +}; + +enum AdditionalData +{ + SPELL_SUMMON_ROOKERY_WHELP = 15745, + EVENT_UROK_DOOMHOWL = 4845, + EVENT_PYROGUARD_EMBERSEER = 4884, + AREATRIGGER = 1, + AREATRIGGER_DRAGONSPIRE_HALL = 2046, + AREATRIGGER_BLACKROCK_STADIUM = 2026 +}; + +enum GameObjectsIds +{ + GO_WHELP_SPAWNER = 175622, // trap spawned by go id 175124 + // Doors + GO_EMBERSEER_IN = 175244, // First door to Pyroguard Emberseer + GO_DOORS = 175705, // Second door to Pyroguard Emberseer + GO_EMBERSEER_OUT = 175153, // Door after Pyroguard Emberseer event + GO_GYTH_ENTRY_DOOR = 164726, + GO_GYTH_COMBAT_DOOR = 175185, + GO_GYTH_EXIT_DOOR = 175186, + GO_DRAKKISATH_DOOR_1 = 175946, + GO_DRAKKISATH_DOOR_2 = 175947, + // Runes in dragonspire hall + GO_HALL_RUNE_1 = 175197, + GO_HALL_RUNE_2 = 175199, + GO_HALL_RUNE_3 = 175195, + GO_HALL_RUNE_4 = 175200, + GO_HALL_RUNE_5 = 175198, + GO_HALL_RUNE_6 = 175196, + GO_HALL_RUNE_7 = 175194, + // Runes in emberseers room + GO_EMBERSEER_RUNE_1 = 175266, + GO_EMBERSEER_RUNE_2 = 175267, + GO_EMBERSEER_RUNE_3 = 175268, + GO_EMBERSEER_RUNE_4 = 175269, + GO_EMBERSEER_RUNE_5 = 175270, + GO_EMBERSEER_RUNE_6 = 175271, + GO_EMBERSEER_RUNE_7 = 175272, + // For Gyth event + GO_DR_PORTCULLIS = 175185, + GO_PORTCULLIS_ACTIVE = 164726, + GO_PORTCULLIS_TOBOSSROOMS = 175186 +}; + +#endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp new file mode 100644 index 00000000000..59581204b05 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_FIRENOVA = 23462, + SPELL_CLEAVE = 20691, + SPELL_CONFLIGURATION = 16805, + SPELL_THUNDERCLAP = 15548, //Not sure if right ID. 23931 would be a harder possibility. +}; + +enum Events +{ + EVENT_FIRE_NOVA = 1, + EVENT_CLEAVE = 2, + EVENT_CONFLIGURATION = 3, + EVENT_THUNDERCLAP = 4, +}; + +class boss_drakkisath : public CreatureScript +{ +public: + boss_drakkisath() : CreatureScript("boss_drakkisath") { } + + struct boss_drakkisathAI : public BossAI + { + boss_drakkisathAI(Creature* creature) : BossAI(creature, DATA_GENERAL_DRAKKISATH) {} + + void Reset() OVERRIDE + { + _Reset(); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_FIRE_NOVA, 6000); + events.ScheduleEvent(EVENT_CLEAVE, 8000); + events.ScheduleEvent(EVENT_CONFLIGURATION, 15000); + events.ScheduleEvent(EVENT_THUNDERCLAP, 17000); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FIRE_NOVA: + DoCastVictim(SPELL_FIRENOVA); + events.ScheduleEvent(EVENT_FIRE_NOVA, 10000); + break; + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, 8000); + break; + case EVENT_CONFLIGURATION: + DoCastVictim(SPELL_CONFLIGURATION); + events.ScheduleEvent(EVENT_CONFLIGURATION, 18000); + break; + case EVENT_THUNDERCLAP: + DoCastVictim(SPELL_THUNDERCLAP); + events.ScheduleEvent(EVENT_THUNDERCLAP, 20000); + break; + } + } + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_drakkisathAI(creature); + } +}; + +void AddSC_boss_drakkisath() +{ + new boss_drakkisath(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp new file mode 100644 index 00000000000..f1bd81f2e6a --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ScriptedCreature.h" +#include "blackrock_spire.h" +#include "TemporarySummon.h" + +enum Spells +{ + SPELL_FATAL_BITE = 16495, + SPELL_INFECTED_BITE = 16128, + SPELL_FRENZY = 8269 +}; + +enum Paths +{ + GIZRUL_PATH = 402450 +}; + +enum Events +{ + EVENT_FATAL_BITE = 1, + EVENT_INFECTED_BITE = 2, + EVENT_FRENZY = 3 +}; + +class boss_gizrul_the_slavener : public CreatureScript +{ +public: + boss_gizrul_the_slavener() : CreatureScript("boss_gizrul_the_slavener") { } + + struct boss_gizrul_the_slavenerAI : public BossAI + { + boss_gizrul_the_slavenerAI(Creature* creature) : BossAI(creature, DATA_GIZRUL_THE_SLAVENER) {} + + void Reset() OVERRIDE + { + _Reset(); + } + + void IsSummonedBy(Unit* /*summoner*/) OVERRIDE + { + me->GetMotionMaster()->MovePath(GIZRUL_PATH, false); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_FATAL_BITE, urand(17000,20000)); + events.ScheduleEvent(EVENT_INFECTED_BITE, urand(10000,12000)); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FATAL_BITE: + DoCastVictim(SPELL_FATAL_BITE); + events.ScheduleEvent(EVENT_FATAL_BITE, urand(8000,10000)); + break; + case EVENT_INFECTED_BITE: + DoCast(me, SPELL_INFECTED_BITE); + events.ScheduleEvent(EVENT_FATAL_BITE, urand(8000,10000)); + break; + default: + break; + } + } + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_gizrul_the_slavenerAI(creature); + } +}; + +void AddSC_boss_gizrul_the_slavener() +{ + new boss_gizrul_the_slavener(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp new file mode 100644 index 00000000000..dbc3056b1ff --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp @@ -0,0 +1,172 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_REND_MOUNTS = 16167, // Change model + SPELL_CORROSIVE_ACID = 16359, // Combat (self cast) + SPELL_FLAMEBREATH = 16390, // Combat (Self cast) + SPELL_FREEZE = 16350, // Combat (Self cast) + SPELL_KNOCK_AWAY = 10101, // Combat + SPELL_SUMMON_REND = 16328 // Summons Rend near death +}; + +enum Misc +{ + NEFARIUS_PATH_2 = 1379671, + NEFARIUS_PATH_3 = 1379672, + GYTH_PATH_1 = 1379681, +}; + +enum Events +{ + EVENT_CORROSIVE_ACID = 1, + EVENT_FREEZE = 2, + EVENT_FLAME_BREATH = 3, + EVENT_KNOCK_AWAY = 4, + EVENT_SUMMONED_1 = 5, + EVENT_SUMMONED_2 = 6 +}; + +class boss_gyth : public CreatureScript +{ +public: + boss_gyth() : CreatureScript("boss_gyth") { } + + struct boss_gythAI : public BossAI + { + boss_gythAI(Creature* creature) : BossAI(creature, DATA_GYTH) { } + + bool SummonedRend; + + void Reset() OVERRIDE + { + SummonedRend = false; + if (instance->GetBossState(DATA_GYTH) == IN_PROGRESS) + { + instance->SetBossState(DATA_GYTH, DONE); + me->DespawnOrUnsummon(); + } + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + + events.ScheduleEvent(EVENT_CORROSIVE_ACID, urand(8000, 16000)); + events.ScheduleEvent(EVENT_FREEZE, urand(8000, 16000)); + events.ScheduleEvent(EVENT_FLAME_BREATH, urand(8000, 16000)); + events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(12000, 18000)); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + instance->SetBossState(DATA_GYTH, DONE); + } + + void SetData(uint32 /*type*/, uint32 data) OVERRIDE + { + switch (data) + { + case 1: + events.ScheduleEvent(EVENT_SUMMONED_1, 1000); + break; + default: + break; + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + + if (!SummonedRend && HealthBelowPct(5)) + { + DoCast(me, SPELL_SUMMON_REND); + me->RemoveAura(SPELL_REND_MOUNTS); + SummonedRend = true; + } + + if (!UpdateVictim()) + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SUMMONED_1: + me->AddAura(SPELL_REND_MOUNTS, me); + if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 40.0f)) + portcullis->UseDoorOrButton(); + if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true)) + victor->AI()->SetData(1, 1); + events.ScheduleEvent(EVENT_SUMMONED_2, 2000); + break; + case EVENT_SUMMONED_2: + me->GetMotionMaster()->MovePath(GYTH_PATH_1, false); + break; + default: + break; + } + } + return; + } + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_CORROSIVE_ACID: + DoCast(me, SPELL_CORROSIVE_ACID); + events.ScheduleEvent(EVENT_CORROSIVE_ACID, urand(10000, 16000)); + break; + case EVENT_FREEZE: + DoCast(me, SPELL_FREEZE); + events.ScheduleEvent(EVENT_FREEZE, urand(10000, 16000)); + break; + case EVENT_FLAME_BREATH: + DoCast(me, SPELL_FLAMEBREATH); + events.ScheduleEvent(EVENT_FLAME_BREATH, urand(10000, 16000)); + break; + case EVENT_KNOCK_AWAY: + DoCastVictim(SPELL_KNOCK_AWAY); + events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(14000, 20000)); + break; + default: + break; + } + } + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_gythAI(creature); + } +}; + +void AddSC_boss_gyth() +{ + new boss_gyth(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp new file mode 100644 index 00000000000..630d6ff2a0d --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_REND = 13738, + SPELL_THRASH = 3391, +}; + +enum Says +{ + EMOTE_DEATH = 0 +}; + +enum Events +{ + EVENT_REND = 1, + EVENT_THRASH = 2, +}; + +const Position SummonLocation = { -167.9561f, -411.7844f, 76.23057f, 1.53589f }; + +class boss_halycon : public CreatureScript +{ +public: + boss_halycon() : CreatureScript("boss_halycon") { } + + struct boss_halyconAI : public BossAI + { + boss_halyconAI(Creature* creature) : BossAI(creature, DATA_HALYCON) {} + + void Reset() OVERRIDE + { + _Reset(); + Summoned = false; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_REND, urand(17000,20000)); + events.ScheduleEvent(EVENT_THRASH, urand(10000,12000)); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300000); + Talk(EMOTE_DEATH); + + Summoned = true; + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_REND: + DoCastVictim(SPELL_REND); + events.ScheduleEvent(EVENT_REND, urand(8000,10000)); + break; + case EVENT_THRASH: + DoCast(me, SPELL_THRASH); + break; + default: + break; + } + } + DoMeleeAttackIfReady(); + } + private: + bool Summoned; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_halyconAI(creature); + } +}; + +void AddSC_boss_halycon() +{ + new boss_halycon(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp new file mode 100644 index 00000000000..54ed5d44e34 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_FRENZY = 8269, + SPELL_KNOCK_AWAY = 10101 +}; + +enum Events +{ + EVENT_FRENZY = 1, + EVENT_KNOCK_AWAY = 2 +}; + +class boss_highlord_omokk : public CreatureScript +{ +public: + boss_highlord_omokk() : CreatureScript("boss_highlord_omokk") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_highlordomokkAI(creature); + } + + struct boss_highlordomokkAI : public BossAI + { + boss_highlordomokkAI(Creature* creature) : BossAI(creature, DATA_HIGHLORD_OMOKK) {} + + void Reset() OVERRIDE + { + _Reset(); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_FRENZY, 20000); + events.ScheduleEvent(EVENT_KNOCK_AWAY, 18000); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FRENZY: + DoCastVictim(SPELL_FRENZY); + events.ScheduleEvent(EVENT_FRENZY, 60000); + break; + case EVENT_KNOCK_AWAY: + DoCastVictim(SPELL_KNOCK_AWAY); + events.ScheduleEvent(EVENT_KNOCK_AWAY, 12000); + break; + default: + break; + } + } + DoMeleeAttackIfReady(); + } + }; + +}; + +void AddSC_boss_highlordomokk() +{ + new boss_highlord_omokk(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp new file mode 100644 index 00000000000..b54c8f11f34 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp @@ -0,0 +1,138 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_FRENZY = 8269, + SPELL_SUMMON_SPECTRAL_ASSASSIN = 27249, + SPELL_SHADOW_BOLT_VOLLEY = 27382, + SPELL_SHADOW_WRATH = 27286 +}; + +enum Says +{ + EMOTE_FRENZY = 0 +}; + +enum Events +{ + EVENT_SUMMON_SPECTRAL_ASSASSIN = 1, + EVENT_SHADOW_BOLT_VOLLEY = 2, + EVENT_SHADOW_WRATH = 3 +}; + +class boss_lord_valthalak : public CreatureScript +{ +public: + boss_lord_valthalak() : CreatureScript("boss_lord_valthalak") { } + + struct boss_lord_valthalakAI : public BossAI + { + boss_lord_valthalakAI(Creature* creature) : BossAI(creature, DATA_LORD_VALTHALAK) {} + + void Reset() OVERRIDE + { + _Reset(); + frenzy40 = false; + frenzy15 = false; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_SUMMON_SPECTRAL_ASSASSIN, urand(6000,8000)); + events.ScheduleEvent(EVENT_SHADOW_WRATH, urand(9000,18000)); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + if (instance) + instance->SetData(DATA_LORD_VALTHALAK, DONE); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SUMMON_SPECTRAL_ASSASSIN: + DoCast(me, SPELL_SUMMON_SPECTRAL_ASSASSIN); + events.ScheduleEvent(EVENT_SUMMON_SPECTRAL_ASSASSIN, urand(30000,35000)); + break; + case EVENT_SHADOW_BOLT_VOLLEY: + DoCastVictim(SPELL_SHADOW_BOLT_VOLLEY); + events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, urand(4000,6000)); + break; + case EVENT_SHADOW_WRATH: + DoCastVictim(SPELL_SHADOW_WRATH); + events.ScheduleEvent(EVENT_SHADOW_WRATH, urand(19000,24000)); + break; + default: + break; + } + } + + if (!frenzy40) + { + if (HealthBelowPct(40)) + { + DoCast(me, SPELL_FRENZY); + events.CancelEvent(EVENT_SUMMON_SPECTRAL_ASSASSIN); + frenzy40 = true; + } + } + + if (!frenzy15) + { + if (HealthBelowPct(15)) + { + DoCast(me, SPELL_FRENZY); + events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, urand(7000,14000)); + frenzy15 = true; + } + } + + DoMeleeAttackIfReady(); + } + private: + bool frenzy40; + bool frenzy15; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_lord_valthalakAI(creature); + } +}; + +void AddSC_boss_lord_valthalak() +{ + new boss_lord_valthalak(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp new file mode 100644 index 00000000000..608cb75bbb2 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_CRYSTALIZE = 16104, + SPELL_MOTHERSMILK = 16468, + SPELL_SUMMON_SPIRE_SPIDERLING = 16103, +}; + +enum Events +{ + EVENT_CRYSTALIZE = 1, + EVENT_MOTHERS_MILK = 2, +}; + +class boss_mother_smolderweb : public CreatureScript +{ +public: + boss_mother_smolderweb() : CreatureScript("boss_mother_smolderweb") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_mothersmolderwebAI(creature); + } + + struct boss_mothersmolderwebAI : public BossAI + { + boss_mothersmolderwebAI(Creature* creature) : BossAI(creature, DATA_MOTHER_SMOLDERWEB) {} + + void Reset() OVERRIDE + { + _Reset(); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_CRYSTALIZE, 20 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MOTHERS_MILK, 10 * IN_MILLISECONDS); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE + { + if (me->GetHealth() <= damage) + DoCast(me, SPELL_SUMMON_SPIRE_SPIDERLING, true); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_CRYSTALIZE: + DoCast(me, SPELL_CRYSTALIZE); + events.ScheduleEvent(EVENT_CRYSTALIZE, 15 * IN_MILLISECONDS); + break; + case EVENT_MOTHERS_MILK: + DoCast(me, SPELL_MOTHERSMILK); + events.ScheduleEvent(EVENT_MOTHERS_MILK, urand(5 * IN_MILLISECONDS, 12500)); + break; + } + } + DoMeleeAttackIfReady(); + } + }; + +}; + +void AddSC_boss_mothersmolderweb() +{ + new boss_mother_smolderweb(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp new file mode 100644 index 00000000000..2b68b640720 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_BLASTWAVE = 11130, + SPELL_SHOUT = 23511, + SPELL_CLEAVE = 20691, + SPELL_KNOCKAWAY = 20686 +}; + +enum Events +{ + EVENT_BLAST_WAVE = 1, + EVENT_SHOUT = 2, + EVENT_CLEAVE = 3, + EVENT_KNOCK_AWAY = 4 +}; + +enum Adds +{ + NPC_SPIRESTONE_WARLORD = 9216, + NPC_SMOLDERTHORN_BERSERKER = 9268 +}; + +const Position SummonLocation1 = { -39.355f, -513.456f, 88.472f, 4.679f }; +const Position SummonLocation2 = { -49.875f, -511.896f, 88.195f, 4.613f }; + +class boss_overlord_wyrmthalak : public CreatureScript +{ +public: + boss_overlord_wyrmthalak() : CreatureScript("boss_overlord_wyrmthalak") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_overlordwyrmthalakAI(creature); + } + + struct boss_overlordwyrmthalakAI : public BossAI + { + boss_overlordwyrmthalakAI(Creature* creature) : BossAI(creature, DATA_OVERLORD_WYRMTHALAK) {} + + bool Summoned; + + void Reset() OVERRIDE + { + _Reset(); + Summoned = false; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SHOUT, 2 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_CLEAVE, 6 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + if (!Summoned && HealthBelowPct(51)) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + { + if (Creature* warlord = me->SummonCreature(NPC_SPIRESTONE_WARLORD, SummonLocation1, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS)) + warlord->AI()->AttackStart(target); + if (Creature* berserker = me->SummonCreature(NPC_SMOLDERTHORN_BERSERKER, SummonLocation2, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS)) + berserker->AI()->AttackStart(target); + Summoned = true; + } + } + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BLAST_WAVE: + DoCastVictim(SPELL_BLASTWAVE); + events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS); + break; + case EVENT_SHOUT: + DoCastVictim(SPELL_SHOUT); + events.ScheduleEvent(EVENT_SHOUT, 10 * IN_MILLISECONDS); + break; + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS); + break; + case EVENT_KNOCK_AWAY: + DoCastVictim(SPELL_KNOCKAWAY); + events.ScheduleEvent(EVENT_KNOCK_AWAY, 14 * IN_MILLISECONDS); + break; + } + } + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_overlordwyrmthalak() +{ + new boss_overlord_wyrmthalak(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp new file mode 100644 index 00000000000..57c3dfac7ff --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -0,0 +1,453 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "Player.h" +#include "Spell.h" +#include "blackrock_spire.h" + +enum Text +{ + EMOTE_ONE_STACK = 0, + EMOTE_TEN_STACK = 1, + EMOTE_FREE_OF_BONDS = 2, + YELL_FREE_OF_BONDS = 3 +}; + +enum Spells +{ + SPELL_ENCAGED_EMBERSEER = 15282, // Self on spawn + SPELL_FIRE_SHIELD_TRIGGER = 13377, // Self on spawn missing from 335 dbc triggers SPELL_FIRE_SHIELD every 3 sec + SPELL_FIRE_SHIELD = 13376, // Triggered by SPELL_FIRE_SHIELD_TRIGGER + SPELL_FREEZE_ANIM = 16245, // Self on event start + SPELL_EMBERSEER_GROWING = 16048, // Self on event start + SPELL_EMBERSEER_GROWING_TRIGGER = 16049, // Triggered by SPELL_EMBERSEER_GROWING + SPELL_EMBERSEER_FULL_STRENGTH = 16047, // Emberseer Full Strength + SPELL_FIRENOVA = 23462, // Combat + SPELL_FLAMEBUFFET = 23341, // Combat + SPELL_PYROBLAST = 17274, // Combat + // Blackhand Incarcerator Spells + SPELL_ENCAGE_EMBERSEER = 15281, // Emberseer on spawn + SPELL_STRIKE = 15580, // Combat + SPELL_ENCAGE = 16045, // Combat + // Cast on player by altar + SPELL_EMBERSEER_OBJECT_VISUAL = 16532 +}; + +enum Events +{ + // Respawn + EVENT_RESPAWN = 1, + // Pre fight + EVENT_PRE_FIGHT_1 = 2, + EVENT_PRE_FIGHT_2 = 3, + // Combat + EVENT_FIRENOVA = 4, + EVENT_FLAMEBUFFET = 5, + EVENT_PYROBLAST = 6, + // Hack due to trigger spell not in dbc + EVENT_FIRE_SHIELD = 7, + // Make sure all players have aura from altar + EVENT_PLAYER_CHECK = 8, + EVENT_ENTER_COMBAT = 9 +}; + +class boss_pyroguard_emberseer : public CreatureScript +{ +public: + boss_pyroguard_emberseer() : CreatureScript("boss_pyroguard_emberseer") { } + + struct boss_pyroguard_emberseerAI : public BossAI + { + boss_pyroguard_emberseerAI(Creature* creature) : BossAI(creature, DATA_PYROGAURD_EMBERSEER) {} + + void Reset() OVERRIDE + { + if (instance) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); + events.Reset(); + // Apply auras on spawn and reset + // DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible + me->RemoveAura(SPELL_EMBERSEER_FULL_STRENGTH); + me->RemoveAura(SPELL_EMBERSEER_GROWING); + me->RemoveAura(SPELL_EMBERSEER_GROWING_TRIGGER); + events.ScheduleEvent(EVENT_RESPAWN, 5000); + // Hack for missing trigger spell + events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); + + // Open doors on reset + if (instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS) + OpenDoors(false); // Opens 2 entrance doors + } + } + + void SetData(uint32 /*type*/, uint32 data) OVERRIDE + { + switch (data) + { + case 1: + events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); + break; + case 2: + // Close these two doors on Blackhand Incarcerators aggro + if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN))) + if (door1->GetGoState() == GO_STATE_ACTIVE) + door1->SetGoState(GO_STATE_READY); + if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS))) + if (door2->GetGoState() == GO_STATE_ACTIVE) + door2->SetGoState(GO_STATE_READY); + break; + case 3: + Reset(); + break; + default: + break; + } + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + // ### TODO Check combat timing ### + events.ScheduleEvent(EVENT_FIRENOVA, 6000); + events.ScheduleEvent(EVENT_FLAMEBUFFET, 3000); + events.ScheduleEvent(EVENT_PYROBLAST, 14000); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + if (instance) + { + // Activate all the runes + UpdateRunes(GO_STATE_READY); + // Opens all 3 doors + OpenDoors(true); + // Complete encounter + instance->SetBossState(DATA_PYROGAURD_EMBERSEER, DONE); + } + } + + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE + { + if (spell->Id == SPELL_ENCAGE_EMBERSEER) + { + if (!me->GetAuraCount(SPELL_ENCAGED_EMBERSEER)) + me->CastSpell(me, SPELL_ENCAGED_EMBERSEER); + } + + if (spell->Id == SPELL_EMBERSEER_GROWING_TRIGGER) + { + if (me->GetAuraCount(SPELL_EMBERSEER_GROWING_TRIGGER) == 10) + Talk(EMOTE_TEN_STACK); + + if (me->GetAuraCount(SPELL_EMBERSEER_GROWING_TRIGGER) == 20) + { + me->RemoveAura(SPELL_ENCAGED_EMBERSEER); + me->RemoveAura(SPELL_FREEZE_ANIM); + me->CastSpell(me, SPELL_EMBERSEER_FULL_STRENGTH); + Talk(EMOTE_FREE_OF_BONDS); + Talk(YELL_FREE_OF_BONDS); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); + events.ScheduleEvent(EVENT_ENTER_COMBAT, 2000); + } + } + } + + void OpenDoors(bool Boss_Killed) + { + // These two doors reopen on reset or boss kill + if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN))) + door1->SetGoState(GO_STATE_ACTIVE); + if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS))) + door2->SetGoState(GO_STATE_ACTIVE); + + // This door opens on boss kill + if (Boss_Killed) + if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_OUT))) + door3->SetGoState(GO_STATE_ACTIVE); + } + + void UpdateRunes(GOState state) + { + if (instance) + { + // update all runes + if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1))) + rune1->SetGoState(state); + if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2))) + rune2->SetGoState(state); + if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3))) + rune3->SetGoState(state); + if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4))) + rune4->SetGoState(state); + if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5))) + rune5->SetGoState(state); + if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6))) + rune6->SetGoState(state); + if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7))) + rune7->SetGoState(state); + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_RESPAWN: + { + // Respawn all Blackhand Incarcerators + std::list creatureList; + GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f); + for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) + if (Creature* creatureList = *itr) + { + if (!creatureList->IsAlive()) + { + creatureList->Respawn(); + } + creatureList->AI()->SetData(1, 1); + } + me->AddAura(SPELL_ENCAGED_EMBERSEER, me); + instance->SetBossState(DATA_PYROGAURD_EMBERSEER, NOT_STARTED); + break; + } + case EVENT_PRE_FIGHT_1: + { + // Set data on all Blackhand Incarcerators + std::list creatureList; + GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f); + for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) + { + if (Creature* creatureList = *itr) + creatureList->AI()->SetData(1, 1); + } + events.ScheduleEvent(EVENT_PRE_FIGHT_2, 32000); + break; + } + case EVENT_PRE_FIGHT_2: + me->CastSpell(me, SPELL_FREEZE_ANIM); + me->CastSpell(me, SPELL_EMBERSEER_GROWING); + Talk(EMOTE_ONE_STACK); + break; + case EVENT_FIRE_SHIELD: + // #### Spell isn't doing any damage ??? #### + DoCast(me, SPELL_FIRE_SHIELD); + events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); + break; + case EVENT_PLAYER_CHECK: + { + // Check to see if all players in instance have aura SPELL_EMBERSEER_START before starting event + bool _hasAura = true; + Map::PlayerList const &players = me->GetMap()->GetPlayers(); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + if (Player* player = itr->GetSource()->ToPlayer()) + if (!player->HasAura(SPELL_EMBERSEER_OBJECT_VISUAL)) + _hasAura = false; + + if (_hasAura) + { + events.ScheduleEvent(EVENT_PRE_FIGHT_1, 1000); + instance->SetBossState(DATA_PYROGAURD_EMBERSEER, IN_PROGRESS); + } + break; + } + case EVENT_ENTER_COMBAT: + AttackStart(me->SelectNearestPlayer(30.0f)); + break; + default: + break; + } + } + return; + } + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FIRE_SHIELD: + DoCast(me, SPELL_FIRE_SHIELD); + events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); + break; + case EVENT_FIRENOVA: + DoCast(me, SPELL_FIRENOVA); + events.ScheduleEvent(EVENT_FIRENOVA, 6000); + break; + case EVENT_FLAMEBUFFET: + DoCast(me, SPELL_FLAMEBUFFET); + events.ScheduleEvent(EVENT_FLAMEBUFFET, 14000); + break; + case EVENT_PYROBLAST: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_PYROBLAST); + events.ScheduleEvent(EVENT_PYROBLAST, 15000); + break; + default: + break; + } + } + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_pyroguard_emberseerAI(creature); + } +}; + +/*#### +## npc_blackhand_incarcerator +####*/ + +enum IncarceratorEvents +{ + // OOC + EVENT_ENCAGED_EMBERSEER = 1, + // Combat + EVENT_STRIKE = 2, + EVENT_ENCAGE = 3 +}; + +class npc_blackhand_incarcerator : public CreatureScript +{ +public: + npc_blackhand_incarcerator() : CreatureScript("npc_blackhand_incarcerator") { } + + struct npc_blackhand_incarceratorAI : public ScriptedAI + { + npc_blackhand_incarceratorAI(Creature* creature) : ScriptedAI(creature) {} + + void Reset() OVERRIDE + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC); + if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) + Emberseer->AI()->SetData(1, 3); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + me->DespawnOrUnsummon(10000); + } + + void SetData(uint32 data, uint32 value) OVERRIDE + { + if (data == 1 && value == 1) + { + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC); + me->InterruptSpell(CURRENT_CHANNELED_SPELL); + _events.CancelEvent(EVENT_ENCAGED_EMBERSEER); + } + + if (data == 1 && value == 2) + { + _events.ScheduleEvent(EVENT_ENCAGED_EMBERSEER, 1000); + } + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + // Used to close doors + if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) + Emberseer->AI()->SetData(1, 2); + + // Had to do this because CallForHelp will ignore any npcs without LOS + std::list creatureList; + GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 60.0f); + for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) + { + if (Creature* creatureList = *itr) + creatureList->SetInCombatWithZone(); // AI()->AttackStart(me->GetVictim()); + } + + _events.ScheduleEvent(EVENT_STRIKE, urand(8000, 16000)); + _events.ScheduleEvent(EVENT_ENCAGE, urand(10000, 20000)); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + + + if (!UpdateVictim()) + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_ENCAGED_EMBERSEER: + { + if (me->GetPositionX() == me->GetHomePosition().GetPositionX()) + if (!me->HasAura(SPELL_ENCAGE_EMBERSEER)) + if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) + DoCast(Emberseer, SPELL_ENCAGE_EMBERSEER); + break; + + } + } + } + return; + } + + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_STRIKE: + DoCastVictim(SPELL_STRIKE, true); + _events.ScheduleEvent(EVENT_STRIKE, urand(14000, 23000)); + break; + case EVENT_ENCAGE: + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), EVENT_ENCAGE, true); + _events.ScheduleEvent(EVENT_ENCAGE, urand(6000, 12000)); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + + private: + EventMap _events; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_blackhand_incarceratorAI(creature); + } +}; + +void AddSC_boss_pyroguard_emberseer() +{ + new boss_pyroguard_emberseer(); + new npc_blackhand_incarcerator(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp new file mode 100644 index 00000000000..a20822839e6 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_SHOOT = 16496, + SPELL_STUNBOMB = 16497, + SPELL_HEALING_POTION = 15504, + SPELL_HOOKEDNET = 15609 +}; + +enum Events +{ + EVENT_SHOOT = 1, + EVENT_STUN_BOMB = 2 +}; + +class quartermaster_zigris : public CreatureScript +{ +public: + quartermaster_zigris() : CreatureScript("quartermaster_zigris") { } + + struct boss_quatermasterzigrisAI : public BossAI + { + boss_quatermasterzigrisAI(Creature* creature) : BossAI(creature, DATA_QUARTERMASTER_ZIGRIS) {} + + void Reset() OVERRIDE + { + _Reset(); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_SHOOT, 1000); + events.ScheduleEvent(EVENT_STUN_BOMB, 16000); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHOOT: + DoCastVictim(SPELL_SHOOT); + events.ScheduleEvent(EVENT_SHOOT, 500); + break; + case EVENT_STUN_BOMB: + DoCastVictim(SPELL_STUNBOMB); + events.ScheduleEvent(EVENT_STUN_BOMB, 14000); + break; + } + } + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_quatermasterzigrisAI(creature); + } +}; + +void AddSC_boss_quatermasterzigris() +{ + new quartermaster_zigris(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp new file mode 100644 index 00000000000..275b3802764 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp @@ -0,0 +1,447 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "Player.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_WHIRLWIND = 13736, // sniffed + SPELL_CLEAVE = 15284, + SPELL_MORTAL_STRIKE = 16856, + SPELL_FRENZY = 8269, + SPELL_KNOCKDOWN = 13360 // On spawn during Gyth fight +}; + +enum Says +{ + // Rend Blackhand + SAY_BLACKHAND_1 = 0, + SAY_BLACKHAND_2 = 1, + EMOTE_BLACKHAND_DISMOUNT = 2, + // Victor Nefarius + SAY_NEFARIUS_0 = 0, + SAY_NEFARIUS_1 = 1, + SAY_NEFARIUS_2 = 2, + SAY_NEFARIUS_3 = 3, + SAY_NEFARIUS_4 = 4, + SAY_NEFARIUS_5 = 5, + SAY_NEFARIUS_6 = 6, + SAY_NEFARIUS_7 = 7, + SAY_NEFARIUS_8 = 8, + SAY_NEFARIUS_9 = 9, +}; + +enum Adds +{ + NPC_CHROMATIC_WHELP = 10442, + NPC_CHROMATIC_DRAGONSPAWN = 10447, + NPC_BLACKHAND_DRAGON_HANDLER = 10742 +}; + +enum Misc +{ + NEFARIUS_PATH_1 = 1379670, + NEFARIUS_PATH_2 = 1379671, + NEFARIUS_PATH_3 = 1379672, + REND_PATH_1 = 1379680, + REND_PATH_2 = 1379681, +}; + +/* +struct Wave +{ + uint32 entry; + float x_pos; + float y_pos; + float z_pos; + float o_pos; +}; + +static Wave Wave2[]= // 22 sec +{ + { 10447, 209.8637f, -428.2729f, 110.9877f, 0.6632251f }, + { 10442, 209.3122f, -430.8724f, 110.9814f, 2.9147f }, + { 10442, 211.3309f, -425.9111f, 111.0006f, 1.727876f } +}; + +static Wave Wave3[]= // 60 sec +{ + { 10742, 208.6493f, -424.5787f, 110.9872f, 5.8294f }, + { 10447, 203.9482f, -428.9446f, 110.982f, 4.677482f }, + { 10442, 203.3441f, -426.8668f, 110.9772f, 4.712389f }, + { 10442, 206.3079f, -424.7509f, 110.9943f, 4.08407f } +}; + +static Wave Wave4[]= // 49 sec +{ + { 10742, 212.3541f, -412.6826f, 111.0352f, 5.88176f }, + { 10447, 212.5754f, -410.2841f, 111.0296f, 2.740167f }, + { 10442, 212.3449f, -414.8659f, 111.0348f, 2.356194f }, + { 10442, 210.6568f, -412.1552f, 111.0124f, 0.9773844f } +}; + +static Wave Wave5[]= // 60 sec +{ + { 10742, 210.2188f, -410.6686f, 111.0211f, 5.8294f }, + { 10447, 209.4078f, -414.13f, 111.0264f, 4.677482f }, + { 10442, 208.0858f, -409.3145f, 111.0118f, 4.642576f }, + { 10442, 207.9811f, -413.0728f, 111.0098f, 5.288348f }, + { 10442, 208.0854f, -412.1505f, 111.0057f, 4.08407f } +}; + +static Wave Wave6[]= // 27 sec +{ + { 10742, 213.9138f, -426.512f, 111.0013f, 3.316126f }, + { 10447, 213.7121f, -429.8102f, 110.9888f, 1.413717f }, + { 10447, 213.7157f, -424.4268f, 111.009f, 3.001966f }, + { 10442, 210.8935f, -423.913f, 111.0125f, 5.969026f }, + { 10442, 212.2642f, -430.7648f, 110.9807f, 5.934119f } +}; +*/ + +Position const GythLoc = { 211.762f, -397.5885f, 111.1817f, 4.747295f }; +Position const Teleport1Loc = { 194.2993f, -474.0814f, 121.4505f, -0.01225555f }; +Position const Teleport2Loc = { 216.485f, -434.93f, 110.888f, -0.01225555f }; + +enum Events +{ + EVENT_START_1 = 1, + EVENT_START_2 = 2, + EVENT_START_3 = 3, + EVENT_START_4 = 4, + EVENT_TURN_TO_REND = 5, + EVENT_TURN_TO_PLAYER = 6, + EVENT_TURN_TO_FACING_1 = 7, + EVENT_TURN_TO_FACING_2 = 8, + EVENT_TURN_TO_FACING_3 = 9, + EVENT_WAVE_1 = 10, + EVENT_WAVE_2 = 11, + EVENT_WAVE_3 = 12, + EVENT_WAVE_4 = 13, + EVENT_WAVE_5 = 14, + EVENT_WAVE_6 = 15, + EVENT_WAVES_TEXT_1 = 16, + EVENT_WAVES_TEXT_2 = 17, + EVENT_WAVES_TEXT_3 = 18, + EVENT_WAVES_TEXT_4 = 19, + EVENT_WAVES_TEXT_5 = 20, + EVENT_WAVES_COMPLETE_TEXT_1 = 21, + EVENT_WAVES_COMPLETE_TEXT_2 = 22, + EVENT_WAVES_COMPLETE_TEXT_3 = 23, + EVENT_WAVES_EMOTE_1 = 24, + EVENT_WAVES_EMOTE_2 = 25, + EVENT_PATH_REND = 26, + EVENT_PATH_NEFARIUS = 27, + EVENT_TELEPORT_1 = 28, + EVENT_TELEPORT_2 = 29, + EVENT_WHIRLWIND = 30, + EVENT_CLEAVE = 31, + EVENT_MORTAL_STRIKE = 32, +}; + +class boss_rend_blackhand : public CreatureScript +{ +public: + boss_rend_blackhand() : CreatureScript("boss_rend_blackhand") { } + + struct boss_rend_blackhandAI : public BossAI + { + boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND) { } + + void Reset() OVERRIDE + { + _Reset(); + gythEvent = false; + victorGUID = 0; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_WHIRLWIND, urand(13000, 15000)); + events.ScheduleEvent(EVENT_CLEAVE, urand(15000, 17000)); + events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(17000, 19000)); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true)) + victor->AI()->SetData(1, 2); + } + + void SetData(uint32 type, uint32 data) OVERRIDE + { + if (instance && type == AREATRIGGER && data == AREATRIGGER_BLACKROCK_STADIUM) + { + if (!gythEvent) + { + gythEvent = true; + + if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 5.0f, true)) + victorGUID = victor->GetGUID(); + + if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 50.0f)) + portcullisGUID = portcullis->GetGUID(); + + events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); + events.ScheduleEvent(EVENT_START_1, 1000); + } + } + } + + void MovementInform(uint32 type, uint32 id) OVERRIDE + { + if (type == WAYPOINT_MOTION_TYPE) + { + switch (id) + { + case 5: + events.ScheduleEvent(EVENT_TELEPORT_1, 2000); + break; + case 11: + if (Creature* gyth = me->FindNearestCreature(NPC_GYTH, 10.0f, true)) + gyth->AI()->SetData(1, 1); + me->DespawnOrUnsummon(1000); + break; + } + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (gythEvent) + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_START_1: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_0); + events.ScheduleEvent(EVENT_START_2, 4000); + break; + case EVENT_START_2: + events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->HandleEmoteCommand(EMOTE_ONESHOT_POINT); + events.ScheduleEvent(EVENT_START_3, 4000); + break; + case EVENT_START_3: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_1); + events.ScheduleEvent(EVENT_WAVE_1, 2000); + events.ScheduleEvent(EVENT_TURN_TO_REND, 4000); + events.ScheduleEvent(EVENT_WAVES_TEXT_1, 20000); + break; + case EVENT_TURN_TO_REND: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + { + victor->SetFacingToObject(me); + victor->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + } + break; + case EVENT_TURN_TO_PLAYER: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + if (Unit* player = victor->SelectNearestPlayer(60.0f)) + victor->SetFacingToObject(player); + break; + case EVENT_TURN_TO_FACING_1: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->SetFacingTo(1.518436f); + break; + case EVENT_TURN_TO_FACING_2: + me->SetFacingTo(1.658063f); + break; + case EVENT_TURN_TO_FACING_3: + me->SetFacingTo(1.500983f); + break; + case EVENT_WAVES_EMOTE_1: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION); + break; + case EVENT_WAVES_EMOTE_2: + me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); + break; + case EVENT_WAVES_TEXT_1: + events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_2); + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); + events.ScheduleEvent(EVENT_WAVES_EMOTE_1, 5000); + events.ScheduleEvent(EVENT_WAVE_2, 2000); + events.ScheduleEvent(EVENT_WAVES_TEXT_2, 20000); + break; + case EVENT_WAVES_TEXT_2: + events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_3); + events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); + events.ScheduleEvent(EVENT_WAVE_3, 2000); + events.ScheduleEvent(EVENT_WAVES_TEXT_3, 20000); + break; + case EVENT_WAVES_TEXT_3: + events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_4); + events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); + events.ScheduleEvent(EVENT_WAVE_4, 2000); + events.ScheduleEvent(EVENT_WAVES_TEXT_4, 20000); + break; + case EVENT_WAVES_TEXT_4: + Talk(SAY_BLACKHAND_1); + events.ScheduleEvent(EVENT_WAVES_EMOTE_2, 4000); + events.ScheduleEvent(EVENT_TURN_TO_FACING_3, 8000); + events.ScheduleEvent(EVENT_WAVE_5, 2000); + events.ScheduleEvent(EVENT_WAVES_TEXT_5, 20000); + break; + case EVENT_WAVES_TEXT_5: + events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_5); + events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); + events.ScheduleEvent(EVENT_WAVE_6, 2000); + events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_1, 20000); + break; + case EVENT_WAVES_COMPLETE_TEXT_1: + events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_6); + events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); + events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_2, 13000); + break; + case EVENT_WAVES_COMPLETE_TEXT_2: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_7); + Talk(SAY_BLACKHAND_2); + events.ScheduleEvent(EVENT_PATH_REND, 1000); + events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_3, 4000); + break; + case EVENT_WAVES_COMPLETE_TEXT_3: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_8); + events.ScheduleEvent(EVENT_PATH_NEFARIUS, 1000); + events.ScheduleEvent(EVENT_PATH_REND, 1000); + break; + case EVENT_PATH_NEFARIUS: + if (Creature* victor = me->GetCreature(*me, victorGUID)) + victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_1, true); + break; + case EVENT_PATH_REND: + me->GetMotionMaster()->MovePath(REND_PATH_1, false); + break; + case EVENT_TELEPORT_1: + me->NearTeleportTo(194.2993f, -474.0814f, 121.4505f, -0.01225555f); + events.ScheduleEvent(EVENT_TELEPORT_2, 50000); + break; + case EVENT_TELEPORT_2: + me->NearTeleportTo(216.485f, -434.93f, 110.888f, -0.01225555f); + me->SummonCreature(NPC_GYTH, 211.762f, -397.5885f, 111.1817f, 4.747295f); + break; + case EVENT_WAVE_1: + if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) + portcullis->UseDoorOrButton(); + // move wave + break; + case EVENT_WAVE_2: + // spawn wave + if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) + portcullis->UseDoorOrButton(); + // move wave + break; + case EVENT_WAVE_3: + // spawn wave + if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) + portcullis->UseDoorOrButton(); + // move wave + break; + case EVENT_WAVE_4: + // spawn wave + if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) + portcullis->UseDoorOrButton(); + // move wave + break; + case EVENT_WAVE_5: + // spawn wave + if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) + portcullis->UseDoorOrButton(); + // move wave + break; + case EVENT_WAVE_6: + // spawn wave + if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) + portcullis->UseDoorOrButton(); + // move wave + break; + default: + break; + } + } + } + + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_WHIRLWIND: + DoCast(SPELL_WHIRLWIND); + events.ScheduleEvent(EVENT_WHIRLWIND, urand(13000, 18000)); + break; + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, urand(10000, 14000)); + break; + case EVENT_MORTAL_STRIKE: + DoCastVictim(SPELL_MORTAL_STRIKE); + events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(14000, 16000)); + break; + } + } + DoMeleeAttackIfReady(); + } + + private: + bool gythEvent; + uint64 victorGUID; + uint64 portcullisGUID; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_rend_blackhandAI(creature); + } +}; + +void AddSC_boss_rend_blackhand() +{ + new boss_rend_blackhand(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp new file mode 100644 index 00000000000..1936e5e72d0 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_CURSEOFBLOOD = 24673, + SPELL_HEX = 16708, + SPELL_CLEAVE = 20691, +}; + +enum Events +{ + EVENT_CURSE_OF_BLOOD = 1, + EVENT_HEX = 2, + EVENT_CLEAVE = 3, +}; + +class boss_shadow_hunter_voshgajin : public CreatureScript +{ +public: + boss_shadow_hunter_voshgajin() : CreatureScript("boss_shadow_hunter_voshgajin") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_shadowvoshAI(creature); + } + + struct boss_shadowvoshAI : public BossAI + { + boss_shadowvoshAI(Creature* creature) : BossAI(creature, DATA_SHADOW_HUNTER_VOSHGAJIN) {} + + void Reset() OVERRIDE + { + _Reset(); + //DoCast(me, SPELL_ICEARMOR, true); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 2 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_HEX, 8 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_CURSE_OF_BLOOD: + DoCastVictim(SPELL_CURSEOFBLOOD); + events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 45 * IN_MILLISECONDS); + break; + case EVENT_HEX: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_HEX); + events.ScheduleEvent(EVENT_HEX, 15 * IN_MILLISECONDS); + break; + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS); + break; + } + } + DoMeleeAttackIfReady(); + } + }; + +}; + +void AddSC_boss_shadowvosh() +{ + new boss_shadow_hunter_voshgajin(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp new file mode 100644 index 00000000000..c4abaac158c --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_FLAMEBREAK = 16785, + SPELL_IMMOLATE = 20294, + SPELL_TERRIFYINGROAR = 14100, +}; + +enum Events +{ + EVENT_FLAME_BREAK = 1, + EVENT_IMMOLATE = 2, + EVENT_TERRIFYING_ROAR = 3, +}; + +class boss_the_beast : public CreatureScript +{ +public: + boss_the_beast() : CreatureScript("boss_the_beast") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_thebeastAI(creature); + } + + struct boss_thebeastAI : public BossAI + { + boss_thebeastAI(Creature* creature) : BossAI(creature, DATA_THE_BEAST) {} + + void Reset() OVERRIDE + { + _Reset(); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_FLAME_BREAK, 12 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_IMMOLATE, 3 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 23 * IN_MILLISECONDS); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FLAME_BREAK: + DoCastVictim(SPELL_FLAMEBREAK); + events.ScheduleEvent(EVENT_FLAME_BREAK, 10 * IN_MILLISECONDS); + break; + case EVENT_IMMOLATE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_IMMOLATE); + events.ScheduleEvent(EVENT_IMMOLATE, 8 * IN_MILLISECONDS); + break; + case EVENT_TERRIFYING_ROAR: + DoCastVictim(SPELL_TERRIFYINGROAR); + events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 20 * IN_MILLISECONDS); + break; + } + } + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_thebeast() +{ + new boss_the_beast(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp new file mode 100644 index 00000000000..afee357aad5 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_REND = 16509, + SPELL_STRIKE = 15580, + SPELL_INTIMIDATING_ROAR = 16508 +}; + +enum Says +{ + SAY_SUMMON = 0, + SAY_AGGRO = 1, +}; + +enum Events +{ + EVENT_REND = 1, + EVENT_STRIKE = 2, + EVENT_INTIMIDATING_ROAR = 3 +}; + +class boss_urok_doomhowl : public CreatureScript +{ +public: + boss_urok_doomhowl() : CreatureScript("boss_urok_doomhowl") { } + + struct boss_urok_doomhowlAI : public BossAI + { + boss_urok_doomhowlAI(Creature* creature) : BossAI(creature, DATA_UROK_DOOMHOWL) {} + + void Reset() OVERRIDE + { + _Reset(); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(SPELL_REND, urand(17000,20000)); + events.ScheduleEvent(SPELL_STRIKE, urand(10000,12000)); + Talk(SAY_AGGRO); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case SPELL_REND: + DoCastVictim(SPELL_REND); + events.ScheduleEvent(SPELL_REND, urand(8000,10000)); + break; + case SPELL_STRIKE: + DoCastVictim(SPELL_STRIKE); + events.ScheduleEvent(SPELL_STRIKE, urand(8000,10000)); + break; + default: + break; + } + } + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_urok_doomhowlAI(creature); + } +}; + +void AddSC_boss_urok_doomhowl() +{ + new boss_urok_doomhowl(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp new file mode 100644 index 00000000000..e3423fd02b6 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackrock_spire.h" + +enum Spells +{ + SPELL_SNAPKICK = 15618, + SPELL_CLEAVE = 15579, + SPELL_UPPERCUT = 10966, + SPELL_MORTALSTRIKE = 16856, + SPELL_PUMMEL = 15615, + SPELL_THROWAXE = 16075, +}; + +enum Events +{ + EVENT_SNAP_KICK = 1, + EVENT_CLEAVE = 2, + EVENT_UPPERCUT = 3, + EVENT_MORTAL_STRIKE = 4, + EVENT_PUMMEL = 5, + EVENT_THROW_AXE = 6, +}; + +class boss_warmaster_voone : public CreatureScript +{ +public: + boss_warmaster_voone() : CreatureScript("boss_warmaster_voone") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_warmastervooneAI(creature); + } + + struct boss_warmastervooneAI : public BossAI + { + boss_warmastervooneAI(Creature* creature) : BossAI(creature, DATA_WARMASTER_VOONE) {} + + void Reset() OVERRIDE + { + _Reset(); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_SNAP_KICK, 8 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_UPPERCUT, 20 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MORTAL_STRIKE, 12 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_PUMMEL, 32 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_THROW_AXE, 1 * IN_MILLISECONDS); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SNAP_KICK: + DoCastVictim(SPELL_SNAPKICK); + events.ScheduleEvent(EVENT_SNAP_KICK, 6 * IN_MILLISECONDS); + break; + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, 12 * IN_MILLISECONDS); + break; + case EVENT_UPPERCUT: + DoCastVictim(SPELL_UPPERCUT); + events.ScheduleEvent(EVENT_UPPERCUT, 14 * IN_MILLISECONDS); + break; + case EVENT_MORTAL_STRIKE: + DoCastVictim(SPELL_MORTALSTRIKE); + events.ScheduleEvent(EVENT_MORTAL_STRIKE, 10 * IN_MILLISECONDS); + break; + case EVENT_PUMMEL: + DoCastVictim(SPELL_PUMMEL); + events.ScheduleEvent(EVENT_MORTAL_STRIKE, 16 * IN_MILLISECONDS); + break; + case EVENT_THROW_AXE: + DoCastVictim(SPELL_THROWAXE); + events.ScheduleEvent(EVENT_THROW_AXE, 8 * IN_MILLISECONDS); + break; + } + } + DoMeleeAttackIfReady(); + } + }; + +}; + +void AddSC_boss_warmastervoone() +{ + new boss_warmaster_voone(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp new file mode 100644 index 00000000000..f0d252a5c5e --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp @@ -0,0 +1,671 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ObjectDefines.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "InstanceScript.h" +#include "ScriptedCreature.h" +#include "blackrock_spire.h" + +uint32 const DragonspireRunes[7] = { GO_HALL_RUNE_1, GO_HALL_RUNE_2, GO_HALL_RUNE_3, GO_HALL_RUNE_4, GO_HALL_RUNE_5, GO_HALL_RUNE_6, GO_HALL_RUNE_7 }; + +uint32 const DragonspireMobs[3] = { NPC_BLACKHAND_DREADWEAVER, NPC_BLACKHAND_SUMMONER, NPC_BLACKHAND_VETERAN }; + +enum EventIds +{ + EVENT_DARGONSPIRE_ROOM_STORE = 1, + EVENT_DARGONSPIRE_ROOM_CHECK = 2, + EVENT_UROK_DOOMHOWL_SPAWNS_1 = 3, + EVENT_UROK_DOOMHOWL_SPAWNS_2 = 4, + EVENT_UROK_DOOMHOWL_SPAWNS_3 = 5, + EVENT_UROK_DOOMHOWL_SPAWNS_4 = 6, + EVENT_UROK_DOOMHOWL_SPAWNS_5 = 7, + EVENT_UROK_DOOMHOWL_SPAWN_IN = 8 +}; + +class instance_blackrock_spire : public InstanceMapScript +{ +public: + instance_blackrock_spire() : InstanceMapScript(BRSScriptName, 229) { } + + struct instance_blackrock_spireMapScript : public InstanceScript + { + instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map) + { + SetBossNumber(EncounterCount); + HighlordOmokk = 0; + ShadowHunterVoshgajin = 0; + WarMasterVoone = 0; + MotherSmolderweb = 0; + UrokDoomhowl = 0; + QuartermasterZigris = 0; + GizrultheSlavener = 0; + Halycon = 0; + OverlordWyrmthalak = 0; + PyroguardEmberseer = 0; + WarchiefRendBlackhand = 0; + Gyth = 0; + LordVictorNefarius = 0; + TheBeast = 0; + GeneralDrakkisath = 0; + go_emberseerin = 0; + go_doors = 0; + go_emberseerout = 0; + go_blackrockaltar = 0; + go_portcullis_active = 0; + go_portcullis_tobossrooms = 0; + } + + void OnCreatureCreate(Creature* creature) + { + switch (creature->GetEntry()) + { + case NPC_HIGHLORD_OMOKK: + HighlordOmokk = creature->GetGUID(); + break; + case NPC_SHADOW_HUNTER_VOSHGAJIN: + ShadowHunterVoshgajin = creature->GetGUID(); + break; + case NPC_WARMASTER_VOONE: + WarMasterVoone = creature->GetGUID(); + break; + case NPC_MOTHER_SMOLDERWEB: + MotherSmolderweb = creature->GetGUID(); + break; + case NPC_UROK_DOOMHOWL: + UrokDoomhowl = creature->GetGUID(); + break; + case NPC_QUARTERMASTER_ZIGRIS: + QuartermasterZigris = creature->GetGUID(); + break; + case NPC_GIZRUL_THE_SLAVENER: + GizrultheSlavener = creature->GetGUID(); + break; + case NPC_HALYCON: + Halycon = creature->GetGUID(); + break; + case NPC_OVERLORD_WYRMTHALAK: + OverlordWyrmthalak = creature->GetGUID(); + break; + case NPC_PYROGAURD_EMBERSEER: + PyroguardEmberseer = creature->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + creature->DisappearAndDie(); + break; + case NPC_WARCHIEF_REND_BLACKHAND: + WarchiefRendBlackhand = creature->GetGUID(); + if (GetBossState(DATA_GYTH) == DONE) + creature->DisappearAndDie(); + break; + case NPC_GYTH: + Gyth = creature->GetGUID(); + break; + case NPC_THE_BEAST: + TheBeast = creature->GetGUID(); + break; + case NPC_GENERAL_DRAKKISATH: + GeneralDrakkisath = creature->GetGUID(); + break; + case NPC_LORD_VICTOR_NEFARIUS: + LordVictorNefarius = creature->GetGUID(); + if (GetBossState(DATA_GYTH) == DONE) + creature->DisappearAndDie(); + break; + } + } + + void OnGameObjectCreate(GameObject* go) + { + switch (go->GetEntry()) + { + case GO_WHELP_SPAWNER: + go->CastSpell(NULL, SPELL_SUMMON_ROOKERY_WHELP); + break; + case GO_EMBERSEER_IN: + go_emberseerin = go->GetGUID(); + if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE) + HandleGameObject(0, true, go); + break; + case GO_DOORS: + go_doors = go->GetGUID(); + if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE) + HandleGameObject(0, true, go); + break; + case GO_EMBERSEER_OUT: + go_emberseerout = go->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, true, go); + break; + case GO_HALL_RUNE_1: + go_roomrunes[0] = go->GetGUID(); + if (GetBossState(DATA_HALL_RUNE_1) == DONE) + HandleGameObject(0, false, go); + break; + case GO_HALL_RUNE_2: + go_roomrunes[1] = go->GetGUID(); + if (GetBossState(DATA_HALL_RUNE_2) == DONE) + HandleGameObject(0, false, go); + break; + case GO_HALL_RUNE_3: + go_roomrunes[2] = go->GetGUID(); + if (GetBossState(DATA_HALL_RUNE_3) == DONE) + HandleGameObject(0, false, go); + break; + case GO_HALL_RUNE_4: + go_roomrunes[3] = go->GetGUID(); + if (GetBossState(DATA_HALL_RUNE_4) == DONE) + HandleGameObject(0, false, go); + break; + case GO_HALL_RUNE_5: + go_roomrunes[4] = go->GetGUID(); + if (GetBossState(DATA_HALL_RUNE_5) == DONE) + HandleGameObject(0, false, go); + break; + case GO_HALL_RUNE_6: + go_roomrunes[5] = go->GetGUID(); + if (GetBossState(DATA_HALL_RUNE_6) == DONE) + HandleGameObject(0, false, go); + break; + case GO_HALL_RUNE_7: + go_roomrunes[6] = go->GetGUID(); + if (GetBossState(DATA_HALL_RUNE_7) == DONE) + HandleGameObject(0, false, go); + break; + case GO_EMBERSEER_RUNE_1: + go_emberseerrunes[0] = go->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); + break; + case GO_EMBERSEER_RUNE_2: + go_emberseerrunes[1] = go->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); + break; + case GO_EMBERSEER_RUNE_3: + go_emberseerrunes[2] = go->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); + break; + case GO_EMBERSEER_RUNE_4: + go_emberseerrunes[3] = go->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); + break; + case GO_EMBERSEER_RUNE_5: + go_emberseerrunes[4] = go->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); + break; + case GO_EMBERSEER_RUNE_6: + go_emberseerrunes[5] = go->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); + break; + case GO_EMBERSEER_RUNE_7: + go_emberseerrunes[6] = go->GetGUID(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); + break; + case GO_PORTCULLIS_ACTIVE: + go_portcullis_active = go->GetGUID(); + if (GetBossState(DATA_GYTH) == DONE) + HandleGameObject(0, true, go); + break; + case GO_PORTCULLIS_TOBOSSROOMS: + go_portcullis_tobossrooms = go->GetGUID(); + if (GetBossState(DATA_GYTH) == DONE) + HandleGameObject(0, true, go); + break; + default: + break; + } + } + + bool SetBossState(uint32 type, EncounterState state) + { + if (!InstanceScript::SetBossState(type, state)) + return false; + + switch (type) + { + case DATA_HIGHLORD_OMOKK: + case DATA_SHADOW_HUNTER_VOSHGAJIN: + case DATA_WARMASTER_VOONE: + case DATA_MOTHER_SMOLDERWEB: + case DATA_UROK_DOOMHOWL: + case DATA_QUARTERMASTER_ZIGRIS: + case DATA_GIZRUL_THE_SLAVENER: + case DATA_HALYCON: + case DATA_OVERLORD_WYRMTHALAK: + case DATA_PYROGAURD_EMBERSEER: + case DATA_WARCHIEF_REND_BLACKHAND: + case DATA_GYTH: + case DATA_THE_BEAST: + case DATA_GENERAL_DRAKKISATH: + case DATA_DRAGONSPIRE_ROOM: + break; + default: + break; + } + + return true; + } + + void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) + { + switch (eventId) + { + case EVENT_PYROGUARD_EMBERSEER: + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == NOT_STARTED) + { + if (Creature* Emberseer = instance->GetCreature(PyroguardEmberseer)) + Emberseer->AI()->SetData(1, 1); + } + break; + case EVENT_UROK_DOOMHOWL: + if (GetBossState(NPC_UROK_DOOMHOWL) == NOT_STARTED) + { + + } + break; + default: + break; + } + } + + void SetData(uint32 type, uint32 data) OVERRIDE + { + switch (type) + { + case AREATRIGGER: + if (data == AREATRIGGER_DRAGONSPIRE_HALL) + { + if (GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE) + Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_STORE, 1000); + } + default: + break; + } + } + + uint64 GetData64(uint32 type) const OVERRIDE + { + switch (type) + { + case DATA_HIGHLORD_OMOKK: + return HighlordOmokk; + break; + case DATA_SHADOW_HUNTER_VOSHGAJIN: + return ShadowHunterVoshgajin; + break; + case DATA_WARMASTER_VOONE: + return WarMasterVoone; + break; + case DATA_MOTHER_SMOLDERWEB: + return MotherSmolderweb; + break; + case DATA_UROK_DOOMHOWL: + return UrokDoomhowl; + break; + case DATA_QUARTERMASTER_ZIGRIS: + return QuartermasterZigris; + break; + case DATA_GIZRUL_THE_SLAVENER: + return GizrultheSlavener; + break; + case DATA_HALYCON: + return Halycon; + break; + case DATA_OVERLORD_WYRMTHALAK: + return OverlordWyrmthalak; + break; + case DATA_PYROGAURD_EMBERSEER: + return PyroguardEmberseer; + break; + case DATA_WARCHIEF_REND_BLACKHAND: + return WarchiefRendBlackhand; + break; + case DATA_GYTH: + return Gyth; + break; + case DATA_THE_BEAST: + return TheBeast; + break; + case DATA_GENERAL_DRAKKISATH: + return GeneralDrakkisath; + break; + case GO_EMBERSEER_IN: + return go_emberseerin; + break; + case GO_DOORS: + return go_doors; + break; + case GO_EMBERSEER_OUT: + return go_emberseerout; + break; + case GO_HALL_RUNE_1: + return go_roomrunes[0]; + break; + case GO_HALL_RUNE_2: + return go_roomrunes[1]; + break; + case GO_HALL_RUNE_3: + return go_roomrunes[2]; + break; + case GO_HALL_RUNE_4: + return go_roomrunes[3]; + break; + case GO_HALL_RUNE_5: + return go_roomrunes[4]; + break; + case GO_HALL_RUNE_6: + return go_roomrunes[5]; + break; + case GO_HALL_RUNE_7: + return go_roomrunes[6]; + break; + case GO_EMBERSEER_RUNE_1: + return go_emberseerrunes[0]; + break; + case GO_EMBERSEER_RUNE_2: + return go_emberseerrunes[1]; + break; + case GO_EMBERSEER_RUNE_3: + return go_emberseerrunes[2]; + break; + case GO_EMBERSEER_RUNE_4: + return go_emberseerrunes[3]; + break; + case GO_EMBERSEER_RUNE_5: + return go_emberseerrunes[4]; + break; + case GO_EMBERSEER_RUNE_6: + return go_emberseerrunes[5]; + break; + case GO_EMBERSEER_RUNE_7: + return go_emberseerrunes[6]; + break; + case GO_PORTCULLIS_ACTIVE: + return go_portcullis_active; + break; + case GO_PORTCULLIS_TOBOSSROOMS: + return go_portcullis_tobossrooms; + break; + } + return 0; + } + + void Update(uint32 diff) + { + Events.Update(diff); + + while (uint32 eventId = Events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_DARGONSPIRE_ROOM_STORE: + Dragonspireroomstore(); + Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 3000); + break; + case EVENT_DARGONSPIRE_ROOM_CHECK: + Dragonspireroomcheck(); + if ((GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE)) + Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 3000); + break; + default: + break; + } + } + } + + void Dragonspireroomstore() + { + uint8 creaturecount; + + for (uint8 i = 0; i < 7; ++i) + { + creaturecount = 0; + + if (GameObject* rune = instance->GetGameObject(go_roomrunes[i])) + { + for (uint8 ii = 0; ii < 3; ++ii) + { + std::list creatureList; + GetCreatureListWithEntryInGrid(creatureList, rune, DragonspireMobs[ii], 15.0f); + for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) + { + if (Creature* creatureList = *itr) + { + runecreaturelist[i] [creaturecount] = creatureList->GetGUID(); + ++creaturecount; + } + } + } + } + } + } + + void Dragonspireroomcheck() + { + Creature* mob = NULL; + GameObject* rune = NULL; + + for (uint8 i = 0; i < 7; ++i) + { + bool _mobAlive = false; + rune = instance->GetGameObject(go_roomrunes[i]); + if (!rune) + continue; + + if (rune->GetGoState() == GO_STATE_ACTIVE) + { + for (uint8 ii = 0; ii < 5; ++ii) + { + mob = instance->GetCreature(runecreaturelist[i][ii]); + if (mob && mob->IsAlive()) + _mobAlive = true; + } + } + + if (!_mobAlive && rune->GetGoState() == GO_STATE_ACTIVE) + { + HandleGameObject(0, false, rune); + + switch (rune->GetEntry()) + { + case GO_HALL_RUNE_1: + SetBossState(DATA_HALL_RUNE_1, DONE); + break; + case GO_HALL_RUNE_2: + SetBossState(DATA_HALL_RUNE_2, DONE); + break; + case GO_HALL_RUNE_3: + SetBossState(DATA_HALL_RUNE_3, DONE); + break; + case GO_HALL_RUNE_4: + SetBossState(DATA_HALL_RUNE_4, DONE); + break; + case GO_HALL_RUNE_5: + SetBossState(DATA_HALL_RUNE_5, DONE); + break; + case GO_HALL_RUNE_6: + SetBossState(DATA_HALL_RUNE_6, DONE); + break; + case GO_HALL_RUNE_7: + SetBossState(DATA_HALL_RUNE_7, DONE); + break; + default: + break; + } + } + } + + if (GetBossState(DATA_HALL_RUNE_1) == DONE && GetBossState(DATA_HALL_RUNE_2) == DONE && GetBossState(DATA_HALL_RUNE_3) == DONE && + GetBossState(DATA_HALL_RUNE_4) == DONE && GetBossState(DATA_HALL_RUNE_5) == DONE && GetBossState(DATA_HALL_RUNE_6) == DONE && + GetBossState(DATA_HALL_RUNE_7) == DONE) + { + SetBossState(DATA_DRAGONSPIRE_ROOM, DONE); + if (GameObject* door1 = instance->GetGameObject(go_emberseerin)) + HandleGameObject(0, true, door1); + if (GameObject* door2 = instance->GetGameObject(go_doors)) + HandleGameObject(0, true, door2); + } + } + + std::string GetSaveData() + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << "B S " << GetBossSaveData(); + + OUT_SAVE_INST_DATA_COMPLETE; + return saveStream.str(); + } + + void Load(const char* strIn) + { + if (!strIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(strIn); + + char dataHead1, dataHead2; + + std::istringstream loadStream(strIn); + loadStream >> dataHead1 >> dataHead2; + + if (dataHead1 == 'B' && dataHead2 == 'S') + { + for (uint8 i = 0; i < EncounterCount; ++i) + { + uint32 tmpState; + loadStream >> tmpState; + if (tmpState == IN_PROGRESS || tmpState > SPECIAL) + tmpState = NOT_STARTED; + + SetBossState(i, EncounterState(tmpState)); + } + } + else + OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } + + protected: + EventMap Events; + uint32 encounter[EncounterCount]; + std::string m_strInstData; + uint64 HighlordOmokk; + uint64 ShadowHunterVoshgajin; + uint64 WarMasterVoone; + uint64 MotherSmolderweb; + uint64 UrokDoomhowl; + uint64 QuartermasterZigris; + uint64 GizrultheSlavener; + uint64 Halycon; + uint64 OverlordWyrmthalak; + uint64 PyroguardEmberseer; + uint64 WarchiefRendBlackhand; + uint64 Gyth; + uint64 LordVictorNefarius; + uint64 TheBeast; + uint64 GeneralDrakkisath; + uint64 go_emberseerin; + uint64 go_doors; + uint64 go_emberseerout; + uint64 go_blackrockaltar; + uint64 go_roomrunes[7]; + uint64 go_emberseerrunes[7]; + uint64 runecreaturelist[7][5]; + uint64 go_portcullis_active; + uint64 go_portcullis_tobossrooms; + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_blackrock_spireMapScript(map); + } +}; + +/*##### +# at_dragonspire_hall +#####*/ + +class at_dragonspire_hall : public AreaTriggerScript +{ +public: + at_dragonspire_hall() : AreaTriggerScript("at_dragonspire_hall") { } + + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE + { + if (player && player->IsAlive()) + { + if (InstanceScript* instance = player->GetInstanceScript()) + { + instance->SetData(AREATRIGGER, AREATRIGGER_DRAGONSPIRE_HALL); + return true; + } + } + + return false; + } +}; + +/*##### +# at_blackrock_stadium +#####*/ + +class at_blackrock_stadium : public AreaTriggerScript +{ +public: + at_blackrock_stadium() : AreaTriggerScript("at_blackrock_stadium") { } + + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE + { + if (player && player->IsAlive()) + { + InstanceScript* instance = player->GetInstanceScript(); + if (!instance) + return false; + + if (Creature* rend = player->FindNearestCreature(NPC_WARCHIEF_REND_BLACKHAND, 50.0f)) + { + rend->AI()->SetData(AREATRIGGER, AREATRIGGER_BLACKROCK_STADIUM); + return true; + } + } + + return false; + } +}; + +void AddSC_instance_blackrock_spire() +{ + new instance_blackrock_spire(); + new at_dragonspire_hall(); + new at_blackrock_stadium(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h new file mode 100644 index 00000000000..acdbf0cd483 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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_LAIR_H +#define DEF_BLACKWING_LAIR_H + +uint32 const EncounterCount = 8; + +#define BRLScriptName "instance_blackwing_lair" + +enum BWLEncounter +{ + BOSS_RAZORGORE = 0, + BOSS_VAELASTRAZ = 1, + BOSS_BROODLORD = 2, + BOSS_FIREMAW = 3, + BOSS_EBONROC = 4, + BOSS_FLAMEGOR = 5, + BOSS_CHROMAGGUS = 6, + BOSS_NEFARIAN = 7 +}; + +enum CreatureIds +{ + NPC_RAZORGORE = 12435, + NPC_BLACKWING_DRAGON = 12422, + NPC_BLACKWING_TASKMASTER = 12458, + NPC_BLACKWING_LEGIONAIRE = 12416, + NPC_BLACKWING_WARLOCK = 12459, + NPC_VAELASTRAZ = 13020, + NPC_BROODLORD = 12017, + NPC_FIRENAW = 11983, + NPC_EBONROC = 14601, + NPC_FLAMEGOR = 11981, + NPC_CHROMAGGUS = 14020, + NPC_VICTOR_NEFARIUS = 10162, + NPC_NEFARIAN = 11583 +}; + +enum BWLData64 +{ + DATA_RAZORGORE_THE_UNTAMED = 1, + DATA_VAELASTRAZ_THE_CORRUPT, + DATA_BROODLORD_LASHLAYER, + DATA_FIRENAW, + DATA_EBONROC, + DATA_FLAMEGOR, + DATA_CHROMAGGUS, + DATA_LORD_VICTOR_NEFARIUS, + DATA_NEFARIAN +}; + +enum BWLEvents +{ + EVENT_RAZOR_SPAWN = 1, + EVENT_RAZOR_PHASE_TWO = 2, + EVENT_RESPAWN_NEFARIUS = 3 +}; + +enum BWLMisc +{ + // Razorgore Egg Event + ACTION_PHASE_TWO = 1, + DATA_EGG_EVENT +}; + +#endif \ No newline at end of file diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp new file mode 100644 index 00000000000..c9dc3d8f134 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackwing_lair.h" + +enum Say +{ + SAY_AGGRO = 0, + SAY_LEASH = 1 +}; + +enum Spells +{ + SPELL_CLEAVE = 26350, + SPELL_BLASTWAVE = 23331, + SPELL_MORTALSTRIKE = 24573, + SPELL_KNOCKBACK = 25778 +}; + +enum Events +{ + EVENT_CLEAVE = 1, + EVENT_BLASTWAVE = 2, + EVENT_MORTALSTRIKE = 3, + EVENT_KNOCKBACK = 4, + EVENT_CHECK = 5 +}; + +class boss_broodlord : public CreatureScript +{ +public: + boss_broodlord() : CreatureScript("boss_broodlord") { } + + struct boss_broodlordAI : public BossAI + { + boss_broodlordAI(Creature* creature) : BossAI(creature, BOSS_BROODLORD) { } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + if (instance->GetBossState(BOSS_VAELASTRAZ) != DONE) + { + EnterEvadeMode(); + return; + } + + _EnterCombat(); + Talk(SAY_AGGRO); + + events.ScheduleEvent(EVENT_CLEAVE, 8000); + events.ScheduleEvent(EVENT_BLASTWAVE, 12000); + events.ScheduleEvent(EVENT_MORTALSTRIKE, 20000); + events.ScheduleEvent(EVENT_KNOCKBACK, 30000); + events.ScheduleEvent(EVENT_CHECK, 1000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, 7000); + break; + case EVENT_BLASTWAVE: + DoCastVictim(SPELL_BLASTWAVE); + events.ScheduleEvent(EVENT_BLASTWAVE, urand(8000, 16000)); + break; + case EVENT_MORTALSTRIKE: + DoCastVictim(SPELL_MORTALSTRIKE); + events.ScheduleEvent(EVENT_MORTALSTRIKE, urand(25000, 35000)); + break; + case EVENT_KNOCKBACK: + DoCastVictim(SPELL_KNOCKBACK); + if (DoGetThreat(me->GetVictim())) + DoModifyThreatPercent(me->GetVictim(), -50); + events.ScheduleEvent(EVENT_KNOCKBACK, urand(15000, 30000)); + break; + case EVENT_CHECK: + if (me->GetDistance(me->GetHomePosition()) > 150.0f) + { + Talk(SAY_LEASH); + EnterEvadeMode(); + } + events.ScheduleEvent(EVENT_CHECK, 1000); + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_broodlordAI(creature); + } +}; + +void AddSC_boss_broodlord() +{ + new boss_broodlord(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp new file mode 100644 index 00000000000..05effabe557 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp @@ -0,0 +1,292 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "Player.h" +#include "blackwing_lair.h" + +enum Emotes +{ + EMOTE_FRENZY = 0, + EMOTE_SHIMMER = 1, +}; + +enum Spells +{ + // These spells are actually called elemental shield + // What they do is decrease all damage by 75% then they increase + // One school of damage by 1100% + SPELL_FIRE_VULNERABILITY = 22277, + SPELL_FROST_VULNERABILITY = 22278, + SPELL_SHADOW_VULNERABILITY = 22279, + SPELL_NATURE_VULNERABILITY = 22280, + SPELL_ARCANE_VULNERABILITY = 22281, + // Other spells + SPELL_INCINERATE = 23308, //Incinerate 23308, 23309 + SPELL_TIMELAPSE = 23310, //Time lapse 23310, 23311(old threat mod that was removed in 2.01) + SPELL_CORROSIVEACID = 23313, //Corrosive Acid 23313, 23314 + SPELL_IGNITEFLESH = 23315, //Ignite Flesh 23315, 23316 + SPELL_FROSTBURN = 23187, //Frost burn 23187, 23189 + // Brood Affliction 23173 - Scripted Spell that cycles through all targets within 100 yards and has a chance to cast one of the afflictions on them + // Since Scripted spells arn't coded I'll just write a function that does the same thing + SPELL_BROODAF_BLUE = 23153, //Blue affliction 23153 + SPELL_BROODAF_BLACK = 23154, //Black affliction 23154 + SPELL_BROODAF_RED = 23155, //Red affliction 23155 (23168 on death) + SPELL_BROODAF_BRONZE = 23170, //Bronze Affliction 23170 + SPELL_BROODAF_GREEN = 23169, //Brood Affliction Green 23169 + SPELL_CHROMATIC_MUT_1 = 23174, //Spell cast on player if they get all 5 debuffs + SPELL_FRENZY = 28371, //The frenzy spell may be wrong + SPELL_ENRAGE = 28747 +}; + +enum Events +{ + EVENT_SHIMMER = 1, + EVENT_BREATH_1 = 2, + EVENT_BREATH_2 = 3, + EVENT_AFFLICTION = 4, + EVENT_FRENZY = 5 +}; + +class boss_chromaggus : public CreatureScript +{ +public: + boss_chromaggus() : CreatureScript("boss_chromaggus") { } + + struct boss_chromaggusAI : public BossAI + { + boss_chromaggusAI(Creature* creature) : BossAI(creature, BOSS_CHROMAGGUS) + { + // Select the 2 breaths that we are going to use until despawned + // 5 possiblities for the first breath, 4 for the second, 20 total possiblites + // This way we don't end up casting 2 of the same breath + // TL TL would be stupid + switch (urand(0, 19)) + { + // B1 - Incin + case 0: + Breath1_Spell = SPELL_INCINERATE; + Breath2_Spell = SPELL_TIMELAPSE; + break; + case 1: + Breath1_Spell = SPELL_INCINERATE; + Breath2_Spell = SPELL_CORROSIVEACID; + break; + case 2: + Breath1_Spell = SPELL_INCINERATE; + Breath2_Spell = SPELL_IGNITEFLESH; + break; + case 3: + Breath1_Spell = SPELL_INCINERATE; + Breath2_Spell = SPELL_FROSTBURN; + break; + + // B1 - TL + case 4: + Breath1_Spell = SPELL_TIMELAPSE; + Breath2_Spell = SPELL_INCINERATE; + break; + case 5: + Breath1_Spell = SPELL_TIMELAPSE; + Breath2_Spell = SPELL_CORROSIVEACID; + break; + case 6: + Breath1_Spell = SPELL_TIMELAPSE; + Breath2_Spell = SPELL_IGNITEFLESH; + break; + case 7: + Breath1_Spell = SPELL_TIMELAPSE; + Breath2_Spell = SPELL_FROSTBURN; + break; + + //B1 - Acid + case 8: + Breath1_Spell = SPELL_CORROSIVEACID; + Breath2_Spell = SPELL_INCINERATE; + break; + case 9: + Breath1_Spell = SPELL_CORROSIVEACID; + Breath2_Spell = SPELL_TIMELAPSE; + break; + case 10: + Breath1_Spell = SPELL_CORROSIVEACID; + Breath2_Spell = SPELL_IGNITEFLESH; + break; + case 11: + Breath1_Spell = SPELL_CORROSIVEACID; + Breath2_Spell = SPELL_FROSTBURN; + break; + + //B1 - Ignite + case 12: + Breath1_Spell = SPELL_IGNITEFLESH; + Breath2_Spell = SPELL_INCINERATE; + break; + case 13: + Breath1_Spell = SPELL_IGNITEFLESH; + Breath2_Spell = SPELL_CORROSIVEACID; + break; + case 14: + Breath1_Spell = SPELL_IGNITEFLESH; + Breath2_Spell = SPELL_TIMELAPSE; + break; + case 15: + Breath1_Spell = SPELL_IGNITEFLESH; + Breath2_Spell = SPELL_FROSTBURN; + break; + + //B1 - Frost + case 16: + Breath1_Spell = SPELL_FROSTBURN; + Breath2_Spell = SPELL_INCINERATE; + break; + case 17: + Breath1_Spell = SPELL_FROSTBURN; + Breath2_Spell = SPELL_TIMELAPSE; + break; + case 18: + Breath1_Spell = SPELL_FROSTBURN; + Breath2_Spell = SPELL_CORROSIVEACID; + break; + case 19: + Breath1_Spell = SPELL_FROSTBURN; + Breath2_Spell = SPELL_IGNITEFLESH; + break; + }; + + EnterEvadeMode(); + } + + void Reset() OVERRIDE + { + _Reset(); + + CurrentVurln_Spell = 0; // We use this to store our last vulnerabilty spell so we can remove it later + Enraged = false; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + if (instance && instance->GetBossState(BOSS_FLAMEGOR) != DONE) + { + EnterEvadeMode(); + return; + } + _EnterCombat(); + + events.ScheduleEvent(EVENT_SHIMMER, 0); + events.ScheduleEvent(EVENT_BREATH_1, 30000); + events.ScheduleEvent(EVENT_BREATH_2, 60000); + events.ScheduleEvent(EVENT_AFFLICTION, 10000); + events.ScheduleEvent(EVENT_FRENZY, 15000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHIMMER: + { + // Remove old vulnerabilty spell + if (CurrentVurln_Spell) + me->RemoveAurasDueToSpell(CurrentVurln_Spell); + + // Cast new random vulnerabilty on self + uint32 spell = RAND(SPELL_FIRE_VULNERABILITY, SPELL_FROST_VULNERABILITY, SPELL_SHADOW_VULNERABILITY, SPELL_NATURE_VULNERABILITY, SPELL_ARCANE_VULNERABILITY); + DoCast(me, spell); + CurrentVurln_Spell = spell; + Talk(EMOTE_SHIMMER); + events.ScheduleEvent(EVENT_SHIMMER, 45000); + break; + } + case EVENT_BREATH_1: + DoCastVictim(Breath1_Spell); + events.ScheduleEvent(EVENT_BREATH_1, 60000); + break; + case EVENT_BREATH_2: + DoCastVictim(Breath2_Spell); + events.ScheduleEvent(EVENT_BREATH_2, 60000); + break; + case EVENT_AFFLICTION: + { + Map::PlayerList const &players = me->GetMap()->GetPlayers(); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* player = itr->GetSource()->ToPlayer()) + { + DoCast(player, RAND(SPELL_BROODAF_BLUE, SPELL_BROODAF_BLACK, SPELL_BROODAF_RED, SPELL_BROODAF_BRONZE, SPELL_BROODAF_GREEN), true); + + if (player->HasAura(SPELL_BROODAF_BLUE) && + player->HasAura(SPELL_BROODAF_BLACK) && + player->HasAura(SPELL_BROODAF_RED) && + player->HasAura(SPELL_BROODAF_BRONZE) && + player->HasAura(SPELL_BROODAF_GREEN)) + { + DoCast(player, SPELL_CHROMATIC_MUT_1); + } + + } + } + } + events.ScheduleEvent(EVENT_AFFLICTION, 10000); + break; + case EVENT_FRENZY: + DoCast(me, SPELL_FRENZY); + events.ScheduleEvent(EVENT_FRENZY, urand(10000, 15000)); + break; + } + } + + // Enrage if not already enraged and below 20% + if (!Enraged && HealthBelowPct(20)) + { + DoCast(me, SPELL_ENRAGE); + Enraged = true; + } + + DoMeleeAttackIfReady(); + } + + private: + uint32 Breath1_Spell; + uint32 Breath2_Spell; + uint32 CurrentVurln_Spell; + bool Enraged; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_chromaggusAI(creature); + } +}; + +void AddSC_boss_chromaggus() +{ + new boss_chromaggus(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp new file mode 100644 index 00000000000..0d79f3faeee --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackwing_lair.h" + +enum Spells +{ + SPELL_SHADOWFLAME = 22539, + SPELL_WINGBUFFET = 23339, + SPELL_SHADOWOFEBONROC = 23340 +}; + +enum Events +{ + EVENT_SHADOWFLAME = 1, + EVENT_WINGBUFFET = 2, + EVENT_SHADOWOFEBONROC = 3 +}; + +class boss_ebonroc : public CreatureScript +{ +public: + boss_ebonroc() : CreatureScript("boss_ebonroc") { } + + struct boss_ebonrocAI : public BossAI + { + boss_ebonrocAI(Creature* creature) : BossAI(creature, BOSS_EBONROC) { } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) + { + EnterEvadeMode(); + return; + } + _EnterCombat(); + + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + events.ScheduleEvent(EVENT_SHADOWOFEBONROC, urand(8000, 10000)); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHADOWFLAME: + DoCastVictim(SPELL_SHADOWFLAME); + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + break; + case EVENT_WINGBUFFET: + DoCastVictim(SPELL_WINGBUFFET); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + break; + case EVENT_SHADOWOFEBONROC: + DoCastVictim(SPELL_SHADOWOFEBONROC); + events.ScheduleEvent(EVENT_SHADOWOFEBONROC, urand(8000, 10000)); + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_ebonrocAI(creature); + } +}; + +void AddSC_boss_ebonroc() +{ + new boss_ebonroc(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp new file mode 100644 index 00000000000..369e4e02f5a --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackwing_lair.h" + +enum Spells +{ + SPELL_SHADOWFLAME = 22539, + SPELL_WINGBUFFET = 23339, + SPELL_FLAMEBUFFET = 23341 +}; + +enum Events +{ + EVENT_SHADOWFLAME = 1, + EVENT_WINGBUFFET = 2, + EVENT_FLAMEBUFFET = 3 +}; + +class boss_firemaw : public CreatureScript +{ +public: + boss_firemaw() : CreatureScript("boss_firemaw") { } + + struct boss_firemawAI : public BossAI + { + boss_firemawAI(Creature* creature) : BossAI(creature, BOSS_FIREMAW) { } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) + { + EnterEvadeMode(); + return; + } + _EnterCombat(); + + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + events.ScheduleEvent(EVENT_FLAMEBUFFET, 5000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHADOWFLAME: + DoCastVictim(SPELL_SHADOWFLAME); + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + break; + case EVENT_WINGBUFFET: + DoCastVictim(SPELL_WINGBUFFET); + if (DoGetThreat(me->GetVictim())) + DoModifyThreatPercent(me->GetVictim(), -75); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + break; + case EVENT_FLAMEBUFFET: + DoCastVictim(SPELL_FLAMEBUFFET); + events.ScheduleEvent(EVENT_FLAMEBUFFET, 5000); + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_firemawAI(creature); + } +}; + +void AddSC_boss_firemaw() +{ + new boss_firemaw(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp new file mode 100644 index 00000000000..060bfeb60b3 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackwing_lair.h" + +enum Emotes +{ + EMOTE_FRENZY = 0, +}; + +enum Spells +{ + SPELL_SHADOWFLAME = 22539, + SPELL_WINGBUFFET = 23339, + SPELL_FRENZY = 23342 //This spell periodically triggers fire nova +}; + +enum Events +{ + EVENT_SHADOWFLAME = 1, + EVENT_WINGBUFFET = 2, + EVENT_FRENZY = 3 +}; + +class boss_flamegor : public CreatureScript +{ +public: + boss_flamegor() : CreatureScript("boss_flamegor") { } + + struct boss_flamegorAI : public BossAI + { + boss_flamegorAI(Creature* creature) : BossAI(creature, BOSS_FLAMEGOR) { } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) + { + EnterEvadeMode(); + return; + } + _EnterCombat(); + + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + events.ScheduleEvent(EVENT_FRENZY, 10000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHADOWFLAME: + DoCastVictim(SPELL_SHADOWFLAME); + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + break; + case EVENT_WINGBUFFET: + DoCastVictim(SPELL_WINGBUFFET); + if (DoGetThreat(me->GetVictim())) + DoModifyThreatPercent(me->GetVictim(), -75); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + break; + case EVENT_FRENZY: + Talk(EMOTE_FRENZY); + DoCast(me, SPELL_FRENZY); + events.ScheduleEvent(EVENT_FRENZY, urand(8000, 10000)); + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_flamegorAI(creature); + } +}; + +void AddSC_boss_flamegor() +{ + new boss_flamegor(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp new file mode 100644 index 00000000000..d49cca2045f --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -0,0 +1,584 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedGossip.h" +#include "ScriptedCreature.h" +#include "blackwing_lair.h" +#include "Player.h" + +enum Events +{ + // Victor Nefarius + EVENT_SPAWN_ADD = 1, + EVENT_SHADOW_BOLT = 2, + EVENT_FEAR = 3, + EVENT_MIND_CONTROL = 4, + // Nefarian + EVENT_SHADOWFLAME = 5, + EVENT_VEILOFSHADOW = 6, + EVENT_CLEAVE = 7, + EVENT_TAILLASH = 8, + EVENT_CLASSCALL = 9, + // UBRS + EVENT_CHAOS_1 = 10, + EVENT_CHAOS_2 = 11, + EVENT_PATH_2 = 12, + EVENT_PATH_3 = 13, + EVENT_SUCCESS_1 = 14, + EVENT_SUCCESS_2 = 15, + EVENT_SUCCESS_3 = 16, +}; + +enum Says +{ + // Nefarius + // UBRS + SAY_CHAOS_SPELL = 9, + SAY_SUCCESS = 10, + SAY_FAILURE = 11, + // BWL + SAY_GAMESBEGIN_1 = 12, + SAY_GAMESBEGIN_2 = 13, + // SAY_VAEL_INTRO = 14, Not used - when he corrupts Vaelastrasz + + // Nefarian + SAY_RANDOM = 0, + SAY_RAISE_SKELETONS = 1, + SAY_SLAY = 2, + SAY_DEATH = 3, + + SAY_MAGE = 4, + SAY_WARRIOR = 5, + SAY_DRUID = 6, + SAY_PRIEST = 7, + SAY_PALADIN = 8, + SAY_SHAMAN = 9, + SAY_WARLOCK = 10, + SAY_HUNTER = 11, + SAY_ROGUE = 12, + SAY_DEATH_KNIGHT = 13 +}; + +enum Gossip +{ + GOSSIP_ID = 21332, + GOSSIP_OPTION_ID = 0 +}; + +enum Paths +{ + NEFARIUS_PATH_2 = 1379671, + NEFARIUS_PATH_3 = 1379672 +}; + +enum GameObjects +{ + GO_PORTCULLIS_ACTIVE = 164726, + GO_PORTCULLIS_TOBOSSROOMS = 175186 +}; + +enum Creatures +{ + NPC_BRONZE_DRAKANOID = 14263, + NPC_BLUE_DRAKANOID = 14261, + NPC_RED_DRAKANOID = 14264, + NPC_GREEN_DRAKANOID = 14262, + NPC_BLACK_DRAKANOID = 14265, + NPC_CHROMATIC_DRAKANOID = 14302, + NPC_BONE_CONSTRUCT = 14605, + // UBRS + NPC_GYTH = 10339 +}; + +enum Spells +{ + // Victor Nefarius + // UBRS Spells + SPELL_CHROMATIC_CHAOS = 16337, // Self Cast hits 10339 + SPELL_VAELASTRASZZ_SPAWN = 16354, // Self Cast Depawn one sec after + // BWL Spells + SPELL_SHADOWBOLT = 22677, + SPELL_SHADOWBOLT_VOLLEY = 22665, + SPELL_SHADOW_COMMAND = 22667, + SPELL_FEAR = 22678, + + SPELL_NEFARIANS_BARRIER = 22663, + + // Nefarian + SPELL_SHADOWFLAME_INITIAL = 22992, + SPELL_SHADOWFLAME = 22539, + SPELL_BELLOWINGROAR = 22686, + SPELL_VEILOFSHADOW = 7068, + SPELL_CLEAVE = 20691, + SPELL_TAILLASH = 23364, + + SPELL_MAGE = 23410, // wild magic + SPELL_WARRIOR = 23397, // beserk + SPELL_DRUID = 23398, // cat form + SPELL_PRIEST = 23401, // corrupted healing + SPELL_PALADIN = 23418, // syphon blessing + SPELL_SHAMAN = 23425, // totems + SPELL_WARLOCK = 23427, // infernals + SPELL_HUNTER = 23436, // bow broke + SPELL_ROGUE = 23414, // Paralise + SPELL_DEATH_KNIGHT = 49576 // Death Grip + +// 19484 +// 22664 +// 22674 +// 22666 +}; + +Position const DrakeSpawnLoc[2] = // drakonid +{ + {-7591.151855f, -1204.051880f, 476.800476f, 3.0f}, + {-7514.598633f, -1150.448853f, 476.796570f, 3.0f} +}; + +Position const NefarianLoc[2] = +{ + {-7449.763672f, -1387.816040f, 526.783691f, 3.0f}, // nefarian spawn + {-7535.456543f, -1279.562500f, 476.798706f, 3.0f} // nefarian move +}; + +uint32 const Entry[5] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; + +class boss_victor_nefarius : public CreatureScript +{ +public: + boss_victor_nefarius() : CreatureScript("boss_victor_nefarius") { } + + struct boss_victor_nefariusAI : public BossAI + { + boss_victor_nefariusAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { } + + void Reset() OVERRIDE + { + if (me->GetMapId() == 469) + { + if (!me->FindNearestCreature(NPC_NEFARIAN, 1000.0f, true)) + _Reset(); + SpawnedAdds = 0; + + me->SetVisible(true); + me->SetPhaseMask(1, true); + me->SetUInt32Value(UNIT_NPC_FLAGS, 1); + me->setFaction(35); + me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR); + me->RemoveAura(SPELL_NEFARIANS_BARRIER); + } + } + + void JustReachedHome() OVERRIDE + { + Reset(); + } + + void BeginEvent(Player* target) + { + _EnterCombat(); + + Talk(SAY_GAMESBEGIN_2); + + me->setFaction(103); + me->SetUInt32Value(UNIT_NPC_FLAGS, 0); + DoCast(me, SPELL_NEFARIANS_BARRIER); + me->SetStandState(UNIT_STAND_STATE_STAND); + AttackStart(target); + events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000)); + events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000)); + //events.ScheduleEvent(EVENT_MIND_CONTROL, urand(30000, 35000)); + events.ScheduleEvent(EVENT_SPAWN_ADD, 10000); + } + + void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) OVERRIDE + { + if (summon->GetEntry() != NPC_NEFARIAN) + { + summon->UpdateEntry(NPC_BONE_CONSTRUCT); + summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + summon->SetReactState(REACT_PASSIVE); + summon->SetStandState(UNIT_STAND_STATE_DEAD); + } + } + + void JustSummoned(Creature* /*summon*/) OVERRIDE {} + + void SetData(uint32 type, uint32 data) OVERRIDE + { + if (instance && type == 1 && data == 1) + { + me->StopMoving(); + events.ScheduleEvent(EVENT_PATH_2, 9000); + } + + if (instance && type == 1 && data == 2) + { + events.ScheduleEvent(EVENT_SUCCESS_1, 5000); + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_PATH_2: + me->GetMotionMaster()->MovePath(NEFARIUS_PATH_2, false); + events.ScheduleEvent(EVENT_CHAOS_1, 7000); + break; + case EVENT_CHAOS_1: + if (Creature* gyth = me->FindNearestCreature(NPC_GYTH, 75.0f, true)) + { + me->SetFacingToObject(gyth); + Talk(SAY_CHAOS_SPELL); + } + events.ScheduleEvent(EVENT_CHAOS_2, 2000); + break; + case EVENT_CHAOS_2: + DoCast(SPELL_CHROMATIC_CHAOS); + me->SetFacingTo(1.570796f); + break; + case EVENT_SUCCESS_1: + if (Unit* player = me->SelectNearestPlayer(60.0f)) + { + me->SetInFront(player); + me->SendMovementFlagUpdate(); + Talk(SAY_SUCCESS); + if (GameObject* portcullis1 = me->FindNearestGameObject(GO_PORTCULLIS_ACTIVE, 65.0f)) + portcullis1->SetGoState(GO_STATE_ACTIVE); + if (GameObject* portcullis2 = me->FindNearestGameObject(GO_PORTCULLIS_TOBOSSROOMS, 80.0f)) + portcullis2->SetGoState(GO_STATE_ACTIVE); + } + events.ScheduleEvent(EVENT_SUCCESS_2, 4000); + break; + case EVENT_SUCCESS_2: + DoCast(me, SPELL_VAELASTRASZZ_SPAWN); + me->DespawnOrUnsummon(1000); + break; + case EVENT_PATH_3: + me->GetMotionMaster()->MovePath(NEFARIUS_PATH_3, false); + break; + default: + break; + } + } + return; + } + + // Only do this if we haven't spawned nefarian yet + if (UpdateVictim() && SpawnedAdds <= 42) + { + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHADOW_BOLT: + switch (urand(0, 1)) + { + case 0: + DoCastVictim(SPELL_SHADOWBOLT_VOLLEY); + break; + case 1: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) + DoCast(target, SPELL_SHADOWBOLT); + break; + } + DoResetThreat(); + events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000)); + break; + case EVENT_FEAR: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) + DoCast(target, SPELL_FEAR); + events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000)); + break; + case EVENT_MIND_CONTROL: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) + DoCast(target, SPELL_SHADOW_COMMAND); + events.ScheduleEvent(EVENT_MIND_CONTROL, urand(30000, 35000)); + break; + case EVENT_SPAWN_ADD: + for (uint8 i=0; i<2; ++i) + { + uint32 CreatureID; + if (urand(0, 2) == 0) + CreatureID = NPC_CHROMATIC_DRAKANOID; + else + CreatureID = Entry[urand(0, 4)]; + if (Creature* dragon = me->SummonCreature(CreatureID, DrakeSpawnLoc[i])) + { + dragon->setFaction(103); + dragon->AI()->AttackStart(me->GetVictim()); + } + + if (++SpawnedAdds >= 42) + { + if (Creature* nefarian = me->SummonCreature(NPC_NEFARIAN, NefarianLoc[0])) + { + nefarian->setActive(true); + nefarian->SetCanFly(true); + nefarian->SetDisableGravity(true); + nefarian->AI()->DoCastAOE(SPELL_SHADOWFLAME_INITIAL); + nefarian->GetMotionMaster()->MovePoint(1, NefarianLoc[1]); + } + events.CancelEvent(EVENT_MIND_CONTROL); + events.CancelEvent(EVENT_FEAR); + events.CancelEvent(EVENT_SHADOW_BOLT); + me->SetVisible(false); + return; + } + } + events.ScheduleEvent(EVENT_SPAWN_ADD, 4000); + break; + } + } + } + } + + void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE + { + if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) + { + player->CLOSE_GOSSIP_MENU(); + Talk(SAY_GAMESBEGIN_1); + BeginEvent(player); + } + } + + private: + uint32 SpawnedAdds; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_victor_nefariusAI(creature); + } +}; + +class boss_nefarian : public CreatureScript +{ +public: + boss_nefarian() : CreatureScript("boss_nefarian") { } + + struct boss_nefarianAI : public BossAI + { + boss_nefarianAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { } + + void Reset() OVERRIDE + { + Phase3 = false; + canDespawn = false; + DespawnTimer = 30000; + } + + void JustReachedHome() OVERRIDE + { + canDespawn = true; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + events.ScheduleEvent(EVENT_SHADOWFLAME, 12000); + events.ScheduleEvent(EVENT_FEAR, urand(25000, 35000)); + events.ScheduleEvent(EVENT_VEILOFSHADOW, urand(25000, 35000)); + events.ScheduleEvent(EVENT_CLEAVE, 7000); + //events.ScheduleEvent(EVENT_TAILLASH, 10000); + events.ScheduleEvent(EVENT_CLASSCALL, urand(30000, 35000)); + Talk(SAY_RANDOM); + } + + void JustDied(Unit* /*Killer*/) OVERRIDE + { + _JustDied(); + Talk(SAY_DEATH); + } + + void KilledUnit(Unit* victim) OVERRIDE + { + if (rand()%5) + return; + + Talk(SAY_SLAY, victim->GetGUID()); + } + + void MovementInform(uint32 type, uint32 id) OVERRIDE + { + if (type != POINT_MOTION_TYPE) + return; + + if (id == 1) + { + me->SetInCombatWithZone(); + if (me->GetVictim()) + AttackStart(me->GetVictim()); + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (canDespawn && DespawnTimer <= diff) + { + if (instance) + instance->SetBossState(BOSS_NEFARIAN, FAIL); + + std::list constructList; + me->GetCreatureListWithEntryInGrid(constructList, NPC_BONE_CONSTRUCT, 500.0f); + for (std::list::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr) + (*itr)->DespawnOrUnsummon(); + + } else DespawnTimer -= diff; + + if (!UpdateVictim()) + return; + + if (canDespawn) + canDespawn = false; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHADOWFLAME: + DoCastVictim(SPELL_SHADOWFLAME); + events.ScheduleEvent(EVENT_SHADOWFLAME, 12000); + break; + case EVENT_FEAR: + DoCastVictim(SPELL_BELLOWINGROAR); + events.ScheduleEvent(EVENT_FEAR, urand(25000, 35000)); + break; + case EVENT_VEILOFSHADOW: + DoCastVictim(SPELL_VEILOFSHADOW); + events.ScheduleEvent(EVENT_VEILOFSHADOW, urand(25000, 35000)); + break; + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, 7000); + break; + case EVENT_TAILLASH: + // Cast NYI since we need a better check for behind target + DoCastVictim(SPELL_TAILLASH); + events.ScheduleEvent(EVENT_TAILLASH, 10000); + break; + case EVENT_CLASSCALL: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true)) + switch (target->getClass()) + { + case CLASS_MAGE: + Talk(SAY_MAGE); + DoCast(me, SPELL_MAGE); + break; + case CLASS_WARRIOR: + Talk(SAY_WARRIOR); + DoCast(me, SPELL_WARRIOR); + break; + case CLASS_DRUID: + Talk(SAY_DRUID); + DoCast(target, SPELL_DRUID); + break; + case CLASS_PRIEST: + Talk(SAY_PRIEST); + DoCast(me, SPELL_PRIEST); + break; + case CLASS_PALADIN: + Talk(SAY_PALADIN); + DoCast(me, SPELL_PALADIN); + break; + case CLASS_SHAMAN: + Talk(SAY_SHAMAN); + DoCast(me, SPELL_SHAMAN); + break; + case CLASS_WARLOCK: + Talk(SAY_WARLOCK); + DoCast(me, SPELL_WARLOCK); + break; + case CLASS_HUNTER: + Talk(SAY_HUNTER); + DoCast(me, SPELL_HUNTER); + break; + case CLASS_ROGUE: + Talk(SAY_ROGUE); + DoCast(me, SPELL_ROGUE); + break; + case CLASS_DEATH_KNIGHT: + Talk(SAY_DEATH_KNIGHT); + DoCast(me, SPELL_DEATH_KNIGHT); + break; + default: + break; + } + events.ScheduleEvent(EVENT_CLASSCALL, urand(30000, 35000)); + break; + } + } + + // Phase3 begins when health below 20 pct + if (!Phase3 && HealthBelowPct(20)) + { + std::list constructList; + me->GetCreatureListWithEntryInGrid(constructList, NPC_BONE_CONSTRUCT, 500.0f); + for (std::list::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr) + if ((*itr) && !(*itr)->IsAlive()) + { + (*itr)->Respawn(); + (*itr)->SetInCombatWithZone(); + (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + (*itr)->SetReactState(REACT_AGGRESSIVE); + (*itr)->SetStandState(UNIT_STAND_STATE_STAND); + } + + Phase3 = true; + Talk(SAY_RAISE_SKELETONS); + } + + DoMeleeAttackIfReady(); + } + + private: + bool canDespawn; + uint32 DespawnTimer; + bool Phase3; + + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_nefarianAI(creature); + } +}; + +void AddSC_boss_nefarian() +{ + new boss_victor_nefarius(); + new boss_nefarian(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp new file mode 100644 index 00000000000..be2aeb9e223 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp @@ -0,0 +1,213 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "SpellScript.h" +#include "blackwing_lair.h" +#include "Player.h" + +enum Say +{ + SAY_EGGS_BROKEN1 = 0, + SAY_EGGS_BROKEN2 = 1, + SAY_EGGS_BROKEN3 = 2, + SAY_DEATH = 3, +}; + +enum Spells +{ + SPELL_MINDCONTROL = 42013, + SPELL_CHANNEL = 45537, + SPELL_EGG_DESTROY = 19873, + + SPELL_CLEAVE = 22540, + SPELL_WARSTOMP = 24375, + SPELL_FIREBALLVOLLEY = 22425, + SPELL_CONFLAGRATION = 23023 +}; + +enum Summons +{ + NPC_ELITE_DRACHKIN = 12422, + NPC_ELITE_WARRIOR = 12458, + NPC_WARRIOR = 12416, + NPC_MAGE = 12420, + NPC_WARLOCK = 12459, + + GO_EGG = 177807 +}; + +enum EVENTS +{ + EVENT_CLEAVE = 1, + EVENT_STOMP = 2, + EVENT_FIREBALL = 3, + EVENT_CONFLAGRATION = 4 +}; + +class boss_razorgore : public CreatureScript +{ +public: + boss_razorgore() : CreatureScript("boss_razorgore") { } + + struct boss_razorgoreAI : public BossAI + { + boss_razorgoreAI(Creature* creature) : BossAI(creature, BOSS_RAZORGORE) { } + + void Reset() OVERRIDE + { + _Reset(); + + secondPhase = false; + if (instance) + instance->SetData(DATA_EGG_EVENT, NOT_STARTED); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + _JustDied(); + Talk(SAY_DEATH); + + if (instance) + instance->SetData(DATA_EGG_EVENT, NOT_STARTED); + } + + void DoChangePhase() + { + events.ScheduleEvent(EVENT_CLEAVE, 15000); + events.ScheduleEvent(EVENT_STOMP, 35000); + events.ScheduleEvent(EVENT_FIREBALL, 7000); + events.ScheduleEvent(EVENT_CONFLAGRATION, 12000); + + secondPhase = true; + me->RemoveAllAuras(); + me->SetHealth(me->GetMaxHealth()); + } + + void DoAction(int32 action) OVERRIDE + { + if (action == ACTION_PHASE_TWO) + DoChangePhase(); + } + + void DamageTaken(Unit* /*who*/, uint32& damage) OVERRIDE + { + if (!secondPhase) + damage = 0; + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, urand(7000, 10000)); + break; + case EVENT_STOMP: + DoCastVictim(SPELL_WARSTOMP); + events.ScheduleEvent(EVENT_STOMP, urand(15000, 25000)); + break; + case EVENT_FIREBALL: + DoCastVictim(SPELL_FIREBALLVOLLEY); + events.ScheduleEvent(EVENT_FIREBALL, urand(12000, 15000)); + break; + case EVENT_CONFLAGRATION: + DoCastVictim(SPELL_CONFLAGRATION); + if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_CONFLAGRATION)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) + me->TauntApply(target); + events.ScheduleEvent(EVENT_CONFLAGRATION, 30000); + break; + } + } + DoMeleeAttackIfReady(); + } + + private: + bool secondPhase; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_razorgoreAI(creature); + } +}; + +class go_orb_of_domination : public GameObjectScript +{ +public: + go_orb_of_domination() : GameObjectScript("go_orb_of_domination") { } + + bool OnGossipHello(Player* player, GameObject* go) OVERRIDE + { + if (InstanceScript* instance = go->GetInstanceScript()) + if (instance->GetData(DATA_EGG_EVENT) != DONE) + if (Creature* razor = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_RAZORGORE_THE_UNTAMED) : 0)) + { + razor->Attack(player, true); + player->CastSpell(razor, SPELL_MINDCONTROL); + } + return true; + } +}; + +class spell_egg_event : public SpellScriptLoader +{ + public: + spell_egg_event() : SpellScriptLoader("spell_egg_event") { } + + class spell_egg_eventSpellScript : public SpellScript + { + PrepareSpellScript(spell_egg_eventSpellScript); + + void HandleOnHit() + { + if (InstanceScript* instance = GetCaster()->GetInstanceScript()) + instance->SetData(DATA_EGG_EVENT, SPECIAL); + } + + void Register() OVERRIDE + { + OnHit += SpellHitFn(spell_egg_eventSpellScript::HandleOnHit); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_egg_eventSpellScript(); + } +}; + +void AddSC_boss_razorgore() +{ + new boss_razorgore(); + new go_orb_of_domination(); + new spell_egg_event(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp new file mode 100644 index 00000000000..c595f3acaff --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp @@ -0,0 +1,242 @@ +/* + * Copyright (C) 2008-2013 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 "ScriptedCreature.h" +#include "blackwing_lair.h" +#include "ScriptedGossip.h" +#include "Player.h" + +enum Says +{ + SAY_LINE1 = 0, + SAY_LINE2 = 1, + SAY_LINE3 = 2, + SAY_HALFLIFE = 3, + SAY_KILLTARGET = 4 +}; + +enum Gossip +{ + GOSSIP_ID = 21334, +}; + +enum Spells +{ + SPELL_ESSENCEOFTHERED = 23513, + SPELL_FLAMEBREATH = 23461, + SPELL_FIRENOVA = 23462, + SPELL_TAILSWIPE = 15847, + SPELL_BURNINGADRENALINE = 23620, + SPELL_CLEAVE = 20684 //Chain cleave is most likely named something different and contains a dummy effect +}; + +enum Events +{ + EVENT_SPEECH_1 = 1, + EVENT_SPEECH_2 = 2, + EVENT_SPEECH_3 = 3, + EVENT_SPEECH_4 = 4, + EVENT_ESSENCEOFTHERED = 5, + EVENT_FLAMEBREATH = 6, + EVENT_FIRENOVA = 7, + EVENT_TAILSWIPE = 8, + EVENT_CLEAVE = 9, + EVENT_BURNINGADRENALINE_CASTER = 10, + EVENT_BURNINGADRENALINE_TANK = 11 +}; + +class boss_vaelastrasz : public CreatureScript +{ +public: + boss_vaelastrasz() : CreatureScript("boss_vaelastrasz") { } + + struct boss_vaelAI : public BossAI + { + boss_vaelAI(Creature* creature) : BossAI(creature, BOSS_VAELASTRAZ) + { + creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + creature->setFaction(35); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void Reset() OVERRIDE + { + _Reset(); + + me->SetStandState(UNIT_STAND_STATE_DEAD); + PlayerGUID = 0; + + HasYelled = false; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + + DoCast(me, SPELL_ESSENCEOFTHERED); + me->SetHealth(me->CountPctFromMaxHealth(30)); + // now drop damage requirement to be able to take loot + me->ResetPlayerDamageReq(); + + events.ScheduleEvent(EVENT_CLEAVE, 10000); + events.ScheduleEvent(EVENT_FLAMEBREATH, 15000); + events.ScheduleEvent(EVENT_FIRENOVA, 20000); + events.ScheduleEvent(EVENT_TAILSWIPE, 11000); + events.ScheduleEvent(EVENT_BURNINGADRENALINE_CASTER, 15000); + events.ScheduleEvent(EVENT_BURNINGADRENALINE_TANK, 45000); + } + + void BeginSpeech(Unit* target) + { + PlayerGUID = target->GetGUID(); + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + events.ScheduleEvent(EVENT_SPEECH_1, 1000); + } + + void KilledUnit(Unit* victim) OVERRIDE + { + if (rand()%5) + return; + + Talk(SAY_KILLTARGET, victim->GetGUID()); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + events.Update(diff); + + // Speech + if (!UpdateVictim()) + { + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SPEECH_1: + Talk(SAY_LINE1); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + events.ScheduleEvent(EVENT_SPEECH_2, 12000); + break; + case EVENT_SPEECH_2: + Talk(SAY_LINE2); + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + events.ScheduleEvent(EVENT_SPEECH_3, 12000); + break; + case EVENT_SPEECH_3: + Talk(SAY_LINE3); + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + events.ScheduleEvent(EVENT_SPEECH_4, 16000); + break; + case EVENT_SPEECH_4: + me->setFaction(103); + if (PlayerGUID && Unit::GetUnit(*me, PlayerGUID)) + AttackStart(Unit::GetUnit(*me, PlayerGUID));; + break; + } + } + return; + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_CLEAVE: + events.ScheduleEvent(EVENT_CLEAVE, 15000); + DoCastVictim(SPELL_CLEAVE); + break; + case EVENT_FLAMEBREATH: + DoCastVictim(SPELL_FLAMEBREATH); + events.ScheduleEvent(EVENT_FLAMEBREATH, urand(8000, 14000)); + break; + case EVENT_FIRENOVA: + DoCastVictim(SPELL_FIRENOVA); + events.ScheduleEvent(EVENT_FIRENOVA, 15000); + break; + case EVENT_TAILSWIPE: + //Only cast if we are behind + /*if (!me->HasInArc(M_PI, me->GetVictim())) + { + DoCast(me->GetVictim(), SPELL_TAILSWIPE); + }*/ + events.ScheduleEvent(EVENT_TAILSWIPE, 15000); + break; + case EVENT_BURNINGADRENALINE_CASTER: + { + Unit* target = NULL; + + uint8 i = 0; + while (i < 3) // max 3 tries to get a random target with power_mana + { + ++i; + target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); // not aggro leader + if (target && target->getPowerType() == POWER_MANA) + i = 3; + } + if (target) // cast on self (see below) + target->CastSpell(target, SPELL_BURNINGADRENALINE, true); + } + events.ScheduleEvent(EVENT_BURNINGADRENALINE_CASTER, 15000); + break; + case EVENT_BURNINGADRENALINE_TANK: + // have the victim cast the spell on himself otherwise the third effect aura will be applied to Vael instead of the player + me->GetVictim()->CastSpell(me->GetVictim(), SPELL_BURNINGADRENALINE, true); + events.ScheduleEvent(EVENT_BURNINGADRENALINE_TANK, 45000); + break; + } + } + + // Yell if hp lower than 15% + if (HealthBelowPct(15) && !HasYelled) + { + Talk(SAY_HALFLIFE); + HasYelled = true; + } + + DoMeleeAttackIfReady(); + } + + void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE + { + if (sender == GOSSIP_ID && action == 0) + { + player->CLOSE_GOSSIP_MENU(); + BeginSpeech(player); + } + } + + private: + uint64 PlayerGUID; + bool HasYelled; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_vaelAI(creature); + } +}; + +void AddSC_boss_vaelastrasz() +{ + new boss_vaelastrasz(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp new file mode 100644 index 00000000000..d904e0a89f8 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -0,0 +1,355 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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 "ScriptedCreature.h" +#include "PassiveAI.h" +#include "blackwing_lair.h" +#include "Player.h" + +/* +Blackwing Lair Encounter: +1 - boss_razorgore.cpp +2 - boss_vaelastrasz.cpp +3 - boss_broodlord_lashlayer.cpp +4 - boss_firemaw.cpp +5 - boss_ebonroc.cpp +6 - boss_flamegor.cpp +7 - boss_chromaggus.cpp +8 - boss_nefarian.cpp +*/ + +Position const SummonPosition[8] = +{ + {-7661.207520f, -1043.268188f, 407.199554f, 6.280452f}, + {-7644.145020f, -1065.628052f, 407.204956f, 0.501492f}, + {-7624.260742f, -1095.196899f, 407.205017f, 0.544694f}, + {-7608.501953f, -1116.077271f, 407.199921f, 0.816443f}, + {-7531.841797f, -1063.765381f, 407.199615f, 2.874187f}, + {-7547.319336f, -1040.971924f, 407.205078f, 3.789175f}, + {-7568.547852f, -1013.112488f, 407.204926f, 3.773467f}, + {-7584.175781f, -989.6691289f, 407.199585f, 4.527447f}, +}; + +uint32 const Entry[5] = {12422, 12458, 12416, 12420, 12459}; + +class instance_blackwing_lair : public InstanceMapScript +{ +public: + instance_blackwing_lair() : InstanceMapScript(BRLScriptName, 469) { } + + struct instance_blackwing_lair_InstanceMapScript : public InstanceScript + { + instance_blackwing_lair_InstanceMapScript(Map* map) : InstanceScript(map) + { + SetBossNumber(EncounterCount); + } + + void Initialize() + { + // Razorgore + EggCount = 0; + RazorgoreTheUntamedGUID = 0; + RazorgoreDoorGUID = 0; + EggList.clear(); + // Vaelastrasz the Corrupt + VaelastraszTheCorruptGUID = 0; + VaelastraszDoorGUID = 0; + // Broodlord Lashlayer + BroodlordLashlayerGUID = 0; + BroodlordDoorGUID = 0; + // 3 Dragons + FiremawGUID = 0; + EbonrocGUID = 0; + FlamegorGUID = 0; + ChrommagusDoorGUID = 0; + // Chormaggus + ChromaggusGUID = 0; + NefarianDoorGUID = 0; + // Nefarian + LordVictorNefariusGUID = 0; + NefarianGUID = 0; + } + + void OnCreatureCreate(Creature* creature) + { + switch (creature->GetEntry()) + { + case NPC_RAZORGORE: + RazorgoreTheUntamedGUID = creature->GetGUID(); + break; + case NPC_BLACKWING_DRAGON: + case NPC_BLACKWING_TASKMASTER: + case NPC_BLACKWING_LEGIONAIRE: + case NPC_BLACKWING_WARLOCK: + if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) + razor->AI()->JustSummoned(creature); + break; + case NPC_VAELASTRAZ: + VaelastraszTheCorruptGUID = creature->GetGUID(); + break; + case NPC_BROODLORD: + BroodlordLashlayerGUID = creature->GetGUID(); + break; + case NPC_FIRENAW: + FiremawGUID = creature->GetGUID(); + break; + case NPC_EBONROC: + EbonrocGUID = creature->GetGUID(); + break; + case NPC_FLAMEGOR: + FlamegorGUID = creature->GetGUID(); + break; + case NPC_CHROMAGGUS: + ChromaggusGUID = creature->GetGUID(); + break; + case NPC_VICTOR_NEFARIUS: + LordVictorNefariusGUID = creature->GetGUID(); + break; + case NPC_NEFARIAN: + NefarianGUID = creature->GetGUID(); + break; + } + } + + void OnGameObjectCreate(GameObject* go) + { + switch (go->GetEntry()) + { + case 177807: // Egg + if (GetBossState(BOSS_FIREMAW) == DONE) + go->SetPhaseMask(2, true); + else + EggList.push_back(go->GetGUID()); + break; + case 175946: // Door + RazorgoreDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_RAZORGORE) == DONE, go); + break; + case 175185: // Door + VaelastraszDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_VAELASTRAZ) == DONE, go); + break; + case 180424: // Door + BroodlordDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_BROODLORD) == DONE, go); + break; + case 185483: // Door + ChrommagusDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE, go); + break; + case 181125: // Door + NefarianDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_CHROMAGGUS) == DONE, go); + break; + } + } + + void OnGameObjectRemove(GameObject* go) + { + if (go->GetEntry() == 177807) // Egg + EggList.remove(go->GetGUID()); + } + + bool SetBossState(uint32 type, EncounterState state) + { + if (!InstanceScript::SetBossState(type, state)) + return false; + + switch (type) + { + case BOSS_RAZORGORE: + HandleGameObject(RazorgoreDoorGUID, state == DONE); + if (state == DONE) + { + for (std::list::const_iterator itr = EggList.begin(); itr != EggList.end(); ++itr) + if (GameObject* egg = instance->GetGameObject((*itr))) + egg->SetPhaseMask(2, true); + } + SetData(DATA_EGG_EVENT, NOT_STARTED); + break; + case BOSS_VAELASTRAZ: + HandleGameObject(VaelastraszDoorGUID, state == DONE); + break; + case BOSS_BROODLORD: + HandleGameObject(BroodlordDoorGUID, state == DONE); + break; + case BOSS_FIREMAW: + case BOSS_EBONROC: + case BOSS_FLAMEGOR: + HandleGameObject(ChrommagusDoorGUID, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE); + break; + case BOSS_CHROMAGGUS: + HandleGameObject(NefarianDoorGUID, state == DONE); + break; + case BOSS_NEFARIAN: + switch (state) + { + case NOT_STARTED: + if (Creature* nefarian = instance->GetCreature(NefarianGUID)) + nefarian->DespawnOrUnsummon(); + break; + case FAIL: + _events.ScheduleEvent(EVENT_RESPAWN_NEFARIUS, 15*IN_MILLISECONDS*MINUTE); + SetBossState(BOSS_NEFARIAN, NOT_STARTED); + break; + default: + break; + } + break; + } + return true; + } + + uint64 GetData64(uint32 id) const OVERRIDE + { + switch (id) + { + case DATA_RAZORGORE_THE_UNTAMED: return RazorgoreTheUntamedGUID; + case DATA_VAELASTRAZ_THE_CORRUPT: return VaelastraszTheCorruptGUID; + case DATA_BROODLORD_LASHLAYER: return BroodlordLashlayerGUID; + case DATA_FIRENAW: return FiremawGUID; + case DATA_EBONROC: return EbonrocGUID; + case DATA_FLAMEGOR: return FlamegorGUID; + case DATA_CHROMAGGUS: return ChromaggusGUID; + case DATA_LORD_VICTOR_NEFARIUS: return LordVictorNefariusGUID; + case DATA_NEFARIAN: return NefarianGUID; + } + + return 0; + } + + void SetData(uint32 type, uint32 data) OVERRIDE + { + if (type == DATA_EGG_EVENT) + { + switch (data) + { + case IN_PROGRESS: + _events.ScheduleEvent(EVENT_RAZOR_SPAWN, 45*IN_MILLISECONDS); + EggEvent = data; + EggCount = 0; + break; + case NOT_STARTED: + _events.CancelEvent(EVENT_RAZOR_SPAWN); + EggEvent = data; + EggCount = 0; + break; + case SPECIAL: + if (++EggCount == 15) + { + if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) + { + SetData(DATA_EGG_EVENT, DONE); + razor->RemoveAurasDueToSpell(42013); // MindControl + DoRemoveAurasDueToSpellOnPlayers(42013); + } + _events.ScheduleEvent(EVENT_RAZOR_PHASE_TWO, IN_MILLISECONDS); + _events.CancelEvent(EVENT_RAZOR_SPAWN); + } + if (EggEvent == NOT_STARTED) + SetData(DATA_EGG_EVENT, IN_PROGRESS); + break; + } + } + } + + void OnUnitDeath(Unit* unit) + { + //! HACK, needed because of buggy CreatureAI after charm + if (unit->GetEntry() == NPC_RAZORGORE && GetBossState(BOSS_RAZORGORE) != DONE) + SetBossState(BOSS_RAZORGORE, DONE); + } + + void Update(uint32 diff) + { + if (_events.Empty()) + return; + + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_RAZOR_SPAWN: + for (uint8 i = urand(2, 5); i > 0 ; --i) + if (Creature* summon = instance->SummonCreature(Entry[urand(0, 4)], SummonPosition[urand(0, 7)])) + summon->SetInCombatWithZone(); + _events.ScheduleEvent(EVENT_RAZOR_SPAWN, urand(12, 17)*IN_MILLISECONDS); + break; + case EVENT_RAZOR_PHASE_TWO: + _events.CancelEvent(EVENT_RAZOR_SPAWN); + if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) + razor->AI()->DoAction(ACTION_PHASE_TWO); + break; + case EVENT_RESPAWN_NEFARIUS: + if (Creature* nefarius = instance->GetCreature(LordVictorNefariusGUID)) + { + nefarius->SetPhaseMask(1, true); + nefarius->setActive(true); + nefarius->Respawn(); + nefarius->GetMotionMaster()->MoveTargetedHome(); + } + break; + } + } + } + + protected: + // Misc + EventMap _events; + // Razorgore + uint8 EggCount; + uint32 EggEvent; + uint64 RazorgoreTheUntamedGUID; + uint64 RazorgoreDoorGUID; + std::list EggList; + + // Vaelastrasz the Corrupt + uint64 VaelastraszTheCorruptGUID; + uint64 VaelastraszDoorGUID; + + // Broodlord Lashlayer + uint64 BroodlordLashlayerGUID; + uint64 BroodlordDoorGUID; + + // 3 Dragons + uint64 FiremawGUID; + uint64 EbonrocGUID; + uint64 FlamegorGUID; + uint64 ChrommagusDoorGUID; + + // Chormaggus + uint64 ChromaggusGUID; + uint64 NefarianDoorGUID; + + // Nefarian + uint64 LordVictorNefariusGUID; + uint64 NefarianGUID; + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_blackwing_lair_InstanceMapScript(map); + } +}; + +void AddSC_instance_blackwing_lair() +{ + new instance_blackwing_lair(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp new file mode 100644 index 00000000000..e9ac15147f9 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Baron_Geddon +SD%Complete: 100 +SDComment: +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Emotes +{ + EMOTE_SERVICE = 0 +}; + +enum Spells +{ + SPELL_INFERNO = 19695, + SPELL_IGNITE_MANA = 19659, + SPELL_LIVING_BOMB = 20475, + SPELL_ARMAGEDDON = 20479, +}; + +enum Events +{ + EVENT_INFERNO = 1, + EVENT_IGNITE_MANA = 2, + EVENT_LIVING_BOMB = 3, +}; + +class boss_baron_geddon : public CreatureScript +{ + public: + boss_baron_geddon() : CreatureScript("boss_baron_geddon") { } + + struct boss_baron_geddonAI : public BossAI + { + boss_baron_geddonAI(Creature* creature) : BossAI(creature, BOSS_BARON_GEDDON) + { + } + + void EnterCombat(Unit* victim) OVERRIDE + { + BossAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_INFERNO, 45000); + events.ScheduleEvent(EVENT_IGNITE_MANA, 30000); + events.ScheduleEvent(EVENT_LIVING_BOMB, 35000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + // If we are <2% hp cast Armageddon + if (!HealthAbovePct(2)) + { + me->InterruptNonMeleeSpells(true); + DoCast(me, SPELL_ARMAGEDDON); + Talk(EMOTE_SERVICE); + return; + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_INFERNO: + DoCast(me, SPELL_INFERNO); + events.ScheduleEvent(EVENT_INFERNO, 45000); + break; + case EVENT_IGNITE_MANA: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_IGNITE_MANA)) + DoCast(target, SPELL_IGNITE_MANA); + events.ScheduleEvent(EVENT_IGNITE_MANA, 30000); + break; + case EVENT_LIVING_BOMB: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) + DoCast(target, SPELL_LIVING_BOMB); + events.ScheduleEvent(EVENT_LIVING_BOMB, 35000); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_baron_geddonAI(creature); + } +}; + +void AddSC_boss_baron_geddon() +{ + new boss_baron_geddon(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp new file mode 100644 index 00000000000..5eabc11618b --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Garr +SD%Complete: 50 +SDComment: Adds NYI +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Spells +{ + // Garr + SPELL_ANTIMAGIC_PULSE = 19492, + SPELL_MAGMA_SHACKLES = 19496, + SPELL_ENRAGE = 19516, + + // Adds + SPELL_ERUPTION = 19497, + SPELL_IMMOLATE = 20294, +}; + +enum Events +{ + EVENT_ANTIMAGIC_PULSE = 1, + EVENT_MAGMA_SHACKLES = 2, +}; + +class boss_garr : public CreatureScript +{ + public: + boss_garr() : CreatureScript("boss_garr") { } + + struct boss_garrAI : public BossAI + { + boss_garrAI(Creature* creature) : BossAI(creature, BOSS_GARR) + { + } + + void EnterCombat(Unit* victim) OVERRIDE + { + BossAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_ANTIMAGIC_PULSE, 25000); + events.ScheduleEvent(EVENT_MAGMA_SHACKLES, 15000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_ANTIMAGIC_PULSE: + DoCast(me, SPELL_ANTIMAGIC_PULSE); + events.ScheduleEvent(EVENT_ANTIMAGIC_PULSE, urand(10000, 15000)); + break; + case EVENT_MAGMA_SHACKLES: + DoCast(me, SPELL_MAGMA_SHACKLES); + events.ScheduleEvent(EVENT_MAGMA_SHACKLES, urand(8000, 12000)); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_garrAI(creature); + } +}; + +class npc_firesworn : public CreatureScript +{ + public: + npc_firesworn() : CreatureScript("npc_firesworn") { } + + struct npc_fireswornAI : public ScriptedAI + { + npc_fireswornAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 immolateTimer; + + void Reset() OVERRIDE + { + immolateTimer = 4000; //These times are probably wrong + } + + void DamageTaken(Unit* /*attacker*/, uint32& damage) OVERRIDE + { + uint32 const health10pct = me->CountPctFromMaxHealth(10); + uint32 health = me->GetHealth(); + if (int32(health) - int32(damage) < int32(health10pct)) + { + damage = 0; + DoCastVictim(SPELL_ERUPTION); + me->DespawnOrUnsummon(); + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + if (immolateTimer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_IMMOLATE); + immolateTimer = urand(5000, 10000); + } + else + immolateTimer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_fireswornAI(creature); + } +}; + +void AddSC_boss_garr() +{ + new boss_garr(); + new npc_firesworn(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp new file mode 100644 index 00000000000..15079953a34 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Gehennas +SD%Complete: 90 +SDComment: Adds MC NYI +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Spells +{ + SPELL_GEHENNAS_CURSE = 19716, + SPELL_RAIN_OF_FIRE = 19717, + SPELL_SHADOW_BOLT = 19728, +}; + +enum Events +{ + EVENT_GEHENNAS_CURSE = 1, + EVENT_RAIN_OF_FIRE = 2, + EVENT_SHADOW_BOLT = 3, +}; + +class boss_gehennas : public CreatureScript +{ + public: + boss_gehennas() : CreatureScript("boss_gehennas") { } + + struct boss_gehennasAI : public BossAI + { + boss_gehennasAI(Creature* creature) : BossAI(creature, BOSS_GEHENNAS) + { + } + + void EnterCombat(Unit* victim) OVERRIDE + { + BossAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_GEHENNAS_CURSE, 12000); + events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 10000); + events.ScheduleEvent(EVENT_SHADOW_BOLT, 6000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_GEHENNAS_CURSE: + DoCastVictim(SPELL_GEHENNAS_CURSE); + events.ScheduleEvent(EVENT_GEHENNAS_CURSE, urand(22000, 30000)); + break; + case EVENT_RAIN_OF_FIRE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_RAIN_OF_FIRE); + events.ScheduleEvent(EVENT_RAIN_OF_FIRE, urand(4000, 12000)); + break; + case EVENT_SHADOW_BOLT: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) + DoCast(target, SPELL_SHADOW_BOLT); + events.ScheduleEvent(EVENT_SHADOW_BOLT, 7000); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_gehennasAI(creature); + } +}; + +void AddSC_boss_gehennas() +{ + new boss_gehennas(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp new file mode 100644 index 00000000000..0fdb88923b3 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp @@ -0,0 +1,190 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Golemagg +SD%Complete: 90 +SDComment: Timers need to be confirmed, Golemagg's Trust need to be checked +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Texts +{ + EMOTE_LOWHP = 0, +}; + +enum Spells +{ + // Golemagg + SPELL_MAGMASPLASH = 13879, + SPELL_PYROBLAST = 20228, + SPELL_EARTHQUAKE = 19798, + SPELL_ENRAGE = 19953, + SPELL_GOLEMAGG_TRUST = 20553, + + // Core Rager + SPELL_MANGLE = 19820 +}; + +enum Events +{ + EVENT_PYROBLAST = 1, + EVENT_EARTHQUAKE = 2, +}; + +class boss_golemagg : public CreatureScript +{ + public: + boss_golemagg() : CreatureScript("boss_golemagg") { } + + struct boss_golemaggAI : public BossAI + { + boss_golemaggAI(Creature* creature) : BossAI(creature, BOSS_GOLEMAGG_THE_INCINERATOR) + { + } + + void Reset() OVERRIDE + { + BossAI::Reset(); + DoCast(me, SPELL_MAGMASPLASH, true); + } + + void EnterCombat(Unit* victim) OVERRIDE + { + BossAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_PYROBLAST, 7000); + } + + void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE + { + if (!HealthBelowPct(10) || me->HasAura(SPELL_ENRAGE)) + return; + + DoCast(me, SPELL_ENRAGE, true); + events.ScheduleEvent(EVENT_EARTHQUAKE, 3000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_PYROBLAST: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_PYROBLAST); + events.ScheduleEvent(EVENT_PYROBLAST, 7000); + break; + case EVENT_EARTHQUAKE: + DoCastVictim(SPELL_EARTHQUAKE); + events.ScheduleEvent(EVENT_EARTHQUAKE, 3000); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_golemaggAI(creature); + } +}; + +class npc_core_rager : public CreatureScript +{ + public: + npc_core_rager() : CreatureScript("npc_core_rager") { } + + struct npc_core_ragerAI : public ScriptedAI + { + npc_core_ragerAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + void Reset() OVERRIDE + { + mangleTimer = 7*IN_MILLISECONDS; // These times are probably wrong + } + + void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE + { + if (HealthAbovePct(50) || !instance) + return; + + if (Creature* pGolemagg = instance->instance->GetCreature(instance->GetData64(BOSS_GOLEMAGG_THE_INCINERATOR))) + { + if (pGolemagg->IsAlive()) + { + me->AddAura(SPELL_GOLEMAGG_TRUST, me); + Talk(EMOTE_LOWHP); + me->SetFullHealth(); + } + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + // Mangle + if (mangleTimer <= diff) + { + DoCastVictim(SPELL_MANGLE); + mangleTimer = 10*IN_MILLISECONDS; + } + else + mangleTimer -= diff; + + DoMeleeAttackIfReady(); + } + + private: + InstanceScript* instance; + uint32 mangleTimer; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_core_ragerAI(creature); + } +}; + +void AddSC_boss_golemagg() +{ + new boss_golemagg(); + new npc_core_rager(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp new file mode 100644 index 00000000000..31f4e40552f --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Lucifron +SD%Complete: 100 +SDComment: +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Spells +{ + SPELL_IMPENDING_DOOM = 19702, + SPELL_LUCIFRON_CURSE = 19703, + SPELL_SHADOW_SHOCK = 20603, +}; + +enum Events +{ + EVENT_IMPENDING_DOOM = 1, + EVENT_LUCIFRON_CURSE = 2, + EVENT_SHADOW_SHOCK = 3, +}; + +class boss_lucifron : public CreatureScript +{ + public: + boss_lucifron() : CreatureScript("boss_lucifron") { } + + struct boss_lucifronAI : public BossAI + { + boss_lucifronAI(Creature* creature) : BossAI(creature, BOSS_LUCIFRON) + { + } + + void EnterCombat(Unit* victim) OVERRIDE + { + BossAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_IMPENDING_DOOM, 10000); + events.ScheduleEvent(EVENT_LUCIFRON_CURSE, 20000); + events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_IMPENDING_DOOM: + DoCastVictim(SPELL_IMPENDING_DOOM); + events.ScheduleEvent(EVENT_IMPENDING_DOOM, 20000); + break; + case EVENT_LUCIFRON_CURSE: + DoCastVictim(SPELL_LUCIFRON_CURSE); + events.ScheduleEvent(EVENT_LUCIFRON_CURSE, 15000); + break; + case EVENT_SHADOW_SHOCK: + DoCastVictim(SPELL_SHADOW_SHOCK); + events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_lucifronAI(creature); + } +}; + +void AddSC_boss_lucifron() +{ + new boss_lucifron(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp new file mode 100644 index 00000000000..7d40b9630ae --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Magmadar +SD%Complete: 75 +SDComment: Conflag on ground nyi +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Texts +{ + EMOTE_FRENZY = 0 +}; + +enum Spells +{ + SPELL_FRENZY = 19451, + SPELL_MAGMA_SPIT = 19449, + SPELL_PANIC = 19408, + SPELL_LAVA_BOMB = 19428, +}; + +enum Events +{ + EVENT_FRENZY = 1, + EVENT_PANIC = 2, + EVENT_LAVA_BOMB = 3, +}; + +class boss_magmadar : public CreatureScript +{ + public: + boss_magmadar() : CreatureScript("boss_magmadar") { } + + struct boss_magmadarAI : public BossAI + { + boss_magmadarAI(Creature* creature) : BossAI(creature, BOSS_MAGMADAR) + { + } + + void Reset() OVERRIDE + { + BossAI::Reset(); + DoCast(me, SPELL_MAGMA_SPIT, true); + } + + void EnterCombat(Unit* victim) OVERRIDE + { + BossAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_FRENZY, 30000); + events.ScheduleEvent(EVENT_PANIC, 20000); + events.ScheduleEvent(EVENT_LAVA_BOMB, 12000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FRENZY: + Talk(EMOTE_FRENZY); + DoCast(me, SPELL_FRENZY); + events.ScheduleEvent(EVENT_FRENZY, 15000); + break; + case EVENT_PANIC: + DoCastVictim(SPELL_PANIC); + events.ScheduleEvent(EVENT_PANIC, 35000); + break; + case EVENT_LAVA_BOMB: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_LAVA_BOMB)) + DoCast(target, SPELL_LAVA_BOMB); + events.ScheduleEvent(EVENT_LAVA_BOMB, 12000); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_magmadarAI(creature); + } +}; + +void AddSC_boss_magmadar() +{ + new boss_magmadar(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp new file mode 100644 index 00000000000..1001516d42e --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp @@ -0,0 +1,217 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Majordomo_Executus +SD%Complete: 30 +SDComment: Correct spawning and Event NYI +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "molten_core.h" +#include "Player.h" + +enum Texts +{ + SAY_AGGRO = 0, + SAY_SPAWN = 1, + SAY_SLAY = 2, + SAY_SPECIAL = 3, + SAY_DEFEAT = 4, + + SAY_SUMMON_MAJ = 5, + SAY_ARRIVAL2_MAJ = 6 +}; + +enum Spells +{ + SPELL_MAGIC_REFLECTION = 20619, + SPELL_DAMAGE_REFLECTION = 21075, + SPELL_BLAST_WAVE = 20229, + SPELL_AEGIS_OF_RAGNAROS = 20620, + SPELL_TELEPORT = 20618, + SPELL_SUMMON_RAGNAROS = 19774, +}; + +#define GOSSIP_HELLO 4995 +#define GOSSIP_SELECT "Tell me more." + +enum Events +{ + EVENT_MAGIC_REFLECTION = 1, + EVENT_DAMAGE_REFLECTION = 2, + EVENT_BLAST_WAVE = 3, + EVENT_TELEPORT = 4, + + EVENT_OUTRO_1 = 5, + EVENT_OUTRO_2 = 6, + EVENT_OUTRO_3 = 7, +}; + +class boss_majordomo : public CreatureScript +{ + public: + boss_majordomo() : CreatureScript("boss_majordomo") { } + + struct boss_majordomoAI : public BossAI + { + boss_majordomoAI(Creature* creature) : BossAI(creature, BOSS_MAJORDOMO_EXECUTUS) + { + } + + void KilledUnit(Unit* /*victim*/) OVERRIDE + { + if (urand(0, 99) < 25) + Talk(SAY_SLAY); + } + + void EnterCombat(Unit* who) OVERRIDE + { + BossAI::EnterCombat(who); + Talk(SAY_AGGRO); + events.ScheduleEvent(EVENT_MAGIC_REFLECTION, 30000); + events.ScheduleEvent(EVENT_DAMAGE_REFLECTION, 15000); + events.ScheduleEvent(EVENT_BLAST_WAVE, 10000); + events.ScheduleEvent(EVENT_TELEPORT, 20000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (instance && instance->GetBossState(BOSS_MAJORDOMO_EXECUTUS) != DONE) + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (!me->FindNearestCreature(NPC_FLAMEWAKER_HEALER, 100.0f) && !me->FindNearestCreature(NPC_FLAMEWAKER_ELITE, 100.0f)) + { + instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me); + me->setFaction(35); + me->AI()->EnterEvadeMode(); + Talk(SAY_DEFEAT); + _JustDied(); + events.ScheduleEvent(EVENT_OUTRO_1, 32000); + return; + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (HealthBelowPct(50)) + DoCast(me, SPELL_AEGIS_OF_RAGNAROS, true); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_MAGIC_REFLECTION: + DoCast(me, SPELL_MAGIC_REFLECTION); + events.ScheduleEvent(EVENT_MAGIC_REFLECTION, 30000); + break; + case EVENT_DAMAGE_REFLECTION: + DoCast(me, SPELL_DAMAGE_REFLECTION); + events.ScheduleEvent(EVENT_DAMAGE_REFLECTION, 30000); + break; + case EVENT_BLAST_WAVE: + DoCastVictim(SPELL_BLAST_WAVE); + events.ScheduleEvent(EVENT_BLAST_WAVE, 10000); + break; + case EVENT_TELEPORT: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) + DoCast(target, SPELL_TELEPORT); + events.ScheduleEvent(EVENT_TELEPORT, 20000); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + else + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_OUTRO_1: + me->NearTeleportTo(RagnarosTelePos.GetPositionX(), RagnarosTelePos.GetPositionY(), RagnarosTelePos.GetPositionZ(), RagnarosTelePos.GetOrientation()); + me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + case EVENT_OUTRO_2: + if (instance) + instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos); + break; + case EVENT_OUTRO_3: + Talk(SAY_ARRIVAL2_MAJ); + break; + default: + break; + } + } + } + } + + void DoAction(int32 action) OVERRIDE + { + if (action == ACTION_START_RAGNAROS) + { + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + Talk(SAY_SUMMON_MAJ); + events.ScheduleEvent(EVENT_OUTRO_2, 8000); + events.ScheduleEvent(EVENT_OUTRO_3, 24000); + } + else if (action == ACTION_START_RAGNAROS_ALT) + { + me->setFaction(35); + me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + } + }; + + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->SEND_GOSSIP_MENU(GOSSIP_HELLO, creature->GetGUID()); + return true; + } + + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) OVERRIDE + { + player->CLOSE_GOSSIP_MENU(); + creature->AI()->DoAction(ACTION_START_RAGNAROS); + return true; + } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_majordomoAI(creature); + } +}; + +void AddSC_boss_majordomo() +{ + new boss_majordomo(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp new file mode 100644 index 00000000000..d03f756f366 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp @@ -0,0 +1,353 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Ragnaros +SD%Complete: 95 +SDComment: some spells doesnt work correctly +SDCategory: Molten Core +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Texts +{ + SAY_SUMMON_MAJ = 0, + SAY_ARRIVAL1_RAG = 1, + SAY_ARRIVAL2_MAJ = 2, + SAY_ARRIVAL3_RAG = 3, + SAY_ARRIVAL5_RAG = 4, + SAY_REINFORCEMENTS1 = 5, + SAY_REINFORCEMENTS2 = 6, + SAY_HAND = 7, + SAY_WRATH = 8, + SAY_KILL = 9, + SAY_MAGMABURST = 10 +}; + +enum Spells +{ + SPELL_HAND_OF_RAGNAROS = 19780, + SPELL_WRATH_OF_RAGNAROS = 20566, + SPELL_LAVA_BURST = 21158, + SPELL_MAGMA_BLAST = 20565, // Ranged attack + SPELL_SONS_OF_FLAME_DUMMY = 21108, // Server side effect + SPELL_RAGSUBMERGE = 21107, // Stealth aura + SPELL_RAGEMERGE = 20568, + SPELL_MELT_WEAPON = 21388, + SPELL_ELEMENTAL_FIRE = 20564, + SPELL_ERRUPTION = 17731 +}; + +enum Events +{ + EVENT_ERUPTION = 1, + EVENT_WRATH_OF_RAGNAROS = 2, + EVENT_HAND_OF_RAGNAROS = 3, + EVENT_LAVA_BURST = 4, + EVENT_ELEMENTAL_FIRE = 5, + EVENT_MAGMA_BLAST = 6, + EVENT_SUBMERGE = 7, + + EVENT_INTRO_1 = 8, + EVENT_INTRO_2 = 9, + EVENT_INTRO_3 = 10, + EVENT_INTRO_4 = 11, + EVENT_INTRO_5 = 12 +}; + +class boss_ragnaros : public CreatureScript +{ + public: + boss_ragnaros() : CreatureScript("boss_ragnaros") { } + + struct boss_ragnarosAI : public BossAI + { + boss_ragnarosAI(Creature* creature) : BossAI(creature, BOSS_RAGNAROS) + { + _introState = 0; + me->SetReactState(REACT_PASSIVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void Reset() OVERRIDE + { + BossAI::Reset(); + _emergeTimer = 90000; + _hasYelledMagmaBurst = false; + _hasSubmergedOnce = false; + _isBanished = false; + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); + } + + void EnterCombat(Unit* victim) OVERRIDE + { + BossAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_ERUPTION, 15000); + events.ScheduleEvent(EVENT_WRATH_OF_RAGNAROS, 30000); + events.ScheduleEvent(EVENT_HAND_OF_RAGNAROS, 25000); + events.ScheduleEvent(EVENT_LAVA_BURST, 10000); + events.ScheduleEvent(EVENT_ELEMENTAL_FIRE, 3000); + events.ScheduleEvent(EVENT_MAGMA_BLAST, 2000); + events.ScheduleEvent(EVENT_SUBMERGE, 180000); + } + + void KilledUnit(Unit* /*victim*/) OVERRIDE + { + if (urand(0, 99) < 25) + Talk(SAY_KILL); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (_introState != 2) + { + if (!_introState) + { + me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE); + events.ScheduleEvent(EVENT_INTRO_1, 4000); + events.ScheduleEvent(EVENT_INTRO_2, 23000); + events.ScheduleEvent(EVENT_INTRO_3, 42000); + events.ScheduleEvent(EVENT_INTRO_4, 43000); + events.ScheduleEvent(EVENT_INTRO_5, 53000); + _introState = 1; + } + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_INTRO_1: + Talk(SAY_ARRIVAL1_RAG); + break; + case EVENT_INTRO_2: + Talk(SAY_ARRIVAL3_RAG); + break; + case EVENT_INTRO_3: + me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK1H); + break; + case EVENT_INTRO_4: + Talk(SAY_ARRIVAL5_RAG); + if (instance) + if (Creature* executus = Unit::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS))) + me->Kill(executus); + break; + case EVENT_INTRO_5: + me->SetReactState(REACT_AGGRESSIVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + _introState = 2; + break; + default: + break; + } + } + } + else + { + if (instance) + { + if (_isBanished && ((_emergeTimer <= diff) || (instance->GetData(DATA_RAGNAROS_ADDS)) > 8)) + { + //Become unbanished again + me->SetReactState(REACT_AGGRESSIVE); + me->setFaction(14); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); + me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + AttackStart(target); + instance->SetData(DATA_RAGNAROS_ADDS, 0); + + //DoCast(me, SPELL_RAGEMERGE); //"phase spells" didnt worked correctly so Ive commented them and wrote solution witch doesnt need core support + _isBanished = false; + } + else if (_isBanished) + { + _emergeTimer -= diff; + //Do nothing while banished + return; + } + } + + //Return since we have no target + if (!UpdateVictim()) + return; + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_ERUPTION: + DoCastVictim(SPELL_ERRUPTION); + events.ScheduleEvent(EVENT_ERUPTION, urand(20000, 45000)); + break; + case EVENT_WRATH_OF_RAGNAROS: + DoCastVictim(SPELL_WRATH_OF_RAGNAROS); + if (urand(0, 1)) + Talk(SAY_WRATH); + events.ScheduleEvent(EVENT_WRATH_OF_RAGNAROS, 25000); + break; + case EVENT_HAND_OF_RAGNAROS: + DoCast(me, SPELL_HAND_OF_RAGNAROS); + if (urand(0, 1)) + Talk(SAY_HAND); + events.ScheduleEvent(EVENT_HAND_OF_RAGNAROS, 20000); + break; + case EVENT_LAVA_BURST: + DoCastVictim(SPELL_LAVA_BURST); + events.ScheduleEvent(EVENT_LAVA_BURST, 10000); + break; + case EVENT_ELEMENTAL_FIRE: + DoCastVictim(SPELL_ELEMENTAL_FIRE); + events.ScheduleEvent(EVENT_ELEMENTAL_FIRE, urand(10000, 14000)); + break; + case EVENT_MAGMA_BLAST: + if (me->IsWithinMeleeRange(me->GetVictim())) + { + DoCastVictim(SPELL_MAGMA_BLAST); + if (!_hasYelledMagmaBurst) + { + //Say our dialog + Talk(SAY_MAGMABURST); + _hasYelledMagmaBurst = true; + } + } + events.ScheduleEvent(EVENT_MAGMA_BLAST, 2500); + break; + case EVENT_SUBMERGE: + { + if (instance && !_isBanished) + { + //Creature spawning and ragnaros becomming unattackable + //is not very well supported in the core //no it really isnt + //so added normaly spawning and banish workaround and attack again after 90 secs. + me->AttackStop(); + DoResetThreat(); + me->SetReactState(REACT_PASSIVE); + me->InterruptNonMeleeSpells(false); + //Root self + //DoCast(me, 23973); + me->setFaction(35); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); + me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE); + instance->SetData(DATA_RAGNAROS_ADDS, 0); + + if (!_hasSubmergedOnce) + { + Talk(SAY_REINFORCEMENTS1); + + // summon 8 elementals + for (uint8 i = 0; i < 8; ++i) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + if (Creature* summoned = me->SummonCreature(12143, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000)) + summoned->AI()->AttackStart(target); + + _hasSubmergedOnce = true; + _isBanished = true; + //DoCast(me, SPELL_RAGSUBMERGE); + _emergeTimer = 90000; + + } + else + { + Talk(SAY_REINFORCEMENTS2); + + for (uint8 i = 0; i < 8; ++i) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + if (Creature* summoned = me->SummonCreature(12143, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000)) + summoned->AI()->AttackStart(target); + + _isBanished = true; + //DoCast(me, SPELL_RAGSUBMERGE); + _emergeTimer = 90000; + } + } + events.ScheduleEvent(EVENT_SUBMERGE, 180000); + break; + } + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + } + + private: + uint32 _emergeTimer; + uint8 _introState; + bool _hasYelledMagmaBurst; + bool _hasSubmergedOnce; + bool _isBanished; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_ragnarosAI(creature); + } +}; + +class npc_son_of_flame : public CreatureScript +{ + public: + npc_son_of_flame() : CreatureScript("npc_SonOfFlame") { } + + struct npc_son_of_flameAI : public ScriptedAI //didnt work correctly in EAI for me... + { + npc_son_of_flameAI(Creature* creature) : ScriptedAI(creature) + { + instance = me->GetInstanceScript(); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + if (instance) + instance->SetData(DATA_RAGNAROS_ADDS, 1); + } + + void UpdateAI(uint32 /*diff*/) OVERRIDE + { + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + + private: + InstanceScript* instance; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_son_of_flameAI(creature); + } +}; + +void AddSC_boss_ragnaros() +{ + new boss_ragnaros(); + new npc_son_of_flame(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp new file mode 100644 index 00000000000..7c1d1af7d29 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Shazzrah +SD%Complete: 75 +SDComment: Teleport NYI +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Spells +{ + SPELL_ARCANE_EXPLOSION = 19712, + SPELL_SHAZZRAH_CURSE = 19713, + SPELL_MAGIC_GROUNDING = 19714, + SPELL_COUNTERSPELL = 19715, +}; + +enum Events +{ + EVENT_ARCANE_EXPLOSION = 1, + EVENT_SHAZZRAH_CURSE = 2, + EVENT_MAGIC_GROUNDING = 3, + EVENT_COUNTERSPELL = 4, + EVENT_BLINK = 5, +}; + +class boss_shazzrah : public CreatureScript +{ + public: + boss_shazzrah() : CreatureScript("boss_shazzrah") { } + + struct boss_shazzrahAI : public BossAI + { + boss_shazzrahAI(Creature* creature) : BossAI(creature, BOSS_SHAZZRAH) + { + } + + void EnterCombat(Unit* target) OVERRIDE + { + BossAI::EnterCombat(target); + events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 6000); + events.ScheduleEvent(EVENT_SHAZZRAH_CURSE, 10000); + events.ScheduleEvent(EVENT_MAGIC_GROUNDING, 24000); + events.ScheduleEvent(EVENT_COUNTERSPELL, 15000); + events.ScheduleEvent(EVENT_BLINK, 30000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_ARCANE_EXPLOSION: + DoCastVictim(SPELL_ARCANE_EXPLOSION); + events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(5000, 9000)); + break; + case EVENT_SHAZZRAH_CURSE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -EVENT_SHAZZRAH_CURSE)) + DoCast(target, SPELL_SHAZZRAH_CURSE); + events.ScheduleEvent(EVENT_SHAZZRAH_CURSE, urand(25000, 30000)); + break; + case EVENT_MAGIC_GROUNDING: + DoCast(me, SPELL_MAGIC_GROUNDING); + events.ScheduleEvent(EVENT_MAGIC_GROUNDING, 35000); + break; + case EVENT_COUNTERSPELL: + DoCastVictim(SPELL_COUNTERSPELL); + events.ScheduleEvent(EVENT_COUNTERSPELL, urand(16000, 20000)); + break; + case EVENT_BLINK: + // Teleporting him to a random player and casting Arcane Explosion after that. + // Blink is not working cause of LoS System we need to do this hardcoded. + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true)) + { + DoTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); + DoCast(target, SPELL_ARCANE_EXPLOSION); + DoResetThreat(); + } + events.ScheduleEvent(EVENT_BLINK, 45000); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_shazzrahAI(creature); + } +}; + +void AddSC_boss_shazzrah() +{ + new boss_shazzrah(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp new file mode 100644 index 00000000000..681f4f72bc6 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp @@ -0,0 +1,216 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Boss_Sulfuron_Harbringer +SD%Complete: 80 +SDComment: Adds NYI +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "molten_core.h" + +enum Spells +{ + // Sulfuron Harbringer + SPELL_DARK_STRIKE = 19777, + SPELL_DEMORALIZING_SHOUT = 19778, + SPELL_INSPIRE = 19779, + SPELL_KNOCKDOWN = 19780, + SPELL_FLAMESPEAR = 19781, + + // Adds + SPELL_HEAL = 19775, + SPELL_SHADOWWORDPAIN = 19776, + SPELL_IMMOLATE = 20294, +}; + +enum Events +{ + EVENT_DARK_STRIKE = 1, + EVENT_DEMORALIZING_SHOUT = 2, + EVENT_INSPIRE = 3, + EVENT_KNOCKDOWN = 4, + EVENT_FLAMESPEAR = 5, + + EVENT_HEAL = 6, + EVENT_SHADOW_WORD_PAIN = 7, + EVENT_IMMOLATE = 8, +}; + +class boss_sulfuron : public CreatureScript +{ + public: + boss_sulfuron() : CreatureScript("boss_sulfuron") { } + + struct boss_sulfuronAI : public BossAI + { + boss_sulfuronAI(Creature* creature) : BossAI(creature, BOSS_SULFURON_HARBINGER) + { + } + + void EnterCombat(Unit* victim) OVERRIDE + { + BossAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_DARK_STRIKE, 10000); + events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, 15000); + events.ScheduleEvent(EVENT_INSPIRE, 13000); + events.ScheduleEvent(EVENT_KNOCKDOWN, 6000); + events.ScheduleEvent(EVENT_FLAMESPEAR, 2000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_DARK_STRIKE: + DoCast(me, SPELL_DARK_STRIKE); + events.ScheduleEvent(EVENT_DARK_STRIKE, urand(15000, 18000)); + break; + case EVENT_DEMORALIZING_SHOUT: + DoCastVictim(SPELL_DEMORALIZING_SHOUT); + events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, urand(15000, 20000)); + break; + case EVENT_INSPIRE: + { + std::list healers = DoFindFriendlyMissingBuff(45.0f, SPELL_INSPIRE); + if (!healers.empty()) + DoCast(Trinity::Containers::SelectRandomContainerElement(healers), SPELL_INSPIRE); + + DoCast(me, SPELL_INSPIRE); + events.ScheduleEvent(EVENT_INSPIRE, urand(20000, 26000)); + break; + } + case EVENT_KNOCKDOWN: + DoCastVictim(SPELL_KNOCKDOWN); + events.ScheduleEvent(EVENT_KNOCKDOWN, urand(12000, 15000)); + break; + case EVENT_FLAMESPEAR: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) + DoCast(target, SPELL_FLAMESPEAR); + events.ScheduleEvent(EVENT_FLAMESPEAR, urand(12000, 16000)); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_sulfuronAI(creature); + } +}; + +class npc_flamewaker_priest : public CreatureScript +{ + public: + npc_flamewaker_priest() : CreatureScript("npc_flamewaker_priest") { } + + struct npc_flamewaker_priestAI : public ScriptedAI + { + npc_flamewaker_priestAI(Creature* creature) : ScriptedAI(creature) + { + } + + void Reset() OVERRIDE + { + events.Reset(); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + events.Reset(); + } + + void EnterCombat(Unit* victim) OVERRIDE + { + ScriptedAI::EnterCombat(victim); + events.ScheduleEvent(EVENT_HEAL, urand(15000, 30000)); + events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 2000); + events.ScheduleEvent(EVENT_IMMOLATE, 8000); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_HEAL: + if (Unit* target = DoSelectLowestHpFriendly(60.0f, 1)) + DoCast(target, SPELL_HEAL); + events.ScheduleEvent(EVENT_HEAL, urand(15000, 20000)); + break; + case EVENT_SHADOW_WORD_PAIN: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_SHADOWWORDPAIN)) + DoCast(target, SPELL_SHADOWWORDPAIN); + events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, urand(18000, 26000)); + break; + case EVENT_IMMOLATE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_IMMOLATE)) + DoCast(target, SPELL_IMMOLATE); + events.ScheduleEvent(EVENT_IMMOLATE, urand(15000, 25000)); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + + private: + EventMap events; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_flamewaker_priestAI(creature); + } +}; + +void AddSC_boss_sulfuron() +{ + new boss_sulfuron(); + new npc_flamewaker_priest(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp new file mode 100644 index 00000000000..04e652b7f80 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp @@ -0,0 +1,264 @@ +/* + * Copyright (C) 2008-2013 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 . + */ + +/* ScriptData +SDName: Instance_Molten_Core +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Molten Core +EndScriptData */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" +#include "CreatureAI.h" +#include "molten_core.h" +#include "TemporarySummon.h" + +Position const SummonPositions[10] = +{ + {737.850f, -1145.35f, -120.288f, 4.71368f}, + {744.162f, -1151.63f, -119.726f, 4.58204f}, + {751.247f, -1152.82f, -119.744f, 4.49673f}, + {759.206f, -1155.09f, -120.051f, 4.30104f}, + {755.973f, -1152.33f, -120.029f, 4.25588f}, + {731.712f, -1147.56f, -120.195f, 4.95955f}, + {726.499f, -1149.80f, -120.156f, 5.24055f}, + {722.408f, -1152.41f, -120.029f, 5.33087f}, + {718.994f, -1156.36f, -119.805f, 5.75738f}, + {838.510f, -829.840f, -232.000f, 2.00000f}, +}; + +class instance_molten_core : public InstanceMapScript +{ + public: + instance_molten_core() : InstanceMapScript("instance_molten_core", 409) { } + + struct instance_molten_core_InstanceMapScript : public InstanceScript + { + instance_molten_core_InstanceMapScript(Map* map) : InstanceScript(map) + { + SetBossNumber(MAX_ENCOUNTER); + _golemaggTheIncineratorGUID = 0; + _majordomoExecutusGUID = 0; + _cacheOfTheFirelordGUID = 0; + _executusSchedule = NULL; + _deadBossCount = 0; + _ragnarosAddDeaths = 0; + _isLoading = false; + _summonedExecutus = false; + } + + ~instance_molten_core_InstanceMapScript() + { + delete _executusSchedule; + } + + void OnPlayerEnter(Player* /*player*/) + { + if (_executusSchedule) + { + SummonMajordomoExecutus(*_executusSchedule); + delete _executusSchedule; + _executusSchedule = NULL; + } + } + + void OnCreatureCreate(Creature* creature) + { + switch (creature->GetEntry()) + { + case NPC_GOLEMAGG_THE_INCINERATOR: + _golemaggTheIncineratorGUID = creature->GetGUID(); + break; + case NPC_MAJORDOMO_EXECUTUS: + _majordomoExecutusGUID = creature->GetGUID(); + break; + default: + break; + } + } + + void OnGameObjectCreate(GameObject* go) + { + switch (go->GetEntry()) + { + case GO_CACHE_OF_THE_FIRELORD: + _cacheOfTheFirelordGUID = go->GetGUID(); + break; + default: + break; + } + } + + void SetData(uint32 type, uint32 data) OVERRIDE + { + if (type == DATA_RAGNAROS_ADDS) + { + if (data == 1) + ++_ragnarosAddDeaths; + else if (data == 0) + _ragnarosAddDeaths = 0; + } + } + + uint32 GetData(uint32 type) const OVERRIDE + { + switch (type) + { + case DATA_RAGNAROS_ADDS: + return _ragnarosAddDeaths; + } + + return 0; + } + + uint64 GetData64(uint32 type) const OVERRIDE + { + switch (type) + { + case BOSS_GOLEMAGG_THE_INCINERATOR: + return _golemaggTheIncineratorGUID; + case BOSS_MAJORDOMO_EXECUTUS: + return _majordomoExecutusGUID; + } + + return 0; + } + + bool SetBossState(uint32 bossId, EncounterState state) + { + if (!InstanceScript::SetBossState(bossId, state)) + return false; + + if (state == DONE && bossId < BOSS_MAJORDOMO_EXECUTUS) + ++_deadBossCount; + + if (_isLoading) + return true; + + if (_deadBossCount == 8) + SummonMajordomoExecutus(false); + + if (bossId == BOSS_MAJORDOMO_EXECUTUS && state == DONE) + DoRespawnGameObject(_cacheOfTheFirelordGUID, 7 * DAY); + + return true; + } + + void SummonMajordomoExecutus(bool done) + { + if (_summonedExecutus) + return; + + _summonedExecutus = true; + if (!done) + { + instance->SummonCreature(NPC_MAJORDOMO_EXECUTUS, SummonPositions[0]); + instance->SummonCreature(NPC_FLAMEWAKER_HEALER, SummonPositions[1]); + instance->SummonCreature(NPC_FLAMEWAKER_HEALER, SummonPositions[2]); + instance->SummonCreature(NPC_FLAMEWAKER_HEALER, SummonPositions[3]); + instance->SummonCreature(NPC_FLAMEWAKER_HEALER, SummonPositions[4]); + instance->SummonCreature(NPC_FLAMEWAKER_ELITE, SummonPositions[5]); + instance->SummonCreature(NPC_FLAMEWAKER_ELITE, SummonPositions[6]); + instance->SummonCreature(NPC_FLAMEWAKER_ELITE, SummonPositions[7]); + instance->SummonCreature(NPC_FLAMEWAKER_ELITE, SummonPositions[8]); + } + else if (TempSummon* summon = instance->SummonCreature(NPC_MAJORDOMO_EXECUTUS, RagnarosTelePos)) + summon->AI()->DoAction(ACTION_START_RAGNAROS_ALT); + } + + std::string GetSaveData() + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << "M C " << GetBossSaveData(); + + OUT_SAVE_INST_DATA_COMPLETE; + return saveStream.str(); + } + + void Load(char const* data) + { + if (!data) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + _isLoading = true; + OUT_LOAD_INST_DATA(data); + + char dataHead1, dataHead2; + + std::istringstream loadStream(data); + loadStream >> dataHead1 >> dataHead2; + + if (dataHead1 == 'M' && dataHead2 == 'C') + { + EncounterState states[MAX_ENCOUNTER]; + uint8 executusCounter = 0; + + // need 2 loops to check spawning executus/ragnaros + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + uint32 tmpState; + loadStream >> tmpState; + if (tmpState == IN_PROGRESS || tmpState > TO_BE_DECIDED) + tmpState = NOT_STARTED; + states[i] = EncounterState(tmpState); + + if (tmpState == DONE && i < BOSS_MAJORDOMO_EXECUTUS) + ++executusCounter; + } + + if (executusCounter >= 8 && states[BOSS_RAGNAROS] != DONE) + _executusSchedule = new bool(states[BOSS_MAJORDOMO_EXECUTUS] == DONE); + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + SetBossState(i, states[i]); + } + else + OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + _isLoading = false; + } + + private: + uint64 _golemaggTheIncineratorGUID; + uint64 _majordomoExecutusGUID; + uint64 _cacheOfTheFirelordGUID; + bool* _executusSchedule; + uint8 _deadBossCount; + uint8 _ragnarosAddDeaths; + bool _isLoading; + bool _summonedExecutus; + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_molten_core_InstanceMapScript(map); + } +}; + +void AddSC_instance_molten_core() +{ + new instance_molten_core(); +} diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h new file mode 100644 index 00000000000..407e3ee5204 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2008-2013 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_MOLTEN_CORE_H +#define DEF_MOLTEN_CORE_H + +enum Encounters +{ + BOSS_LUCIFRON = 0, + BOSS_MAGMADAR = 1, + BOSS_GEHENNAS = 2, + BOSS_GARR = 3, + BOSS_SHAZZRAH = 4, + BOSS_BARON_GEDDON = 5, + BOSS_SULFURON_HARBINGER = 6, + BOSS_GOLEMAGG_THE_INCINERATOR = 7, + BOSS_MAJORDOMO_EXECUTUS = 8, + BOSS_RAGNAROS = 9, + MAX_ENCOUNTER, +}; + +enum Actions +{ + ACTION_START_RAGNAROS = 0, + ACTION_START_RAGNAROS_ALT = 1, +}; + +Position const RagnarosTelePos = {829.159f, -815.773f, -228.972f, 5.30500f}; +Position const RagnarosSummonPos = {838.510f, -829.840f, -232.000f, 2.00000f}; + +enum Creatures +{ + NPC_LUCIFRON = 12118, + NPC_MAGMADAR = 11982, + NPC_GEHENNAS = 12259, + NPC_GARR = 12057, + NPC_SHAZZRAH = 12264, + NPC_BARON_GEDDON = 12056, + NPC_SULFURON_HARBINGER = 12098, + NPC_GOLEMAGG_THE_INCINERATOR = 11988, + NPC_MAJORDOMO_EXECUTUS = 12018, + NPC_RAGNAROS = 11502, + NPC_FLAMEWAKER_HEALER = 11663, + NPC_FLAMEWAKER_ELITE = 11664, +}; + +enum GameObjects +{ + GO_CACHE_OF_THE_FIRELORD = 179703, +}; + +enum Data +{ + DATA_RAGNAROS_ADDS = 0, +}; + +#endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h deleted file mode 100644 index 5c34a30912a..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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_BLACKROCK_SPIRE_H -#define DEF_BLACKROCK_SPIRE_H - -uint32 const EncounterCount = 22; - -#define BRSScriptName "instance_blackrock_spire" - -enum DataTypes -{ - DATA_HIGHLORD_OMOKK = 0, - DATA_SHADOW_HUNTER_VOSHGAJIN = 1, - DATA_WARMASTER_VOONE = 2, - DATA_MOTHER_SMOLDERWEB = 3, - DATA_UROK_DOOMHOWL = 4, - DATA_QUARTERMASTER_ZIGRIS = 5, - DATA_GIZRUL_THE_SLAVENER = 6, - DATA_HALYCON = 7, - DATA_OVERLORD_WYRMTHALAK = 8, - DATA_PYROGAURD_EMBERSEER = 9, - DATA_WARCHIEF_REND_BLACKHAND = 10, - DATA_GYTH = 11, - DATA_THE_BEAST = 12, - DATA_GENERAL_DRAKKISATH = 13, - // Extra - DATA_DRAGONSPIRE_ROOM = 14, - DATA_HALL_RUNE_1 = 15, - DATA_HALL_RUNE_2 = 16, - DATA_HALL_RUNE_3 = 17, - DATA_HALL_RUNE_4 = 18, - DATA_HALL_RUNE_5 = 19, - DATA_HALL_RUNE_6 = 20, - DATA_HALL_RUNE_7 = 21 -}; - -enum CreaturesIds -{ - NPC_HIGHLORD_OMOKK = 9196, - NPC_SHADOW_HUNTER_VOSHGAJIN = 9236, - NPC_WARMASTER_VOONE = 9237, - NPC_MOTHER_SMOLDERWEB = 10596, - NPC_UROK_DOOMHOWL = 10584, - NPC_QUARTERMASTER_ZIGRIS = 9736, - NPC_GIZRUL_THE_SLAVENER = 10268, - NPC_HALYCON = 10220, - NPC_OVERLORD_WYRMTHALAK = 9568, - NPC_PYROGAURD_EMBERSEER = 9816, - NPC_WARCHIEF_REND_BLACKHAND = 10429, - NPC_GYTH = 10339, - NPC_THE_BEAST = 10430, - NPC_GENERAL_DRAKKISATH = 10363, - NPC_BLACKHAND_DREADWEAVER = 9817, - NPC_BLACKHAND_SUMMONER = 9818, - NPC_BLACKHAND_VETERAN = 9819, - NPC_BLACKHAND_INCARCERATOR = 10316, - NPC_LORD_VICTOR_NEFARIUS = 10162 -}; - -enum AdditionalData -{ - SPELL_SUMMON_ROOKERY_WHELP = 15745, - EVENT_PYROGUARD_EMBERSEER = 4884, - AREATRIGGER = 1, - AREATRIGGER_DRAGONSPIRE_HALL = 2046, - AREATRIGGER_BLACKROCK_STADIUM = 2026 -}; - -enum GameObjectsIds -{ - GO_WHELP_SPAWNER = 175622, // trap spawned by go id 175124 - // Doors - GO_EMBERSEER_IN = 175244, // First door to Pyroguard Emberseer - GO_DOORS = 175705, // Second door to Pyroguard Emberseer - GO_EMBERSEER_OUT = 175153, // Door after Pyroguard Emberseer event - GO_GYTH_ENTRY_DOOR = 164726, - GO_GYTH_COMBAT_DOOR = 175185, - GO_GYTH_EXIT_DOOR = 175186, - GO_DRAKKISATH_DOOR_1 = 175946, - GO_DRAKKISATH_DOOR_2 = 175947, - // Runes in dragonspire hall - GO_HALL_RUNE_1 = 175197, - GO_HALL_RUNE_2 = 175199, - GO_HALL_RUNE_3 = 175195, - GO_HALL_RUNE_4 = 175200, - GO_HALL_RUNE_5 = 175198, - GO_HALL_RUNE_6 = 175196, - GO_HALL_RUNE_7 = 175194, - // Runes in emberseers room - GO_EMBERSEER_RUNE_1 = 175266, - GO_EMBERSEER_RUNE_2 = 175267, - GO_EMBERSEER_RUNE_3 = 175268, - GO_EMBERSEER_RUNE_4 = 175269, - GO_EMBERSEER_RUNE_5 = 175270, - GO_EMBERSEER_RUNE_6 = 175271, - GO_EMBERSEER_RUNE_7 = 175272, - // For Gyth event - GO_DR_PORTCULLIS = 175185, - GO_PORTCULLIS_ACTIVE = 164726, - GO_PORTCULLIS_TOBOSSROOMS = 175186 -}; - -#endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp deleted file mode 100644 index 59581204b05..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_FIRENOVA = 23462, - SPELL_CLEAVE = 20691, - SPELL_CONFLIGURATION = 16805, - SPELL_THUNDERCLAP = 15548, //Not sure if right ID. 23931 would be a harder possibility. -}; - -enum Events -{ - EVENT_FIRE_NOVA = 1, - EVENT_CLEAVE = 2, - EVENT_CONFLIGURATION = 3, - EVENT_THUNDERCLAP = 4, -}; - -class boss_drakkisath : public CreatureScript -{ -public: - boss_drakkisath() : CreatureScript("boss_drakkisath") { } - - struct boss_drakkisathAI : public BossAI - { - boss_drakkisathAI(Creature* creature) : BossAI(creature, DATA_GENERAL_DRAKKISATH) {} - - void Reset() OVERRIDE - { - _Reset(); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_FIRE_NOVA, 6000); - events.ScheduleEvent(EVENT_CLEAVE, 8000); - events.ScheduleEvent(EVENT_CONFLIGURATION, 15000); - events.ScheduleEvent(EVENT_THUNDERCLAP, 17000); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_FIRE_NOVA: - DoCastVictim(SPELL_FIRENOVA); - events.ScheduleEvent(EVENT_FIRE_NOVA, 10000); - break; - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, 8000); - break; - case EVENT_CONFLIGURATION: - DoCastVictim(SPELL_CONFLIGURATION); - events.ScheduleEvent(EVENT_CONFLIGURATION, 18000); - break; - case EVENT_THUNDERCLAP: - DoCastVictim(SPELL_THUNDERCLAP); - events.ScheduleEvent(EVENT_THUNDERCLAP, 20000); - break; - } - } - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_drakkisathAI(creature); - } -}; - -void AddSC_boss_drakkisath() -{ - new boss_drakkisath(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp deleted file mode 100644 index f1bd81f2e6a..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ScriptedCreature.h" -#include "blackrock_spire.h" -#include "TemporarySummon.h" - -enum Spells -{ - SPELL_FATAL_BITE = 16495, - SPELL_INFECTED_BITE = 16128, - SPELL_FRENZY = 8269 -}; - -enum Paths -{ - GIZRUL_PATH = 402450 -}; - -enum Events -{ - EVENT_FATAL_BITE = 1, - EVENT_INFECTED_BITE = 2, - EVENT_FRENZY = 3 -}; - -class boss_gizrul_the_slavener : public CreatureScript -{ -public: - boss_gizrul_the_slavener() : CreatureScript("boss_gizrul_the_slavener") { } - - struct boss_gizrul_the_slavenerAI : public BossAI - { - boss_gizrul_the_slavenerAI(Creature* creature) : BossAI(creature, DATA_GIZRUL_THE_SLAVENER) {} - - void Reset() OVERRIDE - { - _Reset(); - } - - void IsSummonedBy(Unit* /*summoner*/) OVERRIDE - { - me->GetMotionMaster()->MovePath(GIZRUL_PATH, false); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_FATAL_BITE, urand(17000,20000)); - events.ScheduleEvent(EVENT_INFECTED_BITE, urand(10000,12000)); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_FATAL_BITE: - DoCastVictim(SPELL_FATAL_BITE); - events.ScheduleEvent(EVENT_FATAL_BITE, urand(8000,10000)); - break; - case EVENT_INFECTED_BITE: - DoCast(me, SPELL_INFECTED_BITE); - events.ScheduleEvent(EVENT_FATAL_BITE, urand(8000,10000)); - break; - default: - break; - } - } - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_gizrul_the_slavenerAI(creature); - } -}; - -void AddSC_boss_gizrul_the_slavener() -{ - new boss_gizrul_the_slavener(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp deleted file mode 100644 index dbc3056b1ff..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_REND_MOUNTS = 16167, // Change model - SPELL_CORROSIVE_ACID = 16359, // Combat (self cast) - SPELL_FLAMEBREATH = 16390, // Combat (Self cast) - SPELL_FREEZE = 16350, // Combat (Self cast) - SPELL_KNOCK_AWAY = 10101, // Combat - SPELL_SUMMON_REND = 16328 // Summons Rend near death -}; - -enum Misc -{ - NEFARIUS_PATH_2 = 1379671, - NEFARIUS_PATH_3 = 1379672, - GYTH_PATH_1 = 1379681, -}; - -enum Events -{ - EVENT_CORROSIVE_ACID = 1, - EVENT_FREEZE = 2, - EVENT_FLAME_BREATH = 3, - EVENT_KNOCK_AWAY = 4, - EVENT_SUMMONED_1 = 5, - EVENT_SUMMONED_2 = 6 -}; - -class boss_gyth : public CreatureScript -{ -public: - boss_gyth() : CreatureScript("boss_gyth") { } - - struct boss_gythAI : public BossAI - { - boss_gythAI(Creature* creature) : BossAI(creature, DATA_GYTH) { } - - bool SummonedRend; - - void Reset() OVERRIDE - { - SummonedRend = false; - if (instance->GetBossState(DATA_GYTH) == IN_PROGRESS) - { - instance->SetBossState(DATA_GYTH, DONE); - me->DespawnOrUnsummon(); - } - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - - events.ScheduleEvent(EVENT_CORROSIVE_ACID, urand(8000, 16000)); - events.ScheduleEvent(EVENT_FREEZE, urand(8000, 16000)); - events.ScheduleEvent(EVENT_FLAME_BREATH, urand(8000, 16000)); - events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(12000, 18000)); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - instance->SetBossState(DATA_GYTH, DONE); - } - - void SetData(uint32 /*type*/, uint32 data) OVERRIDE - { - switch (data) - { - case 1: - events.ScheduleEvent(EVENT_SUMMONED_1, 1000); - break; - default: - break; - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - - if (!SummonedRend && HealthBelowPct(5)) - { - DoCast(me, SPELL_SUMMON_REND); - me->RemoveAura(SPELL_REND_MOUNTS); - SummonedRend = true; - } - - if (!UpdateVictim()) - { - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SUMMONED_1: - me->AddAura(SPELL_REND_MOUNTS, me); - if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 40.0f)) - portcullis->UseDoorOrButton(); - if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true)) - victor->AI()->SetData(1, 1); - events.ScheduleEvent(EVENT_SUMMONED_2, 2000); - break; - case EVENT_SUMMONED_2: - me->GetMotionMaster()->MovePath(GYTH_PATH_1, false); - break; - default: - break; - } - } - return; - } - - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CORROSIVE_ACID: - DoCast(me, SPELL_CORROSIVE_ACID); - events.ScheduleEvent(EVENT_CORROSIVE_ACID, urand(10000, 16000)); - break; - case EVENT_FREEZE: - DoCast(me, SPELL_FREEZE); - events.ScheduleEvent(EVENT_FREEZE, urand(10000, 16000)); - break; - case EVENT_FLAME_BREATH: - DoCast(me, SPELL_FLAMEBREATH); - events.ScheduleEvent(EVENT_FLAME_BREATH, urand(10000, 16000)); - break; - case EVENT_KNOCK_AWAY: - DoCastVictim(SPELL_KNOCK_AWAY); - events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(14000, 20000)); - break; - default: - break; - } - } - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_gythAI(creature); - } -}; - -void AddSC_boss_gyth() -{ - new boss_gyth(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp deleted file mode 100644 index 630d6ff2a0d..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_REND = 13738, - SPELL_THRASH = 3391, -}; - -enum Says -{ - EMOTE_DEATH = 0 -}; - -enum Events -{ - EVENT_REND = 1, - EVENT_THRASH = 2, -}; - -const Position SummonLocation = { -167.9561f, -411.7844f, 76.23057f, 1.53589f }; - -class boss_halycon : public CreatureScript -{ -public: - boss_halycon() : CreatureScript("boss_halycon") { } - - struct boss_halyconAI : public BossAI - { - boss_halyconAI(Creature* creature) : BossAI(creature, DATA_HALYCON) {} - - void Reset() OVERRIDE - { - _Reset(); - Summoned = false; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_REND, urand(17000,20000)); - events.ScheduleEvent(EVENT_THRASH, urand(10000,12000)); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300000); - Talk(EMOTE_DEATH); - - Summoned = true; - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_REND: - DoCastVictim(SPELL_REND); - events.ScheduleEvent(EVENT_REND, urand(8000,10000)); - break; - case EVENT_THRASH: - DoCast(me, SPELL_THRASH); - break; - default: - break; - } - } - DoMeleeAttackIfReady(); - } - private: - bool Summoned; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_halyconAI(creature); - } -}; - -void AddSC_boss_halycon() -{ - new boss_halycon(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp deleted file mode 100644 index 54ed5d44e34..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_FRENZY = 8269, - SPELL_KNOCK_AWAY = 10101 -}; - -enum Events -{ - EVENT_FRENZY = 1, - EVENT_KNOCK_AWAY = 2 -}; - -class boss_highlord_omokk : public CreatureScript -{ -public: - boss_highlord_omokk() : CreatureScript("boss_highlord_omokk") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_highlordomokkAI(creature); - } - - struct boss_highlordomokkAI : public BossAI - { - boss_highlordomokkAI(Creature* creature) : BossAI(creature, DATA_HIGHLORD_OMOKK) {} - - void Reset() OVERRIDE - { - _Reset(); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_FRENZY, 20000); - events.ScheduleEvent(EVENT_KNOCK_AWAY, 18000); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_FRENZY: - DoCastVictim(SPELL_FRENZY); - events.ScheduleEvent(EVENT_FRENZY, 60000); - break; - case EVENT_KNOCK_AWAY: - DoCastVictim(SPELL_KNOCK_AWAY); - events.ScheduleEvent(EVENT_KNOCK_AWAY, 12000); - break; - default: - break; - } - } - DoMeleeAttackIfReady(); - } - }; - -}; - -void AddSC_boss_highlordomokk() -{ - new boss_highlord_omokk(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp deleted file mode 100644 index 608cb75bbb2..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_CRYSTALIZE = 16104, - SPELL_MOTHERSMILK = 16468, - SPELL_SUMMON_SPIRE_SPIDERLING = 16103, -}; - -enum Events -{ - EVENT_CRYSTALIZE = 1, - EVENT_MOTHERS_MILK = 2, -}; - -class boss_mother_smolderweb : public CreatureScript -{ -public: - boss_mother_smolderweb() : CreatureScript("boss_mother_smolderweb") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_mothersmolderwebAI(creature); - } - - struct boss_mothersmolderwebAI : public BossAI - { - boss_mothersmolderwebAI(Creature* creature) : BossAI(creature, DATA_MOTHER_SMOLDERWEB) {} - - void Reset() OVERRIDE - { - _Reset(); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_CRYSTALIZE, 20 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_MOTHERS_MILK, 10 * IN_MILLISECONDS); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE - { - if (me->GetHealth() <= damage) - DoCast(me, SPELL_SUMMON_SPIRE_SPIDERLING, true); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CRYSTALIZE: - DoCast(me, SPELL_CRYSTALIZE); - events.ScheduleEvent(EVENT_CRYSTALIZE, 15 * IN_MILLISECONDS); - break; - case EVENT_MOTHERS_MILK: - DoCast(me, SPELL_MOTHERSMILK); - events.ScheduleEvent(EVENT_MOTHERS_MILK, urand(5 * IN_MILLISECONDS, 12500)); - break; - } - } - DoMeleeAttackIfReady(); - } - }; - -}; - -void AddSC_boss_mothersmolderweb() -{ - new boss_mother_smolderweb(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp deleted file mode 100644 index 2b68b640720..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_BLASTWAVE = 11130, - SPELL_SHOUT = 23511, - SPELL_CLEAVE = 20691, - SPELL_KNOCKAWAY = 20686 -}; - -enum Events -{ - EVENT_BLAST_WAVE = 1, - EVENT_SHOUT = 2, - EVENT_CLEAVE = 3, - EVENT_KNOCK_AWAY = 4 -}; - -enum Adds -{ - NPC_SPIRESTONE_WARLORD = 9216, - NPC_SMOLDERTHORN_BERSERKER = 9268 -}; - -const Position SummonLocation1 = { -39.355f, -513.456f, 88.472f, 4.679f }; -const Position SummonLocation2 = { -49.875f, -511.896f, 88.195f, 4.613f }; - -class boss_overlord_wyrmthalak : public CreatureScript -{ -public: - boss_overlord_wyrmthalak() : CreatureScript("boss_overlord_wyrmthalak") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_overlordwyrmthalakAI(creature); - } - - struct boss_overlordwyrmthalakAI : public BossAI - { - boss_overlordwyrmthalakAI(Creature* creature) : BossAI(creature, DATA_OVERLORD_WYRMTHALAK) {} - - bool Summoned; - - void Reset() OVERRIDE - { - _Reset(); - Summoned = false; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_SHOUT, 2 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_CLEAVE, 6 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - if (!Summoned && HealthBelowPct(51)) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - { - if (Creature* warlord = me->SummonCreature(NPC_SPIRESTONE_WARLORD, SummonLocation1, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS)) - warlord->AI()->AttackStart(target); - if (Creature* berserker = me->SummonCreature(NPC_SMOLDERTHORN_BERSERKER, SummonLocation2, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS)) - berserker->AI()->AttackStart(target); - Summoned = true; - } - } - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_BLAST_WAVE: - DoCastVictim(SPELL_BLASTWAVE); - events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS); - break; - case EVENT_SHOUT: - DoCastVictim(SPELL_SHOUT); - events.ScheduleEvent(EVENT_SHOUT, 10 * IN_MILLISECONDS); - break; - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS); - break; - case EVENT_KNOCK_AWAY: - DoCastVictim(SPELL_KNOCKAWAY); - events.ScheduleEvent(EVENT_KNOCK_AWAY, 14 * IN_MILLISECONDS); - break; - } - } - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_overlordwyrmthalak() -{ - new boss_overlord_wyrmthalak(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp deleted file mode 100644 index b84be2feb17..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ /dev/null @@ -1,453 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "Player.h" -#include "Spell.h" -#include "blackrock_spire.h" - -enum Text -{ - EMOTE_ONE_STACK = 0, - EMOTE_TEN_STACK = 1, - EMOTE_FREE_OF_BONDS = 2, - YELL_FREE_OF_BONDS = 3 -}; - -enum Spells -{ - SPELL_ENCAGED_EMBERSEER = 15282, // Self on spawn - SPELL_FIRE_SHIELD_TRIGGER = 13377, // Self on spawn missing from 335 dbc triggers SPELL_FIRE_SHIELD every 3 sec - SPELL_FIRE_SHIELD = 13376, // Triggered by SPELL_FIRE_SHIELD_TRIGGER - SPELL_FREEZE_ANIM = 16245, // Self on event start - SPELL_EMBERSEER_GROWING = 16048, // Self on event start - SPELL_EMBERSEER_GROWING_TRIGGER = 16049, // Triggered by SPELL_EMBERSEER_GROWING - SPELL_EMBERSEER_FULL_STRENGTH = 16047, // Emberseer Full Strength - SPELL_FIRENOVA = 23462, // Combat - SPELL_FLAMEBUFFET = 23341, // Combat - SPELL_PYROBLAST = 17274, // Combat - // Blackhand Incarcerator Spells - SPELL_ENCAGE_EMBERSEER = 15281, // Emberseer on spawn - SPELL_STRIKE = 15580, // Combat - SPELL_ENCAGE = 16045, // Combat - // Cast on player by altar - SPELL_EMBERSEER_OBJECT_VISUAL = 16532 -}; - -enum Events -{ - // Respawn - EVENT_RESPAWN = 1, - // Pre fight - EVENT_PRE_FIGHT_1 = 2, - EVENT_PRE_FIGHT_2 = 3, - // Combat - EVENT_FIRENOVA = 4, - EVENT_FLAMEBUFFET = 5, - EVENT_PYROBLAST = 6, - // Hack due to trigger spell not in dbc - EVENT_FIRE_SHIELD = 7, - // Make sure all players have aura from altar - EVENT_PLAYER_CHECK = 8, - EVENT_ENTER_COMBAT = 9 -}; - -class boss_pyroguard_emberseer : public CreatureScript -{ -public: - boss_pyroguard_emberseer() : CreatureScript("boss_pyroguard_emberseer") { } - - struct boss_pyroguard_emberseerAI : public BossAI - { - boss_pyroguard_emberseerAI(Creature* creature) : BossAI(creature, DATA_PYROGAURD_EMBERSEER) {} - - void Reset() OVERRIDE - { - if (instance) - { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); - events.Reset(); - // Apply auras on spawn and reset - // DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible - me->RemoveAura(SPELL_EMBERSEER_FULL_STRENGTH); - me->RemoveAura(SPELL_EMBERSEER_GROWING); - me->RemoveAura(SPELL_EMBERSEER_GROWING_TRIGGER); - events.ScheduleEvent(EVENT_RESPAWN, 5000); - // Hack for missing trigger spell - events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); - - // Open doors on reset - if (instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS) - OpenDoors(false); // Opens 2 entrance doors - } - } - - void SetData(uint32 /*type*/, uint32 data) OVERRIDE - { - switch (data) - { - case 1: - events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); - break; - case 2: - // Close these two doors on Blackhand Incarcerators aggro - if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN))) - if (door1->GetGoState() == GO_STATE_ACTIVE) - door1->SetGoState(GO_STATE_READY); - if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS))) - if (door2->GetGoState() == GO_STATE_ACTIVE) - door2->SetGoState(GO_STATE_READY); - break; - case 3: - Reset(); - break; - default: - break; - } - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - // ### TODO Check combat timing ### - events.ScheduleEvent(EVENT_FIRENOVA, 6000); - events.ScheduleEvent(EVENT_FLAMEBUFFET, 3000); - events.ScheduleEvent(EVENT_PYROBLAST, 14000); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - if (instance) - { - // Activate all the runes - UpdateRunes(GO_STATE_READY); - // Opens all 3 doors - OpenDoors(true); - // Complete encounter - instance->SetBossState(DATA_PYROGAURD_EMBERSEER, DONE); - } - } - - void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE - { - if (spell->Id == SPELL_ENCAGE_EMBERSEER) - { - if (!me->GetAuraCount(SPELL_ENCAGED_EMBERSEER)) - me->CastSpell(me, SPELL_ENCAGED_EMBERSEER); - } - - if (spell->Id == SPELL_EMBERSEER_GROWING_TRIGGER) - { - if (me->GetAuraCount(SPELL_EMBERSEER_GROWING_TRIGGER) == 10) - Talk(EMOTE_TEN_STACK); - - if (me->GetAuraCount(SPELL_EMBERSEER_GROWING_TRIGGER) == 20) - { - me->RemoveAura(SPELL_ENCAGED_EMBERSEER); - me->RemoveAura(SPELL_FREEZE_ANIM); - me->CastSpell(me, SPELL_EMBERSEER_FULL_STRENGTH); - Talk(EMOTE_FREE_OF_BONDS); - Talk(YELL_FREE_OF_BONDS); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); - events.ScheduleEvent(EVENT_ENTER_COMBAT, 2000); - } - } - } - - void OpenDoors(bool Boss_Killed) - { - // These two doors reopen on reset or boss kill - if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN))) - door1->SetGoState(GO_STATE_ACTIVE); - if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS))) - door2->SetGoState(GO_STATE_ACTIVE); - - // This door opens on boss kill - if (Boss_Killed) - if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_OUT))) - door3->SetGoState(GO_STATE_ACTIVE); - } - - void UpdateRunes(GOState state) - { - if (instance) - { - // update all runes - if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1))) - rune1->SetGoState(state); - if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2))) - rune2->SetGoState(state); - if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3))) - rune3->SetGoState(state); - if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4))) - rune4->SetGoState(state); - if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5))) - rune5->SetGoState(state); - if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6))) - rune6->SetGoState(state); - if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7))) - rune7->SetGoState(state); - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - { - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_RESPAWN: - { - // Respawn all Blackhand Incarcerators - std::list creatureList; - GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f); - for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) - if (Creature* creatureList = *itr) - { - if (!creatureList->IsAlive()) - { - creatureList->Respawn(); - } - creatureList->AI()->SetData(1, 2); - } - me->AddAura(SPELL_ENCAGED_EMBERSEER, me); - instance->SetBossState(DATA_PYROGAURD_EMBERSEER, NOT_STARTED); - break; - } - case EVENT_PRE_FIGHT_1: - { - // Set data on all Blackhand Incarcerators - std::list creatureList; - GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f); - for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) - { - if (Creature* creatureList = *itr) - creatureList->AI()->SetData(1, 1); - } - events.ScheduleEvent(EVENT_PRE_FIGHT_2, 32000); - break; - } - case EVENT_PRE_FIGHT_2: - me->CastSpell(me, SPELL_FREEZE_ANIM); - me->CastSpell(me, SPELL_EMBERSEER_GROWING); - Talk(EMOTE_ONE_STACK); - break; - case EVENT_FIRE_SHIELD: - // #### Spell isn't doing any damage ??? #### - DoCast(me, SPELL_FIRE_SHIELD); - events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); - break; - case EVENT_PLAYER_CHECK: - { - // Check to see if all players in instance have aura SPELL_EMBERSEER_START before starting event - bool _hasAura = true; - Map::PlayerList const &players = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - if (Player* player = itr->GetSource()->ToPlayer()) - if (!player->HasAura(SPELL_EMBERSEER_OBJECT_VISUAL)) - _hasAura = false; - - if (_hasAura) - { - events.ScheduleEvent(EVENT_PRE_FIGHT_1, 1000); - instance->SetBossState(DATA_PYROGAURD_EMBERSEER, IN_PROGRESS); - } - break; - } - case EVENT_ENTER_COMBAT: - AttackStart(me->SelectNearestPlayer(30.0f)); - break; - default: - break; - } - } - return; - } - - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_FIRE_SHIELD: - DoCast(me, SPELL_FIRE_SHIELD); - events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); - break; - case EVENT_FIRENOVA: - DoCast(me, SPELL_FIRENOVA); - events.ScheduleEvent(EVENT_FIRENOVA, 6000); - break; - case EVENT_FLAMEBUFFET: - DoCast(me, SPELL_FLAMEBUFFET); - events.ScheduleEvent(EVENT_FLAMEBUFFET, 14000); - break; - case EVENT_PYROBLAST: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_PYROBLAST); - events.ScheduleEvent(EVENT_PYROBLAST, 15000); - break; - default: - break; - } - } - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_pyroguard_emberseerAI(creature); - } -}; - -/*#### -## npc_blackhand_incarcerator -####*/ - -enum IncarceratorEvents -{ - // OOC - EVENT_ENCAGED_EMBERSEER = 1, - // Combat - EVENT_STRIKE = 2, - EVENT_ENCAGE = 3 -}; - -class npc_blackhand_incarcerator : public CreatureScript -{ -public: - npc_blackhand_incarcerator() : CreatureScript("npc_blackhand_incarcerator") { } - - struct npc_blackhand_incarceratorAI : public ScriptedAI - { - npc_blackhand_incarceratorAI(Creature* creature) : ScriptedAI(creature) {} - - void Reset() OVERRIDE - { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC); - if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) - Emberseer->AI()->SetData(1, 3); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - me->DespawnOrUnsummon(10000); - } - - void SetData(uint32 data, uint32 value) OVERRIDE - { - if (data == 1 && value == 1) - { - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC); - me->InterruptSpell(CURRENT_CHANNELED_SPELL); - _events.CancelEvent(EVENT_ENCAGED_EMBERSEER); - } - - if (data == 1 && value == 2) - { - _events.ScheduleEvent(EVENT_ENCAGED_EMBERSEER, 1000); - } - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - // Used to close doors - if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) - Emberseer->AI()->SetData(1, 2); - - // Had to do this because CallForHelp will ignore any npcs without LOS - std::list creatureList; - GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 60.0f); - for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) - { - if (Creature* creatureList = *itr) - creatureList->SetInCombatWithZone(); // AI()->AttackStart(me->GetVictim()); - } - - _events.ScheduleEvent(EVENT_STRIKE, urand(8000, 16000)); - _events.ScheduleEvent(EVENT_ENCAGE, urand(10000, 20000)); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - - - if (!UpdateVictim()) - { - _events.Update(diff); - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_ENCAGED_EMBERSEER: - { - if (me->GetPositionX() == me->GetHomePosition().GetPositionX()) - if (!me->HasAura(SPELL_ENCAGE_EMBERSEER)) - if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) - DoCast(Emberseer, SPELL_ENCAGE_EMBERSEER); - break; - - } - } - } - return; - } - - _events.Update(diff); - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_STRIKE: - DoCastVictim(SPELL_STRIKE, true); - _events.ScheduleEvent(EVENT_STRIKE, urand(14000, 23000)); - break; - case EVENT_ENCAGE: - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), EVENT_ENCAGE, true); - _events.ScheduleEvent(EVENT_ENCAGE, urand(6000, 12000)); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - - private: - EventMap _events; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_blackhand_incarceratorAI(creature); - } -}; - -void AddSC_boss_pyroguard_emberseer() -{ - new boss_pyroguard_emberseer(); - new npc_blackhand_incarcerator(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp deleted file mode 100644 index a20822839e6..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_SHOOT = 16496, - SPELL_STUNBOMB = 16497, - SPELL_HEALING_POTION = 15504, - SPELL_HOOKEDNET = 15609 -}; - -enum Events -{ - EVENT_SHOOT = 1, - EVENT_STUN_BOMB = 2 -}; - -class quartermaster_zigris : public CreatureScript -{ -public: - quartermaster_zigris() : CreatureScript("quartermaster_zigris") { } - - struct boss_quatermasterzigrisAI : public BossAI - { - boss_quatermasterzigrisAI(Creature* creature) : BossAI(creature, DATA_QUARTERMASTER_ZIGRIS) {} - - void Reset() OVERRIDE - { - _Reset(); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_SHOOT, 1000); - events.ScheduleEvent(EVENT_STUN_BOMB, 16000); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SHOOT: - DoCastVictim(SPELL_SHOOT); - events.ScheduleEvent(EVENT_SHOOT, 500); - break; - case EVENT_STUN_BOMB: - DoCastVictim(SPELL_STUNBOMB); - events.ScheduleEvent(EVENT_STUN_BOMB, 14000); - break; - } - } - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_quatermasterzigrisAI(creature); - } -}; - -void AddSC_boss_quatermasterzigris() -{ - new quartermaster_zigris(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp deleted file mode 100644 index 275b3802764..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "Player.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_WHIRLWIND = 13736, // sniffed - SPELL_CLEAVE = 15284, - SPELL_MORTAL_STRIKE = 16856, - SPELL_FRENZY = 8269, - SPELL_KNOCKDOWN = 13360 // On spawn during Gyth fight -}; - -enum Says -{ - // Rend Blackhand - SAY_BLACKHAND_1 = 0, - SAY_BLACKHAND_2 = 1, - EMOTE_BLACKHAND_DISMOUNT = 2, - // Victor Nefarius - SAY_NEFARIUS_0 = 0, - SAY_NEFARIUS_1 = 1, - SAY_NEFARIUS_2 = 2, - SAY_NEFARIUS_3 = 3, - SAY_NEFARIUS_4 = 4, - SAY_NEFARIUS_5 = 5, - SAY_NEFARIUS_6 = 6, - SAY_NEFARIUS_7 = 7, - SAY_NEFARIUS_8 = 8, - SAY_NEFARIUS_9 = 9, -}; - -enum Adds -{ - NPC_CHROMATIC_WHELP = 10442, - NPC_CHROMATIC_DRAGONSPAWN = 10447, - NPC_BLACKHAND_DRAGON_HANDLER = 10742 -}; - -enum Misc -{ - NEFARIUS_PATH_1 = 1379670, - NEFARIUS_PATH_2 = 1379671, - NEFARIUS_PATH_3 = 1379672, - REND_PATH_1 = 1379680, - REND_PATH_2 = 1379681, -}; - -/* -struct Wave -{ - uint32 entry; - float x_pos; - float y_pos; - float z_pos; - float o_pos; -}; - -static Wave Wave2[]= // 22 sec -{ - { 10447, 209.8637f, -428.2729f, 110.9877f, 0.6632251f }, - { 10442, 209.3122f, -430.8724f, 110.9814f, 2.9147f }, - { 10442, 211.3309f, -425.9111f, 111.0006f, 1.727876f } -}; - -static Wave Wave3[]= // 60 sec -{ - { 10742, 208.6493f, -424.5787f, 110.9872f, 5.8294f }, - { 10447, 203.9482f, -428.9446f, 110.982f, 4.677482f }, - { 10442, 203.3441f, -426.8668f, 110.9772f, 4.712389f }, - { 10442, 206.3079f, -424.7509f, 110.9943f, 4.08407f } -}; - -static Wave Wave4[]= // 49 sec -{ - { 10742, 212.3541f, -412.6826f, 111.0352f, 5.88176f }, - { 10447, 212.5754f, -410.2841f, 111.0296f, 2.740167f }, - { 10442, 212.3449f, -414.8659f, 111.0348f, 2.356194f }, - { 10442, 210.6568f, -412.1552f, 111.0124f, 0.9773844f } -}; - -static Wave Wave5[]= // 60 sec -{ - { 10742, 210.2188f, -410.6686f, 111.0211f, 5.8294f }, - { 10447, 209.4078f, -414.13f, 111.0264f, 4.677482f }, - { 10442, 208.0858f, -409.3145f, 111.0118f, 4.642576f }, - { 10442, 207.9811f, -413.0728f, 111.0098f, 5.288348f }, - { 10442, 208.0854f, -412.1505f, 111.0057f, 4.08407f } -}; - -static Wave Wave6[]= // 27 sec -{ - { 10742, 213.9138f, -426.512f, 111.0013f, 3.316126f }, - { 10447, 213.7121f, -429.8102f, 110.9888f, 1.413717f }, - { 10447, 213.7157f, -424.4268f, 111.009f, 3.001966f }, - { 10442, 210.8935f, -423.913f, 111.0125f, 5.969026f }, - { 10442, 212.2642f, -430.7648f, 110.9807f, 5.934119f } -}; -*/ - -Position const GythLoc = { 211.762f, -397.5885f, 111.1817f, 4.747295f }; -Position const Teleport1Loc = { 194.2993f, -474.0814f, 121.4505f, -0.01225555f }; -Position const Teleport2Loc = { 216.485f, -434.93f, 110.888f, -0.01225555f }; - -enum Events -{ - EVENT_START_1 = 1, - EVENT_START_2 = 2, - EVENT_START_3 = 3, - EVENT_START_4 = 4, - EVENT_TURN_TO_REND = 5, - EVENT_TURN_TO_PLAYER = 6, - EVENT_TURN_TO_FACING_1 = 7, - EVENT_TURN_TO_FACING_2 = 8, - EVENT_TURN_TO_FACING_3 = 9, - EVENT_WAVE_1 = 10, - EVENT_WAVE_2 = 11, - EVENT_WAVE_3 = 12, - EVENT_WAVE_4 = 13, - EVENT_WAVE_5 = 14, - EVENT_WAVE_6 = 15, - EVENT_WAVES_TEXT_1 = 16, - EVENT_WAVES_TEXT_2 = 17, - EVENT_WAVES_TEXT_3 = 18, - EVENT_WAVES_TEXT_4 = 19, - EVENT_WAVES_TEXT_5 = 20, - EVENT_WAVES_COMPLETE_TEXT_1 = 21, - EVENT_WAVES_COMPLETE_TEXT_2 = 22, - EVENT_WAVES_COMPLETE_TEXT_3 = 23, - EVENT_WAVES_EMOTE_1 = 24, - EVENT_WAVES_EMOTE_2 = 25, - EVENT_PATH_REND = 26, - EVENT_PATH_NEFARIUS = 27, - EVENT_TELEPORT_1 = 28, - EVENT_TELEPORT_2 = 29, - EVENT_WHIRLWIND = 30, - EVENT_CLEAVE = 31, - EVENT_MORTAL_STRIKE = 32, -}; - -class boss_rend_blackhand : public CreatureScript -{ -public: - boss_rend_blackhand() : CreatureScript("boss_rend_blackhand") { } - - struct boss_rend_blackhandAI : public BossAI - { - boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND) { } - - void Reset() OVERRIDE - { - _Reset(); - gythEvent = false; - victorGUID = 0; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_WHIRLWIND, urand(13000, 15000)); - events.ScheduleEvent(EVENT_CLEAVE, urand(15000, 17000)); - events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(17000, 19000)); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true)) - victor->AI()->SetData(1, 2); - } - - void SetData(uint32 type, uint32 data) OVERRIDE - { - if (instance && type == AREATRIGGER && data == AREATRIGGER_BLACKROCK_STADIUM) - { - if (!gythEvent) - { - gythEvent = true; - - if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 5.0f, true)) - victorGUID = victor->GetGUID(); - - if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 50.0f)) - portcullisGUID = portcullis->GetGUID(); - - events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); - events.ScheduleEvent(EVENT_START_1, 1000); - } - } - } - - void MovementInform(uint32 type, uint32 id) OVERRIDE - { - if (type == WAYPOINT_MOTION_TYPE) - { - switch (id) - { - case 5: - events.ScheduleEvent(EVENT_TELEPORT_1, 2000); - break; - case 11: - if (Creature* gyth = me->FindNearestCreature(NPC_GYTH, 10.0f, true)) - gyth->AI()->SetData(1, 1); - me->DespawnOrUnsummon(1000); - break; - } - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (gythEvent) - { - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_START_1: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_0); - events.ScheduleEvent(EVENT_START_2, 4000); - break; - case EVENT_START_2: - events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->HandleEmoteCommand(EMOTE_ONESHOT_POINT); - events.ScheduleEvent(EVENT_START_3, 4000); - break; - case EVENT_START_3: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_1); - events.ScheduleEvent(EVENT_WAVE_1, 2000); - events.ScheduleEvent(EVENT_TURN_TO_REND, 4000); - events.ScheduleEvent(EVENT_WAVES_TEXT_1, 20000); - break; - case EVENT_TURN_TO_REND: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - { - victor->SetFacingToObject(me); - victor->HandleEmoteCommand(EMOTE_ONESHOT_TALK); - } - break; - case EVENT_TURN_TO_PLAYER: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - if (Unit* player = victor->SelectNearestPlayer(60.0f)) - victor->SetFacingToObject(player); - break; - case EVENT_TURN_TO_FACING_1: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->SetFacingTo(1.518436f); - break; - case EVENT_TURN_TO_FACING_2: - me->SetFacingTo(1.658063f); - break; - case EVENT_TURN_TO_FACING_3: - me->SetFacingTo(1.500983f); - break; - case EVENT_WAVES_EMOTE_1: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION); - break; - case EVENT_WAVES_EMOTE_2: - me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); - break; - case EVENT_WAVES_TEXT_1: - events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_2); - me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); - events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); - events.ScheduleEvent(EVENT_WAVES_EMOTE_1, 5000); - events.ScheduleEvent(EVENT_WAVE_2, 2000); - events.ScheduleEvent(EVENT_WAVES_TEXT_2, 20000); - break; - case EVENT_WAVES_TEXT_2: - events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_3); - events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); - events.ScheduleEvent(EVENT_WAVE_3, 2000); - events.ScheduleEvent(EVENT_WAVES_TEXT_3, 20000); - break; - case EVENT_WAVES_TEXT_3: - events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_4); - events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); - events.ScheduleEvent(EVENT_WAVE_4, 2000); - events.ScheduleEvent(EVENT_WAVES_TEXT_4, 20000); - break; - case EVENT_WAVES_TEXT_4: - Talk(SAY_BLACKHAND_1); - events.ScheduleEvent(EVENT_WAVES_EMOTE_2, 4000); - events.ScheduleEvent(EVENT_TURN_TO_FACING_3, 8000); - events.ScheduleEvent(EVENT_WAVE_5, 2000); - events.ScheduleEvent(EVENT_WAVES_TEXT_5, 20000); - break; - case EVENT_WAVES_TEXT_5: - events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_5); - events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); - events.ScheduleEvent(EVENT_WAVE_6, 2000); - events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_1, 20000); - break; - case EVENT_WAVES_COMPLETE_TEXT_1: - events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0); - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_6); - events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000); - events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_2, 13000); - break; - case EVENT_WAVES_COMPLETE_TEXT_2: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_7); - Talk(SAY_BLACKHAND_2); - events.ScheduleEvent(EVENT_PATH_REND, 1000); - events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_3, 4000); - break; - case EVENT_WAVES_COMPLETE_TEXT_3: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->AI()->Talk(SAY_NEFARIUS_8); - events.ScheduleEvent(EVENT_PATH_NEFARIUS, 1000); - events.ScheduleEvent(EVENT_PATH_REND, 1000); - break; - case EVENT_PATH_NEFARIUS: - if (Creature* victor = me->GetCreature(*me, victorGUID)) - victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_1, true); - break; - case EVENT_PATH_REND: - me->GetMotionMaster()->MovePath(REND_PATH_1, false); - break; - case EVENT_TELEPORT_1: - me->NearTeleportTo(194.2993f, -474.0814f, 121.4505f, -0.01225555f); - events.ScheduleEvent(EVENT_TELEPORT_2, 50000); - break; - case EVENT_TELEPORT_2: - me->NearTeleportTo(216.485f, -434.93f, 110.888f, -0.01225555f); - me->SummonCreature(NPC_GYTH, 211.762f, -397.5885f, 111.1817f, 4.747295f); - break; - case EVENT_WAVE_1: - if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) - portcullis->UseDoorOrButton(); - // move wave - break; - case EVENT_WAVE_2: - // spawn wave - if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) - portcullis->UseDoorOrButton(); - // move wave - break; - case EVENT_WAVE_3: - // spawn wave - if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) - portcullis->UseDoorOrButton(); - // move wave - break; - case EVENT_WAVE_4: - // spawn wave - if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) - portcullis->UseDoorOrButton(); - // move wave - break; - case EVENT_WAVE_5: - // spawn wave - if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) - portcullis->UseDoorOrButton(); - // move wave - break; - case EVENT_WAVE_6: - // spawn wave - if (GameObject* portcullis = me->GetMap()->GetGameObject(portcullisGUID)) - portcullis->UseDoorOrButton(); - // move wave - break; - default: - break; - } - } - } - - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_WHIRLWIND: - DoCast(SPELL_WHIRLWIND); - events.ScheduleEvent(EVENT_WHIRLWIND, urand(13000, 18000)); - break; - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, urand(10000, 14000)); - break; - case EVENT_MORTAL_STRIKE: - DoCastVictim(SPELL_MORTAL_STRIKE); - events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(14000, 16000)); - break; - } - } - DoMeleeAttackIfReady(); - } - - private: - bool gythEvent; - uint64 victorGUID; - uint64 portcullisGUID; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_rend_blackhandAI(creature); - } -}; - -void AddSC_boss_rend_blackhand() -{ - new boss_rend_blackhand(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp deleted file mode 100644 index 1936e5e72d0..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_CURSEOFBLOOD = 24673, - SPELL_HEX = 16708, - SPELL_CLEAVE = 20691, -}; - -enum Events -{ - EVENT_CURSE_OF_BLOOD = 1, - EVENT_HEX = 2, - EVENT_CLEAVE = 3, -}; - -class boss_shadow_hunter_voshgajin : public CreatureScript -{ -public: - boss_shadow_hunter_voshgajin() : CreatureScript("boss_shadow_hunter_voshgajin") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_shadowvoshAI(creature); - } - - struct boss_shadowvoshAI : public BossAI - { - boss_shadowvoshAI(Creature* creature) : BossAI(creature, DATA_SHADOW_HUNTER_VOSHGAJIN) {} - - void Reset() OVERRIDE - { - _Reset(); - //DoCast(me, SPELL_ICEARMOR, true); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 2 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_HEX, 8 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CURSE_OF_BLOOD: - DoCastVictim(SPELL_CURSEOFBLOOD); - events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 45 * IN_MILLISECONDS); - break; - case EVENT_HEX: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_HEX); - events.ScheduleEvent(EVENT_HEX, 15 * IN_MILLISECONDS); - break; - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS); - break; - } - } - DoMeleeAttackIfReady(); - } - }; - -}; - -void AddSC_boss_shadowvosh() -{ - new boss_shadow_hunter_voshgajin(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp deleted file mode 100644 index c4abaac158c..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_FLAMEBREAK = 16785, - SPELL_IMMOLATE = 20294, - SPELL_TERRIFYINGROAR = 14100, -}; - -enum Events -{ - EVENT_FLAME_BREAK = 1, - EVENT_IMMOLATE = 2, - EVENT_TERRIFYING_ROAR = 3, -}; - -class boss_the_beast : public CreatureScript -{ -public: - boss_the_beast() : CreatureScript("boss_the_beast") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_thebeastAI(creature); - } - - struct boss_thebeastAI : public BossAI - { - boss_thebeastAI(Creature* creature) : BossAI(creature, DATA_THE_BEAST) {} - - void Reset() OVERRIDE - { - _Reset(); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_FLAME_BREAK, 12 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_IMMOLATE, 3 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 23 * IN_MILLISECONDS); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_FLAME_BREAK: - DoCastVictim(SPELL_FLAMEBREAK); - events.ScheduleEvent(EVENT_FLAME_BREAK, 10 * IN_MILLISECONDS); - break; - case EVENT_IMMOLATE: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_IMMOLATE); - events.ScheduleEvent(EVENT_IMMOLATE, 8 * IN_MILLISECONDS); - break; - case EVENT_TERRIFYING_ROAR: - DoCastVictim(SPELL_TERRIFYINGROAR); - events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 20 * IN_MILLISECONDS); - break; - } - } - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_thebeast() -{ - new boss_the_beast(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp deleted file mode 100644 index afee357aad5..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_REND = 16509, - SPELL_STRIKE = 15580, - SPELL_INTIMIDATING_ROAR = 16508 -}; - -enum Says -{ - SAY_SUMMON = 0, - SAY_AGGRO = 1, -}; - -enum Events -{ - EVENT_REND = 1, - EVENT_STRIKE = 2, - EVENT_INTIMIDATING_ROAR = 3 -}; - -class boss_urok_doomhowl : public CreatureScript -{ -public: - boss_urok_doomhowl() : CreatureScript("boss_urok_doomhowl") { } - - struct boss_urok_doomhowlAI : public BossAI - { - boss_urok_doomhowlAI(Creature* creature) : BossAI(creature, DATA_UROK_DOOMHOWL) {} - - void Reset() OVERRIDE - { - _Reset(); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(SPELL_REND, urand(17000,20000)); - events.ScheduleEvent(SPELL_STRIKE, urand(10000,12000)); - Talk(SAY_AGGRO); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case SPELL_REND: - DoCastVictim(SPELL_REND); - events.ScheduleEvent(SPELL_REND, urand(8000,10000)); - break; - case SPELL_STRIKE: - DoCastVictim(SPELL_STRIKE); - events.ScheduleEvent(SPELL_STRIKE, urand(8000,10000)); - break; - default: - break; - } - } - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_urok_doomhowlAI(creature); - } -}; - -void AddSC_boss_urok_doomhowl() -{ - new boss_urok_doomhowl(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp deleted file mode 100644 index e3423fd02b6..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackrock_spire.h" - -enum Spells -{ - SPELL_SNAPKICK = 15618, - SPELL_CLEAVE = 15579, - SPELL_UPPERCUT = 10966, - SPELL_MORTALSTRIKE = 16856, - SPELL_PUMMEL = 15615, - SPELL_THROWAXE = 16075, -}; - -enum Events -{ - EVENT_SNAP_KICK = 1, - EVENT_CLEAVE = 2, - EVENT_UPPERCUT = 3, - EVENT_MORTAL_STRIKE = 4, - EVENT_PUMMEL = 5, - EVENT_THROW_AXE = 6, -}; - -class boss_warmaster_voone : public CreatureScript -{ -public: - boss_warmaster_voone() : CreatureScript("boss_warmaster_voone") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_warmastervooneAI(creature); - } - - struct boss_warmastervooneAI : public BossAI - { - boss_warmastervooneAI(Creature* creature) : BossAI(creature, DATA_WARMASTER_VOONE) {} - - void Reset() OVERRIDE - { - _Reset(); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_SNAP_KICK, 8 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_UPPERCUT, 20 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_MORTAL_STRIKE, 12 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_PUMMEL, 32 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_THROW_AXE, 1 * IN_MILLISECONDS); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SNAP_KICK: - DoCastVictim(SPELL_SNAPKICK); - events.ScheduleEvent(EVENT_SNAP_KICK, 6 * IN_MILLISECONDS); - break; - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, 12 * IN_MILLISECONDS); - break; - case EVENT_UPPERCUT: - DoCastVictim(SPELL_UPPERCUT); - events.ScheduleEvent(EVENT_UPPERCUT, 14 * IN_MILLISECONDS); - break; - case EVENT_MORTAL_STRIKE: - DoCastVictim(SPELL_MORTALSTRIKE); - events.ScheduleEvent(EVENT_MORTAL_STRIKE, 10 * IN_MILLISECONDS); - break; - case EVENT_PUMMEL: - DoCastVictim(SPELL_PUMMEL); - events.ScheduleEvent(EVENT_MORTAL_STRIKE, 16 * IN_MILLISECONDS); - break; - case EVENT_THROW_AXE: - DoCastVictim(SPELL_THROWAXE); - events.ScheduleEvent(EVENT_THROW_AXE, 8 * IN_MILLISECONDS); - break; - } - } - DoMeleeAttackIfReady(); - } - }; - -}; - -void AddSC_boss_warmastervoone() -{ - new boss_warmaster_voone(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp deleted file mode 100644 index f07e426c808..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ObjectDefines.h" -#include "Cell.h" -#include "CellImpl.h" -#include "GridNotifiers.h" -#include "GridNotifiersImpl.h" -#include "InstanceScript.h" -#include "ScriptedCreature.h" -#include "blackrock_spire.h" - -uint32 const DragonspireRunes[7] = { GO_HALL_RUNE_1, GO_HALL_RUNE_2, GO_HALL_RUNE_3, GO_HALL_RUNE_4, GO_HALL_RUNE_5, GO_HALL_RUNE_6, GO_HALL_RUNE_7 }; - -uint32 const DragonspireMobs[3] = { NPC_BLACKHAND_DREADWEAVER, NPC_BLACKHAND_SUMMONER, NPC_BLACKHAND_VETERAN }; - -enum EventIds -{ - EVENT_DARGONSPIRE_ROOM_STORE = 1, - EVENT_DARGONSPIRE_ROOM_CHECK = 2 -}; - -class instance_blackrock_spire : public InstanceMapScript -{ -public: - instance_blackrock_spire() : InstanceMapScript(BRSScriptName, 229) { } - - struct instance_blackrock_spireMapScript : public InstanceScript - { - instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map) - { - SetBossNumber(EncounterCount); - HighlordOmokk = 0; - ShadowHunterVoshgajin = 0; - WarMasterVoone = 0; - MotherSmolderweb = 0; - UrokDoomhowl = 0; - QuartermasterZigris = 0; - GizrultheSlavener = 0; - Halycon = 0; - OverlordWyrmthalak = 0; - PyroguardEmberseer = 0; - WarchiefRendBlackhand = 0; - Gyth = 0; - LordVictorNefarius = 0; - TheBeast = 0; - GeneralDrakkisath = 0; - go_emberseerin = 0; - go_doors = 0; - go_emberseerout = 0; - go_blackrockaltar = 0; - go_portcullis_active = 0; - go_portcullis_tobossrooms = 0; - } - - void OnCreatureCreate(Creature* creature) - { - switch (creature->GetEntry()) - { - case NPC_HIGHLORD_OMOKK: - HighlordOmokk = creature->GetGUID(); - break; - case NPC_SHADOW_HUNTER_VOSHGAJIN: - ShadowHunterVoshgajin = creature->GetGUID(); - break; - case NPC_WARMASTER_VOONE: - WarMasterVoone = creature->GetGUID(); - break; - case NPC_MOTHER_SMOLDERWEB: - MotherSmolderweb = creature->GetGUID(); - break; - case NPC_UROK_DOOMHOWL: - UrokDoomhowl = creature->GetGUID(); - break; - case NPC_QUARTERMASTER_ZIGRIS: - QuartermasterZigris = creature->GetGUID(); - break; - case NPC_GIZRUL_THE_SLAVENER: - GizrultheSlavener = creature->GetGUID(); - break; - case NPC_HALYCON: - Halycon = creature->GetGUID(); - break; - case NPC_OVERLORD_WYRMTHALAK: - OverlordWyrmthalak = creature->GetGUID(); - break; - case NPC_PYROGAURD_EMBERSEER: - PyroguardEmberseer = creature->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - creature->DisappearAndDie(); - break; - case NPC_WARCHIEF_REND_BLACKHAND: - WarchiefRendBlackhand = creature->GetGUID(); - if (GetBossState(DATA_GYTH) == DONE) - creature->DisappearAndDie(); - break; - case NPC_GYTH: - Gyth = creature->GetGUID(); - break; - case NPC_THE_BEAST: - TheBeast = creature->GetGUID(); - break; - case NPC_GENERAL_DRAKKISATH: - GeneralDrakkisath = creature->GetGUID(); - break; - case NPC_LORD_VICTOR_NEFARIUS: - LordVictorNefarius = creature->GetGUID(); - if (GetBossState(DATA_GYTH) == DONE) - creature->DisappearAndDie(); - break; - } - } - - void OnGameObjectCreate(GameObject* go) - { - switch (go->GetEntry()) - { - case GO_WHELP_SPAWNER: - go->CastSpell(NULL, SPELL_SUMMON_ROOKERY_WHELP); - break; - case GO_EMBERSEER_IN: - go_emberseerin = go->GetGUID(); - if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE) - HandleGameObject(0, true, go); - break; - case GO_DOORS: - go_doors = go->GetGUID(); - if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE) - HandleGameObject(0, true, go); - break; - case GO_EMBERSEER_OUT: - go_emberseerout = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - HandleGameObject(0, true, go); - break; - case GO_HALL_RUNE_1: - go_roomrunes[0] = go->GetGUID(); - if (GetBossState(DATA_HALL_RUNE_1) == DONE) - HandleGameObject(0, false, go); - break; - case GO_HALL_RUNE_2: - go_roomrunes[1] = go->GetGUID(); - if (GetBossState(DATA_HALL_RUNE_2) == DONE) - HandleGameObject(0, false, go); - break; - case GO_HALL_RUNE_3: - go_roomrunes[2] = go->GetGUID(); - if (GetBossState(DATA_HALL_RUNE_3) == DONE) - HandleGameObject(0, false, go); - break; - case GO_HALL_RUNE_4: - go_roomrunes[3] = go->GetGUID(); - if (GetBossState(DATA_HALL_RUNE_4) == DONE) - HandleGameObject(0, false, go); - break; - case GO_HALL_RUNE_5: - go_roomrunes[4] = go->GetGUID(); - if (GetBossState(DATA_HALL_RUNE_5) == DONE) - HandleGameObject(0, false, go); - break; - case GO_HALL_RUNE_6: - go_roomrunes[5] = go->GetGUID(); - if (GetBossState(DATA_HALL_RUNE_6) == DONE) - HandleGameObject(0, false, go); - break; - case GO_HALL_RUNE_7: - go_roomrunes[6] = go->GetGUID(); - if (GetBossState(DATA_HALL_RUNE_7) == DONE) - HandleGameObject(0, false, go); - break; - case GO_EMBERSEER_RUNE_1: - go_emberseerrunes[0] = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - HandleGameObject(0, false, go); - break; - case GO_EMBERSEER_RUNE_2: - go_emberseerrunes[1] = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - HandleGameObject(0, false, go); - break; - case GO_EMBERSEER_RUNE_3: - go_emberseerrunes[2] = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - HandleGameObject(0, false, go); - break; - case GO_EMBERSEER_RUNE_4: - go_emberseerrunes[3] = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - HandleGameObject(0, false, go); - break; - case GO_EMBERSEER_RUNE_5: - go_emberseerrunes[4] = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - HandleGameObject(0, false, go); - break; - case GO_EMBERSEER_RUNE_6: - go_emberseerrunes[5] = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - HandleGameObject(0, false, go); - break; - case GO_EMBERSEER_RUNE_7: - go_emberseerrunes[6] = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - HandleGameObject(0, false, go); - break; - case GO_PORTCULLIS_ACTIVE: - go_portcullis_active = go->GetGUID(); - if (GetBossState(DATA_GYTH) == DONE) - HandleGameObject(0, true, go); - break; - case GO_PORTCULLIS_TOBOSSROOMS: - go_portcullis_tobossrooms = go->GetGUID(); - if (GetBossState(DATA_GYTH) == DONE) - HandleGameObject(0, true, go); - break; - default: - break; - } - } - - bool SetBossState(uint32 type, EncounterState state) - { - if (!InstanceScript::SetBossState(type, state)) - return false; - - switch (type) - { - case DATA_HIGHLORD_OMOKK: - case DATA_SHADOW_HUNTER_VOSHGAJIN: - case DATA_WARMASTER_VOONE: - case DATA_MOTHER_SMOLDERWEB: - case DATA_UROK_DOOMHOWL: - case DATA_QUARTERMASTER_ZIGRIS: - case DATA_GIZRUL_THE_SLAVENER: - case DATA_HALYCON: - case DATA_OVERLORD_WYRMTHALAK: - case DATA_PYROGAURD_EMBERSEER: - case DATA_WARCHIEF_REND_BLACKHAND: - case DATA_GYTH: - case DATA_THE_BEAST: - case DATA_GENERAL_DRAKKISATH: - case DATA_DRAGONSPIRE_ROOM: - break; - default: - break; - } - - return true; - } - - void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) - { - switch (eventId) - { - case EVENT_PYROGUARD_EMBERSEER: - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == NOT_STARTED) - { - if (Creature* Emberseer = instance->GetCreature(PyroguardEmberseer)) - Emberseer->AI()->SetData(1, 1); - } - break; - default: - break; - } - } - - void SetData(uint32 type, uint32 data) OVERRIDE - { - switch (type) - { - case AREATRIGGER: - if (data == AREATRIGGER_DRAGONSPIRE_HALL) - { - if (GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE) - Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_STORE, 1000); - } - default: - break; - } - } - - uint64 GetData64(uint32 type) const OVERRIDE - { - switch (type) - { - case DATA_HIGHLORD_OMOKK: - return HighlordOmokk; - break; - case DATA_SHADOW_HUNTER_VOSHGAJIN: - return ShadowHunterVoshgajin; - break; - case DATA_WARMASTER_VOONE: - return WarMasterVoone; - break; - case DATA_MOTHER_SMOLDERWEB: - return MotherSmolderweb; - break; - case DATA_UROK_DOOMHOWL: - return UrokDoomhowl; - break; - case DATA_QUARTERMASTER_ZIGRIS: - return QuartermasterZigris; - break; - case DATA_GIZRUL_THE_SLAVENER: - return GizrultheSlavener; - break; - case DATA_HALYCON: - return Halycon; - break; - case DATA_OVERLORD_WYRMTHALAK: - return OverlordWyrmthalak; - break; - case DATA_PYROGAURD_EMBERSEER: - return PyroguardEmberseer; - break; - case DATA_WARCHIEF_REND_BLACKHAND: - return WarchiefRendBlackhand; - break; - case DATA_GYTH: - return Gyth; - break; - case DATA_THE_BEAST: - return TheBeast; - break; - case DATA_GENERAL_DRAKKISATH: - return GeneralDrakkisath; - break; - case GO_EMBERSEER_IN: - return go_emberseerin; - break; - case GO_DOORS: - return go_doors; - break; - case GO_EMBERSEER_OUT: - return go_emberseerout; - break; - case GO_HALL_RUNE_1: - return go_roomrunes[0]; - break; - case GO_HALL_RUNE_2: - return go_roomrunes[1]; - break; - case GO_HALL_RUNE_3: - return go_roomrunes[2]; - break; - case GO_HALL_RUNE_4: - return go_roomrunes[3]; - break; - case GO_HALL_RUNE_5: - return go_roomrunes[4]; - break; - case GO_HALL_RUNE_6: - return go_roomrunes[5]; - break; - case GO_HALL_RUNE_7: - return go_roomrunes[6]; - break; - case GO_EMBERSEER_RUNE_1: - return go_emberseerrunes[0]; - break; - case GO_EMBERSEER_RUNE_2: - return go_emberseerrunes[1]; - break; - case GO_EMBERSEER_RUNE_3: - return go_emberseerrunes[2]; - break; - case GO_EMBERSEER_RUNE_4: - return go_emberseerrunes[3]; - break; - case GO_EMBERSEER_RUNE_5: - return go_emberseerrunes[4]; - break; - case GO_EMBERSEER_RUNE_6: - return go_emberseerrunes[5]; - break; - case GO_EMBERSEER_RUNE_7: - return go_emberseerrunes[6]; - break; - case GO_PORTCULLIS_ACTIVE: - return go_portcullis_active; - break; - case GO_PORTCULLIS_TOBOSSROOMS: - return go_portcullis_tobossrooms; - break; - } - return 0; - } - - void Update(uint32 diff) - { - Events.Update(diff); - - while (uint32 eventId = Events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_DARGONSPIRE_ROOM_STORE: - Dragonspireroomstore(); - Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 3000); - break; - case EVENT_DARGONSPIRE_ROOM_CHECK: - Dragonspireroomcheck(); - if ((GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE)) - Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 3000); - break; - default: - break; - } - } - } - - void Dragonspireroomstore() - { - uint8 creaturecount; - - for (uint8 i = 0; i < 7; ++i) - { - creaturecount = 0; - - if (GameObject* rune = instance->GetGameObject(go_roomrunes[i])) - { - for (uint8 ii = 0; ii < 3; ++ii) - { - std::list creatureList; - GetCreatureListWithEntryInGrid(creatureList, rune, DragonspireMobs[ii], 15.0f); - for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) - { - if (Creature* creatureList = *itr) - { - runecreaturelist[i] [creaturecount] = creatureList->GetGUID(); - ++creaturecount; - } - } - } - } - } - } - - void Dragonspireroomcheck() - { - Creature* mob = NULL; - GameObject* rune = NULL; - - for (uint8 i = 0; i < 7; ++i) - { - bool _mobAlive = false; - rune = instance->GetGameObject(go_roomrunes[i]); - if (!rune) - continue; - - if (rune->GetGoState() == GO_STATE_ACTIVE) - { - for (uint8 ii = 0; ii < 5; ++ii) - { - mob = instance->GetCreature(runecreaturelist[i][ii]); - if (mob && mob->IsAlive()) - _mobAlive = true; - } - } - - if (!_mobAlive && rune->GetGoState() == GO_STATE_ACTIVE) - { - HandleGameObject(0, false, rune); - - switch (rune->GetEntry()) - { - case GO_HALL_RUNE_1: - SetBossState(DATA_HALL_RUNE_1, DONE); - break; - case GO_HALL_RUNE_2: - SetBossState(DATA_HALL_RUNE_2, DONE); - break; - case GO_HALL_RUNE_3: - SetBossState(DATA_HALL_RUNE_3, DONE); - break; - case GO_HALL_RUNE_4: - SetBossState(DATA_HALL_RUNE_4, DONE); - break; - case GO_HALL_RUNE_5: - SetBossState(DATA_HALL_RUNE_5, DONE); - break; - case GO_HALL_RUNE_6: - SetBossState(DATA_HALL_RUNE_6, DONE); - break; - case GO_HALL_RUNE_7: - SetBossState(DATA_HALL_RUNE_7, DONE); - break; - default: - break; - } - } - } - - if (GetBossState(DATA_HALL_RUNE_1) == DONE && GetBossState(DATA_HALL_RUNE_2) == DONE && GetBossState(DATA_HALL_RUNE_3) == DONE && - GetBossState(DATA_HALL_RUNE_4) == DONE && GetBossState(DATA_HALL_RUNE_5) == DONE && GetBossState(DATA_HALL_RUNE_6) == DONE && - GetBossState(DATA_HALL_RUNE_7) == DONE) - { - SetBossState(DATA_DRAGONSPIRE_ROOM, DONE); - if (GameObject* door1 = instance->GetGameObject(go_emberseerin)) - HandleGameObject(0, true, door1); - if (GameObject* door2 = instance->GetGameObject(go_doors)) - HandleGameObject(0, true, door2); - } - } - - std::string GetSaveData() - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << "B S " << GetBossSaveData(); - - OUT_SAVE_INST_DATA_COMPLETE; - return saveStream.str(); - } - - void Load(const char* strIn) - { - if (!strIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(strIn); - - char dataHead1, dataHead2; - - std::istringstream loadStream(strIn); - loadStream >> dataHead1 >> dataHead2; - - if (dataHead1 == 'B' && dataHead2 == 'S') - { - for (uint8 i = 0; i < EncounterCount; ++i) - { - uint32 tmpState; - loadStream >> tmpState; - if (tmpState == IN_PROGRESS || tmpState > SPECIAL) - tmpState = NOT_STARTED; - - SetBossState(i, EncounterState(tmpState)); - } - } - else - OUT_LOAD_INST_DATA_FAIL; - - OUT_LOAD_INST_DATA_COMPLETE; - } - - protected: - EventMap Events; - uint32 encounter[EncounterCount]; - std::string m_strInstData; - uint64 HighlordOmokk; - uint64 ShadowHunterVoshgajin; - uint64 WarMasterVoone; - uint64 MotherSmolderweb; - uint64 UrokDoomhowl; - uint64 QuartermasterZigris; - uint64 GizrultheSlavener; - uint64 Halycon; - uint64 OverlordWyrmthalak; - uint64 PyroguardEmberseer; - uint64 WarchiefRendBlackhand; - uint64 Gyth; - uint64 LordVictorNefarius; - uint64 TheBeast; - uint64 GeneralDrakkisath; - uint64 go_emberseerin; - uint64 go_doors; - uint64 go_emberseerout; - uint64 go_blackrockaltar; - uint64 go_roomrunes[7]; - uint64 go_emberseerrunes[7]; - uint64 runecreaturelist[7][5]; - uint64 go_portcullis_active; - uint64 go_portcullis_tobossrooms; - }; - - InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE - { - return new instance_blackrock_spireMapScript(map); - } -}; - -/*##### -# at_dragonspire_hall -#####*/ - -class at_dragonspire_hall : public AreaTriggerScript -{ -public: - at_dragonspire_hall() : AreaTriggerScript("at_dragonspire_hall") { } - - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE - { - if (player && player->IsAlive()) - { - if (InstanceScript* instance = player->GetInstanceScript()) - { - instance->SetData(AREATRIGGER, AREATRIGGER_DRAGONSPIRE_HALL); - return true; - } - } - - return false; - } -}; - -/*##### -# at_blackrock_stadium -#####*/ - -class at_blackrock_stadium : public AreaTriggerScript -{ -public: - at_blackrock_stadium() : AreaTriggerScript("at_blackrock_stadium") { } - - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE - { - if (player && player->IsAlive()) - { - InstanceScript* instance = player->GetInstanceScript(); - if (!instance) - return false; - - if (Creature* rend = player->FindNearestCreature(NPC_WARCHIEF_REND_BLACKHAND, 50.0f)) - { - rend->AI()->SetData(AREATRIGGER, AREATRIGGER_BLACKROCK_STADIUM); - return true; - } - } - - return false; - } -}; - -void AddSC_instance_blackrock_spire() -{ - new instance_blackrock_spire(); - new at_dragonspire_hall(); - new at_blackrock_stadium(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h deleted file mode 100644 index acdbf0cd483..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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_LAIR_H -#define DEF_BLACKWING_LAIR_H - -uint32 const EncounterCount = 8; - -#define BRLScriptName "instance_blackwing_lair" - -enum BWLEncounter -{ - BOSS_RAZORGORE = 0, - BOSS_VAELASTRAZ = 1, - BOSS_BROODLORD = 2, - BOSS_FIREMAW = 3, - BOSS_EBONROC = 4, - BOSS_FLAMEGOR = 5, - BOSS_CHROMAGGUS = 6, - BOSS_NEFARIAN = 7 -}; - -enum CreatureIds -{ - NPC_RAZORGORE = 12435, - NPC_BLACKWING_DRAGON = 12422, - NPC_BLACKWING_TASKMASTER = 12458, - NPC_BLACKWING_LEGIONAIRE = 12416, - NPC_BLACKWING_WARLOCK = 12459, - NPC_VAELASTRAZ = 13020, - NPC_BROODLORD = 12017, - NPC_FIRENAW = 11983, - NPC_EBONROC = 14601, - NPC_FLAMEGOR = 11981, - NPC_CHROMAGGUS = 14020, - NPC_VICTOR_NEFARIUS = 10162, - NPC_NEFARIAN = 11583 -}; - -enum BWLData64 -{ - DATA_RAZORGORE_THE_UNTAMED = 1, - DATA_VAELASTRAZ_THE_CORRUPT, - DATA_BROODLORD_LASHLAYER, - DATA_FIRENAW, - DATA_EBONROC, - DATA_FLAMEGOR, - DATA_CHROMAGGUS, - DATA_LORD_VICTOR_NEFARIUS, - DATA_NEFARIAN -}; - -enum BWLEvents -{ - EVENT_RAZOR_SPAWN = 1, - EVENT_RAZOR_PHASE_TWO = 2, - EVENT_RESPAWN_NEFARIUS = 3 -}; - -enum BWLMisc -{ - // Razorgore Egg Event - ACTION_PHASE_TWO = 1, - DATA_EGG_EVENT -}; - -#endif \ No newline at end of file diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp deleted file mode 100644 index c9dc3d8f134..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackwing_lair.h" - -enum Say -{ - SAY_AGGRO = 0, - SAY_LEASH = 1 -}; - -enum Spells -{ - SPELL_CLEAVE = 26350, - SPELL_BLASTWAVE = 23331, - SPELL_MORTALSTRIKE = 24573, - SPELL_KNOCKBACK = 25778 -}; - -enum Events -{ - EVENT_CLEAVE = 1, - EVENT_BLASTWAVE = 2, - EVENT_MORTALSTRIKE = 3, - EVENT_KNOCKBACK = 4, - EVENT_CHECK = 5 -}; - -class boss_broodlord : public CreatureScript -{ -public: - boss_broodlord() : CreatureScript("boss_broodlord") { } - - struct boss_broodlordAI : public BossAI - { - boss_broodlordAI(Creature* creature) : BossAI(creature, BOSS_BROODLORD) { } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - if (instance->GetBossState(BOSS_VAELASTRAZ) != DONE) - { - EnterEvadeMode(); - return; - } - - _EnterCombat(); - Talk(SAY_AGGRO); - - events.ScheduleEvent(EVENT_CLEAVE, 8000); - events.ScheduleEvent(EVENT_BLASTWAVE, 12000); - events.ScheduleEvent(EVENT_MORTALSTRIKE, 20000); - events.ScheduleEvent(EVENT_KNOCKBACK, 30000); - events.ScheduleEvent(EVENT_CHECK, 1000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, 7000); - break; - case EVENT_BLASTWAVE: - DoCastVictim(SPELL_BLASTWAVE); - events.ScheduleEvent(EVENT_BLASTWAVE, urand(8000, 16000)); - break; - case EVENT_MORTALSTRIKE: - DoCastVictim(SPELL_MORTALSTRIKE); - events.ScheduleEvent(EVENT_MORTALSTRIKE, urand(25000, 35000)); - break; - case EVENT_KNOCKBACK: - DoCastVictim(SPELL_KNOCKBACK); - if (DoGetThreat(me->GetVictim())) - DoModifyThreatPercent(me->GetVictim(), -50); - events.ScheduleEvent(EVENT_KNOCKBACK, urand(15000, 30000)); - break; - case EVENT_CHECK: - if (me->GetDistance(me->GetHomePosition()) > 150.0f) - { - Talk(SAY_LEASH); - EnterEvadeMode(); - } - events.ScheduleEvent(EVENT_CHECK, 1000); - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_broodlordAI(creature); - } -}; - -void AddSC_boss_broodlord() -{ - new boss_broodlord(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp deleted file mode 100644 index 05effabe557..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "Player.h" -#include "blackwing_lair.h" - -enum Emotes -{ - EMOTE_FRENZY = 0, - EMOTE_SHIMMER = 1, -}; - -enum Spells -{ - // These spells are actually called elemental shield - // What they do is decrease all damage by 75% then they increase - // One school of damage by 1100% - SPELL_FIRE_VULNERABILITY = 22277, - SPELL_FROST_VULNERABILITY = 22278, - SPELL_SHADOW_VULNERABILITY = 22279, - SPELL_NATURE_VULNERABILITY = 22280, - SPELL_ARCANE_VULNERABILITY = 22281, - // Other spells - SPELL_INCINERATE = 23308, //Incinerate 23308, 23309 - SPELL_TIMELAPSE = 23310, //Time lapse 23310, 23311(old threat mod that was removed in 2.01) - SPELL_CORROSIVEACID = 23313, //Corrosive Acid 23313, 23314 - SPELL_IGNITEFLESH = 23315, //Ignite Flesh 23315, 23316 - SPELL_FROSTBURN = 23187, //Frost burn 23187, 23189 - // Brood Affliction 23173 - Scripted Spell that cycles through all targets within 100 yards and has a chance to cast one of the afflictions on them - // Since Scripted spells arn't coded I'll just write a function that does the same thing - SPELL_BROODAF_BLUE = 23153, //Blue affliction 23153 - SPELL_BROODAF_BLACK = 23154, //Black affliction 23154 - SPELL_BROODAF_RED = 23155, //Red affliction 23155 (23168 on death) - SPELL_BROODAF_BRONZE = 23170, //Bronze Affliction 23170 - SPELL_BROODAF_GREEN = 23169, //Brood Affliction Green 23169 - SPELL_CHROMATIC_MUT_1 = 23174, //Spell cast on player if they get all 5 debuffs - SPELL_FRENZY = 28371, //The frenzy spell may be wrong - SPELL_ENRAGE = 28747 -}; - -enum Events -{ - EVENT_SHIMMER = 1, - EVENT_BREATH_1 = 2, - EVENT_BREATH_2 = 3, - EVENT_AFFLICTION = 4, - EVENT_FRENZY = 5 -}; - -class boss_chromaggus : public CreatureScript -{ -public: - boss_chromaggus() : CreatureScript("boss_chromaggus") { } - - struct boss_chromaggusAI : public BossAI - { - boss_chromaggusAI(Creature* creature) : BossAI(creature, BOSS_CHROMAGGUS) - { - // Select the 2 breaths that we are going to use until despawned - // 5 possiblities for the first breath, 4 for the second, 20 total possiblites - // This way we don't end up casting 2 of the same breath - // TL TL would be stupid - switch (urand(0, 19)) - { - // B1 - Incin - case 0: - Breath1_Spell = SPELL_INCINERATE; - Breath2_Spell = SPELL_TIMELAPSE; - break; - case 1: - Breath1_Spell = SPELL_INCINERATE; - Breath2_Spell = SPELL_CORROSIVEACID; - break; - case 2: - Breath1_Spell = SPELL_INCINERATE; - Breath2_Spell = SPELL_IGNITEFLESH; - break; - case 3: - Breath1_Spell = SPELL_INCINERATE; - Breath2_Spell = SPELL_FROSTBURN; - break; - - // B1 - TL - case 4: - Breath1_Spell = SPELL_TIMELAPSE; - Breath2_Spell = SPELL_INCINERATE; - break; - case 5: - Breath1_Spell = SPELL_TIMELAPSE; - Breath2_Spell = SPELL_CORROSIVEACID; - break; - case 6: - Breath1_Spell = SPELL_TIMELAPSE; - Breath2_Spell = SPELL_IGNITEFLESH; - break; - case 7: - Breath1_Spell = SPELL_TIMELAPSE; - Breath2_Spell = SPELL_FROSTBURN; - break; - - //B1 - Acid - case 8: - Breath1_Spell = SPELL_CORROSIVEACID; - Breath2_Spell = SPELL_INCINERATE; - break; - case 9: - Breath1_Spell = SPELL_CORROSIVEACID; - Breath2_Spell = SPELL_TIMELAPSE; - break; - case 10: - Breath1_Spell = SPELL_CORROSIVEACID; - Breath2_Spell = SPELL_IGNITEFLESH; - break; - case 11: - Breath1_Spell = SPELL_CORROSIVEACID; - Breath2_Spell = SPELL_FROSTBURN; - break; - - //B1 - Ignite - case 12: - Breath1_Spell = SPELL_IGNITEFLESH; - Breath2_Spell = SPELL_INCINERATE; - break; - case 13: - Breath1_Spell = SPELL_IGNITEFLESH; - Breath2_Spell = SPELL_CORROSIVEACID; - break; - case 14: - Breath1_Spell = SPELL_IGNITEFLESH; - Breath2_Spell = SPELL_TIMELAPSE; - break; - case 15: - Breath1_Spell = SPELL_IGNITEFLESH; - Breath2_Spell = SPELL_FROSTBURN; - break; - - //B1 - Frost - case 16: - Breath1_Spell = SPELL_FROSTBURN; - Breath2_Spell = SPELL_INCINERATE; - break; - case 17: - Breath1_Spell = SPELL_FROSTBURN; - Breath2_Spell = SPELL_TIMELAPSE; - break; - case 18: - Breath1_Spell = SPELL_FROSTBURN; - Breath2_Spell = SPELL_CORROSIVEACID; - break; - case 19: - Breath1_Spell = SPELL_FROSTBURN; - Breath2_Spell = SPELL_IGNITEFLESH; - break; - }; - - EnterEvadeMode(); - } - - void Reset() OVERRIDE - { - _Reset(); - - CurrentVurln_Spell = 0; // We use this to store our last vulnerabilty spell so we can remove it later - Enraged = false; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - if (instance && instance->GetBossState(BOSS_FLAMEGOR) != DONE) - { - EnterEvadeMode(); - return; - } - _EnterCombat(); - - events.ScheduleEvent(EVENT_SHIMMER, 0); - events.ScheduleEvent(EVENT_BREATH_1, 30000); - events.ScheduleEvent(EVENT_BREATH_2, 60000); - events.ScheduleEvent(EVENT_AFFLICTION, 10000); - events.ScheduleEvent(EVENT_FRENZY, 15000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SHIMMER: - { - // Remove old vulnerabilty spell - if (CurrentVurln_Spell) - me->RemoveAurasDueToSpell(CurrentVurln_Spell); - - // Cast new random vulnerabilty on self - uint32 spell = RAND(SPELL_FIRE_VULNERABILITY, SPELL_FROST_VULNERABILITY, SPELL_SHADOW_VULNERABILITY, SPELL_NATURE_VULNERABILITY, SPELL_ARCANE_VULNERABILITY); - DoCast(me, spell); - CurrentVurln_Spell = spell; - Talk(EMOTE_SHIMMER); - events.ScheduleEvent(EVENT_SHIMMER, 45000); - break; - } - case EVENT_BREATH_1: - DoCastVictim(Breath1_Spell); - events.ScheduleEvent(EVENT_BREATH_1, 60000); - break; - case EVENT_BREATH_2: - DoCastVictim(Breath2_Spell); - events.ScheduleEvent(EVENT_BREATH_2, 60000); - break; - case EVENT_AFFLICTION: - { - Map::PlayerList const &players = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - { - if (Player* player = itr->GetSource()->ToPlayer()) - { - DoCast(player, RAND(SPELL_BROODAF_BLUE, SPELL_BROODAF_BLACK, SPELL_BROODAF_RED, SPELL_BROODAF_BRONZE, SPELL_BROODAF_GREEN), true); - - if (player->HasAura(SPELL_BROODAF_BLUE) && - player->HasAura(SPELL_BROODAF_BLACK) && - player->HasAura(SPELL_BROODAF_RED) && - player->HasAura(SPELL_BROODAF_BRONZE) && - player->HasAura(SPELL_BROODAF_GREEN)) - { - DoCast(player, SPELL_CHROMATIC_MUT_1); - } - - } - } - } - events.ScheduleEvent(EVENT_AFFLICTION, 10000); - break; - case EVENT_FRENZY: - DoCast(me, SPELL_FRENZY); - events.ScheduleEvent(EVENT_FRENZY, urand(10000, 15000)); - break; - } - } - - // Enrage if not already enraged and below 20% - if (!Enraged && HealthBelowPct(20)) - { - DoCast(me, SPELL_ENRAGE); - Enraged = true; - } - - DoMeleeAttackIfReady(); - } - - private: - uint32 Breath1_Spell; - uint32 Breath2_Spell; - uint32 CurrentVurln_Spell; - bool Enraged; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_chromaggusAI(creature); - } -}; - -void AddSC_boss_chromaggus() -{ - new boss_chromaggus(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp deleted file mode 100644 index 0d79f3faeee..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackwing_lair.h" - -enum Spells -{ - SPELL_SHADOWFLAME = 22539, - SPELL_WINGBUFFET = 23339, - SPELL_SHADOWOFEBONROC = 23340 -}; - -enum Events -{ - EVENT_SHADOWFLAME = 1, - EVENT_WINGBUFFET = 2, - EVENT_SHADOWOFEBONROC = 3 -}; - -class boss_ebonroc : public CreatureScript -{ -public: - boss_ebonroc() : CreatureScript("boss_ebonroc") { } - - struct boss_ebonrocAI : public BossAI - { - boss_ebonrocAI(Creature* creature) : BossAI(creature, BOSS_EBONROC) { } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) - { - EnterEvadeMode(); - return; - } - _EnterCombat(); - - events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); - events.ScheduleEvent(EVENT_WINGBUFFET, 30000); - events.ScheduleEvent(EVENT_SHADOWOFEBONROC, urand(8000, 10000)); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SHADOWFLAME: - DoCastVictim(SPELL_SHADOWFLAME); - events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); - break; - case EVENT_WINGBUFFET: - DoCastVictim(SPELL_WINGBUFFET); - events.ScheduleEvent(EVENT_WINGBUFFET, 30000); - break; - case EVENT_SHADOWOFEBONROC: - DoCastVictim(SPELL_SHADOWOFEBONROC); - events.ScheduleEvent(EVENT_SHADOWOFEBONROC, urand(8000, 10000)); - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_ebonrocAI(creature); - } -}; - -void AddSC_boss_ebonroc() -{ - new boss_ebonroc(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp deleted file mode 100644 index 369e4e02f5a..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackwing_lair.h" - -enum Spells -{ - SPELL_SHADOWFLAME = 22539, - SPELL_WINGBUFFET = 23339, - SPELL_FLAMEBUFFET = 23341 -}; - -enum Events -{ - EVENT_SHADOWFLAME = 1, - EVENT_WINGBUFFET = 2, - EVENT_FLAMEBUFFET = 3 -}; - -class boss_firemaw : public CreatureScript -{ -public: - boss_firemaw() : CreatureScript("boss_firemaw") { } - - struct boss_firemawAI : public BossAI - { - boss_firemawAI(Creature* creature) : BossAI(creature, BOSS_FIREMAW) { } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) - { - EnterEvadeMode(); - return; - } - _EnterCombat(); - - events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); - events.ScheduleEvent(EVENT_WINGBUFFET, 30000); - events.ScheduleEvent(EVENT_FLAMEBUFFET, 5000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SHADOWFLAME: - DoCastVictim(SPELL_SHADOWFLAME); - events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); - break; - case EVENT_WINGBUFFET: - DoCastVictim(SPELL_WINGBUFFET); - if (DoGetThreat(me->GetVictim())) - DoModifyThreatPercent(me->GetVictim(), -75); - events.ScheduleEvent(EVENT_WINGBUFFET, 30000); - break; - case EVENT_FLAMEBUFFET: - DoCastVictim(SPELL_FLAMEBUFFET); - events.ScheduleEvent(EVENT_FLAMEBUFFET, 5000); - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_firemawAI(creature); - } -}; - -void AddSC_boss_firemaw() -{ - new boss_firemaw(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp deleted file mode 100644 index 060bfeb60b3..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackwing_lair.h" - -enum Emotes -{ - EMOTE_FRENZY = 0, -}; - -enum Spells -{ - SPELL_SHADOWFLAME = 22539, - SPELL_WINGBUFFET = 23339, - SPELL_FRENZY = 23342 //This spell periodically triggers fire nova -}; - -enum Events -{ - EVENT_SHADOWFLAME = 1, - EVENT_WINGBUFFET = 2, - EVENT_FRENZY = 3 -}; - -class boss_flamegor : public CreatureScript -{ -public: - boss_flamegor() : CreatureScript("boss_flamegor") { } - - struct boss_flamegorAI : public BossAI - { - boss_flamegorAI(Creature* creature) : BossAI(creature, BOSS_FLAMEGOR) { } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) - { - EnterEvadeMode(); - return; - } - _EnterCombat(); - - events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); - events.ScheduleEvent(EVENT_WINGBUFFET, 30000); - events.ScheduleEvent(EVENT_FRENZY, 10000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SHADOWFLAME: - DoCastVictim(SPELL_SHADOWFLAME); - events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); - break; - case EVENT_WINGBUFFET: - DoCastVictim(SPELL_WINGBUFFET); - if (DoGetThreat(me->GetVictim())) - DoModifyThreatPercent(me->GetVictim(), -75); - events.ScheduleEvent(EVENT_WINGBUFFET, 30000); - break; - case EVENT_FRENZY: - Talk(EMOTE_FRENZY); - DoCast(me, SPELL_FRENZY); - events.ScheduleEvent(EVENT_FRENZY, urand(8000, 10000)); - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_flamegorAI(creature); - } -}; - -void AddSC_boss_flamegor() -{ - new boss_flamegor(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp deleted file mode 100644 index d49cca2045f..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp +++ /dev/null @@ -1,584 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedGossip.h" -#include "ScriptedCreature.h" -#include "blackwing_lair.h" -#include "Player.h" - -enum Events -{ - // Victor Nefarius - EVENT_SPAWN_ADD = 1, - EVENT_SHADOW_BOLT = 2, - EVENT_FEAR = 3, - EVENT_MIND_CONTROL = 4, - // Nefarian - EVENT_SHADOWFLAME = 5, - EVENT_VEILOFSHADOW = 6, - EVENT_CLEAVE = 7, - EVENT_TAILLASH = 8, - EVENT_CLASSCALL = 9, - // UBRS - EVENT_CHAOS_1 = 10, - EVENT_CHAOS_2 = 11, - EVENT_PATH_2 = 12, - EVENT_PATH_3 = 13, - EVENT_SUCCESS_1 = 14, - EVENT_SUCCESS_2 = 15, - EVENT_SUCCESS_3 = 16, -}; - -enum Says -{ - // Nefarius - // UBRS - SAY_CHAOS_SPELL = 9, - SAY_SUCCESS = 10, - SAY_FAILURE = 11, - // BWL - SAY_GAMESBEGIN_1 = 12, - SAY_GAMESBEGIN_2 = 13, - // SAY_VAEL_INTRO = 14, Not used - when he corrupts Vaelastrasz - - // Nefarian - SAY_RANDOM = 0, - SAY_RAISE_SKELETONS = 1, - SAY_SLAY = 2, - SAY_DEATH = 3, - - SAY_MAGE = 4, - SAY_WARRIOR = 5, - SAY_DRUID = 6, - SAY_PRIEST = 7, - SAY_PALADIN = 8, - SAY_SHAMAN = 9, - SAY_WARLOCK = 10, - SAY_HUNTER = 11, - SAY_ROGUE = 12, - SAY_DEATH_KNIGHT = 13 -}; - -enum Gossip -{ - GOSSIP_ID = 21332, - GOSSIP_OPTION_ID = 0 -}; - -enum Paths -{ - NEFARIUS_PATH_2 = 1379671, - NEFARIUS_PATH_3 = 1379672 -}; - -enum GameObjects -{ - GO_PORTCULLIS_ACTIVE = 164726, - GO_PORTCULLIS_TOBOSSROOMS = 175186 -}; - -enum Creatures -{ - NPC_BRONZE_DRAKANOID = 14263, - NPC_BLUE_DRAKANOID = 14261, - NPC_RED_DRAKANOID = 14264, - NPC_GREEN_DRAKANOID = 14262, - NPC_BLACK_DRAKANOID = 14265, - NPC_CHROMATIC_DRAKANOID = 14302, - NPC_BONE_CONSTRUCT = 14605, - // UBRS - NPC_GYTH = 10339 -}; - -enum Spells -{ - // Victor Nefarius - // UBRS Spells - SPELL_CHROMATIC_CHAOS = 16337, // Self Cast hits 10339 - SPELL_VAELASTRASZZ_SPAWN = 16354, // Self Cast Depawn one sec after - // BWL Spells - SPELL_SHADOWBOLT = 22677, - SPELL_SHADOWBOLT_VOLLEY = 22665, - SPELL_SHADOW_COMMAND = 22667, - SPELL_FEAR = 22678, - - SPELL_NEFARIANS_BARRIER = 22663, - - // Nefarian - SPELL_SHADOWFLAME_INITIAL = 22992, - SPELL_SHADOWFLAME = 22539, - SPELL_BELLOWINGROAR = 22686, - SPELL_VEILOFSHADOW = 7068, - SPELL_CLEAVE = 20691, - SPELL_TAILLASH = 23364, - - SPELL_MAGE = 23410, // wild magic - SPELL_WARRIOR = 23397, // beserk - SPELL_DRUID = 23398, // cat form - SPELL_PRIEST = 23401, // corrupted healing - SPELL_PALADIN = 23418, // syphon blessing - SPELL_SHAMAN = 23425, // totems - SPELL_WARLOCK = 23427, // infernals - SPELL_HUNTER = 23436, // bow broke - SPELL_ROGUE = 23414, // Paralise - SPELL_DEATH_KNIGHT = 49576 // Death Grip - -// 19484 -// 22664 -// 22674 -// 22666 -}; - -Position const DrakeSpawnLoc[2] = // drakonid -{ - {-7591.151855f, -1204.051880f, 476.800476f, 3.0f}, - {-7514.598633f, -1150.448853f, 476.796570f, 3.0f} -}; - -Position const NefarianLoc[2] = -{ - {-7449.763672f, -1387.816040f, 526.783691f, 3.0f}, // nefarian spawn - {-7535.456543f, -1279.562500f, 476.798706f, 3.0f} // nefarian move -}; - -uint32 const Entry[5] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; - -class boss_victor_nefarius : public CreatureScript -{ -public: - boss_victor_nefarius() : CreatureScript("boss_victor_nefarius") { } - - struct boss_victor_nefariusAI : public BossAI - { - boss_victor_nefariusAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { } - - void Reset() OVERRIDE - { - if (me->GetMapId() == 469) - { - if (!me->FindNearestCreature(NPC_NEFARIAN, 1000.0f, true)) - _Reset(); - SpawnedAdds = 0; - - me->SetVisible(true); - me->SetPhaseMask(1, true); - me->SetUInt32Value(UNIT_NPC_FLAGS, 1); - me->setFaction(35); - me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR); - me->RemoveAura(SPELL_NEFARIANS_BARRIER); - } - } - - void JustReachedHome() OVERRIDE - { - Reset(); - } - - void BeginEvent(Player* target) - { - _EnterCombat(); - - Talk(SAY_GAMESBEGIN_2); - - me->setFaction(103); - me->SetUInt32Value(UNIT_NPC_FLAGS, 0); - DoCast(me, SPELL_NEFARIANS_BARRIER); - me->SetStandState(UNIT_STAND_STATE_STAND); - AttackStart(target); - events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000)); - events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000)); - //events.ScheduleEvent(EVENT_MIND_CONTROL, urand(30000, 35000)); - events.ScheduleEvent(EVENT_SPAWN_ADD, 10000); - } - - void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) OVERRIDE - { - if (summon->GetEntry() != NPC_NEFARIAN) - { - summon->UpdateEntry(NPC_BONE_CONSTRUCT); - summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - summon->SetReactState(REACT_PASSIVE); - summon->SetStandState(UNIT_STAND_STATE_DEAD); - } - } - - void JustSummoned(Creature* /*summon*/) OVERRIDE {} - - void SetData(uint32 type, uint32 data) OVERRIDE - { - if (instance && type == 1 && data == 1) - { - me->StopMoving(); - events.ScheduleEvent(EVENT_PATH_2, 9000); - } - - if (instance && type == 1 && data == 2) - { - events.ScheduleEvent(EVENT_SUCCESS_1, 5000); - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - { - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_PATH_2: - me->GetMotionMaster()->MovePath(NEFARIUS_PATH_2, false); - events.ScheduleEvent(EVENT_CHAOS_1, 7000); - break; - case EVENT_CHAOS_1: - if (Creature* gyth = me->FindNearestCreature(NPC_GYTH, 75.0f, true)) - { - me->SetFacingToObject(gyth); - Talk(SAY_CHAOS_SPELL); - } - events.ScheduleEvent(EVENT_CHAOS_2, 2000); - break; - case EVENT_CHAOS_2: - DoCast(SPELL_CHROMATIC_CHAOS); - me->SetFacingTo(1.570796f); - break; - case EVENT_SUCCESS_1: - if (Unit* player = me->SelectNearestPlayer(60.0f)) - { - me->SetInFront(player); - me->SendMovementFlagUpdate(); - Talk(SAY_SUCCESS); - if (GameObject* portcullis1 = me->FindNearestGameObject(GO_PORTCULLIS_ACTIVE, 65.0f)) - portcullis1->SetGoState(GO_STATE_ACTIVE); - if (GameObject* portcullis2 = me->FindNearestGameObject(GO_PORTCULLIS_TOBOSSROOMS, 80.0f)) - portcullis2->SetGoState(GO_STATE_ACTIVE); - } - events.ScheduleEvent(EVENT_SUCCESS_2, 4000); - break; - case EVENT_SUCCESS_2: - DoCast(me, SPELL_VAELASTRASZZ_SPAWN); - me->DespawnOrUnsummon(1000); - break; - case EVENT_PATH_3: - me->GetMotionMaster()->MovePath(NEFARIUS_PATH_3, false); - break; - default: - break; - } - } - return; - } - - // Only do this if we haven't spawned nefarian yet - if (UpdateVictim() && SpawnedAdds <= 42) - { - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SHADOW_BOLT: - switch (urand(0, 1)) - { - case 0: - DoCastVictim(SPELL_SHADOWBOLT_VOLLEY); - break; - case 1: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) - DoCast(target, SPELL_SHADOWBOLT); - break; - } - DoResetThreat(); - events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000)); - break; - case EVENT_FEAR: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) - DoCast(target, SPELL_FEAR); - events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000)); - break; - case EVENT_MIND_CONTROL: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) - DoCast(target, SPELL_SHADOW_COMMAND); - events.ScheduleEvent(EVENT_MIND_CONTROL, urand(30000, 35000)); - break; - case EVENT_SPAWN_ADD: - for (uint8 i=0; i<2; ++i) - { - uint32 CreatureID; - if (urand(0, 2) == 0) - CreatureID = NPC_CHROMATIC_DRAKANOID; - else - CreatureID = Entry[urand(0, 4)]; - if (Creature* dragon = me->SummonCreature(CreatureID, DrakeSpawnLoc[i])) - { - dragon->setFaction(103); - dragon->AI()->AttackStart(me->GetVictim()); - } - - if (++SpawnedAdds >= 42) - { - if (Creature* nefarian = me->SummonCreature(NPC_NEFARIAN, NefarianLoc[0])) - { - nefarian->setActive(true); - nefarian->SetCanFly(true); - nefarian->SetDisableGravity(true); - nefarian->AI()->DoCastAOE(SPELL_SHADOWFLAME_INITIAL); - nefarian->GetMotionMaster()->MovePoint(1, NefarianLoc[1]); - } - events.CancelEvent(EVENT_MIND_CONTROL); - events.CancelEvent(EVENT_FEAR); - events.CancelEvent(EVENT_SHADOW_BOLT); - me->SetVisible(false); - return; - } - } - events.ScheduleEvent(EVENT_SPAWN_ADD, 4000); - break; - } - } - } - } - - void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE - { - if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) - { - player->CLOSE_GOSSIP_MENU(); - Talk(SAY_GAMESBEGIN_1); - BeginEvent(player); - } - } - - private: - uint32 SpawnedAdds; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_victor_nefariusAI(creature); - } -}; - -class boss_nefarian : public CreatureScript -{ -public: - boss_nefarian() : CreatureScript("boss_nefarian") { } - - struct boss_nefarianAI : public BossAI - { - boss_nefarianAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { } - - void Reset() OVERRIDE - { - Phase3 = false; - canDespawn = false; - DespawnTimer = 30000; - } - - void JustReachedHome() OVERRIDE - { - canDespawn = true; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - events.ScheduleEvent(EVENT_SHADOWFLAME, 12000); - events.ScheduleEvent(EVENT_FEAR, urand(25000, 35000)); - events.ScheduleEvent(EVENT_VEILOFSHADOW, urand(25000, 35000)); - events.ScheduleEvent(EVENT_CLEAVE, 7000); - //events.ScheduleEvent(EVENT_TAILLASH, 10000); - events.ScheduleEvent(EVENT_CLASSCALL, urand(30000, 35000)); - Talk(SAY_RANDOM); - } - - void JustDied(Unit* /*Killer*/) OVERRIDE - { - _JustDied(); - Talk(SAY_DEATH); - } - - void KilledUnit(Unit* victim) OVERRIDE - { - if (rand()%5) - return; - - Talk(SAY_SLAY, victim->GetGUID()); - } - - void MovementInform(uint32 type, uint32 id) OVERRIDE - { - if (type != POINT_MOTION_TYPE) - return; - - if (id == 1) - { - me->SetInCombatWithZone(); - if (me->GetVictim()) - AttackStart(me->GetVictim()); - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (canDespawn && DespawnTimer <= diff) - { - if (instance) - instance->SetBossState(BOSS_NEFARIAN, FAIL); - - std::list constructList; - me->GetCreatureListWithEntryInGrid(constructList, NPC_BONE_CONSTRUCT, 500.0f); - for (std::list::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr) - (*itr)->DespawnOrUnsummon(); - - } else DespawnTimer -= diff; - - if (!UpdateVictim()) - return; - - if (canDespawn) - canDespawn = false; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SHADOWFLAME: - DoCastVictim(SPELL_SHADOWFLAME); - events.ScheduleEvent(EVENT_SHADOWFLAME, 12000); - break; - case EVENT_FEAR: - DoCastVictim(SPELL_BELLOWINGROAR); - events.ScheduleEvent(EVENT_FEAR, urand(25000, 35000)); - break; - case EVENT_VEILOFSHADOW: - DoCastVictim(SPELL_VEILOFSHADOW); - events.ScheduleEvent(EVENT_VEILOFSHADOW, urand(25000, 35000)); - break; - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, 7000); - break; - case EVENT_TAILLASH: - // Cast NYI since we need a better check for behind target - DoCastVictim(SPELL_TAILLASH); - events.ScheduleEvent(EVENT_TAILLASH, 10000); - break; - case EVENT_CLASSCALL: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true)) - switch (target->getClass()) - { - case CLASS_MAGE: - Talk(SAY_MAGE); - DoCast(me, SPELL_MAGE); - break; - case CLASS_WARRIOR: - Talk(SAY_WARRIOR); - DoCast(me, SPELL_WARRIOR); - break; - case CLASS_DRUID: - Talk(SAY_DRUID); - DoCast(target, SPELL_DRUID); - break; - case CLASS_PRIEST: - Talk(SAY_PRIEST); - DoCast(me, SPELL_PRIEST); - break; - case CLASS_PALADIN: - Talk(SAY_PALADIN); - DoCast(me, SPELL_PALADIN); - break; - case CLASS_SHAMAN: - Talk(SAY_SHAMAN); - DoCast(me, SPELL_SHAMAN); - break; - case CLASS_WARLOCK: - Talk(SAY_WARLOCK); - DoCast(me, SPELL_WARLOCK); - break; - case CLASS_HUNTER: - Talk(SAY_HUNTER); - DoCast(me, SPELL_HUNTER); - break; - case CLASS_ROGUE: - Talk(SAY_ROGUE); - DoCast(me, SPELL_ROGUE); - break; - case CLASS_DEATH_KNIGHT: - Talk(SAY_DEATH_KNIGHT); - DoCast(me, SPELL_DEATH_KNIGHT); - break; - default: - break; - } - events.ScheduleEvent(EVENT_CLASSCALL, urand(30000, 35000)); - break; - } - } - - // Phase3 begins when health below 20 pct - if (!Phase3 && HealthBelowPct(20)) - { - std::list constructList; - me->GetCreatureListWithEntryInGrid(constructList, NPC_BONE_CONSTRUCT, 500.0f); - for (std::list::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr) - if ((*itr) && !(*itr)->IsAlive()) - { - (*itr)->Respawn(); - (*itr)->SetInCombatWithZone(); - (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - (*itr)->SetReactState(REACT_AGGRESSIVE); - (*itr)->SetStandState(UNIT_STAND_STATE_STAND); - } - - Phase3 = true; - Talk(SAY_RAISE_SKELETONS); - } - - DoMeleeAttackIfReady(); - } - - private: - bool canDespawn; - uint32 DespawnTimer; - bool Phase3; - - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_nefarianAI(creature); - } -}; - -void AddSC_boss_nefarian() -{ - new boss_victor_nefarius(); - new boss_nefarian(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp deleted file mode 100644 index be2aeb9e223..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "SpellScript.h" -#include "blackwing_lair.h" -#include "Player.h" - -enum Say -{ - SAY_EGGS_BROKEN1 = 0, - SAY_EGGS_BROKEN2 = 1, - SAY_EGGS_BROKEN3 = 2, - SAY_DEATH = 3, -}; - -enum Spells -{ - SPELL_MINDCONTROL = 42013, - SPELL_CHANNEL = 45537, - SPELL_EGG_DESTROY = 19873, - - SPELL_CLEAVE = 22540, - SPELL_WARSTOMP = 24375, - SPELL_FIREBALLVOLLEY = 22425, - SPELL_CONFLAGRATION = 23023 -}; - -enum Summons -{ - NPC_ELITE_DRACHKIN = 12422, - NPC_ELITE_WARRIOR = 12458, - NPC_WARRIOR = 12416, - NPC_MAGE = 12420, - NPC_WARLOCK = 12459, - - GO_EGG = 177807 -}; - -enum EVENTS -{ - EVENT_CLEAVE = 1, - EVENT_STOMP = 2, - EVENT_FIREBALL = 3, - EVENT_CONFLAGRATION = 4 -}; - -class boss_razorgore : public CreatureScript -{ -public: - boss_razorgore() : CreatureScript("boss_razorgore") { } - - struct boss_razorgoreAI : public BossAI - { - boss_razorgoreAI(Creature* creature) : BossAI(creature, BOSS_RAZORGORE) { } - - void Reset() OVERRIDE - { - _Reset(); - - secondPhase = false; - if (instance) - instance->SetData(DATA_EGG_EVENT, NOT_STARTED); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - _JustDied(); - Talk(SAY_DEATH); - - if (instance) - instance->SetData(DATA_EGG_EVENT, NOT_STARTED); - } - - void DoChangePhase() - { - events.ScheduleEvent(EVENT_CLEAVE, 15000); - events.ScheduleEvent(EVENT_STOMP, 35000); - events.ScheduleEvent(EVENT_FIREBALL, 7000); - events.ScheduleEvent(EVENT_CONFLAGRATION, 12000); - - secondPhase = true; - me->RemoveAllAuras(); - me->SetHealth(me->GetMaxHealth()); - } - - void DoAction(int32 action) OVERRIDE - { - if (action == ACTION_PHASE_TWO) - DoChangePhase(); - } - - void DamageTaken(Unit* /*who*/, uint32& damage) OVERRIDE - { - if (!secondPhase) - damage = 0; - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, urand(7000, 10000)); - break; - case EVENT_STOMP: - DoCastVictim(SPELL_WARSTOMP); - events.ScheduleEvent(EVENT_STOMP, urand(15000, 25000)); - break; - case EVENT_FIREBALL: - DoCastVictim(SPELL_FIREBALLVOLLEY); - events.ScheduleEvent(EVENT_FIREBALL, urand(12000, 15000)); - break; - case EVENT_CONFLAGRATION: - DoCastVictim(SPELL_CONFLAGRATION); - if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_CONFLAGRATION)) - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) - me->TauntApply(target); - events.ScheduleEvent(EVENT_CONFLAGRATION, 30000); - break; - } - } - DoMeleeAttackIfReady(); - } - - private: - bool secondPhase; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_razorgoreAI(creature); - } -}; - -class go_orb_of_domination : public GameObjectScript -{ -public: - go_orb_of_domination() : GameObjectScript("go_orb_of_domination") { } - - bool OnGossipHello(Player* player, GameObject* go) OVERRIDE - { - if (InstanceScript* instance = go->GetInstanceScript()) - if (instance->GetData(DATA_EGG_EVENT) != DONE) - if (Creature* razor = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_RAZORGORE_THE_UNTAMED) : 0)) - { - razor->Attack(player, true); - player->CastSpell(razor, SPELL_MINDCONTROL); - } - return true; - } -}; - -class spell_egg_event : public SpellScriptLoader -{ - public: - spell_egg_event() : SpellScriptLoader("spell_egg_event") { } - - class spell_egg_eventSpellScript : public SpellScript - { - PrepareSpellScript(spell_egg_eventSpellScript); - - void HandleOnHit() - { - if (InstanceScript* instance = GetCaster()->GetInstanceScript()) - instance->SetData(DATA_EGG_EVENT, SPECIAL); - } - - void Register() OVERRIDE - { - OnHit += SpellHitFn(spell_egg_eventSpellScript::HandleOnHit); - } - }; - - SpellScript* GetSpellScript() const OVERRIDE - { - return new spell_egg_eventSpellScript(); - } -}; - -void AddSC_boss_razorgore() -{ - new boss_razorgore(); - new go_orb_of_domination(); - new spell_egg_event(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp deleted file mode 100644 index c595f3acaff..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 "ScriptedCreature.h" -#include "blackwing_lair.h" -#include "ScriptedGossip.h" -#include "Player.h" - -enum Says -{ - SAY_LINE1 = 0, - SAY_LINE2 = 1, - SAY_LINE3 = 2, - SAY_HALFLIFE = 3, - SAY_KILLTARGET = 4 -}; - -enum Gossip -{ - GOSSIP_ID = 21334, -}; - -enum Spells -{ - SPELL_ESSENCEOFTHERED = 23513, - SPELL_FLAMEBREATH = 23461, - SPELL_FIRENOVA = 23462, - SPELL_TAILSWIPE = 15847, - SPELL_BURNINGADRENALINE = 23620, - SPELL_CLEAVE = 20684 //Chain cleave is most likely named something different and contains a dummy effect -}; - -enum Events -{ - EVENT_SPEECH_1 = 1, - EVENT_SPEECH_2 = 2, - EVENT_SPEECH_3 = 3, - EVENT_SPEECH_4 = 4, - EVENT_ESSENCEOFTHERED = 5, - EVENT_FLAMEBREATH = 6, - EVENT_FIRENOVA = 7, - EVENT_TAILSWIPE = 8, - EVENT_CLEAVE = 9, - EVENT_BURNINGADRENALINE_CASTER = 10, - EVENT_BURNINGADRENALINE_TANK = 11 -}; - -class boss_vaelastrasz : public CreatureScript -{ -public: - boss_vaelastrasz() : CreatureScript("boss_vaelastrasz") { } - - struct boss_vaelAI : public BossAI - { - boss_vaelAI(Creature* creature) : BossAI(creature, BOSS_VAELASTRAZ) - { - creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - creature->setFaction(35); - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - - void Reset() OVERRIDE - { - _Reset(); - - me->SetStandState(UNIT_STAND_STATE_DEAD); - PlayerGUID = 0; - - HasYelled = false; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - - DoCast(me, SPELL_ESSENCEOFTHERED); - me->SetHealth(me->CountPctFromMaxHealth(30)); - // now drop damage requirement to be able to take loot - me->ResetPlayerDamageReq(); - - events.ScheduleEvent(EVENT_CLEAVE, 10000); - events.ScheduleEvent(EVENT_FLAMEBREATH, 15000); - events.ScheduleEvent(EVENT_FIRENOVA, 20000); - events.ScheduleEvent(EVENT_TAILSWIPE, 11000); - events.ScheduleEvent(EVENT_BURNINGADRENALINE_CASTER, 15000); - events.ScheduleEvent(EVENT_BURNINGADRENALINE_TANK, 45000); - } - - void BeginSpeech(Unit* target) - { - PlayerGUID = target->GetGUID(); - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - events.ScheduleEvent(EVENT_SPEECH_1, 1000); - } - - void KilledUnit(Unit* victim) OVERRIDE - { - if (rand()%5) - return; - - Talk(SAY_KILLTARGET, victim->GetGUID()); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - events.Update(diff); - - // Speech - if (!UpdateVictim()) - { - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SPEECH_1: - Talk(SAY_LINE1); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); - events.ScheduleEvent(EVENT_SPEECH_2, 12000); - break; - case EVENT_SPEECH_2: - Talk(SAY_LINE2); - me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); - events.ScheduleEvent(EVENT_SPEECH_3, 12000); - break; - case EVENT_SPEECH_3: - Talk(SAY_LINE3); - me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); - events.ScheduleEvent(EVENT_SPEECH_4, 16000); - break; - case EVENT_SPEECH_4: - me->setFaction(103); - if (PlayerGUID && Unit::GetUnit(*me, PlayerGUID)) - AttackStart(Unit::GetUnit(*me, PlayerGUID));; - break; - } - } - return; - } - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CLEAVE: - events.ScheduleEvent(EVENT_CLEAVE, 15000); - DoCastVictim(SPELL_CLEAVE); - break; - case EVENT_FLAMEBREATH: - DoCastVictim(SPELL_FLAMEBREATH); - events.ScheduleEvent(EVENT_FLAMEBREATH, urand(8000, 14000)); - break; - case EVENT_FIRENOVA: - DoCastVictim(SPELL_FIRENOVA); - events.ScheduleEvent(EVENT_FIRENOVA, 15000); - break; - case EVENT_TAILSWIPE: - //Only cast if we are behind - /*if (!me->HasInArc(M_PI, me->GetVictim())) - { - DoCast(me->GetVictim(), SPELL_TAILSWIPE); - }*/ - events.ScheduleEvent(EVENT_TAILSWIPE, 15000); - break; - case EVENT_BURNINGADRENALINE_CASTER: - { - Unit* target = NULL; - - uint8 i = 0; - while (i < 3) // max 3 tries to get a random target with power_mana - { - ++i; - target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); // not aggro leader - if (target && target->getPowerType() == POWER_MANA) - i = 3; - } - if (target) // cast on self (see below) - target->CastSpell(target, SPELL_BURNINGADRENALINE, true); - } - events.ScheduleEvent(EVENT_BURNINGADRENALINE_CASTER, 15000); - break; - case EVENT_BURNINGADRENALINE_TANK: - // have the victim cast the spell on himself otherwise the third effect aura will be applied to Vael instead of the player - me->GetVictim()->CastSpell(me->GetVictim(), SPELL_BURNINGADRENALINE, true); - events.ScheduleEvent(EVENT_BURNINGADRENALINE_TANK, 45000); - break; - } - } - - // Yell if hp lower than 15% - if (HealthBelowPct(15) && !HasYelled) - { - Talk(SAY_HALFLIFE); - HasYelled = true; - } - - DoMeleeAttackIfReady(); - } - - void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE - { - if (sender == GOSSIP_ID && action == 0) - { - player->CLOSE_GOSSIP_MENU(); - BeginSpeech(player); - } - } - - private: - uint64 PlayerGUID; - bool HasYelled; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_vaelAI(creature); - } -}; - -void AddSC_boss_vaelastrasz() -{ - new boss_vaelastrasz(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp deleted file mode 100644 index d904e0a89f8..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * - * 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 "ScriptedCreature.h" -#include "PassiveAI.h" -#include "blackwing_lair.h" -#include "Player.h" - -/* -Blackwing Lair Encounter: -1 - boss_razorgore.cpp -2 - boss_vaelastrasz.cpp -3 - boss_broodlord_lashlayer.cpp -4 - boss_firemaw.cpp -5 - boss_ebonroc.cpp -6 - boss_flamegor.cpp -7 - boss_chromaggus.cpp -8 - boss_nefarian.cpp -*/ - -Position const SummonPosition[8] = -{ - {-7661.207520f, -1043.268188f, 407.199554f, 6.280452f}, - {-7644.145020f, -1065.628052f, 407.204956f, 0.501492f}, - {-7624.260742f, -1095.196899f, 407.205017f, 0.544694f}, - {-7608.501953f, -1116.077271f, 407.199921f, 0.816443f}, - {-7531.841797f, -1063.765381f, 407.199615f, 2.874187f}, - {-7547.319336f, -1040.971924f, 407.205078f, 3.789175f}, - {-7568.547852f, -1013.112488f, 407.204926f, 3.773467f}, - {-7584.175781f, -989.6691289f, 407.199585f, 4.527447f}, -}; - -uint32 const Entry[5] = {12422, 12458, 12416, 12420, 12459}; - -class instance_blackwing_lair : public InstanceMapScript -{ -public: - instance_blackwing_lair() : InstanceMapScript(BRLScriptName, 469) { } - - struct instance_blackwing_lair_InstanceMapScript : public InstanceScript - { - instance_blackwing_lair_InstanceMapScript(Map* map) : InstanceScript(map) - { - SetBossNumber(EncounterCount); - } - - void Initialize() - { - // Razorgore - EggCount = 0; - RazorgoreTheUntamedGUID = 0; - RazorgoreDoorGUID = 0; - EggList.clear(); - // Vaelastrasz the Corrupt - VaelastraszTheCorruptGUID = 0; - VaelastraszDoorGUID = 0; - // Broodlord Lashlayer - BroodlordLashlayerGUID = 0; - BroodlordDoorGUID = 0; - // 3 Dragons - FiremawGUID = 0; - EbonrocGUID = 0; - FlamegorGUID = 0; - ChrommagusDoorGUID = 0; - // Chormaggus - ChromaggusGUID = 0; - NefarianDoorGUID = 0; - // Nefarian - LordVictorNefariusGUID = 0; - NefarianGUID = 0; - } - - void OnCreatureCreate(Creature* creature) - { - switch (creature->GetEntry()) - { - case NPC_RAZORGORE: - RazorgoreTheUntamedGUID = creature->GetGUID(); - break; - case NPC_BLACKWING_DRAGON: - case NPC_BLACKWING_TASKMASTER: - case NPC_BLACKWING_LEGIONAIRE: - case NPC_BLACKWING_WARLOCK: - if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) - razor->AI()->JustSummoned(creature); - break; - case NPC_VAELASTRAZ: - VaelastraszTheCorruptGUID = creature->GetGUID(); - break; - case NPC_BROODLORD: - BroodlordLashlayerGUID = creature->GetGUID(); - break; - case NPC_FIRENAW: - FiremawGUID = creature->GetGUID(); - break; - case NPC_EBONROC: - EbonrocGUID = creature->GetGUID(); - break; - case NPC_FLAMEGOR: - FlamegorGUID = creature->GetGUID(); - break; - case NPC_CHROMAGGUS: - ChromaggusGUID = creature->GetGUID(); - break; - case NPC_VICTOR_NEFARIUS: - LordVictorNefariusGUID = creature->GetGUID(); - break; - case NPC_NEFARIAN: - NefarianGUID = creature->GetGUID(); - break; - } - } - - void OnGameObjectCreate(GameObject* go) - { - switch (go->GetEntry()) - { - case 177807: // Egg - if (GetBossState(BOSS_FIREMAW) == DONE) - go->SetPhaseMask(2, true); - else - EggList.push_back(go->GetGUID()); - break; - case 175946: // Door - RazorgoreDoorGUID = go->GetGUID(); - HandleGameObject(0, GetBossState(BOSS_RAZORGORE) == DONE, go); - break; - case 175185: // Door - VaelastraszDoorGUID = go->GetGUID(); - HandleGameObject(0, GetBossState(BOSS_VAELASTRAZ) == DONE, go); - break; - case 180424: // Door - BroodlordDoorGUID = go->GetGUID(); - HandleGameObject(0, GetBossState(BOSS_BROODLORD) == DONE, go); - break; - case 185483: // Door - ChrommagusDoorGUID = go->GetGUID(); - HandleGameObject(0, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE, go); - break; - case 181125: // Door - NefarianDoorGUID = go->GetGUID(); - HandleGameObject(0, GetBossState(BOSS_CHROMAGGUS) == DONE, go); - break; - } - } - - void OnGameObjectRemove(GameObject* go) - { - if (go->GetEntry() == 177807) // Egg - EggList.remove(go->GetGUID()); - } - - bool SetBossState(uint32 type, EncounterState state) - { - if (!InstanceScript::SetBossState(type, state)) - return false; - - switch (type) - { - case BOSS_RAZORGORE: - HandleGameObject(RazorgoreDoorGUID, state == DONE); - if (state == DONE) - { - for (std::list::const_iterator itr = EggList.begin(); itr != EggList.end(); ++itr) - if (GameObject* egg = instance->GetGameObject((*itr))) - egg->SetPhaseMask(2, true); - } - SetData(DATA_EGG_EVENT, NOT_STARTED); - break; - case BOSS_VAELASTRAZ: - HandleGameObject(VaelastraszDoorGUID, state == DONE); - break; - case BOSS_BROODLORD: - HandleGameObject(BroodlordDoorGUID, state == DONE); - break; - case BOSS_FIREMAW: - case BOSS_EBONROC: - case BOSS_FLAMEGOR: - HandleGameObject(ChrommagusDoorGUID, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE); - break; - case BOSS_CHROMAGGUS: - HandleGameObject(NefarianDoorGUID, state == DONE); - break; - case BOSS_NEFARIAN: - switch (state) - { - case NOT_STARTED: - if (Creature* nefarian = instance->GetCreature(NefarianGUID)) - nefarian->DespawnOrUnsummon(); - break; - case FAIL: - _events.ScheduleEvent(EVENT_RESPAWN_NEFARIUS, 15*IN_MILLISECONDS*MINUTE); - SetBossState(BOSS_NEFARIAN, NOT_STARTED); - break; - default: - break; - } - break; - } - return true; - } - - uint64 GetData64(uint32 id) const OVERRIDE - { - switch (id) - { - case DATA_RAZORGORE_THE_UNTAMED: return RazorgoreTheUntamedGUID; - case DATA_VAELASTRAZ_THE_CORRUPT: return VaelastraszTheCorruptGUID; - case DATA_BROODLORD_LASHLAYER: return BroodlordLashlayerGUID; - case DATA_FIRENAW: return FiremawGUID; - case DATA_EBONROC: return EbonrocGUID; - case DATA_FLAMEGOR: return FlamegorGUID; - case DATA_CHROMAGGUS: return ChromaggusGUID; - case DATA_LORD_VICTOR_NEFARIUS: return LordVictorNefariusGUID; - case DATA_NEFARIAN: return NefarianGUID; - } - - return 0; - } - - void SetData(uint32 type, uint32 data) OVERRIDE - { - if (type == DATA_EGG_EVENT) - { - switch (data) - { - case IN_PROGRESS: - _events.ScheduleEvent(EVENT_RAZOR_SPAWN, 45*IN_MILLISECONDS); - EggEvent = data; - EggCount = 0; - break; - case NOT_STARTED: - _events.CancelEvent(EVENT_RAZOR_SPAWN); - EggEvent = data; - EggCount = 0; - break; - case SPECIAL: - if (++EggCount == 15) - { - if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) - { - SetData(DATA_EGG_EVENT, DONE); - razor->RemoveAurasDueToSpell(42013); // MindControl - DoRemoveAurasDueToSpellOnPlayers(42013); - } - _events.ScheduleEvent(EVENT_RAZOR_PHASE_TWO, IN_MILLISECONDS); - _events.CancelEvent(EVENT_RAZOR_SPAWN); - } - if (EggEvent == NOT_STARTED) - SetData(DATA_EGG_EVENT, IN_PROGRESS); - break; - } - } - } - - void OnUnitDeath(Unit* unit) - { - //! HACK, needed because of buggy CreatureAI after charm - if (unit->GetEntry() == NPC_RAZORGORE && GetBossState(BOSS_RAZORGORE) != DONE) - SetBossState(BOSS_RAZORGORE, DONE); - } - - void Update(uint32 diff) - { - if (_events.Empty()) - return; - - _events.Update(diff); - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_RAZOR_SPAWN: - for (uint8 i = urand(2, 5); i > 0 ; --i) - if (Creature* summon = instance->SummonCreature(Entry[urand(0, 4)], SummonPosition[urand(0, 7)])) - summon->SetInCombatWithZone(); - _events.ScheduleEvent(EVENT_RAZOR_SPAWN, urand(12, 17)*IN_MILLISECONDS); - break; - case EVENT_RAZOR_PHASE_TWO: - _events.CancelEvent(EVENT_RAZOR_SPAWN); - if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) - razor->AI()->DoAction(ACTION_PHASE_TWO); - break; - case EVENT_RESPAWN_NEFARIUS: - if (Creature* nefarius = instance->GetCreature(LordVictorNefariusGUID)) - { - nefarius->SetPhaseMask(1, true); - nefarius->setActive(true); - nefarius->Respawn(); - nefarius->GetMotionMaster()->MoveTargetedHome(); - } - break; - } - } - } - - protected: - // Misc - EventMap _events; - // Razorgore - uint8 EggCount; - uint32 EggEvent; - uint64 RazorgoreTheUntamedGUID; - uint64 RazorgoreDoorGUID; - std::list EggList; - - // Vaelastrasz the Corrupt - uint64 VaelastraszTheCorruptGUID; - uint64 VaelastraszDoorGUID; - - // Broodlord Lashlayer - uint64 BroodlordLashlayerGUID; - uint64 BroodlordDoorGUID; - - // 3 Dragons - uint64 FiremawGUID; - uint64 EbonrocGUID; - uint64 FlamegorGUID; - uint64 ChrommagusDoorGUID; - - // Chormaggus - uint64 ChromaggusGUID; - uint64 NefarianDoorGUID; - - // Nefarian - uint64 LordVictorNefariusGUID; - uint64 NefarianGUID; - }; - - InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE - { - return new instance_blackwing_lair_InstanceMapScript(map); - } -}; - -void AddSC_instance_blackwing_lair() -{ - new instance_blackwing_lair(); -} diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt index 41d6179b169..53d37d83610 100644 --- a/src/server/scripts/EasternKingdoms/CMakeLists.txt +++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt @@ -17,6 +17,58 @@ set(scripts_STAT_SRCS EasternKingdoms/AlteracValley/boss_drekthar.cpp EasternKingdoms/AlteracValley/boss_vanndar.cpp EasternKingdoms/AlteracValley/alterac_valley.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp + EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp + EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp + EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h + EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h + EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp + EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp EasternKingdoms/Scholomance/boss_the_ravenian.cpp EasternKingdoms/Scholomance/boss_instructor_malicia.cpp EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp @@ -55,37 +107,12 @@ set(scripts_STAT_SRCS EasternKingdoms/Gnomeregan/gnomeregan.cpp EasternKingdoms/Gnomeregan/gnomeregan.h EasternKingdoms/zone_redridge_mountains.cpp - EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp - EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp - EasternKingdoms/BlackrockDepths/blackrock_depths.cpp - EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp - EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp - EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp - EasternKingdoms/BlackrockDepths/boss_grizzle.cpp - EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp - EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp - EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp - EasternKingdoms/BlackrockDepths/blackrock_depths.h - EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp - EasternKingdoms/BlackrockDepths/boss_magmus.cpp EasternKingdoms/zone_ironforge.cpp EasternKingdoms/ScarletEnclave/chapter2.cpp EasternKingdoms/ScarletEnclave/chapter5.cpp EasternKingdoms/ScarletEnclave/chapter1.cpp EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp EasternKingdoms/zone_eastern_plaguelands.cpp - EasternKingdoms/MoltenCore/boss_gehennas.cpp - EasternKingdoms/MoltenCore/boss_lucifron.cpp - EasternKingdoms/MoltenCore/boss_golemagg.cpp - EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp - EasternKingdoms/MoltenCore/boss_baron_geddon.cpp - EasternKingdoms/MoltenCore/boss_ragnaros.cpp - EasternKingdoms/MoltenCore/boss_garr.cpp - EasternKingdoms/MoltenCore/molten_core.h - EasternKingdoms/MoltenCore/instance_molten_core.cpp - EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp - EasternKingdoms/MoltenCore/boss_magmadar.cpp - EasternKingdoms/MoltenCore/boss_shazzrah.cpp EasternKingdoms/Stratholme/boss_baroness_anastari.cpp EasternKingdoms/Stratholme/boss_nerubenkan.cpp EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -117,22 +144,6 @@ set(scripts_STAT_SRCS EasternKingdoms/Uldaman/instance_uldaman.cpp EasternKingdoms/Uldaman/boss_archaedas.cpp EasternKingdoms/zone_swamp_of_sorrows.cpp - EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp - EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp - EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp - EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp - EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp - EasternKingdoms/BlackrockSpire/boss_halycon.cpp - EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp - EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp - EasternKingdoms/BlackrockSpire/boss_gyth.cpp - EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp - EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp - EasternKingdoms/BlackrockSpire/boss_the_beast.cpp - EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp - EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp - EasternKingdoms/BlackrockSpire/blackrock_spire.h - EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp EasternKingdoms/SunwellPlateau/sunwell_plateau.h @@ -167,16 +178,6 @@ set(scripts_STAT_SRCS EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp EasternKingdoms/ShadowfangKeep/shadowfang_keep.h EasternKingdoms/zone_burning_steppes.cpp - EasternKingdoms/BlackwingLair/boss_chromaggus.cpp - EasternKingdoms/BlackwingLair/boss_razorgore.cpp - EasternKingdoms/BlackwingLair/boss_firemaw.cpp - EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp - EasternKingdoms/BlackwingLair/boss_ebonroc.cpp - EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp - EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp - EasternKingdoms/BlackwingLair/boss_nefarian.cpp - EasternKingdoms/BlackwingLair/boss_flamegor.cpp - EasternKingdoms/BlackwingLair/blackwing_lair.h EasternKingdoms/zone_blasted_lands.cpp EasternKingdoms/zone_stormwind_city.cpp EasternKingdoms/ZulAman/boss_halazzi.cpp diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp deleted file mode 100644 index e9ac15147f9..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Baron_Geddon -SD%Complete: 100 -SDComment: -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Emotes -{ - EMOTE_SERVICE = 0 -}; - -enum Spells -{ - SPELL_INFERNO = 19695, - SPELL_IGNITE_MANA = 19659, - SPELL_LIVING_BOMB = 20475, - SPELL_ARMAGEDDON = 20479, -}; - -enum Events -{ - EVENT_INFERNO = 1, - EVENT_IGNITE_MANA = 2, - EVENT_LIVING_BOMB = 3, -}; - -class boss_baron_geddon : public CreatureScript -{ - public: - boss_baron_geddon() : CreatureScript("boss_baron_geddon") { } - - struct boss_baron_geddonAI : public BossAI - { - boss_baron_geddonAI(Creature* creature) : BossAI(creature, BOSS_BARON_GEDDON) - { - } - - void EnterCombat(Unit* victim) OVERRIDE - { - BossAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_INFERNO, 45000); - events.ScheduleEvent(EVENT_IGNITE_MANA, 30000); - events.ScheduleEvent(EVENT_LIVING_BOMB, 35000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - // If we are <2% hp cast Armageddon - if (!HealthAbovePct(2)) - { - me->InterruptNonMeleeSpells(true); - DoCast(me, SPELL_ARMAGEDDON); - Talk(EMOTE_SERVICE); - return; - } - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_INFERNO: - DoCast(me, SPELL_INFERNO); - events.ScheduleEvent(EVENT_INFERNO, 45000); - break; - case EVENT_IGNITE_MANA: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_IGNITE_MANA)) - DoCast(target, SPELL_IGNITE_MANA); - events.ScheduleEvent(EVENT_IGNITE_MANA, 30000); - break; - case EVENT_LIVING_BOMB: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) - DoCast(target, SPELL_LIVING_BOMB); - events.ScheduleEvent(EVENT_LIVING_BOMB, 35000); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_baron_geddonAI(creature); - } -}; - -void AddSC_boss_baron_geddon() -{ - new boss_baron_geddon(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp deleted file mode 100644 index 5eabc11618b..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Garr -SD%Complete: 50 -SDComment: Adds NYI -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Spells -{ - // Garr - SPELL_ANTIMAGIC_PULSE = 19492, - SPELL_MAGMA_SHACKLES = 19496, - SPELL_ENRAGE = 19516, - - // Adds - SPELL_ERUPTION = 19497, - SPELL_IMMOLATE = 20294, -}; - -enum Events -{ - EVENT_ANTIMAGIC_PULSE = 1, - EVENT_MAGMA_SHACKLES = 2, -}; - -class boss_garr : public CreatureScript -{ - public: - boss_garr() : CreatureScript("boss_garr") { } - - struct boss_garrAI : public BossAI - { - boss_garrAI(Creature* creature) : BossAI(creature, BOSS_GARR) - { - } - - void EnterCombat(Unit* victim) OVERRIDE - { - BossAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_ANTIMAGIC_PULSE, 25000); - events.ScheduleEvent(EVENT_MAGMA_SHACKLES, 15000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_ANTIMAGIC_PULSE: - DoCast(me, SPELL_ANTIMAGIC_PULSE); - events.ScheduleEvent(EVENT_ANTIMAGIC_PULSE, urand(10000, 15000)); - break; - case EVENT_MAGMA_SHACKLES: - DoCast(me, SPELL_MAGMA_SHACKLES); - events.ScheduleEvent(EVENT_MAGMA_SHACKLES, urand(8000, 12000)); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_garrAI(creature); - } -}; - -class npc_firesworn : public CreatureScript -{ - public: - npc_firesworn() : CreatureScript("npc_firesworn") { } - - struct npc_fireswornAI : public ScriptedAI - { - npc_fireswornAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 immolateTimer; - - void Reset() OVERRIDE - { - immolateTimer = 4000; //These times are probably wrong - } - - void DamageTaken(Unit* /*attacker*/, uint32& damage) OVERRIDE - { - uint32 const health10pct = me->CountPctFromMaxHealth(10); - uint32 health = me->GetHealth(); - if (int32(health) - int32(damage) < int32(health10pct)) - { - damage = 0; - DoCastVictim(SPELL_ERUPTION); - me->DespawnOrUnsummon(); - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - if (immolateTimer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_IMMOLATE); - immolateTimer = urand(5000, 10000); - } - else - immolateTimer -= diff; - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_fireswornAI(creature); - } -}; - -void AddSC_boss_garr() -{ - new boss_garr(); - new npc_firesworn(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp deleted file mode 100644 index 15079953a34..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Gehennas -SD%Complete: 90 -SDComment: Adds MC NYI -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Spells -{ - SPELL_GEHENNAS_CURSE = 19716, - SPELL_RAIN_OF_FIRE = 19717, - SPELL_SHADOW_BOLT = 19728, -}; - -enum Events -{ - EVENT_GEHENNAS_CURSE = 1, - EVENT_RAIN_OF_FIRE = 2, - EVENT_SHADOW_BOLT = 3, -}; - -class boss_gehennas : public CreatureScript -{ - public: - boss_gehennas() : CreatureScript("boss_gehennas") { } - - struct boss_gehennasAI : public BossAI - { - boss_gehennasAI(Creature* creature) : BossAI(creature, BOSS_GEHENNAS) - { - } - - void EnterCombat(Unit* victim) OVERRIDE - { - BossAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_GEHENNAS_CURSE, 12000); - events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 10000); - events.ScheduleEvent(EVENT_SHADOW_BOLT, 6000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_GEHENNAS_CURSE: - DoCastVictim(SPELL_GEHENNAS_CURSE); - events.ScheduleEvent(EVENT_GEHENNAS_CURSE, urand(22000, 30000)); - break; - case EVENT_RAIN_OF_FIRE: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_RAIN_OF_FIRE); - events.ScheduleEvent(EVENT_RAIN_OF_FIRE, urand(4000, 12000)); - break; - case EVENT_SHADOW_BOLT: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) - DoCast(target, SPELL_SHADOW_BOLT); - events.ScheduleEvent(EVENT_SHADOW_BOLT, 7000); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_gehennasAI(creature); - } -}; - -void AddSC_boss_gehennas() -{ - new boss_gehennas(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp deleted file mode 100644 index 0fdb88923b3..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Golemagg -SD%Complete: 90 -SDComment: Timers need to be confirmed, Golemagg's Trust need to be checked -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Texts -{ - EMOTE_LOWHP = 0, -}; - -enum Spells -{ - // Golemagg - SPELL_MAGMASPLASH = 13879, - SPELL_PYROBLAST = 20228, - SPELL_EARTHQUAKE = 19798, - SPELL_ENRAGE = 19953, - SPELL_GOLEMAGG_TRUST = 20553, - - // Core Rager - SPELL_MANGLE = 19820 -}; - -enum Events -{ - EVENT_PYROBLAST = 1, - EVENT_EARTHQUAKE = 2, -}; - -class boss_golemagg : public CreatureScript -{ - public: - boss_golemagg() : CreatureScript("boss_golemagg") { } - - struct boss_golemaggAI : public BossAI - { - boss_golemaggAI(Creature* creature) : BossAI(creature, BOSS_GOLEMAGG_THE_INCINERATOR) - { - } - - void Reset() OVERRIDE - { - BossAI::Reset(); - DoCast(me, SPELL_MAGMASPLASH, true); - } - - void EnterCombat(Unit* victim) OVERRIDE - { - BossAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_PYROBLAST, 7000); - } - - void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE - { - if (!HealthBelowPct(10) || me->HasAura(SPELL_ENRAGE)) - return; - - DoCast(me, SPELL_ENRAGE, true); - events.ScheduleEvent(EVENT_EARTHQUAKE, 3000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_PYROBLAST: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_PYROBLAST); - events.ScheduleEvent(EVENT_PYROBLAST, 7000); - break; - case EVENT_EARTHQUAKE: - DoCastVictim(SPELL_EARTHQUAKE); - events.ScheduleEvent(EVENT_EARTHQUAKE, 3000); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_golemaggAI(creature); - } -}; - -class npc_core_rager : public CreatureScript -{ - public: - npc_core_rager() : CreatureScript("npc_core_rager") { } - - struct npc_core_ragerAI : public ScriptedAI - { - npc_core_ragerAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - } - - void Reset() OVERRIDE - { - mangleTimer = 7*IN_MILLISECONDS; // These times are probably wrong - } - - void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE - { - if (HealthAbovePct(50) || !instance) - return; - - if (Creature* pGolemagg = instance->instance->GetCreature(instance->GetData64(BOSS_GOLEMAGG_THE_INCINERATOR))) - { - if (pGolemagg->IsAlive()) - { - me->AddAura(SPELL_GOLEMAGG_TRUST, me); - Talk(EMOTE_LOWHP); - me->SetFullHealth(); - } - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - // Mangle - if (mangleTimer <= diff) - { - DoCastVictim(SPELL_MANGLE); - mangleTimer = 10*IN_MILLISECONDS; - } - else - mangleTimer -= diff; - - DoMeleeAttackIfReady(); - } - - private: - InstanceScript* instance; - uint32 mangleTimer; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_core_ragerAI(creature); - } -}; - -void AddSC_boss_golemagg() -{ - new boss_golemagg(); - new npc_core_rager(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp deleted file mode 100644 index 31f4e40552f..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Lucifron -SD%Complete: 100 -SDComment: -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Spells -{ - SPELL_IMPENDING_DOOM = 19702, - SPELL_LUCIFRON_CURSE = 19703, - SPELL_SHADOW_SHOCK = 20603, -}; - -enum Events -{ - EVENT_IMPENDING_DOOM = 1, - EVENT_LUCIFRON_CURSE = 2, - EVENT_SHADOW_SHOCK = 3, -}; - -class boss_lucifron : public CreatureScript -{ - public: - boss_lucifron() : CreatureScript("boss_lucifron") { } - - struct boss_lucifronAI : public BossAI - { - boss_lucifronAI(Creature* creature) : BossAI(creature, BOSS_LUCIFRON) - { - } - - void EnterCombat(Unit* victim) OVERRIDE - { - BossAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_IMPENDING_DOOM, 10000); - events.ScheduleEvent(EVENT_LUCIFRON_CURSE, 20000); - events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_IMPENDING_DOOM: - DoCastVictim(SPELL_IMPENDING_DOOM); - events.ScheduleEvent(EVENT_IMPENDING_DOOM, 20000); - break; - case EVENT_LUCIFRON_CURSE: - DoCastVictim(SPELL_LUCIFRON_CURSE); - events.ScheduleEvent(EVENT_LUCIFRON_CURSE, 15000); - break; - case EVENT_SHADOW_SHOCK: - DoCastVictim(SPELL_SHADOW_SHOCK); - events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_lucifronAI(creature); - } -}; - -void AddSC_boss_lucifron() -{ - new boss_lucifron(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp deleted file mode 100644 index 7d40b9630ae..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Magmadar -SD%Complete: 75 -SDComment: Conflag on ground nyi -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Texts -{ - EMOTE_FRENZY = 0 -}; - -enum Spells -{ - SPELL_FRENZY = 19451, - SPELL_MAGMA_SPIT = 19449, - SPELL_PANIC = 19408, - SPELL_LAVA_BOMB = 19428, -}; - -enum Events -{ - EVENT_FRENZY = 1, - EVENT_PANIC = 2, - EVENT_LAVA_BOMB = 3, -}; - -class boss_magmadar : public CreatureScript -{ - public: - boss_magmadar() : CreatureScript("boss_magmadar") { } - - struct boss_magmadarAI : public BossAI - { - boss_magmadarAI(Creature* creature) : BossAI(creature, BOSS_MAGMADAR) - { - } - - void Reset() OVERRIDE - { - BossAI::Reset(); - DoCast(me, SPELL_MAGMA_SPIT, true); - } - - void EnterCombat(Unit* victim) OVERRIDE - { - BossAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_FRENZY, 30000); - events.ScheduleEvent(EVENT_PANIC, 20000); - events.ScheduleEvent(EVENT_LAVA_BOMB, 12000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_FRENZY: - Talk(EMOTE_FRENZY); - DoCast(me, SPELL_FRENZY); - events.ScheduleEvent(EVENT_FRENZY, 15000); - break; - case EVENT_PANIC: - DoCastVictim(SPELL_PANIC); - events.ScheduleEvent(EVENT_PANIC, 35000); - break; - case EVENT_LAVA_BOMB: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_LAVA_BOMB)) - DoCast(target, SPELL_LAVA_BOMB); - events.ScheduleEvent(EVENT_LAVA_BOMB, 12000); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_magmadarAI(creature); - } -}; - -void AddSC_boss_magmadar() -{ - new boss_magmadar(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp deleted file mode 100644 index 1001516d42e..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Majordomo_Executus -SD%Complete: 30 -SDComment: Correct spawning and Event NYI -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "molten_core.h" -#include "Player.h" - -enum Texts -{ - SAY_AGGRO = 0, - SAY_SPAWN = 1, - SAY_SLAY = 2, - SAY_SPECIAL = 3, - SAY_DEFEAT = 4, - - SAY_SUMMON_MAJ = 5, - SAY_ARRIVAL2_MAJ = 6 -}; - -enum Spells -{ - SPELL_MAGIC_REFLECTION = 20619, - SPELL_DAMAGE_REFLECTION = 21075, - SPELL_BLAST_WAVE = 20229, - SPELL_AEGIS_OF_RAGNAROS = 20620, - SPELL_TELEPORT = 20618, - SPELL_SUMMON_RAGNAROS = 19774, -}; - -#define GOSSIP_HELLO 4995 -#define GOSSIP_SELECT "Tell me more." - -enum Events -{ - EVENT_MAGIC_REFLECTION = 1, - EVENT_DAMAGE_REFLECTION = 2, - EVENT_BLAST_WAVE = 3, - EVENT_TELEPORT = 4, - - EVENT_OUTRO_1 = 5, - EVENT_OUTRO_2 = 6, - EVENT_OUTRO_3 = 7, -}; - -class boss_majordomo : public CreatureScript -{ - public: - boss_majordomo() : CreatureScript("boss_majordomo") { } - - struct boss_majordomoAI : public BossAI - { - boss_majordomoAI(Creature* creature) : BossAI(creature, BOSS_MAJORDOMO_EXECUTUS) - { - } - - void KilledUnit(Unit* /*victim*/) OVERRIDE - { - if (urand(0, 99) < 25) - Talk(SAY_SLAY); - } - - void EnterCombat(Unit* who) OVERRIDE - { - BossAI::EnterCombat(who); - Talk(SAY_AGGRO); - events.ScheduleEvent(EVENT_MAGIC_REFLECTION, 30000); - events.ScheduleEvent(EVENT_DAMAGE_REFLECTION, 15000); - events.ScheduleEvent(EVENT_BLAST_WAVE, 10000); - events.ScheduleEvent(EVENT_TELEPORT, 20000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (instance && instance->GetBossState(BOSS_MAJORDOMO_EXECUTUS) != DONE) - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (!me->FindNearestCreature(NPC_FLAMEWAKER_HEALER, 100.0f) && !me->FindNearestCreature(NPC_FLAMEWAKER_ELITE, 100.0f)) - { - instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me); - me->setFaction(35); - me->AI()->EnterEvadeMode(); - Talk(SAY_DEFEAT); - _JustDied(); - events.ScheduleEvent(EVENT_OUTRO_1, 32000); - return; - } - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - if (HealthBelowPct(50)) - DoCast(me, SPELL_AEGIS_OF_RAGNAROS, true); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_MAGIC_REFLECTION: - DoCast(me, SPELL_MAGIC_REFLECTION); - events.ScheduleEvent(EVENT_MAGIC_REFLECTION, 30000); - break; - case EVENT_DAMAGE_REFLECTION: - DoCast(me, SPELL_DAMAGE_REFLECTION); - events.ScheduleEvent(EVENT_DAMAGE_REFLECTION, 30000); - break; - case EVENT_BLAST_WAVE: - DoCastVictim(SPELL_BLAST_WAVE); - events.ScheduleEvent(EVENT_BLAST_WAVE, 10000); - break; - case EVENT_TELEPORT: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) - DoCast(target, SPELL_TELEPORT); - events.ScheduleEvent(EVENT_TELEPORT, 20000); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - else - { - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_OUTRO_1: - me->NearTeleportTo(RagnarosTelePos.GetPositionX(), RagnarosTelePos.GetPositionY(), RagnarosTelePos.GetPositionZ(), RagnarosTelePos.GetOrientation()); - me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - break; - case EVENT_OUTRO_2: - if (instance) - instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos); - break; - case EVENT_OUTRO_3: - Talk(SAY_ARRIVAL2_MAJ); - break; - default: - break; - } - } - } - } - - void DoAction(int32 action) OVERRIDE - { - if (action == ACTION_START_RAGNAROS) - { - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - Talk(SAY_SUMMON_MAJ); - events.ScheduleEvent(EVENT_OUTRO_2, 8000); - events.ScheduleEvent(EVENT_OUTRO_3, 24000); - } - else if (action == ACTION_START_RAGNAROS_ALT) - { - me->setFaction(35); - me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } - } - }; - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(GOSSIP_HELLO, creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) OVERRIDE - { - player->CLOSE_GOSSIP_MENU(); - creature->AI()->DoAction(ACTION_START_RAGNAROS); - return true; - } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_majordomoAI(creature); - } -}; - -void AddSC_boss_majordomo() -{ - new boss_majordomo(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp deleted file mode 100644 index d03f756f366..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Ragnaros -SD%Complete: 95 -SDComment: some spells doesnt work correctly -SDCategory: Molten Core -EndScriptData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Texts -{ - SAY_SUMMON_MAJ = 0, - SAY_ARRIVAL1_RAG = 1, - SAY_ARRIVAL2_MAJ = 2, - SAY_ARRIVAL3_RAG = 3, - SAY_ARRIVAL5_RAG = 4, - SAY_REINFORCEMENTS1 = 5, - SAY_REINFORCEMENTS2 = 6, - SAY_HAND = 7, - SAY_WRATH = 8, - SAY_KILL = 9, - SAY_MAGMABURST = 10 -}; - -enum Spells -{ - SPELL_HAND_OF_RAGNAROS = 19780, - SPELL_WRATH_OF_RAGNAROS = 20566, - SPELL_LAVA_BURST = 21158, - SPELL_MAGMA_BLAST = 20565, // Ranged attack - SPELL_SONS_OF_FLAME_DUMMY = 21108, // Server side effect - SPELL_RAGSUBMERGE = 21107, // Stealth aura - SPELL_RAGEMERGE = 20568, - SPELL_MELT_WEAPON = 21388, - SPELL_ELEMENTAL_FIRE = 20564, - SPELL_ERRUPTION = 17731 -}; - -enum Events -{ - EVENT_ERUPTION = 1, - EVENT_WRATH_OF_RAGNAROS = 2, - EVENT_HAND_OF_RAGNAROS = 3, - EVENT_LAVA_BURST = 4, - EVENT_ELEMENTAL_FIRE = 5, - EVENT_MAGMA_BLAST = 6, - EVENT_SUBMERGE = 7, - - EVENT_INTRO_1 = 8, - EVENT_INTRO_2 = 9, - EVENT_INTRO_3 = 10, - EVENT_INTRO_4 = 11, - EVENT_INTRO_5 = 12 -}; - -class boss_ragnaros : public CreatureScript -{ - public: - boss_ragnaros() : CreatureScript("boss_ragnaros") { } - - struct boss_ragnarosAI : public BossAI - { - boss_ragnarosAI(Creature* creature) : BossAI(creature, BOSS_RAGNAROS) - { - _introState = 0; - me->SetReactState(REACT_PASSIVE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void Reset() OVERRIDE - { - BossAI::Reset(); - _emergeTimer = 90000; - _hasYelledMagmaBurst = false; - _hasSubmergedOnce = false; - _isBanished = false; - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); - } - - void EnterCombat(Unit* victim) OVERRIDE - { - BossAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_ERUPTION, 15000); - events.ScheduleEvent(EVENT_WRATH_OF_RAGNAROS, 30000); - events.ScheduleEvent(EVENT_HAND_OF_RAGNAROS, 25000); - events.ScheduleEvent(EVENT_LAVA_BURST, 10000); - events.ScheduleEvent(EVENT_ELEMENTAL_FIRE, 3000); - events.ScheduleEvent(EVENT_MAGMA_BLAST, 2000); - events.ScheduleEvent(EVENT_SUBMERGE, 180000); - } - - void KilledUnit(Unit* /*victim*/) OVERRIDE - { - if (urand(0, 99) < 25) - Talk(SAY_KILL); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (_introState != 2) - { - if (!_introState) - { - me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE); - events.ScheduleEvent(EVENT_INTRO_1, 4000); - events.ScheduleEvent(EVENT_INTRO_2, 23000); - events.ScheduleEvent(EVENT_INTRO_3, 42000); - events.ScheduleEvent(EVENT_INTRO_4, 43000); - events.ScheduleEvent(EVENT_INTRO_5, 53000); - _introState = 1; - } - - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_INTRO_1: - Talk(SAY_ARRIVAL1_RAG); - break; - case EVENT_INTRO_2: - Talk(SAY_ARRIVAL3_RAG); - break; - case EVENT_INTRO_3: - me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK1H); - break; - case EVENT_INTRO_4: - Talk(SAY_ARRIVAL5_RAG); - if (instance) - if (Creature* executus = Unit::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS))) - me->Kill(executus); - break; - case EVENT_INTRO_5: - me->SetReactState(REACT_AGGRESSIVE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - _introState = 2; - break; - default: - break; - } - } - } - else - { - if (instance) - { - if (_isBanished && ((_emergeTimer <= diff) || (instance->GetData(DATA_RAGNAROS_ADDS)) > 8)) - { - //Become unbanished again - me->SetReactState(REACT_AGGRESSIVE); - me->setFaction(14); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); - me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE); - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - AttackStart(target); - instance->SetData(DATA_RAGNAROS_ADDS, 0); - - //DoCast(me, SPELL_RAGEMERGE); //"phase spells" didnt worked correctly so Ive commented them and wrote solution witch doesnt need core support - _isBanished = false; - } - else if (_isBanished) - { - _emergeTimer -= diff; - //Do nothing while banished - return; - } - } - - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_ERUPTION: - DoCastVictim(SPELL_ERRUPTION); - events.ScheduleEvent(EVENT_ERUPTION, urand(20000, 45000)); - break; - case EVENT_WRATH_OF_RAGNAROS: - DoCastVictim(SPELL_WRATH_OF_RAGNAROS); - if (urand(0, 1)) - Talk(SAY_WRATH); - events.ScheduleEvent(EVENT_WRATH_OF_RAGNAROS, 25000); - break; - case EVENT_HAND_OF_RAGNAROS: - DoCast(me, SPELL_HAND_OF_RAGNAROS); - if (urand(0, 1)) - Talk(SAY_HAND); - events.ScheduleEvent(EVENT_HAND_OF_RAGNAROS, 20000); - break; - case EVENT_LAVA_BURST: - DoCastVictim(SPELL_LAVA_BURST); - events.ScheduleEvent(EVENT_LAVA_BURST, 10000); - break; - case EVENT_ELEMENTAL_FIRE: - DoCastVictim(SPELL_ELEMENTAL_FIRE); - events.ScheduleEvent(EVENT_ELEMENTAL_FIRE, urand(10000, 14000)); - break; - case EVENT_MAGMA_BLAST: - if (me->IsWithinMeleeRange(me->GetVictim())) - { - DoCastVictim(SPELL_MAGMA_BLAST); - if (!_hasYelledMagmaBurst) - { - //Say our dialog - Talk(SAY_MAGMABURST); - _hasYelledMagmaBurst = true; - } - } - events.ScheduleEvent(EVENT_MAGMA_BLAST, 2500); - break; - case EVENT_SUBMERGE: - { - if (instance && !_isBanished) - { - //Creature spawning and ragnaros becomming unattackable - //is not very well supported in the core //no it really isnt - //so added normaly spawning and banish workaround and attack again after 90 secs. - me->AttackStop(); - DoResetThreat(); - me->SetReactState(REACT_PASSIVE); - me->InterruptNonMeleeSpells(false); - //Root self - //DoCast(me, 23973); - me->setFaction(35); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); - me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE); - instance->SetData(DATA_RAGNAROS_ADDS, 0); - - if (!_hasSubmergedOnce) - { - Talk(SAY_REINFORCEMENTS1); - - // summon 8 elementals - for (uint8 i = 0; i < 8; ++i) - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - if (Creature* summoned = me->SummonCreature(12143, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000)) - summoned->AI()->AttackStart(target); - - _hasSubmergedOnce = true; - _isBanished = true; - //DoCast(me, SPELL_RAGSUBMERGE); - _emergeTimer = 90000; - - } - else - { - Talk(SAY_REINFORCEMENTS2); - - for (uint8 i = 0; i < 8; ++i) - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - if (Creature* summoned = me->SummonCreature(12143, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000)) - summoned->AI()->AttackStart(target); - - _isBanished = true; - //DoCast(me, SPELL_RAGSUBMERGE); - _emergeTimer = 90000; - } - } - events.ScheduleEvent(EVENT_SUBMERGE, 180000); - break; - } - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - } - - private: - uint32 _emergeTimer; - uint8 _introState; - bool _hasYelledMagmaBurst; - bool _hasSubmergedOnce; - bool _isBanished; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_ragnarosAI(creature); - } -}; - -class npc_son_of_flame : public CreatureScript -{ - public: - npc_son_of_flame() : CreatureScript("npc_SonOfFlame") { } - - struct npc_son_of_flameAI : public ScriptedAI //didnt work correctly in EAI for me... - { - npc_son_of_flameAI(Creature* creature) : ScriptedAI(creature) - { - instance = me->GetInstanceScript(); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - if (instance) - instance->SetData(DATA_RAGNAROS_ADDS, 1); - } - - void UpdateAI(uint32 /*diff*/) OVERRIDE - { - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - - private: - InstanceScript* instance; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_son_of_flameAI(creature); - } -}; - -void AddSC_boss_ragnaros() -{ - new boss_ragnaros(); - new npc_son_of_flame(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp deleted file mode 100644 index 7c1d1af7d29..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Shazzrah -SD%Complete: 75 -SDComment: Teleport NYI -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Spells -{ - SPELL_ARCANE_EXPLOSION = 19712, - SPELL_SHAZZRAH_CURSE = 19713, - SPELL_MAGIC_GROUNDING = 19714, - SPELL_COUNTERSPELL = 19715, -}; - -enum Events -{ - EVENT_ARCANE_EXPLOSION = 1, - EVENT_SHAZZRAH_CURSE = 2, - EVENT_MAGIC_GROUNDING = 3, - EVENT_COUNTERSPELL = 4, - EVENT_BLINK = 5, -}; - -class boss_shazzrah : public CreatureScript -{ - public: - boss_shazzrah() : CreatureScript("boss_shazzrah") { } - - struct boss_shazzrahAI : public BossAI - { - boss_shazzrahAI(Creature* creature) : BossAI(creature, BOSS_SHAZZRAH) - { - } - - void EnterCombat(Unit* target) OVERRIDE - { - BossAI::EnterCombat(target); - events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 6000); - events.ScheduleEvent(EVENT_SHAZZRAH_CURSE, 10000); - events.ScheduleEvent(EVENT_MAGIC_GROUNDING, 24000); - events.ScheduleEvent(EVENT_COUNTERSPELL, 15000); - events.ScheduleEvent(EVENT_BLINK, 30000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_ARCANE_EXPLOSION: - DoCastVictim(SPELL_ARCANE_EXPLOSION); - events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(5000, 9000)); - break; - case EVENT_SHAZZRAH_CURSE: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -EVENT_SHAZZRAH_CURSE)) - DoCast(target, SPELL_SHAZZRAH_CURSE); - events.ScheduleEvent(EVENT_SHAZZRAH_CURSE, urand(25000, 30000)); - break; - case EVENT_MAGIC_GROUNDING: - DoCast(me, SPELL_MAGIC_GROUNDING); - events.ScheduleEvent(EVENT_MAGIC_GROUNDING, 35000); - break; - case EVENT_COUNTERSPELL: - DoCastVictim(SPELL_COUNTERSPELL); - events.ScheduleEvent(EVENT_COUNTERSPELL, urand(16000, 20000)); - break; - case EVENT_BLINK: - // Teleporting him to a random player and casting Arcane Explosion after that. - // Blink is not working cause of LoS System we need to do this hardcoded. - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true)) - { - DoTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); - DoCast(target, SPELL_ARCANE_EXPLOSION); - DoResetThreat(); - } - events.ScheduleEvent(EVENT_BLINK, 45000); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_shazzrahAI(creature); - } -}; - -void AddSC_boss_shazzrah() -{ - new boss_shazzrah(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp deleted file mode 100644 index 681f4f72bc6..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Boss_Sulfuron_Harbringer -SD%Complete: 80 -SDComment: Adds NYI -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "molten_core.h" - -enum Spells -{ - // Sulfuron Harbringer - SPELL_DARK_STRIKE = 19777, - SPELL_DEMORALIZING_SHOUT = 19778, - SPELL_INSPIRE = 19779, - SPELL_KNOCKDOWN = 19780, - SPELL_FLAMESPEAR = 19781, - - // Adds - SPELL_HEAL = 19775, - SPELL_SHADOWWORDPAIN = 19776, - SPELL_IMMOLATE = 20294, -}; - -enum Events -{ - EVENT_DARK_STRIKE = 1, - EVENT_DEMORALIZING_SHOUT = 2, - EVENT_INSPIRE = 3, - EVENT_KNOCKDOWN = 4, - EVENT_FLAMESPEAR = 5, - - EVENT_HEAL = 6, - EVENT_SHADOW_WORD_PAIN = 7, - EVENT_IMMOLATE = 8, -}; - -class boss_sulfuron : public CreatureScript -{ - public: - boss_sulfuron() : CreatureScript("boss_sulfuron") { } - - struct boss_sulfuronAI : public BossAI - { - boss_sulfuronAI(Creature* creature) : BossAI(creature, BOSS_SULFURON_HARBINGER) - { - } - - void EnterCombat(Unit* victim) OVERRIDE - { - BossAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_DARK_STRIKE, 10000); - events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, 15000); - events.ScheduleEvent(EVENT_INSPIRE, 13000); - events.ScheduleEvent(EVENT_KNOCKDOWN, 6000); - events.ScheduleEvent(EVENT_FLAMESPEAR, 2000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_DARK_STRIKE: - DoCast(me, SPELL_DARK_STRIKE); - events.ScheduleEvent(EVENT_DARK_STRIKE, urand(15000, 18000)); - break; - case EVENT_DEMORALIZING_SHOUT: - DoCastVictim(SPELL_DEMORALIZING_SHOUT); - events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, urand(15000, 20000)); - break; - case EVENT_INSPIRE: - { - std::list healers = DoFindFriendlyMissingBuff(45.0f, SPELL_INSPIRE); - if (!healers.empty()) - DoCast(Trinity::Containers::SelectRandomContainerElement(healers), SPELL_INSPIRE); - - DoCast(me, SPELL_INSPIRE); - events.ScheduleEvent(EVENT_INSPIRE, urand(20000, 26000)); - break; - } - case EVENT_KNOCKDOWN: - DoCastVictim(SPELL_KNOCKDOWN); - events.ScheduleEvent(EVENT_KNOCKDOWN, urand(12000, 15000)); - break; - case EVENT_FLAMESPEAR: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) - DoCast(target, SPELL_FLAMESPEAR); - events.ScheduleEvent(EVENT_FLAMESPEAR, urand(12000, 16000)); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_sulfuronAI(creature); - } -}; - -class npc_flamewaker_priest : public CreatureScript -{ - public: - npc_flamewaker_priest() : CreatureScript("npc_flamewaker_priest") { } - - struct npc_flamewaker_priestAI : public ScriptedAI - { - npc_flamewaker_priestAI(Creature* creature) : ScriptedAI(creature) - { - } - - void Reset() OVERRIDE - { - events.Reset(); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - events.Reset(); - } - - void EnterCombat(Unit* victim) OVERRIDE - { - ScriptedAI::EnterCombat(victim); - events.ScheduleEvent(EVENT_HEAL, urand(15000, 30000)); - events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 2000); - events.ScheduleEvent(EVENT_IMMOLATE, 8000); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_HEAL: - if (Unit* target = DoSelectLowestHpFriendly(60.0f, 1)) - DoCast(target, SPELL_HEAL); - events.ScheduleEvent(EVENT_HEAL, urand(15000, 20000)); - break; - case EVENT_SHADOW_WORD_PAIN: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_SHADOWWORDPAIN)) - DoCast(target, SPELL_SHADOWWORDPAIN); - events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, urand(18000, 26000)); - break; - case EVENT_IMMOLATE: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_IMMOLATE)) - DoCast(target, SPELL_IMMOLATE); - events.ScheduleEvent(EVENT_IMMOLATE, urand(15000, 25000)); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - - private: - EventMap events; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_flamewaker_priestAI(creature); - } -}; - -void AddSC_boss_sulfuron() -{ - new boss_sulfuron(); - new npc_flamewaker_priest(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp deleted file mode 100644 index 04e652b7f80..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (C) 2008-2013 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 . - */ - -/* ScriptData -SDName: Instance_Molten_Core -SD%Complete: 0 -SDComment: Place Holder -SDCategory: Molten Core -EndScriptData */ - -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "InstanceScript.h" -#include "CreatureAI.h" -#include "molten_core.h" -#include "TemporarySummon.h" - -Position const SummonPositions[10] = -{ - {737.850f, -1145.35f, -120.288f, 4.71368f}, - {744.162f, -1151.63f, -119.726f, 4.58204f}, - {751.247f, -1152.82f, -119.744f, 4.49673f}, - {759.206f, -1155.09f, -120.051f, 4.30104f}, - {755.973f, -1152.33f, -120.029f, 4.25588f}, - {731.712f, -1147.56f, -120.195f, 4.95955f}, - {726.499f, -1149.80f, -120.156f, 5.24055f}, - {722.408f, -1152.41f, -120.029f, 5.33087f}, - {718.994f, -1156.36f, -119.805f, 5.75738f}, - {838.510f, -829.840f, -232.000f, 2.00000f}, -}; - -class instance_molten_core : public InstanceMapScript -{ - public: - instance_molten_core() : InstanceMapScript("instance_molten_core", 409) { } - - struct instance_molten_core_InstanceMapScript : public InstanceScript - { - instance_molten_core_InstanceMapScript(Map* map) : InstanceScript(map) - { - SetBossNumber(MAX_ENCOUNTER); - _golemaggTheIncineratorGUID = 0; - _majordomoExecutusGUID = 0; - _cacheOfTheFirelordGUID = 0; - _executusSchedule = NULL; - _deadBossCount = 0; - _ragnarosAddDeaths = 0; - _isLoading = false; - _summonedExecutus = false; - } - - ~instance_molten_core_InstanceMapScript() - { - delete _executusSchedule; - } - - void OnPlayerEnter(Player* /*player*/) - { - if (_executusSchedule) - { - SummonMajordomoExecutus(*_executusSchedule); - delete _executusSchedule; - _executusSchedule = NULL; - } - } - - void OnCreatureCreate(Creature* creature) - { - switch (creature->GetEntry()) - { - case NPC_GOLEMAGG_THE_INCINERATOR: - _golemaggTheIncineratorGUID = creature->GetGUID(); - break; - case NPC_MAJORDOMO_EXECUTUS: - _majordomoExecutusGUID = creature->GetGUID(); - break; - default: - break; - } - } - - void OnGameObjectCreate(GameObject* go) - { - switch (go->GetEntry()) - { - case GO_CACHE_OF_THE_FIRELORD: - _cacheOfTheFirelordGUID = go->GetGUID(); - break; - default: - break; - } - } - - void SetData(uint32 type, uint32 data) OVERRIDE - { - if (type == DATA_RAGNAROS_ADDS) - { - if (data == 1) - ++_ragnarosAddDeaths; - else if (data == 0) - _ragnarosAddDeaths = 0; - } - } - - uint32 GetData(uint32 type) const OVERRIDE - { - switch (type) - { - case DATA_RAGNAROS_ADDS: - return _ragnarosAddDeaths; - } - - return 0; - } - - uint64 GetData64(uint32 type) const OVERRIDE - { - switch (type) - { - case BOSS_GOLEMAGG_THE_INCINERATOR: - return _golemaggTheIncineratorGUID; - case BOSS_MAJORDOMO_EXECUTUS: - return _majordomoExecutusGUID; - } - - return 0; - } - - bool SetBossState(uint32 bossId, EncounterState state) - { - if (!InstanceScript::SetBossState(bossId, state)) - return false; - - if (state == DONE && bossId < BOSS_MAJORDOMO_EXECUTUS) - ++_deadBossCount; - - if (_isLoading) - return true; - - if (_deadBossCount == 8) - SummonMajordomoExecutus(false); - - if (bossId == BOSS_MAJORDOMO_EXECUTUS && state == DONE) - DoRespawnGameObject(_cacheOfTheFirelordGUID, 7 * DAY); - - return true; - } - - void SummonMajordomoExecutus(bool done) - { - if (_summonedExecutus) - return; - - _summonedExecutus = true; - if (!done) - { - instance->SummonCreature(NPC_MAJORDOMO_EXECUTUS, SummonPositions[0]); - instance->SummonCreature(NPC_FLAMEWAKER_HEALER, SummonPositions[1]); - instance->SummonCreature(NPC_FLAMEWAKER_HEALER, SummonPositions[2]); - instance->SummonCreature(NPC_FLAMEWAKER_HEALER, SummonPositions[3]); - instance->SummonCreature(NPC_FLAMEWAKER_HEALER, SummonPositions[4]); - instance->SummonCreature(NPC_FLAMEWAKER_ELITE, SummonPositions[5]); - instance->SummonCreature(NPC_FLAMEWAKER_ELITE, SummonPositions[6]); - instance->SummonCreature(NPC_FLAMEWAKER_ELITE, SummonPositions[7]); - instance->SummonCreature(NPC_FLAMEWAKER_ELITE, SummonPositions[8]); - } - else if (TempSummon* summon = instance->SummonCreature(NPC_MAJORDOMO_EXECUTUS, RagnarosTelePos)) - summon->AI()->DoAction(ACTION_START_RAGNAROS_ALT); - } - - std::string GetSaveData() - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << "M C " << GetBossSaveData(); - - OUT_SAVE_INST_DATA_COMPLETE; - return saveStream.str(); - } - - void Load(char const* data) - { - if (!data) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - _isLoading = true; - OUT_LOAD_INST_DATA(data); - - char dataHead1, dataHead2; - - std::istringstream loadStream(data); - loadStream >> dataHead1 >> dataHead2; - - if (dataHead1 == 'M' && dataHead2 == 'C') - { - EncounterState states[MAX_ENCOUNTER]; - uint8 executusCounter = 0; - - // need 2 loops to check spawning executus/ragnaros - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - uint32 tmpState; - loadStream >> tmpState; - if (tmpState == IN_PROGRESS || tmpState > TO_BE_DECIDED) - tmpState = NOT_STARTED; - states[i] = EncounterState(tmpState); - - if (tmpState == DONE && i < BOSS_MAJORDOMO_EXECUTUS) - ++executusCounter; - } - - if (executusCounter >= 8 && states[BOSS_RAGNAROS] != DONE) - _executusSchedule = new bool(states[BOSS_MAJORDOMO_EXECUTUS] == DONE); - - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - SetBossState(i, states[i]); - } - else - OUT_LOAD_INST_DATA_FAIL; - - OUT_LOAD_INST_DATA_COMPLETE; - _isLoading = false; - } - - private: - uint64 _golemaggTheIncineratorGUID; - uint64 _majordomoExecutusGUID; - uint64 _cacheOfTheFirelordGUID; - bool* _executusSchedule; - uint8 _deadBossCount; - uint8 _ragnarosAddDeaths; - bool _isLoading; - bool _summonedExecutus; - }; - - InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE - { - return new instance_molten_core_InstanceMapScript(map); - } -}; - -void AddSC_instance_molten_core() -{ - new instance_molten_core(); -} diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h deleted file mode 100644 index 407e3ee5204..00000000000 --- a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2008-2013 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_MOLTEN_CORE_H -#define DEF_MOLTEN_CORE_H - -enum Encounters -{ - BOSS_LUCIFRON = 0, - BOSS_MAGMADAR = 1, - BOSS_GEHENNAS = 2, - BOSS_GARR = 3, - BOSS_SHAZZRAH = 4, - BOSS_BARON_GEDDON = 5, - BOSS_SULFURON_HARBINGER = 6, - BOSS_GOLEMAGG_THE_INCINERATOR = 7, - BOSS_MAJORDOMO_EXECUTUS = 8, - BOSS_RAGNAROS = 9, - MAX_ENCOUNTER, -}; - -enum Actions -{ - ACTION_START_RAGNAROS = 0, - ACTION_START_RAGNAROS_ALT = 1, -}; - -Position const RagnarosTelePos = {829.159f, -815.773f, -228.972f, 5.30500f}; -Position const RagnarosSummonPos = {838.510f, -829.840f, -232.000f, 2.00000f}; - -enum Creatures -{ - NPC_LUCIFRON = 12118, - NPC_MAGMADAR = 11982, - NPC_GEHENNAS = 12259, - NPC_GARR = 12057, - NPC_SHAZZRAH = 12264, - NPC_BARON_GEDDON = 12056, - NPC_SULFURON_HARBINGER = 12098, - NPC_GOLEMAGG_THE_INCINERATOR = 11988, - NPC_MAJORDOMO_EXECUTUS = 12018, - NPC_RAGNAROS = 11502, - NPC_FLAMEWAKER_HEALER = 11663, - NPC_FLAMEWAKER_ELITE = 11664, -}; - -enum GameObjects -{ - GO_CACHE_OF_THE_FIRELORD = 179703, -}; - -enum Data -{ - DATA_RAGNAROS_ADDS = 0, -}; - -#endif -- cgit v1.2.3