diff options
| author | Shauren <shauren.trinity@gmail.com> | 2013-06-23 14:51:52 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2013-06-23 14:51:52 +0200 |
| commit | 3f3a32df3498368be953c3f0fbcfabe6aa6f28f9 (patch) | |
| tree | 33425be0cc4338bbae28bc79236ac0237a8d5bb1 /src/server/scripts/Kalimdor | |
| parent | 6cbced8e1665415f42de3f46164121fe26bbb984 (diff) | |
| parent | 89466f76acd9fc8562f80d5c6df75eac84bfdae2 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'src/server/scripts/Kalimdor')
31 files changed, 392 insertions, 384 deletions
diff --git a/src/server/scripts/Kalimdor/CMakeLists.txt b/src/server/scripts/Kalimdor/CMakeLists.txt index 6f145d3e9a4..0e7b1f6c2b6 100644 --- a/src/server/scripts/Kalimdor/CMakeLists.txt +++ b/src/server/scripts/Kalimdor/CMakeLists.txt @@ -46,12 +46,12 @@ set(scripts_STAT_SRCS Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h - Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h - Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp - Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp - Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp - Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp - Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp + Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h + Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp + Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp + Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp + Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp + Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp Kalimdor/BlackfathomDeeps/boss_kelris.cpp Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp Kalimdor/BlackfathomDeeps/boss_gelihast.cpp diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 332ac33c56b..9b1f2475c1b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -456,7 +456,7 @@ public: if (me->HasAura(chargeSpell)) { me->RemoveAuraFromStack(chargeSpell); - DoCast(me->GetVictim(), unleashSpell); + DoCastVictim(unleashSpell); HasCast = true; SoulChargeCount--; } @@ -577,7 +577,7 @@ public: { if (HandOfDeathTimer <= diff) { - DoCast(me->GetVictim(), SPELL_HAND_OF_DEATH); + DoCastVictim(SPELL_HAND_OF_DEATH); HandOfDeathTimer = 2000; } else HandOfDeathTimer -= diff; return; // Don't do anything after this point. @@ -605,7 +605,7 @@ public: if (FearTimer <= diff) { - DoCast(me->GetVictim(), SPELL_FEAR); + DoCastVictim(SPELL_FEAR); FearTimer = 42000; } else FearTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index f47ba2cc3a3..b45ace791fc 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -161,7 +161,7 @@ public: if (CleaveTimer <= diff) { - DoCast(me->GetVictim(), SPELL_CLEAVE); + DoCastVictim(SPELL_CLEAVE); CleaveTimer = 10000+rand()%5000; } else CleaveTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp index 6d9a66c1a64..966aed69374 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp @@ -139,13 +139,13 @@ public: } else FrostArmorTimer -= diff; if (DecayTimer <= diff) { - DoCast(me->GetVictim(), SPELL_DEATH_AND_DECAY); + DoCastVictim(SPELL_DEATH_AND_DECAY); DecayTimer = 60000+rand()%20000; Talk(SAY_DECAY); } else DecayTimer -= diff; if (NovaTimer <= diff) { - DoCast(me->GetVictim(), SPELL_FROST_NOVA); + DoCastVictim(SPELL_FROST_NOVA); NovaTimer = 30000+rand()%15000; Talk(SAY_NOVA); } else NovaTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 9796614d2f2..df928f30f21 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -528,7 +528,7 @@ public: } if (FlameBuffetTimer <= diff) { - DoCast(me->GetVictim(), SPELL_FLAME_BUFFET, true); + DoCastVictim(SPELL_FLAME_BUFFET, true); FlameBuffetTimer = 7000; } else FlameBuffetTimer -= diff; DoMeleeAttackIfReady(); @@ -630,7 +630,7 @@ public: return; if (KnockDownTimer <= diff) { - DoCast(me->GetVictim(), SPELL_KNOCKDOWN); + DoCastVictim(SPELL_KNOCKDOWN); KnockDownTimer = 15000+rand()%10000; } else KnockDownTimer -= diff; DoMeleeAttackIfReady(); @@ -858,7 +858,7 @@ public: if (ShadowBoltTimer <= diff) { - DoCast(me->GetVictim(), SPELL_SHADOW_BOLT); + DoCastVictim(SPELL_SHADOW_BOLT); ShadowBoltTimer = 20000+rand()%10000; } else ShadowBoltTimer -= diff; @@ -952,12 +952,12 @@ public: return; if (CourseTimer <= diff) { - DoCast(me->GetVictim(), SPELL_BANSHEE_CURSE); + DoCastVictim(SPELL_BANSHEE_CURSE); CourseTimer = 20000+rand()%5000; } else CourseTimer -= diff; if (WailTimer <= diff) { - DoCast(me->GetVictim(), SPELL_BANSHEE_WAIL); + DoCastVictim(SPELL_BANSHEE_WAIL); WailTimer = 15000+rand()%5000; } else WailTimer -= diff; if (ShellTimer <= diff) @@ -1052,7 +1052,7 @@ public: return; if (WebTimer <= diff) { - DoCast(me->GetVictim(), SPELL_WEB); + DoCastVictim(SPELL_WEB); WebTimer = 20000+rand()%5000; } else WebTimer -= diff; DoMeleeAttackIfReady(); @@ -1142,7 +1142,7 @@ public: return; if (ManaBurnTimer <= diff) { - DoCast(me->GetVictim(), SPELL_MANA_BURN); + DoCastVictim(SPELL_MANA_BURN); ManaBurnTimer = 9000+rand()%5000; } else ManaBurnTimer -= diff; DoMeleeAttackIfReady(); @@ -1252,7 +1252,7 @@ public: { if (!me->IsWithinDist(me->GetVictim(), 25)) { - DoCast(me->GetVictim(), SPELL_FROST_BREATH); + DoCastVictim(SPELL_FROST_BREATH); me->StopMoving(); me->GetMotionMaster()->Clear(); FrostBreathTimer = 4000; @@ -1387,7 +1387,7 @@ public: { if (me->IsWithinDist(me->GetVictim(), 20)) { - DoCast(me->GetVictim(), SPELL_GARGOYLE_STRIKE); + DoCastVictim(SPELL_GARGOYLE_STRIKE); me->StopMoving(); me->GetMotionMaster()->Clear(); StrikeTimer = 2000+rand()%1000; 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 index c12171486ae..ba4439907ba 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp @@ -105,7 +105,7 @@ public: //Curse of twisted flesh timer if (uiCurseFleshTimer <= diff) { - DoCast(me->GetVictim(), SPELL_CURSE_OF_TWISTED_FLESH); + DoCastVictim(SPELL_CURSE_OF_TWISTED_FLESH); uiCurseFleshTimer = 37000; } else uiCurseFleshTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h deleted file mode 100644 index 490ac4c2e50..00000000000 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef DEF_DARKPORTAL_H -#define DEF_DARKPORTAL_H - -#define TYPE_MEDIVH 1 -#define TYPE_RIFT 2 - -#define DATA_MEDIVH 10 -#define DATA_PORTAL_COUNT 11 -#define DATA_SHIELD 12 - -#define WORLD_STATE_BM 2541 -#define WORLD_STATE_BM_SHIELD 2540 -#define WORLD_STATE_BM_RIFT 2784 - -#define QUEST_OPENING_PORTAL 10297 -#define QUEST_MASTER_TOUCH 9836 - -#define C_TIME_KEEPER 17918 -#define C_RKEEP 21104 -#define C_RLORD 17839 -#define C_DEJA 17879 -#define C_TEMPO 17880 -#define C_AEONUS 17881 -#define C_ASSAS 17835 -#define C_WHELP 21818 -#define C_CHRON 17892 -#define C_EXECU 18994 -#define C_VANQU 18995 - -#endif - diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp index c5828966438..31e3c033833 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp @@ -126,7 +126,7 @@ public: //Hammer of Justice if (HammerOfJustice_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_HAMMER_OF_JUSTICE); + DoCastVictim(SPELL_HAMMER_OF_JUSTICE); HammerOfJustice_Timer = 60000; } else HammerOfJustice_Timer -= diff; @@ -147,7 +147,7 @@ public: //Consecration if (Consecration_Timer <= diff) { - //DoCast(me->GetVictim(), SPELL_CONSECRATION); + //DoCastVictim(SPELL_CONSECRATION); Consecration_Timer = urand(5000, 10000); } else Consecration_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp index 7421a116ec0..4352740e6f4 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp @@ -107,7 +107,7 @@ public: if (me->IsNonMeleeSpellCasted(false)) me->InterruptNonMeleeSpells(false); - DoCast(me->GetVictim(), SPELL_SAND_BREATH); + DoCastVictim(SPELL_SAND_BREATH); Talk(SAY_BREATH); @@ -116,7 +116,7 @@ public: if (ImpendingDeath_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_IMPENDING_DEATH); + DoCastVictim(SPELL_IMPENDING_DEATH); ImpendingDeath_Timer = 25000+rand()%5000; } else ImpendingDeath_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp index 1fb704fb67e..db2d965f761 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp @@ -166,7 +166,7 @@ public: //Whirlwind if (Whirlwind_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_WHIRLWIND); + DoCastVictim(SPELL_WHIRLWIND); Whirlwind_Timer = 20000+rand()%5000; } else Whirlwind_Timer -= diff; @@ -174,7 +174,7 @@ public: if (Fear_Timer <= diff) { Talk(SAY_SHOUT); - DoCast(me->GetVictim(), SPELL_FRIGHTENING_SHOUT); + DoCastVictim(SPELL_FRIGHTENING_SHOUT); Fear_Timer = 25000+rand()%10000; } else Fear_Timer -= diff; @@ -182,7 +182,7 @@ public: if (MortalStrike_Timer <= diff) { Talk(SAY_MORTAL); - DoCast(me->GetVictim(), SPELL_MORTAL_STRIKE); + DoCastVictim(SPELL_MORTAL_STRIKE); MortalStrike_Timer = 20000+rand()%10000; } else MortalStrike_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp index 72e1cacbb48..498a4368168 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp @@ -16,18 +16,18 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Boss_Aeonus -SD%Complete: 80 -SDComment: Some spells not implemented -SDCategory: Caverns of Time, The Dark Portal -EndScriptData */ +/* +Name: Boss_Aeonus +%Complete: 80 +Comment: Some spells not implemented +Category: Caverns of Time, The Dark Portal +*/ #include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "dark_portal.h" +#include "the_black_morass.h" -enum eEnums +enum Enums { SAY_ENTER = 0, SAY_AGGRO = 1, @@ -43,45 +43,37 @@ enum eEnums H_SPELL_SAND_BREATH = 39049 }; +enum Events +{ + EVENT_SANDBREATH = 1, + EVENT_TIMESTOP = 2, + EVENT_FRENZY = 3 +}; + class boss_aeonus : public CreatureScript { public: boss_aeonus() : CreatureScript("boss_aeonus") { } - CreatureAI* GetAI(Creature* creature) const + struct boss_aeonusAI : public BossAI { - return new boss_aeonusAI (creature); - } + boss_aeonusAI(Creature* creature) : BossAI(creature, TYPE_AEONUS) { } - struct boss_aeonusAI : public ScriptedAI - { - boss_aeonusAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - } - - InstanceScript* instance; - - uint32 SandBreath_Timer; - uint32 TimeStop_Timer; - uint32 Frenzy_Timer; - - void Reset() - { - SandBreath_Timer = 15000+rand()%15000; - TimeStop_Timer = 10000+rand()%5000; - Frenzy_Timer = 30000+rand()%15000; - } + void Reset() { } void EnterCombat(Unit* /*who*/) { + events.ScheduleEvent(EVENT_SANDBREATH, urand(15000, 30000)); + events.ScheduleEvent(EVENT_TIMESTOP, urand(10000, 15000)); + events.ScheduleEvent(EVENT_FRENZY, urand(30000, 45000)); + Talk(SAY_AGGRO); } void MoveInLineOfSight(Unit* who) { //Despawn Time Keeper - if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == C_TIME_KEEPER) + if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) { if (me->IsWithinDistInMap(who, 20.0f)) { @@ -100,7 +92,7 @@ public: if (instance) { instance->SetData(TYPE_RIFT, DONE); - instance->SetData(TYPE_MEDIVH, DONE);//FIXME: later should be removed + instance->SetData(TYPE_MEDIVH, DONE); // FIXME: later should be removed } } @@ -115,32 +107,40 @@ public: if (!UpdateVictim()) return; - //Sand Breath - if (SandBreath_Timer <= diff) - { - DoCast(me->GetVictim(), SPELL_SAND_BREATH); - SandBreath_Timer = 15000+rand()%10000; - } else SandBreath_Timer -= diff; + events.Update(diff); - //Time Stop - if (TimeStop_Timer <= diff) - { - DoCast(me->GetVictim(), SPELL_TIME_STOP); - TimeStop_Timer = 20000+rand()%15000; - } else TimeStop_Timer -= diff; + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - //Frenzy - if (Frenzy_Timer <= diff) - { - Talk(EMOTE_FRENZY); - DoCast(me, SPELL_ENRAGE); - Frenzy_Timer = 20000+rand()%15000; - } else Frenzy_Timer -= diff; + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SANDBREATH: + DoCastVictim(SPELL_SAND_BREATH); + events.ScheduleEvent(EVENT_SANDBREATH, urand(15000, 25000)); + break; + case EVENT_TIMESTOP: + DoCastVictim(SPELL_TIME_STOP); + events.ScheduleEvent(EVENT_TIMESTOP, urand(20000, 35000)); + break; + case EVENT_FRENZY: + Talk(EMOTE_FRENZY); + DoCast(me, SPELL_ENRAGE); + events.ScheduleEvent(EVENT_FRENZY, urand(20000, 35000)); + break; + default: + break; + } + } + DoMeleeAttackIfReady(); + } - DoMeleeAttackIfReady(); + CreatureAI* GetAI(Creature* creature) const + { + return new boss_aeonusAI (creature); } }; - }; void AddSC_boss_aeonus() diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp index 03ab0f193f4..d02dc0dd359 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp @@ -16,18 +16,18 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Boss_Chrono_Lord_Deja -SD%Complete: 65 -SDComment: All abilities not implemented -SDCategory: Caverns of Time, The Dark Portal -EndScriptData */ +/* +Name: Boss_Chrono_Lord_Deja +%Complete: 65 +Comment: All abilities not implemented +Category: Caverns of Time, The Black Morass +*/ #include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "dark_portal.h" +#include "the_black_morass.h" -enum eEnums +enum Enums { SAY_ENTER = 0, SAY_AGGRO = 1, @@ -43,47 +43,40 @@ enum eEnums SPELL_ATTRACTION = 38540 //Not Implemented (Heroic mode) }; +enum Events +{ + EVENT_ARCANE_BLAST = 1, + EVENT_TIME_LAPSE = 2, + EVENT_ARCANE_DISCHARGE = 3, + EVENT_ATTRACTION = 4 +}; + class boss_chrono_lord_deja : public CreatureScript { public: boss_chrono_lord_deja() : CreatureScript("boss_chrono_lord_deja") { } - CreatureAI* GetAI(Creature* creature) const + struct boss_chrono_lord_dejaAI : public BossAI { - return new boss_chrono_lord_dejaAI (creature); - } + boss_chrono_lord_dejaAI(Creature* creature) : BossAI(creature, TYPE_CRONO_LORD_DEJA) { } - struct boss_chrono_lord_dejaAI : public ScriptedAI - { - boss_chrono_lord_dejaAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - } - - InstanceScript* instance; - - uint32 ArcaneBlast_Timer; - uint32 TimeLapse_Timer; - uint32 Attraction_Timer; - uint32 ArcaneDischarge_Timer; - - void Reset() - { - ArcaneBlast_Timer = 18000+rand()%5000; - TimeLapse_Timer = 10000+rand()%5000; - ArcaneDischarge_Timer = 20000+rand()%10000; - Attraction_Timer = 25000+rand()%10000; - } + void Reset() { } void EnterCombat(Unit* /*who*/) { + events.ScheduleEvent(EVENT_ARCANE_BLAST, urand(18000, 23000)); + events.ScheduleEvent(EVENT_TIME_LAPSE, urand(10000, 15000)); + events.ScheduleEvent(EVENT_ARCANE_DISCHARGE, urand(20000, 30000)); + if (IsHeroic()) + events.ScheduleEvent(EVENT_ATTRACTION, urand(25000, 35000)); + Talk(SAY_AGGRO); } void MoveInLineOfSight(Unit* who) { //Despawn Time Keeper - if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == C_TIME_KEEPER) + if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) { if (me->IsWithinDistInMap(who, 20.0f)) { @@ -110,46 +103,49 @@ public: void UpdateAI(uint32 diff) { - //Return since we have no target if (!UpdateVictim()) return; - //Arcane Blast - if (ArcaneBlast_Timer <= diff) - { - DoCast(me->GetVictim(), SPELL_ARCANE_BLAST); - ArcaneBlast_Timer = 15000+rand()%10000; - } else ArcaneBlast_Timer -= diff; - - //Arcane Discharge - if (ArcaneDischarge_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_ARCANE_DISCHARGE); - ArcaneDischarge_Timer = 20000+rand()%10000; - } else ArcaneDischarge_Timer -= diff; + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - //Time Lapse - if (TimeLapse_Timer <= diff) - { - Talk(SAY_BANISH); - DoCast(me, SPELL_TIME_LAPSE); - TimeLapse_Timer = 15000+rand()%10000; - } else TimeLapse_Timer -= diff; + events.Update(diff); - if (IsHeroic()) + while (uint32 eventId = events.ExecuteEvent()) { - if (Attraction_Timer <= diff) + switch (eventId) { - DoCast(me, SPELL_ATTRACTION); - Attraction_Timer = 25000+rand()%10000; - } else Attraction_Timer -= diff; + case EVENT_ARCANE_BLAST: + DoCastVictim(SPELL_ARCANE_BLAST); + events.ScheduleEvent(EVENT_ARCANE_BLAST, urand(15000, 25000)); + break; + case EVENT_TIME_LAPSE: + Talk(SAY_BANISH); + DoCast(me, SPELL_TIME_LAPSE); + events.ScheduleEvent(EVENT_TIME_LAPSE, urand(15000, 25000)); + break; + case EVENT_ARCANE_DISCHARGE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_ARCANE_DISCHARGE); + events.ScheduleEvent(EVENT_ARCANE_DISCHARGE, urand(20000, 30000)); + break; + case EVENT_ATTRACTION: // Only in Heroic + DoCast(me, SPELL_ATTRACTION); + events.ScheduleEvent(EVENT_ATTRACTION, urand(25000, 35000)); + break; + default: + break; + } } DoMeleeAttackIfReady(); } - }; + CreatureAI* GetAI(Creature* creature) const + { + return new boss_chrono_lord_dejaAI (creature); + } + }; }; void AddSC_boss_chrono_lord_deja() diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp index e224094b1f9..8ded2388083 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp @@ -16,18 +16,18 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Boss_Temporus -SD%Complete: 75 -SDComment: More abilities need to be implemented -SDCategory: Caverns of Time, The Dark Portal -EndScriptData */ +/* +Name: Boss_Temporus +%Complete: 75 +Comment: More abilities need to be implemented +Category: Caverns of Time, The Black Morass +*/ #include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "dark_portal.h" +#include "the_black_morass.h" -enum eEnums +enum Enums { SAY_ENTER = 0, SAY_AGGRO = 1, @@ -42,40 +42,33 @@ enum eEnums SPELL_REFLECT = 38592 //Not Implemented (Heroic mod) }; +enum Events +{ + EVENT_HASTE = 1, + EVENT_MORTAL_WOUND = 2, + EVENT_WING_BUFFET = 3, + EVENT_SPELL_REFLECTION = 4 +}; + class boss_temporus : public CreatureScript { public: boss_temporus() : CreatureScript("boss_temporus") { } - CreatureAI* GetAI(Creature* creature) const - { - return new boss_temporusAI (creature); - } - - struct boss_temporusAI : public ScriptedAI + struct boss_temporusAI : public BossAI { - boss_temporusAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - } - - InstanceScript* instance; + boss_temporusAI(Creature* creature) : BossAI(creature, TYPE_TEMPORUS) { } - uint32 Haste_Timer; - uint32 SpellReflection_Timer; - uint32 MortalWound_Timer; - uint32 WingBuffet_Timer; - - void Reset() - { - Haste_Timer = 15000+rand()%8000; - SpellReflection_Timer = 30000; - MortalWound_Timer = 8000; - WingBuffet_Timer = 25000+rand()%10000; - } + void Reset() { } void EnterCombat(Unit* /*who*/) { + events.ScheduleEvent(EVENT_HASTE, urand(15000, 23000)); + events.ScheduleEvent(EVENT_MORTAL_WOUND, 8000); + events.ScheduleEvent(EVENT_WING_BUFFET, urand(25000, 35000)); + if (IsHeroic()) + events.ScheduleEvent(EVENT_SPELL_REFLECTION, 30000); + Talk(SAY_AGGRO); } @@ -95,7 +88,7 @@ public: void MoveInLineOfSight(Unit* who) { //Despawn Time Keeper - if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == C_TIME_KEEPER) + if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) { if (me->IsWithinDistInMap(who, 20.0f)) { @@ -114,37 +107,41 @@ public: if (!UpdateVictim()) return; - //Attack Haste - if (Haste_Timer <= diff) - { - DoCast(me, SPELL_HASTE); - Haste_Timer = 20000+rand()%5000; - } else Haste_Timer -= diff; - - //MortalWound_Timer - if (MortalWound_Timer <= diff) - { - DoCast(me, SPELL_MORTAL_WOUND); - MortalWound_Timer = 10000+rand()%10000; - } else MortalWound_Timer -= diff; + events.Update(diff); - //Wing ruffet - if (WingBuffet_Timer <= diff) - { - DoCast(me, SPELL_WING_BUFFET); - WingBuffet_Timer = 20000+rand()%10000; - } else WingBuffet_Timer -= diff; + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - if (IsHeroic()) - { - if (SpellReflection_Timer <= diff) + while (uint32 eventId = events.ExecuteEvent()) { - DoCast(me, SPELL_REFLECT); - SpellReflection_Timer = 25000+rand()%10000; - } else SpellReflection_Timer -= diff; - } + switch (eventId) + { + case EVENT_HASTE: + DoCast(me, SPELL_HASTE); + events.ScheduleEvent(EVENT_HASTE, urand(20000, 25000)); + break; + case EVENT_MORTAL_WOUND: + DoCast(me, SPELL_MORTAL_WOUND); + events.ScheduleEvent(EVENT_MORTAL_WOUND, urand(10000, 20000)); + break; + case EVENT_WING_BUFFET: + DoCast(me, SPELL_WING_BUFFET); + events.ScheduleEvent(EVENT_WING_BUFFET, urand(20000, 30000)); + break; + case EVENT_SPELL_REFLECTION: // Only in Heroic + DoCast(me, SPELL_REFLECT); + events.ScheduleEvent(EVENT_SPELL_REFLECTION, urand(25000, 35000)); + break; + default: + break; + } + } + DoMeleeAttackIfReady(); + } - DoMeleeAttackIfReady(); + CreatureAI* GetAI(Creature* creature) const + { + return new boss_temporusAI (creature); } }; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp index 1278688d7ad..7d76cce6ddb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp @@ -16,30 +16,28 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Instance_Dark_Portal -SD%Complete: 50 -SDComment: Quest support: 9836, 10297. Currently in progress. -SDCategory: Caverns of Time, The Dark Portal -EndScriptData */ +/* +Name: Instance_The_Black_Morass +%Complete: 50 +Comment: Quest support: 9836, 10297. Currently in progress. +Category: Caverns of Time, The Black Morass +*/ #include "ScriptMgr.h" #include "InstanceScript.h" -#include "dark_portal.h" +#include "the_black_morass.h" #include "Player.h" #include "TemporarySummon.h" #include "SpellInfo.h" +#include "ScriptedCreature.h" -#define MAX_ENCOUNTER 2 - -#define C_MEDIVH 15608 -#define C_TIME_RIFT 17838 - -#define SPELL_RIFT_CHANNEL 31387 - -#define RIFT_BOSS 1 +enum Misc +{ + SPELL_RIFT_CHANNEL = 31387, + RIFT_BOSS = 1 +}; -inline uint32 RandRiftBoss() { return ((rand()%2) ? C_RKEEP : C_RLORD); } +inline uint32 RandRiftBoss() { return ((rand()%2) ? NPC_RIFT_KEEPER : NPC_RIFT_LORD); } float PortalLocation[4][4]= { @@ -57,45 +55,46 @@ struct Wave static Wave RiftWaves[]= { - {RIFT_BOSS, 0}, - {C_DEJA, 0}, - {RIFT_BOSS, 120000}, - {C_TEMPO, 140000}, - {RIFT_BOSS, 120000}, - {C_AEONUS, 0} + { RIFT_BOSS, 0 }, + { NPC_CRONO_LORD_DEJA, 0 }, + { RIFT_BOSS, 120000 }, + { NPC_TEMPORUS, 140000 }, + { RIFT_BOSS, 120000 }, + { NPC_AEONUS, 0 } +}; + +enum EventIds +{ + EVENT_NEXT_PORTAL = 1 }; -class instance_dark_portal : public InstanceMapScript +class instance_the_black_morass : public InstanceMapScript { public: - instance_dark_portal() : InstanceMapScript("instance_dark_portal", 269) { } + instance_the_black_morass() : InstanceMapScript("instance_the_black_morass", 269) { } InstanceScript* GetInstanceScript(InstanceMap* map) const { - return new instance_dark_portal_InstanceMapScript(map); + return new instance_the_black_morass_InstanceMapScript(map); } - struct instance_dark_portal_InstanceMapScript : public InstanceScript + struct instance_the_black_morass_InstanceMapScript : public InstanceScript { - instance_dark_portal_InstanceMapScript(Map* map) : InstanceScript(map) - { - } + instance_the_black_morass_InstanceMapScript(Map* map) : InstanceScript(map) { } - uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_auiEncounter[EncounterCount]; uint32 mRiftPortalCount; uint32 mShieldPercent; - uint8 mRiftWaveCount; - uint8 mRiftWaveId; - - uint32 NextPortal_Timer; + uint8 mRiftWaveCount; + uint8 mRiftWaveId; - uint64 MedivhGUID; - uint8 CurrentRiftId; + uint64 _medivhGUID; + uint8 _currentRiftId; void Initialize() { - MedivhGUID = 0; + _medivhGUID = 0; Clear(); } @@ -108,9 +107,7 @@ public: mRiftWaveCount = 0; mRiftWaveId = 0; - CurrentRiftId = 0; - - NextPortal_Timer = 0; + _currentRiftId = 0; } void InitWorldState(bool Enable = true) @@ -138,8 +135,8 @@ public: void OnCreatureCreate(Creature* creature) { - if (creature->GetEntry() == C_MEDIVH) - MedivhGUID = creature->GetGUID(); + if (creature->GetEntry() == NPC_MEDIVH) + _medivhGUID = creature->GetGUID(); } //what other conditions to check? @@ -181,11 +178,11 @@ public: if (!mShieldPercent) { - if (Creature* pMedivh = instance->GetCreature(MedivhGUID)) + if (Creature* medivh = instance->GetCreature(_medivhGUID)) { - if (pMedivh->IsAlive()) + if (medivh->IsAlive()) { - pMedivh->DealDamage(pMedivh, pMedivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + medivh->DealDamage(medivh, medivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_auiEncounter[0] = FAIL; m_auiEncounter[1] = NOT_STARTED; } @@ -196,16 +193,16 @@ public: { if (data == IN_PROGRESS) { - TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: Starting event."); + TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Starting event."); InitWorldState(); m_auiEncounter[1] = IN_PROGRESS; - NextPortal_Timer = 15000; + Events.ScheduleEvent(EVENT_NEXT_PORTAL, 15000); } if (data == DONE) { //this may be completed further out in the post-event - TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: Event completed."); + TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Event completed."); Map::PlayerList const& players = instance->GetPlayers(); if (!players.isEmpty()) @@ -231,7 +228,7 @@ public: if (data == SPECIAL) { if (mRiftPortalCount < 7) - NextPortal_Timer = 5000; + Events.ScheduleEvent(EVENT_NEXT_PORTAL, 5000); } else m_auiEncounter[1] = data; @@ -258,7 +255,7 @@ public: uint64 GetData64(uint32 data) const { if (data == DATA_MEDIVH) - return MedivhGUID; + return _medivhGUID; return 0; } @@ -270,7 +267,7 @@ public: if (entry == RIFT_BOSS) entry = RandRiftBoss(); - TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: Summoning rift boss entry %u.", entry); + TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Summoning rift boss entry %u.", entry); Position pos; me->GetRandomNearPosition(pos, 10.0f); @@ -281,24 +278,24 @@ public: if (Creature* summon = me->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) return summon; - TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: What just happened there? No boss, no loot, no fun..."); + TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: What just happened there? No boss, no loot, no fun..."); return NULL; } void DoSpawnPortal() { - if (Creature* pMedivh = instance->GetCreature(MedivhGUID)) + if (Creature* medivh = instance->GetCreature(_medivhGUID)) { uint8 tmp = urand(0, 2); - if (tmp >= CurrentRiftId) + if (tmp >= _currentRiftId) ++tmp; - TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).", tmp, CurrentRiftId); + TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Creating Time Rift at locationId %i (old locationId was %u).", tmp, _currentRiftId); - CurrentRiftId = tmp; + _currentRiftId = tmp; - Creature* temp = pMedivh->SummonCreature(C_TIME_RIFT, + Creature* temp = medivh->SummonCreature(NPC_TIME_RIFT, PortalLocation[tmp][0], PortalLocation[tmp][1], PortalLocation[tmp][2], PortalLocation[tmp][3], TEMPSUMMON_CORPSE_DESPAWN, 0); if (temp) @@ -306,14 +303,14 @@ public: temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - if (Creature* pBoss = SummonedPortalBoss(temp)) + if (Creature* boss = SummonedPortalBoss(temp)) { - if (pBoss->GetEntry() == C_AEONUS) - pBoss->AddThreat(pMedivh, 0.0f); + if (boss->GetEntry() == NPC_AEONUS) + boss->AddThreat(medivh, 0.0f); else { - pBoss->AddThreat(temp, 0.0f); - temp->CastSpell(pBoss, SPELL_RIFT_CHANNEL, false); + boss->AddThreat(temp, 0.0f); + temp->CastSpell(boss, SPELL_RIFT_CHANNEL, false); } } } @@ -332,24 +329,24 @@ public: return; } - if (NextPortal_Timer) - { - if (NextPortal_Timer <= diff) - { - ++mRiftPortalCount; - - DoUpdateWorldState(WORLD_STATE_BM_RIFT, mRiftPortalCount); + Events.Update(diff); - DoSpawnPortal(); - NextPortal_Timer = RiftWaves[GetRiftWaveId()].NextPortalTime; - } else NextPortal_Timer -= diff; + if (Events.ExecuteEvent() == EVENT_NEXT_PORTAL) + { + ++mRiftPortalCount; + DoUpdateWorldState(WORLD_STATE_BM_RIFT, mRiftPortalCount); + DoSpawnPortal(); + Events.ScheduleEvent(EVENT_NEXT_PORTAL, RiftWaves[GetRiftWaveId()].NextPortalTime); } } + + protected: + EventMap Events; }; }; -void AddSC_instance_dark_portal() +void AddSC_instance_the_black_morass() { - new instance_dark_portal(); + new instance_the_black_morass(); } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp index ca60a0ca0ef..d27b4b330b4 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp @@ -16,12 +16,12 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Dark_Portal -SD%Complete: 30 -SDComment: Misc NPC's and mobs for instance. Most here far from complete. -SDCategory: Caverns of Time, The Dark Portal -EndScriptData */ +/* +Name: The_Black_Morass +%Complete: 30 +Comment: Misc NPC's and mobs for instance. Most here far from complete. +Category: Caverns of Time, The Black Morass +*/ /* ContentData npc_medivh_bm @@ -32,7 +32,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" -#include "dark_portal.h" +#include "the_black_morass.h" #include "Player.h" #include "SpellInfo.h" @@ -125,12 +125,12 @@ public: return; uint32 entry = who->GetEntry(); - if (entry == C_ASSAS || entry == C_WHELP || entry == C_CHRON || entry == C_EXECU || entry == C_VANQU) + if (entry == NPC_INFINITE_ASSASIN || entry == NPC_INFINITE_WHELP || entry == NPC_INFINITE_CRONOMANCER || entry == NPC_INFINITE_EXECUTIONER || entry == NPC_INFINITE_VANQUISHER) { who->StopMoving(); who->CastSpell(me, SPELL_CORRUPT, false); } - else if (entry == C_AEONUS) + else if (entry == NPC_AEONUS) { who->StopMoving(); who->CastSpell(me, SPELL_CORRUPT_AEONUS, false); @@ -251,9 +251,9 @@ struct Wave static Wave PortalWaves[]= { - { {C_ASSAS, C_WHELP, C_CHRON, 0} }, - { {C_EXECU, C_CHRON, C_WHELP, C_ASSAS} }, - { {C_EXECU, C_VANQU, C_CHRON, C_ASSAS} } + { {NPC_INFINITE_ASSASIN, NPC_INFINITE_WHELP, NPC_INFINITE_CRONOMANCER, 0} }, + { {NPC_INFINITE_EXECUTIONER, NPC_INFINITE_CRONOMANCER, NPC_INFINITE_WHELP, NPC_INFINITE_ASSASIN} }, + { {NPC_INFINITE_EXECUTIONER, NPC_INFINITE_VANQUISHER, NPC_INFINITE_CRONOMANCER, NPC_INFINITE_ASSASIN} } }; class npc_time_rift : public CreatureScript @@ -335,7 +335,7 @@ public: ++mRiftWaveCount; - if (entry == C_WHELP) + if (entry == NPC_INFINITE_WHELP) { for (uint8 i = 0; i < 3; ++i) DoSummonAtRift(entry); @@ -414,7 +414,7 @@ public: }; -void AddSC_dark_portal() +void AddSC_the_black_morass() { new npc_medivh_bm(); new npc_time_rift(); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h new file mode 100644 index 00000000000..729eb42e9c5 --- /dev/null +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef DEF_THEBLACKMORASS_H +#define DEF_THEBLACKMORASS_H + +uint32 const EncounterCount = 2; + +enum DataTypes +{ + TYPE_MEDIVH = 1, + TYPE_RIFT = 2, + TYPE_AEONUS = 3, + TYPE_TEMPORUS = 4, + TYPE_CRONO_LORD_DEJA = 5, + DATA_MEDIVH = 10, + DATA_PORTAL_COUNT = 11, + DATA_SHIELD = 12 +}; + +enum WorldStateIds +{ + WORLD_STATE_BM = 2541, + WORLD_STATE_BM_SHIELD = 2540, + WORLD_STATE_BM_RIFT = 2784 +}; + +enum QuestIds +{ + QUEST_OPENING_PORTAL = 10297, + QUEST_MASTER_TOUCH = 9836 +}; + +enum CreatureIds +{ + NPC_MEDIVH = 15608, + NPC_TIME_RIFT = 17838, + NPC_TIME_KEEPER = 17918, + NPC_RIFT_KEEPER = 21104, + NPC_RIFT_LORD = 17839, + NPC_CRONO_LORD_DEJA = 17879, + NPC_TEMPORUS = 17880, + NPC_AEONUS = 17881, + NPC_INFINITE_ASSASIN = 17835, + NPC_INFINITE_WHELP = 21818, + NPC_INFINITE_CRONOMANCER = 17892, + NPC_INFINITE_EXECUTIONER = 18994, + NPC_INFINITE_VANQUISHER = 18995 +}; + +#endif + diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp index d2d5c45d864..46ef908bf37 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp @@ -89,14 +89,14 @@ public: //AmnenarsWrath_Timer if (AmnenarsWrath_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_AMNENNARSWRATH); + DoCastVictim(SPELL_AMNENNARSWRATH); AmnenarsWrath_Timer = 12000; } else AmnenarsWrath_Timer -= diff; //FrostBolt_Timer if (FrostBolt_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_FROSTBOLT); + DoCastVictim(SPELL_FROSTBOLT); FrostBolt_Timer = 8000; } else FrostBolt_Timer -= diff; @@ -109,7 +109,7 @@ public: if (!Spectrals60 && HealthBelowPct(60)) { Talk(SAY_SUMMON60); - DoCast(me->GetVictim(), SPELL_FROST_SPECTRES); + DoCastVictim(SPELL_FROST_SPECTRES); Spectrals60 = true; } @@ -122,7 +122,7 @@ public: if (!Spectrals30 && HealthBelowPct(30)) { Talk(SAY_SUMMON30); - DoCast(me->GetVictim(), SPELL_FROST_SPECTRES); + DoCastVictim(SPELL_FROST_SPECTRES); Spectrals30 = true; } diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp index 8bea6c5d058..6b63c98e7d8 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp @@ -152,7 +152,7 @@ public: { if (uiWebTimer <= uiDiff) { - DoCast(me->GetVictim(), SPELL_WEB); + DoCastVictim(SPELL_WEB); uiWebTimer = urand(7000, 16000); } else uiWebTimer -= uiDiff; } diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index 0d49302bec3..bd5f76c0c85 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -221,7 +221,7 @@ class boss_ossirian : public CreatureScript // No kiting! if (me->GetDistance(me->GetVictim()) > 60.00f && me->GetDistance(me->GetVictim()) < 120.00f) - DoCast(me->GetVictim(), SPELL_SUMMON); + DoCastVictim(SPELL_SUMMON); bool ApplySupreme = true; @@ -254,7 +254,7 @@ class boss_ossirian : public CreatureScript events.ScheduleEvent(EVENT_SILENCE, urand(20000, 30000)); break; case EVENT_CYCLONE: - DoCast(me->GetVictim(), SPELL_CYCLONE); + DoCastVictim(SPELL_CYCLONE); events.ScheduleEvent(EVENT_CYCLONE, 20000); break; case EVENT_STOMP: diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp index 908d2a7a691..9935248c39e 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp @@ -98,20 +98,20 @@ public: //Cleave_Timer if (Cleave_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_CLEAVE); + DoCastVictim(SPELL_CLEAVE); Cleave_Timer = urand(5000, 12000); } else Cleave_Timer -= diff; //ToxicVolley_Timer if (ToxicVolley_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_TOXIC_VOLLEY); + DoCastVictim(SPELL_TOXIC_VOLLEY); ToxicVolley_Timer = urand(10000, 15000); } else ToxicVolley_Timer -= diff; if (!HealthAbovePct(5) && !Death) { - DoCast(me->GetVictim(), SPELL_POISON_CLOUD); + DoCastVictim(SPELL_POISON_CLOUD); Death = true; } @@ -209,7 +209,7 @@ public: //KnockBack_Timer if (KnockBack_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_KNOCKBACK); + DoCastVictim(SPELL_KNOCKBACK); if (DoGetThreat(me->GetVictim())) DoModifyThreatPercent(me->GetVictim(), -80); KnockBack_Timer = urand(15000, 25000); @@ -295,7 +295,7 @@ public: //Fear_Timer if (Fear_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_FEAR); + DoCastVictim(SPELL_FEAR); DoResetThreat(); Fear_Timer = 20000; } else Fear_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index b99b092dd7e..44b9999d9bc 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -1076,14 +1076,14 @@ public: //GroundRuptureTimer if (GroundRuptureTimer <= diff) { - DoCast(me->GetVictim(), SPELL_GROUND_RUPTURE); + DoCastVictim(SPELL_GROUND_RUPTURE); GroundRuptureTimer = 30000; } else GroundRuptureTimer -= diff; //HamstringTimer if (HamstringTimer <= diff) { - DoCast(me->GetVictim(), SPELL_HAMSTRING); + DoCastVictim(SPELL_HAMSTRING); HamstringTimer = 5000; } else HamstringTimer -= diff; @@ -1188,21 +1188,21 @@ public: //GroundRuptureTimer if (GroundRuptureTimer <= diff) { - DoCast(me->GetVictim(), SPELL_GROUND_RUPTURE); + DoCastVictim(SPELL_GROUND_RUPTURE); GroundRuptureTimer = 30000; } else GroundRuptureTimer -= diff; //ThrashTimer if (ThrashTimer <= diff) { - DoCast(me->GetVictim(), SPELL_THRASH); + DoCastVictim(SPELL_THRASH); ThrashTimer = 10000; } else ThrashTimer -= diff; //HamstringTimer if (HamstringTimer <= diff) { - DoCast(me->GetVictim(), SPELL_HAMSTRING); + DoCastVictim(SPELL_HAMSTRING); HamstringTimer = 10000; } else HamstringTimer -= diff; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index 44352c7ef35..4b442604881 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -106,7 +106,7 @@ public: //MortalWound_Timer if (MortalWound_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_MORTAL_WOUND); + DoCastVictim(SPELL_MORTAL_WOUND); MortalWound_Timer = urand(10000, 20000); } else MortalWound_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp index 206de40320f..5435de8c3ef 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp @@ -107,14 +107,14 @@ public: //Spit Timer if (Spit_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_ACIDSPIT); + DoCastVictim(SPELL_ACIDSPIT); Spit_Timer = urand(5000, 10000); } else Spit_Timer -= diff; //NoxiousPoison_Timer if (NoxiousPoison_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_NOXIOUSPOISON); + DoCastVictim(SPELL_NOXIOUSPOISON); NoxiousPoison_Timer = urand(12000, 24000); } else NoxiousPoison_Timer -= diff; @@ -123,7 +123,7 @@ public: { if (PoisonBolt_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_POISONBOLT); + DoCastVictim(SPELL_POISONBOLT); PoisonBolt_Timer = 3000; } else PoisonBolt_Timer -= diff; } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp index 84f35fdf9c0..d1cc2025be4 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp @@ -75,7 +75,7 @@ public: void EnterCombat(Unit* /*who*/) { - DoCast(me->GetVictim(), SPELL_BIRTH); + DoCastVictim(SPELL_BIRTH); } void UpdateAI(uint32 diff) @@ -87,14 +87,14 @@ public: //Sweep_Timer if (!Submerged && Sweep_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_SWEEP); + DoCastVictim(SPELL_SWEEP); Sweep_Timer = urand(15000, 30000); } else Sweep_Timer -= diff; //SandBlast_Timer if (!Submerged && SandBlast_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_SANDBLAST); + DoCastVictim(SPELL_SANDBLAST); SandBlast_Timer = urand(20000, 35000); } else SandBlast_Timer -= diff; @@ -129,7 +129,7 @@ public: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->setFaction(14); - DoCast(me->GetVictim(), SPELL_GROUND_RUPTURE); + DoCastVictim(SPELL_GROUND_RUPTURE); Submerged = false; Submerge_Timer = urand(60000, 120000); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index d4b73a2e4a6..833ba83432b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -441,7 +441,7 @@ public: //UnbalancingStrike_Timer if (UnbalancingStrike_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_UNBALANCING_STRIKE); + DoCastVictim(SPELL_UNBALANCING_STRIKE); UnbalancingStrike_Timer = 8000+rand()%12000; } else UnbalancingStrike_Timer -= diff; @@ -538,7 +538,7 @@ public: if (!me->IsWithinDist(me->GetVictim(), 45.0f)) me->GetMotionMaster()->MoveChase(me->GetVictim(), VEKLOR_DIST, 0); else - DoCast(me->GetVictim(), SPELL_SHADOWBOLT); + DoCastVictim(SPELL_SHADOWBOLT); ShadowBolt_Timer = 2000; } else ShadowBolt_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index fdbc40600a3..af76ea041a8 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -165,7 +165,7 @@ public: if (ShieldBash_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_SHIELD_BASH); + DoCastVictim(SPELL_SHIELD_BASH); ShieldBash_Timer = 15000; } else @@ -173,7 +173,7 @@ public: if (Revenge_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_REVENGE); + DoCastVictim(SPELL_REVENGE); Revenge_Timer = 10000; } else @@ -338,7 +338,7 @@ public: if (Bomb_Timer < diff) { - DoCast(me->GetVictim(), SPELL_BOMB); + DoCastVictim(SPELL_BOMB); Bomb_Timer = 10000; } else @@ -346,7 +346,7 @@ public: if (me->isAttackReady() && !me->IsWithinMeleeRange(me->GetVictim())) { - DoCast(me->GetVictim(), SPELL_SHOOT); + DoCastVictim(SPELL_SHOOT); me->SetSheath(SHEATH_STATE_RANGED); } else diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp index 1cb7d5cfd37..4f70191810a 100644 --- a/src/server/scripts/Kalimdor/boss_azuregos.cpp +++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp @@ -108,21 +108,21 @@ public: // //MarkOfFrostTimer // if (MarkOfFrostTimer <= diff) // { - // DoCast(me->GetVictim(), SPELL_MARKOFFROST); + // DoCastVictim(SPELL_MARKOFFROST); // MarkOfFrostTimer = 25000; // } else MarkOfFrostTimer -= diff; //ChillTimer if (ChillTimer <= diff) { - DoCast(me->GetVictim(), SPELL_CHILL); + DoCastVictim(SPELL_CHILL); ChillTimer = urand(13000, 25000); } else ChillTimer -= diff; //BreathTimer if (BreathTimer <= diff) { - DoCast(me->GetVictim(), SPELL_FROSTBREATH); + DoCastVictim(SPELL_FROSTBREATH); BreathTimer = urand(10000, 15000); } else BreathTimer -= diff; @@ -144,7 +144,7 @@ public: //CleaveTimer if (CleaveTimer <= diff) { - DoCast(me->GetVictim(), SPELL_CLEAVE); + DoCastVictim(SPELL_CLEAVE); CleaveTimer = 7000; } else CleaveTimer -= diff; diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp index 4d689d30508..315ee609bca 100644 --- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp +++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp @@ -133,7 +133,7 @@ class npc_torek : public CreatureScript if (Rend_Timer <= diff) { - DoCast(me->GetVictim(), SPELL_REND); + DoCastVictim(SPELL_REND); Rend_Timer = 20000; } else Rend_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 5fda8ee55ce..341d14863c4 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -273,7 +273,7 @@ public: if (DynamiteTimer <= diff) { - DoCast(me->GetVictim(), SPELL_DYNAMITE); + DoCastVictim(SPELL_DYNAMITE); DynamiteTimer = 8000; } else DynamiteTimer -= diff; @@ -633,14 +633,14 @@ public: if (RendTimer <= diff) { - DoCast(me->GetVictim(), SPELL_REND); + DoCastVictim(SPELL_REND); RendTimer = 30000; } else RendTimer -= diff; if (EnragingBiteTimer <= diff) { - DoCast(me->GetVictim(), SPELL_ENRAGING_BITE); + DoCastVictim(SPELL_ENRAGING_BITE); EnragingBiteTimer = 15000; } else EnragingBiteTimer -= diff; diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp index c2ee4f574d6..86b8955b4c6 100644 --- a/src/server/scripts/Kalimdor/zone_tanaris.cpp +++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp @@ -128,7 +128,7 @@ public: if (FrostShockTimer <= diff) { - DoCast(me->GetVictim(), SPELL_FROST_SHOCK); + DoCastVictim(SPELL_FROST_SHOCK); FrostShockTimer = 15000; } else FrostShockTimer -= diff; diff --git a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp index 4c7b00a03e7..74efa2ffaff 100644 --- a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp +++ b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp @@ -88,25 +88,25 @@ public: if (UppercutTimer <= diff) { - DoCast(me->GetVictim(), SPELL_UPPERCUT); + DoCastVictim(SPELL_UPPERCUT); UppercutTimer = 20000; } else UppercutTimer -= diff; if (ThunderclapTimer <= diff) { - DoCast(me->GetVictim(), SPELL_THUNDERCLAP); + DoCastVictim(SPELL_THUNDERCLAP); ThunderclapTimer = 15000; } else ThunderclapTimer -= diff; if (MortalStrikeTimer <= diff) { - DoCast(me->GetVictim(), SPELL_MORTAL_STRIKE); + DoCastVictim(SPELL_MORTAL_STRIKE); MortalStrikeTimer = 15000; } else MortalStrikeTimer -= diff; if (CleaveTimer <= diff) { - DoCast(me->GetVictim(), SPELL_CLEAVE); + DoCastVictim(SPELL_CLEAVE); CleaveTimer = 7000; } else CleaveTimer -= diff; |
