From cfaabe50cf229040b9f6c7d379a1879579c18bb9 Mon Sep 17 00:00:00 2001 From: Krogonos Date: Sun, 3 Feb 2013 09:12:03 -0600 Subject: Fixed a few file names to improve searching. Signed-off-by: Krogonos --- src/server/scripts/Kalimdor/CMakeLists.txt | 6 +- .../CullingOfStratholme/boss_chrono_lord_epoch.cpp | 153 +++++++++++++++++++ .../CullingOfStratholme/boss_epoch.cpp | 153 ------------------- .../CullingOfStratholme/boss_infinite.cpp | 89 ----------- .../boss_infinite_corruptor.cpp | 89 +++++++++++ .../CullingOfStratholme/boss_salramm.cpp | 163 --------------------- .../boss_salramm_the_fleshcrafter.cpp | 163 +++++++++++++++++++++ 7 files changed, 408 insertions(+), 408 deletions(-) create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp delete mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp delete mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp delete mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp create mode 100644 src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp (limited to 'src/server/scripts') diff --git a/src/server/scripts/Kalimdor/CMakeLists.txt b/src/server/scripts/Kalimdor/CMakeLists.txt index 5c44cd7ef27..536824e7a63 100644 --- a/src/server/scripts/Kalimdor/CMakeLists.txt +++ b/src/server/scripts/Kalimdor/CMakeLists.txt @@ -38,11 +38,11 @@ set(scripts_STAT_SRCS Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp - Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp - Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp + Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp + Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp - Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp + Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp new file mode 100644 index 00000000000..fad5736e18f --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp @@ -0,0 +1,153 @@ +/* + * 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 . + */ + +/* Script Data Start +SDName: Boss epoch +SDAuthor: Tartalo +SD%Complete: 80 +SDComment: TODO: Intro, consecutive attacks to a random target durin time wrap, adjust timers +SDCategory: +Script Data End */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "culling_of_stratholme.h" + +enum Spells +{ + SPELL_CURSE_OF_EXERTION = 52772, + SPELL_TIME_WARP = 52766, //Time slows down, reducing attack, casting and movement speed by 70% for 6 sec. + SPELL_TIME_STOP = 58848, //Stops time in a 50 yard sphere for 2 sec. + SPELL_WOUNDING_STRIKE = 52771, //Used only on the tank + H_SPELL_WOUNDING_STRIKE = 58830 +}; + +enum Yells +{ + SAY_INTRO = 0, + SAY_AGGRO = 1, + SAY_TIME_WARP = 2, + SAY_SLAY = 3, + SAY_DEATH = 4 +}; + +class boss_epoch : public CreatureScript +{ +public: + boss_epoch() : CreatureScript("boss_epoch") { } + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_epochAI (creature); + } + + struct boss_epochAI : public ScriptedAI + { + boss_epochAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + uint8 uiStep; + + uint32 uiStepTimer; + uint32 uiWoundingStrikeTimer; + uint32 uiTimeWarpTimer; + uint32 uiTimeStopTimer; + uint32 uiCurseOfExertionTimer; + + InstanceScript* instance; + + void Reset() + { + uiStep = 1; + uiStepTimer = 26000; + uiCurseOfExertionTimer = 9300; + uiTimeWarpTimer = 25300; + uiTimeStopTimer = 21300; + uiWoundingStrikeTimer = 5300; + + if (instance) + instance->SetData(DATA_EPOCH_EVENT, NOT_STARTED); + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + + if (instance) + instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + if (uiCurseOfExertionTimer < diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_CURSE_OF_EXERTION); + uiCurseOfExertionTimer = 9300; + } else uiCurseOfExertionTimer -= diff; + + if (uiWoundingStrikeTimer < diff) + { + DoCastVictim(SPELL_WOUNDING_STRIKE); + uiWoundingStrikeTimer = 5300; + } else uiWoundingStrikeTimer -= diff; + + if (uiTimeStopTimer < diff) + { + DoCastAOE(SPELL_TIME_STOP); + uiTimeStopTimer = 21300; + } else uiTimeStopTimer -= diff; + + if (uiTimeWarpTimer < diff) + { + Talk(SAY_TIME_WARP); + DoCastAOE(SPELL_TIME_WARP); + uiTimeWarpTimer = 25300; + } else uiTimeWarpTimer -= diff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* /*killer*/) + { + Talk(SAY_DEATH); + + if (instance) + instance->SetData(DATA_EPOCH_EVENT, DONE); + } + + void KilledUnit(Unit* victim) + { + if (victim == me) + return; + + Talk(SAY_SLAY); + } + }; + +}; + +void AddSC_boss_epoch() +{ + new boss_epoch(); +} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp deleted file mode 100644 index fad5736e18f..00000000000 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp +++ /dev/null @@ -1,153 +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 . - */ - -/* Script Data Start -SDName: Boss epoch -SDAuthor: Tartalo -SD%Complete: 80 -SDComment: TODO: Intro, consecutive attacks to a random target durin time wrap, adjust timers -SDCategory: -Script Data End */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "culling_of_stratholme.h" - -enum Spells -{ - SPELL_CURSE_OF_EXERTION = 52772, - SPELL_TIME_WARP = 52766, //Time slows down, reducing attack, casting and movement speed by 70% for 6 sec. - SPELL_TIME_STOP = 58848, //Stops time in a 50 yard sphere for 2 sec. - SPELL_WOUNDING_STRIKE = 52771, //Used only on the tank - H_SPELL_WOUNDING_STRIKE = 58830 -}; - -enum Yells -{ - SAY_INTRO = 0, - SAY_AGGRO = 1, - SAY_TIME_WARP = 2, - SAY_SLAY = 3, - SAY_DEATH = 4 -}; - -class boss_epoch : public CreatureScript -{ -public: - boss_epoch() : CreatureScript("boss_epoch") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new boss_epochAI (creature); - } - - struct boss_epochAI : public ScriptedAI - { - boss_epochAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - } - - uint8 uiStep; - - uint32 uiStepTimer; - uint32 uiWoundingStrikeTimer; - uint32 uiTimeWarpTimer; - uint32 uiTimeStopTimer; - uint32 uiCurseOfExertionTimer; - - InstanceScript* instance; - - void Reset() - { - uiStep = 1; - uiStepTimer = 26000; - uiCurseOfExertionTimer = 9300; - uiTimeWarpTimer = 25300; - uiTimeStopTimer = 21300; - uiWoundingStrikeTimer = 5300; - - if (instance) - instance->SetData(DATA_EPOCH_EVENT, NOT_STARTED); - } - - void EnterCombat(Unit* /*who*/) - { - Talk(SAY_AGGRO); - - if (instance) - instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - if (uiCurseOfExertionTimer < diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_CURSE_OF_EXERTION); - uiCurseOfExertionTimer = 9300; - } else uiCurseOfExertionTimer -= diff; - - if (uiWoundingStrikeTimer < diff) - { - DoCastVictim(SPELL_WOUNDING_STRIKE); - uiWoundingStrikeTimer = 5300; - } else uiWoundingStrikeTimer -= diff; - - if (uiTimeStopTimer < diff) - { - DoCastAOE(SPELL_TIME_STOP); - uiTimeStopTimer = 21300; - } else uiTimeStopTimer -= diff; - - if (uiTimeWarpTimer < diff) - { - Talk(SAY_TIME_WARP); - DoCastAOE(SPELL_TIME_WARP); - uiTimeWarpTimer = 25300; - } else uiTimeWarpTimer -= diff; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* /*killer*/) - { - Talk(SAY_DEATH); - - if (instance) - instance->SetData(DATA_EPOCH_EVENT, DONE); - } - - void KilledUnit(Unit* victim) - { - if (victim == me) - return; - - Talk(SAY_SLAY); - } - }; - -}; - -void AddSC_boss_epoch() -{ - new boss_epoch(); -} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp deleted file mode 100644 index 8c2861db299..00000000000 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp +++ /dev/null @@ -1,89 +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 "culling_of_stratholme.h" - -enum Spells -{ - SPELL_CORRUPTING_BLIGHT = 60588, - SPELL_VOID_STRIKE = 60590 -}; - -enum Yells -{ - SAY_AGGRO = 0, - SAY_DEATH = 1, - SAY_FAIL = 2 -}; - -class boss_infinite_corruptor : public CreatureScript -{ -public: - boss_infinite_corruptor() : CreatureScript("boss_infinite_corruptor") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new boss_infinite_corruptorAI(creature); - } - - struct boss_infinite_corruptorAI : public ScriptedAI - { - boss_infinite_corruptorAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - } - - InstanceScript* instance; - - void Reset() - { - if (instance) - instance->SetData(DATA_INFINITE_EVENT, NOT_STARTED); - } - - void EnterCombat(Unit* /*who*/) - { - Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS); - } - - void UpdateAI(uint32 const /*diff*/) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* /*killer*/) - { - Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_INFINITE_EVENT, DONE); - } - }; - -}; - -void AddSC_boss_infinite_corruptor() -{ - new boss_infinite_corruptor(); -} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp new file mode 100644 index 00000000000..8c2861db299 --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp @@ -0,0 +1,89 @@ +/* + * 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 "culling_of_stratholme.h" + +enum Spells +{ + SPELL_CORRUPTING_BLIGHT = 60588, + SPELL_VOID_STRIKE = 60590 +}; + +enum Yells +{ + SAY_AGGRO = 0, + SAY_DEATH = 1, + SAY_FAIL = 2 +}; + +class boss_infinite_corruptor : public CreatureScript +{ +public: + boss_infinite_corruptor() : CreatureScript("boss_infinite_corruptor") { } + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_infinite_corruptorAI(creature); + } + + struct boss_infinite_corruptorAI : public ScriptedAI + { + boss_infinite_corruptorAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + InstanceScript* instance; + + void Reset() + { + if (instance) + instance->SetData(DATA_INFINITE_EVENT, NOT_STARTED); + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + if (instance) + instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS); + } + + void UpdateAI(uint32 const /*diff*/) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* /*killer*/) + { + Talk(SAY_DEATH); + if (instance) + instance->SetData(DATA_INFINITE_EVENT, DONE); + } + }; + +}; + +void AddSC_boss_infinite_corruptor() +{ + new boss_infinite_corruptor(); +} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp deleted file mode 100644 index d7d9beaedd4..00000000000 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp +++ /dev/null @@ -1,163 +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 . - */ - -/* Script Data Start -SDName: Boss salramm -SDAuthor: Tartalo -SD%Complete: 80 -SDComment: TODO: Intro -SDCategory: -Script Data End */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "culling_of_stratholme.h" - -enum Spells -{ - SPELL_CURSE_OF_TWISTED_FLESH = 58845, - SPELL_EXPLODE_GHOUL = 52480, - H_SPELL_EXPLODE_GHOUL = 58825, - SPELL_SHADOW_BOLT = 57725, - H_SPELL_SHADOW_BOLT = 58828, - SPELL_STEAL_FLESH = 52708, - SPELL_SUMMON_GHOULS = 52451 -}; - -enum Yells -{ - SAY_AGGRO = 0, - SAY_SPAWN = 1, - SAY_SLAY = 2, - SAY_DEATH = 3, - SAY_EXPLODE_GHOUL = 4, - SAY_STEAL_FLESH = 5, - SAY_SUMMON_GHOULS = 6 -}; - -class boss_salramm : public CreatureScript -{ -public: - boss_salramm() : CreatureScript("boss_salramm") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new boss_salrammAI (creature); - } - - struct boss_salrammAI : public ScriptedAI - { - boss_salrammAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - if (instance) - Talk(SAY_SPAWN); - } - - uint32 uiCurseFleshTimer; - uint32 uiExplodeGhoulTimer; - uint32 uiShadowBoltTimer; - uint32 uiStealFleshTimer; - uint32 uiSummonGhoulsTimer; - - InstanceScript* instance; - - void Reset() - { - uiCurseFleshTimer = 30000; //30s DBM - uiExplodeGhoulTimer = urand(25000, 28000); //approx 6 sec after summon ghouls - uiShadowBoltTimer = urand(8000, 12000); // approx 10s - uiStealFleshTimer = 12345; - uiSummonGhoulsTimer = urand(19000, 24000); //on a video approx 24s after aggro - - if (instance) - instance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED); - } - - void EnterCombat(Unit* /*who*/) - { - Talk(SAY_AGGRO); - - if (instance) - instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //Curse of twisted flesh timer - if (uiCurseFleshTimer <= diff) - { - DoCast(me->getVictim(), SPELL_CURSE_OF_TWISTED_FLESH); - uiCurseFleshTimer = 37000; - } else uiCurseFleshTimer -= diff; - - //Shadow bolt timer - if (uiShadowBoltTimer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_SHADOW_BOLT); - uiShadowBoltTimer = urand(8000, 12000); - } else uiShadowBoltTimer -= diff; - - //Steal Flesh timer - if (uiStealFleshTimer <= diff) - { - Talk(SAY_STEAL_FLESH); - if (Unit* random_pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(random_pTarget, SPELL_STEAL_FLESH); - uiStealFleshTimer = 10000; - } else uiStealFleshTimer -= diff; - - //Summon ghouls timer - if (uiSummonGhoulsTimer <= diff) - { - Talk(SAY_SUMMON_GHOULS); - if (Unit* random_pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(random_pTarget, SPELL_SUMMON_GHOULS); - uiSummonGhoulsTimer = 10000; - } else uiSummonGhoulsTimer -= diff; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* /*killer*/) - { - Talk(SAY_DEATH); - - if (instance) - instance->SetData(DATA_SALRAMM_EVENT, DONE); - } - - void KilledUnit(Unit* victim) - { - if (victim == me) - return; - - Talk(SAY_SLAY); - } - }; - -}; - -void AddSC_boss_salramm() -{ - new boss_salramm(); -} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp new file mode 100644 index 00000000000..d7d9beaedd4 --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp @@ -0,0 +1,163 @@ +/* + * 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 . + */ + +/* Script Data Start +SDName: Boss salramm +SDAuthor: Tartalo +SD%Complete: 80 +SDComment: TODO: Intro +SDCategory: +Script Data End */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "culling_of_stratholme.h" + +enum Spells +{ + SPELL_CURSE_OF_TWISTED_FLESH = 58845, + SPELL_EXPLODE_GHOUL = 52480, + H_SPELL_EXPLODE_GHOUL = 58825, + SPELL_SHADOW_BOLT = 57725, + H_SPELL_SHADOW_BOLT = 58828, + SPELL_STEAL_FLESH = 52708, + SPELL_SUMMON_GHOULS = 52451 +}; + +enum Yells +{ + SAY_AGGRO = 0, + SAY_SPAWN = 1, + SAY_SLAY = 2, + SAY_DEATH = 3, + SAY_EXPLODE_GHOUL = 4, + SAY_STEAL_FLESH = 5, + SAY_SUMMON_GHOULS = 6 +}; + +class boss_salramm : public CreatureScript +{ +public: + boss_salramm() : CreatureScript("boss_salramm") { } + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_salrammAI (creature); + } + + struct boss_salrammAI : public ScriptedAI + { + boss_salrammAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + if (instance) + Talk(SAY_SPAWN); + } + + uint32 uiCurseFleshTimer; + uint32 uiExplodeGhoulTimer; + uint32 uiShadowBoltTimer; + uint32 uiStealFleshTimer; + uint32 uiSummonGhoulsTimer; + + InstanceScript* instance; + + void Reset() + { + uiCurseFleshTimer = 30000; //30s DBM + uiExplodeGhoulTimer = urand(25000, 28000); //approx 6 sec after summon ghouls + uiShadowBoltTimer = urand(8000, 12000); // approx 10s + uiStealFleshTimer = 12345; + uiSummonGhoulsTimer = urand(19000, 24000); //on a video approx 24s after aggro + + if (instance) + instance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED); + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + + if (instance) + instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //Curse of twisted flesh timer + if (uiCurseFleshTimer <= diff) + { + DoCast(me->getVictim(), SPELL_CURSE_OF_TWISTED_FLESH); + uiCurseFleshTimer = 37000; + } else uiCurseFleshTimer -= diff; + + //Shadow bolt timer + if (uiShadowBoltTimer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_SHADOW_BOLT); + uiShadowBoltTimer = urand(8000, 12000); + } else uiShadowBoltTimer -= diff; + + //Steal Flesh timer + if (uiStealFleshTimer <= diff) + { + Talk(SAY_STEAL_FLESH); + if (Unit* random_pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(random_pTarget, SPELL_STEAL_FLESH); + uiStealFleshTimer = 10000; + } else uiStealFleshTimer -= diff; + + //Summon ghouls timer + if (uiSummonGhoulsTimer <= diff) + { + Talk(SAY_SUMMON_GHOULS); + if (Unit* random_pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(random_pTarget, SPELL_SUMMON_GHOULS); + uiSummonGhoulsTimer = 10000; + } else uiSummonGhoulsTimer -= diff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* /*killer*/) + { + Talk(SAY_DEATH); + + if (instance) + instance->SetData(DATA_SALRAMM_EVENT, DONE); + } + + void KilledUnit(Unit* victim) + { + if (victim == me) + return; + + Talk(SAY_SLAY); + } + }; + +}; + +void AddSC_boss_salramm() +{ + new boss_salramm(); +} -- cgit v1.2.3