aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp7
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp117
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp146
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp130
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp151
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp200
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp115
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h21
-rw-r--r--src/server/scripts/Outland/zone_nagrand.cpp4
12 files changed, 551 insertions, 354 deletions
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index 11569c30f1e..ec85d675225 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -45,7 +45,7 @@ enum MotherShahraz
SPELL_ATTRACTION = 40871,
SPELL_SILENCING_SHRIEK = 40823,
SPELL_ENRAGE = 23537,
- SPELL_SABER_LASH = 40810,//43267
+ SPELL_SABER_LASH = 40810, //43267
SPELL_SABER_LASH_IMM = 43690,
SPELL_TELEPORT_VISUAL = 40869,
SPELL_BERSERK = 45078
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
index 9fa5a1a51f5..c55e93726a9 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
@@ -26,8 +26,11 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SPELL_FOUL_SPORES 31673
-#define SPELL_ACID_GEYSER 38739
+enum Spells
+{
+ SPELL_FOUL_SPORES = 31673,
+ SPELL_ACID_GEYSER = 38739
+};
class boss_hungarfen : public CreatureScript
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
index 4eaf7cc2d6c..be51b7922a2 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
@@ -375,23 +375,23 @@ class instance_blood_furnace : public InstanceMapScript
switch (id)
{
case DATA_PRISON_CELL5:
- HandleGameObject(PrisonCell5GUID,true);
+ HandleGameObject(PrisonCell5GUID, true);
ActivatePrisoners(PrisonersCell5);
break;
case DATA_PRISON_CELL6:
- HandleGameObject(PrisonCell6GUID,true);
+ HandleGameObject(PrisonCell6GUID, true);
ActivatePrisoners(PrisonersCell6);
break;
case DATA_PRISON_CELL7:
- HandleGameObject(PrisonCell7GUID,true);
+ HandleGameObject(PrisonCell7GUID, true);
ActivatePrisoners(PrisonersCell7);
break;
case DATA_PRISON_CELL8:
- HandleGameObject(PrisonCell8GUID,true);
+ HandleGameObject(PrisonCell8GUID, true);
ActivatePrisoners(PrisonersCell8);
break;
case DATA_DOOR5:
- HandleGameObject(Door5GUID,true);
+ HandleGameObject(Door5GUID, true);
if (Creature* broggok = instance->GetCreature(BroggokGUID))
broggok->AI()->DoAction(ACTION_ACTIVATE_BROGGOK);
break;
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 9c4b764fd2a..01ca1636c6b 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -518,7 +518,7 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader
return;
Unit* target = GetUnitOwner();
- target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(),false);
+ target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), false);
}
void Register()
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
index 3c72c8353aa..dc9940c87b8 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
@@ -1,6 +1,5 @@
/*
* 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
@@ -17,26 +16,112 @@
*/
/* ScriptData
-SDName: Boss_Gatewatcher_Gyrokill
-SD%Complete: 0
-SDComment: Place Holder
+SDName: boss_gatewatcher_gyrokill
+SD%Complete: 99%
+SDComment:
SDCategory: Tempest Keep, The Mechanar
EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "mechanar.h"
-//not used
-#define SAY_AGGRO -1554000
-#define SAY_SAW_ATTACK1 -1554001
-#define SAY_SAW_ATTACK2 -1554002
-#define SAY_SLAY1 -1554003
-#define SAY_SLAY2 -1554004
-#define SAY_DEATH -1554005
+enum Say
+{
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SAW_BLADEs = 2,
+ SAY_DEATH = 3
+};
-#define SPELL_STREAM_OF_MACHINE_FLUID 35311
-#define SPELL_SAW_BLADE 35318
-#define H_SPELL_SAW_BLADE 39192
-#define SPELL_SHADOW_POWER 35322
-#define H_SPELL_SHADOW_POWER 39193
+enum Spells
+{
+ SPELL_STREAM_OF_MACHINE_FLUID = 35311,
+ SPELL_SAW_BLADE = 35318,
+ H_SPELL_SAW_BLADE = 39192,
+ SPELL_SHADOW_POWER = 35322,
+ H_SPELL_SHADOW_POWER = 39193
+};
+enum Events
+{
+ EVENT_STREAM_OF_MACHINE_FLUID = 0,
+ EVENT_SAW_BLADE = 1,
+ EVENT_SHADOW_POWER = 2
+};
+
+class boss_gatewatcher_gyrokill : public CreatureScript
+{
+ public:
+ boss_gatewatcher_gyrokill() : CreatureScript("boss_gatewatcher_gyrokill") {}
+
+ struct boss_gatewatcher_gyrokillAI : public BossAI
+ {
+ boss_gatewatcher_gyrokillAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) {}
+
+ void JustDied(Unit* /*killer*/)
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 10000);
+ events.ScheduleEvent(EVENT_SAW_BLADE, 20000);
+ events.ScheduleEvent(EVENT_SHADOW_POWER, 25000);
+ Talk(SAY_AGGRO);
+ }
+
+ void KilledUnit(Unit* /*victim*/)
+ {
+ Talk(SAY_SLAY);
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_STREAM_OF_MACHINE_FLUID:
+ DoCastVictim(SPELL_STREAM_OF_MACHINE_FLUID, true);
+ events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, urand(13000, 17000));
+ break;
+ case EVENT_SAW_BLADE:
+ DoCast(me, SPELL_SAW_BLADE);
+ Talk(SAY_SAW_BLADEs);
+ events.ScheduleEvent(EVENT_SAW_BLADE, urand(20000, 30000));
+ break;
+ case EVENT_SHADOW_POWER:
+ DoCast(me, SPELL_SHADOW_POWER);
+ events.ScheduleEvent(EVENT_SAW_BLADE, urand(25000, 35000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_gatewatcher_gyrokillAI (creature);
+ }
+};
+
+void AddSC_boss_gatewatcher_gyrokill()
+{
+ new boss_gatewatcher_gyrokill();
+}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
index 09ff6cf8e49..440e17a29cf 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -25,8 +25,9 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "mechanar.h"
-enum eSays
+enum Says
{
SAY_AGGRO = 0,
SAY_HAMMER = 1,
@@ -35,111 +36,96 @@ enum eSays
EMOTE_HAMMER = 4
};
-enum eSpells
+enum Spells
{
- // Spells to be casted
SPELL_SHADOW_POWER = 35322,
H_SPELL_SHADOW_POWER = 39193,
SPELL_HAMMER_PUNCH = 35326,
SPELL_JACKHAMMER = 35327,
H_SPELL_JACKHAMMER = 39194,
- SPELL_STREAM_OF_MACHINE_FLUID = 35311,
+ SPELL_STREAM_OF_MACHINE_FLUID = 35311
+};
+
+enum Events
+{
+ EVENT_STREAM_OF_MACHINE_FLUID = 0,
+ EVENT_JACKHAMMER = 1,
+ EVENT_SHADOW_POWER = 2
};
class boss_gatewatcher_iron_hand : public CreatureScript
{
public:
+ boss_gatewatcher_iron_hand(): CreatureScript("boss_gatewatcher_iron_hand") {}
- boss_gatewatcher_iron_hand()
- : CreatureScript("boss_gatewatcher_iron_hand")
+ struct boss_gatewatcher_iron_handAI : public BossAI
{
- }
- // Gatewatcher Iron-Hand AI
- struct boss_gatewatcher_iron_handAI : public ScriptedAI
- {
- boss_gatewatcher_iron_handAI(Creature* creature) : ScriptedAI(creature)
- {
- }
-
- uint32 Shadow_Power_Timer;
- uint32 Jackhammer_Timer;
- uint32 Stream_of_Machine_Fluid_Timer;
-
- void Reset()
- {
- Shadow_Power_Timer = 25000;
- Jackhammer_Timer = 45000;
- Stream_of_Machine_Fluid_Timer = 55000;
+ boss_gatewatcher_iron_handAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND) {}
- }
- void EnterCombat(Unit* /*who*/)
- {
- Talk(SAY_AGGRO);
- }
-
- void KilledUnit(Unit* /*victim*/)
- {
- if (rand()%2)
- return;
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 55000);
+ events.ScheduleEvent(EVENT_JACKHAMMER, 45000);
+ events.ScheduleEvent(EVENT_SHADOW_POWER, 25000);
+ Talk(SAY_AGGRO);
+ }
+ void KilledUnit(Unit* /*victim*/)
+ {
+ if (roll_chance_i(50))
Talk(SAY_SLAY);
- }
-
- void JustDied(Unit* /*killer*/)
- {
- Talk(SAY_DEATH);
- //TODO: Add door check/open code
- }
-
- void UpdateAI(const uint32 diff)
- {
- //Return since we have no target
- if (!UpdateVictim())
- return;
+ }
- //Shadow Power
- if (Shadow_Power_Timer <= diff)
- {
- DoCast(me, SPELL_SHADOW_POWER);
- Shadow_Power_Timer = urand(20000, 28000);
- }
- else
- Shadow_Power_Timer -= diff;
+ void JustDied(Unit* /*killer*/)
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
- //Jack Hammer
- if (Jackhammer_Timer <= diff)
- {
- //TODO: expect cast this about 5 times in a row (?), announce it by emote only once
- Talk(EMOTE_HAMMER);
- DoCast(me->getVictim(), SPELL_JACKHAMMER);
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
- //chance to yell, but not same time as emote (after spell in fact casted)
- if (rand()%2)
- return;
+ events.Update(diff);
- Talk(SAY_HAMMER);
- Jackhammer_Timer = 30000;
- }
- else
- Jackhammer_Timer -= diff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- //Stream of Machine Fluid
- if (Stream_of_Machine_Fluid_Timer <= diff)
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
{
- DoCast(me->getVictim(), SPELL_STREAM_OF_MACHINE_FLUID);
- Stream_of_Machine_Fluid_Timer = urand(35000, 50000);
+ case EVENT_STREAM_OF_MACHINE_FLUID:
+ DoCastVictim(SPELL_STREAM_OF_MACHINE_FLUID, true);
+ events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, urand(35000, 50000));
+ break;
+ case EVENT_JACKHAMMER:
+ Talk(EMOTE_HAMMER);
+ //TODO: expect cast this about 5 times in a row (?), announce it by emote only once
+ DoCastVictim(SPELL_JACKHAMMER, true);
+ if (roll_chance_i(50))
+ Talk(SAY_HAMMER);
+ events.ScheduleEvent(EVENT_JACKHAMMER, 30000);
+ break;
+ case EVENT_SHADOW_POWER:
+ DoCast(me, SPELL_SHADOW_POWER);
+ events.ScheduleEvent(EVENT_SHADOW_POWER, urand(20000, 28000));
+ break;
+ default:
+ break;
}
- else
- Stream_of_Machine_Fluid_Timer -= diff;
-
- DoMeleeAttackIfReady();
}
- };
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_gatewatcher_iron_handAI(creature);
+ DoMeleeAttackIfReady();
}
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_gatewatcher_iron_handAI(creature);
+ }
};
void AddSC_boss_gatewatcher_iron_hand()
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
index f8c44471b30..1a43798ccef 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
@@ -15,21 +15,144 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//! TODO - Boss not scripted, just ported required spellscript from core
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
+#include "mechanar.h"
#include "Player.h"
enum Spells
{
+ SPELL_HEADCRACK = 35161,
+ SPELL_REFLECTIVE_MAGIC_SHIELD = 35158,
+ SPELL_REFLECTIVE_DAMAGE_SHIELD = 35159,
+ SPELL_POLARITY_SHIFT = 39096,
+ SPELL_BERSERK = 26662,
+ SPELL_NETHER_CHARGE_TIMER = 37670,
+ SPELL_NETHER_CHARGE_PASSIVE = 37670,
+
SPELL_POSITIVE_POLARITY = 39088,
SPELL_POSITIVE_CHARGE_STACK = 39089,
SPELL_POSITIVE_CHARGE = 39090,
+
SPELL_NEGATIVE_POLARITY = 39091,
SPELL_NEGATIVE_CHARGE_STACK = 39092,
- SPELL_NEGATIVE_CHARGE = 39093,
+ SPELL_NEGATIVE_CHARGE = 39093
+};
+
+enum Yells
+{
+ YELL_AGGRO = 0,
+ YELL_REFLECTIVE_MAGIC_SHIELD = 1,
+ YELL_REFLECTIVE_DAMAGE_SHIELD = 2,
+ YELL_KILL = 3,
+ YELL_DEATH = 4
+};
+
+enum Creatures
+{
+ NPC_NETHER_CHARGE = 20405
+};
+
+enum Events
+{
+ EVENT_NONE = 0,
+
+ EVENT_HEADCRACK = 1,
+ EVENT_REFLECTIVE_DAMAGE_SHIELD = 2,
+ EVENT_REFLECTIVE_MAGIE_SHIELD = 3,
+ EVENT_POSITIVE_SHIFT = 4,
+ EVENT_SUMMON_NETHER_CHARGE = 5,
+ EVENT_BERSERK = 6
+};
+
+class boss_mechano_lord_capacitus : public CreatureScript
+{
+ public:
+ boss_mechano_lord_capacitus() : CreatureScript("boss_mechano_lord_capacitus") { }
+
+ struct boss_mechano_lord_capacitusAI : public BossAI
+ {
+ boss_mechano_lord_capacitusAI(Creature* creature) : BossAI(creature, DATA_MECHANOLORD_CAPACITUS) { }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ Talk(YELL_AGGRO);
+ events.ScheduleEvent(EVENT_HEADCRACK, 10 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_REFLECTIVE_DAMAGE_SHIELD, 15 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, 10 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_BERSERK, 3 * MINUTE * IN_MILLISECONDS);
+
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_POSITIVE_SHIFT, 15 * IN_MILLISECONDS);
+ }
+
+ void KilledUnit(Unit* /*victim*/)
+ {
+ Talk(YELL_KILL);
+ }
+
+ void JustDied(Unit* /*victim*/)
+ {
+ _JustDied();
+ Talk(YELL_DEATH);
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_HEADCRACK:
+ DoCastVictim(SPELL_HEADCRACK);
+ events.ScheduleEvent(EVENT_HEADCRACK, 10 * IN_MILLISECONDS);
+ break;
+ case EVENT_REFLECTIVE_DAMAGE_SHIELD:
+ Talk(YELL_REFLECTIVE_DAMAGE_SHIELD);
+ DoCast(me, SPELL_REFLECTIVE_DAMAGE_SHIELD);
+ events.ScheduleEvent(EVENT_REFLECTIVE_MAGIE_SHIELD, 30 * IN_MILLISECONDS);
+ break;
+ case EVENT_REFLECTIVE_MAGIE_SHIELD:
+ Talk(YELL_REFLECTIVE_MAGIC_SHIELD);
+ DoCast(me, SPELL_REFLECTIVE_MAGIC_SHIELD);
+ events.ScheduleEvent(EVENT_REFLECTIVE_DAMAGE_SHIELD, 30 * IN_MILLISECONDS);
+ break;
+ case EVENT_POSITIVE_SHIFT:
+ DoCastAOE(SPELL_POLARITY_SHIFT);
+ events.ScheduleEvent(EVENT_POSITIVE_SHIFT, urand(45, 60) * IN_MILLISECONDS);
+ break;
+ case EVENT_SUMMON_NETHER_CHARGE:
+ Position pos;
+ me->GetRandomNearPosition(pos, 5.0f);
+ me->SummonCreature(NPC_NETHER_CHARGE, pos, TEMPSUMMON_TIMED_DESPAWN, 18000);
+ events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, 10 * IN_MILLISECONDS);
+ break;
+ case EVENT_BERSERK:
+ DoCast(me, SPELL_BERSERK);
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_mechano_lord_capacitusAI(creature);
+ }
};
class spell_capacitus_polarity_charge : public SpellScriptLoader
@@ -138,6 +261,7 @@ class spell_capacitus_polarity_shift : public SpellScriptLoader
void AddSC_boss_mechano_lord_capacitus()
{
+ new boss_mechano_lord_capacitus();
new spell_capacitus_polarity_charge();
new spell_capacitus_polarity_shift();
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
index 5a9e551375b..9bda618b732 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -36,60 +36,45 @@ enum eSays
SAY_DEATH = 4
};
-enum eSpells
+enum Spells
{
- SPELL_SUMMON_RAGIN_FLAMES = 35275,
+ SPELL_SUMMON_RAGIN_FLAMES = 35275, // Not scripted
SPELL_FROST_ATTACK = 35263,
SPELL_ARCANE_BLAST = 35314,
SPELL_DRAGONS_BREATH = 35250,
SPELL_KNOCKBACK = 37317,
SPELL_SOLARBURN = 35267,
- H_SPELL_SUMMON_RAGIN_FLAMES = 39084,
- SPELL_INFERNO = 35268,
- H_SPELL_INFERNO = 39346,
- SPELL_FIRE_TAIL = 35278,
+ H_SPELL_SUMMON_RAGIN_FLAMES = 39084, // Not scripted
+ SPELL_INFERNO = 35268, // Not scripted
+ H_SPELL_INFERNO = 39346, // Not scripted
+ SPELL_FIRE_TAIL = 35278 // Not scripted
+};
+
+enum Events
+{
+ EVENT_FROST_ATTACK = 0,
+ EVENT_ARCANE_BLAST = 1,
+ EVENT_DRAGONS_BREATH = 2,
+ EVENT_KNOCKBACK = 3,
+ EVENT_SOLARBURN = 4
};
class boss_nethermancer_sepethrea : public CreatureScript
{
- public:
+ public: boss_nethermancer_sepethrea(): CreatureScript("boss_nethermancer_sepethrea") {}
- boss_nethermancer_sepethrea()
- : CreatureScript("boss_nethermancer_sepethrea")
+ struct boss_nethermancer_sepethreaAI : public BossAI
{
- }
- struct boss_nethermancer_sepethreaAI : public ScriptedAI
- {
- boss_nethermancer_sepethreaAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
-
- InstanceScript* instance;
-
- uint32 frost_attack_Timer;
- uint32 arcane_blast_Timer;
- uint32 dragons_breath_Timer;
- uint32 knockback_Timer;
- uint32 solarburn_Timer;
-
- void Reset()
- {
- frost_attack_Timer = urand(7000, 10000);
- arcane_blast_Timer = urand(12000, 18000);
- dragons_breath_Timer = urand(18000, 22000);
- knockback_Timer = urand(22000, 28000);
- solarburn_Timer = 30000;
-
- if (instance)
- instance->SetData(DATA_NETHERMANCER_EVENT, NOT_STARTED);
- }
+ boss_nethermancer_sepethreaAI(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) {}
void EnterCombat(Unit* who)
{
- if (instance)
- instance->SetData(DATA_NETHERMANCER_EVENT, IN_PROGRESS);
-
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_FROST_ATTACK, urand(7000, 10000));
+ events.ScheduleEvent(EVENT_ARCANE_BLAST, urand(12000, 18000));
+ events.ScheduleEvent(EVENT_DRAGONS_BREATH, urand(18000, 22000));
+ events.ScheduleEvent(EVENT_KNOCKBACK, urand(22000, 28000));
+ events.ScheduleEvent(EVENT_SOLARBURN, 30000);
Talk(SAY_AGGRO);
DoCast(who, SPELL_SUMMON_RAGIN_FLAMES);
Talk(SAY_SUMMON);
@@ -102,66 +87,50 @@ class boss_nethermancer_sepethrea : public CreatureScript
void JustDied(Unit* /*killer*/)
{
+ _JustDied();
Talk(SAY_DEATH);
- if (instance)
- instance->SetData(DATA_NETHERMANCER_EVENT, DONE);
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const diff)
{
- //Return since we have no target
if (!UpdateVictim())
return;
- //Frost Attack
- if (frost_attack_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_FROST_ATTACK);
+ events.Update(diff);
- frost_attack_Timer = urand(7000, 10000);
- }
- else
- frost_attack_Timer -= diff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- //Arcane Blast
- if (arcane_blast_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_ARCANE_BLAST);
- arcane_blast_Timer = 15000;
- }
- else
- arcane_blast_Timer -= diff;
- //Dragons Breath
- if (dragons_breath_Timer <= diff)
+ while (uint32 eventId = events.ExecuteEvent())
{
- DoCast(me->getVictim(), SPELL_DRAGONS_BREATH);
+ switch (eventId)
{
- if (rand()%2)
- return;
- Talk(SAY_DRAGONS_BREATH);
+ case EVENT_FROST_ATTACK:
+ DoCastVictim(SPELL_FROST_ATTACK, true);
+ events.ScheduleEvent(EVENT_FROST_ATTACK, urand(7000, 10000));
+ break;
+ case EVENT_ARCANE_BLAST:
+ DoCastVictim(SPELL_ARCANE_BLAST, true);
+ events.ScheduleEvent(EVENT_ARCANE_BLAST, 15000);
+ break;
+ case EVENT_DRAGONS_BREATH:
+ DoCastVictim(SPELL_DRAGONS_BREATH, true);
+ events.ScheduleEvent(EVENT_DRAGONS_BREATH, urand(12000, 22000));
+ if (roll_chance_i(50))
+ Talk(SAY_DRAGONS_BREATH);
+ break;
+ case EVENT_KNOCKBACK:
+ DoCastVictim(SPELL_KNOCKBACK, true);
+ events.ScheduleEvent(EVENT_KNOCKBACK, urand(15000, 25000));
+ break;
+ case EVENT_SOLARBURN:
+ DoCastVictim(SPELL_SOLARBURN, true);
+ events.ScheduleEvent(EVENT_SOLARBURN, 30000);
+ break;
+ default:
+ break;
}
- dragons_breath_Timer = urand(12000, 22000);
}
- else
- dragons_breath_Timer -= diff;
-
- //Knockback
- if (knockback_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_KNOCKBACK);
- knockback_Timer = urand(15000, 25000);
- }
- else
- knockback_Timer -= diff;
-
- //Solarburn
- if (solarburn_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_SOLARBURN);
- solarburn_Timer = 30000;
- }
- else
- solarburn_Timer -= diff;
DoMeleeAttackIfReady();
}
@@ -172,13 +141,11 @@ class boss_nethermancer_sepethrea : public CreatureScript
return new boss_nethermancer_sepethreaAI(creature);
}
};
+
class mob_ragin_flames : public CreatureScript
{
public:
- mob_ragin_flames()
- : CreatureScript("mob_ragin_flames")
- {
- }
+ mob_ragin_flames() : CreatureScript("mob_ragin_flames") { }
struct mob_ragin_flamesAI : public ScriptedAI
{
@@ -217,7 +184,7 @@ class mob_ragin_flames : public CreatureScript
{
if (instance)
{
- if (instance->GetData(DATA_NETHERMANCER_EVENT) != IN_PROGRESS)
+ if (instance->GetData(DATA_NETHERMANCER_SEPRETHREA) != IN_PROGRESS)
{
//remove
me->setDeathState(JUST_DIED);
@@ -259,9 +226,9 @@ class mob_ragin_flames : public CreatureScript
return new mob_ragin_flamesAI(creature);
}
};
+
void AddSC_boss_nethermancer_sepethrea()
{
new boss_nethermancer_sepethrea();
new mob_ragin_flames();
}
-
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
index 41296daf1fa..9d894e41b60 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
@@ -25,8 +25,9 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "mechanar.h"
-enum eSays
+enum Says
{
SAY_AGGRO = 0,
SAY_DOMINATION = 1,
@@ -35,65 +36,53 @@ enum eSays
SAY_SLAY = 4,
SAY_DEATH = 5
};
-// Spells to be casted
-enum eSpells
+
+enum Spells
{
SPELL_MANA_TAP = 36021,
SPELL_ARCANE_TORRENT = 36022,
SPELL_DOMINATION = 35280,
H_SPELL_ARCANE_EXPLOSION = 15453,
SPELL_FRENZY = 36992,
- //Spells work, but not implemented
- SPELL_SUMMON_NETHER_WRAITH_1 = 35285,
- SPELL_SUMMON_NETHER_WRAITH_2 = 35286,
- SPELL_SUMMON_NETHER_WRAITH_3 = 35287,
- SPELL_SUMMON_NETHER_WRAITH_4 = 35288,
- // Add Spells
- SPELL_DETONATION = 35058,
- SPELL_ARCANE_MISSILES = 35034,
+ SPELL_SUMMON_NETHER_WRAITH_1 = 35285, // Not scripted
+ SPELL_SUMMON_NETHER_WRAITH_2 = 35286, // Not scripted
+ SPELL_SUMMON_NETHER_WRAITH_3 = 35287, // Not scripted
+ SPELL_SUMMON_NETHER_WRAITH_4 = 35288, // Not scripted
+ SPELL_DETONATION = 35058, // Used by Nether Wraith
+ SPELL_ARCANE_MISSILES = 35034 // Used by Nether Wraith
+};
+
+enum Events
+{
+ EVENT_SUMMON = 0,
+ EVENT_MANA_TAP = 1,
+ EVENT_ARCANE_TORRENT = 2,
+ EVENT_DOMINATION = 3,
+ EVENT_ARCANE_EXPLOSION = 4
+};
+
+enum Creatures
+{
+ NPC_NETHER_WRAITH = 21062
};
class boss_pathaleon_the_calculator : public CreatureScript
{
public:
+ boss_pathaleon_the_calculator(): CreatureScript("boss_pathaleon_the_calculator") {}
- boss_pathaleon_the_calculator()
- : CreatureScript("boss_pathaleon_the_calculator")
- {
- }
-
- struct boss_pathaleon_the_calculatorAI : public ScriptedAI
+ struct boss_pathaleon_the_calculatorAI : public BossAI
{
- boss_pathaleon_the_calculatorAI(Creature* creature) : ScriptedAI(creature), summons(me)
- {
- }
+ boss_pathaleon_the_calculatorAI(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR) { }
- uint32 Summon_Timer;
- SummonList summons;
- uint32 ManaTap_Timer;
- uint32 ArcaneTorrent_Timer;
- uint32 Domination_Timer;
- uint32 ArcaneExplosion_Timer;
-
- bool Enraged;
-
- uint32 Counter;
-
- void Reset()
- {
- Summon_Timer = 30000;
- ManaTap_Timer = urand(12000, 20000);
- ArcaneTorrent_Timer = urand(16000, 25000);
- Domination_Timer = urand(25000, 40000);
- ArcaneExplosion_Timer = urand(8000, 13000);
-
- Enraged = false;
-
- Counter = 0;
- summons.DespawnAll();
- }
void EnterCombat(Unit* /*who*/)
{
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_SUMMON, 30000);
+ events.ScheduleEvent(EVENT_MANA_TAP, urand(12000, 20000));
+ events.ScheduleEvent(EVENT_ARCANE_TORRENT, urand(16000, 25000));
+ events.ScheduleEvent(EVENT_DOMINATION, urand(25000, 40000));
+ events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(8000, 13000));
Talk(SAY_AGGRO);
}
@@ -104,107 +93,82 @@ class boss_pathaleon_the_calculator : public CreatureScript
void JustDied(Unit* /*killer*/)
{
+ _JustDied();
Talk(SAY_DEATH);
-
- summons.DespawnAll();
}
- void JustSummoned(Creature* summon)
- {
- summons.Summon(summon);
- }
- void SummonedCreatureDespawn(Creature* summon)
+ void DamageTaken(Unit* /*attacker*/, uint32& damage)
{
- summons.Despawn(summon);
+ if (me->HealthBelowPctDamaged(20, damage) && !me->HasAura(SPELL_FRENZY))
+ {
+ DoCast(me, SPELL_FRENZY);
+ Talk(SAY_ENRAGE);
+ }
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const diff)
{
- //Return since we have no target
if (!UpdateVictim())
return;
- if (Summon_Timer <= diff)
- {
- for (uint8 i = 0; i < 3; ++i)
- {
- Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
- Creature* Wraith = me->SummonCreature(21062, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- if (target && Wraith)
- Wraith->AI()->AttackStart(target);
- }
- Talk(SAY_SUMMON);
- Summon_Timer = urand(30000, 45000);
- }
- else
- Summon_Timer -= diff;
-
- if (ManaTap_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_MANA_TAP);
- ManaTap_Timer = urand(14000, 22000);
- }
- else
- ManaTap_Timer -= diff;
-
- if (ArcaneTorrent_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_ARCANE_TORRENT);
- ArcaneTorrent_Timer = urand(12000, 18000);
- }
- else
- ArcaneTorrent_Timer -= diff;
+ events.Update(diff);
- if (Domination_Timer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
- {
- Talk(SAY_DOMINATION);
- DoCast(target, SPELL_DOMINATION);
- }
- Domination_Timer = urand(25000, 30000);
- }
- else
- Domination_Timer -= diff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- //Only casting if Heroic Mode is used
- if (IsHeroic())
+ while (uint32 eventId = events.ExecuteEvent())
{
- if (ArcaneExplosion_Timer <= diff)
+ switch (eventId)
{
- DoCast(me->getVictim(), H_SPELL_ARCANE_EXPLOSION);
- ArcaneExplosion_Timer = urand(10000, 14000);
+ case EVENT_SUMMON:
+ for (uint8 i = 0; i < 3; ++i)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ {
+ if (Creature* Wraith = me->SummonCreature(NPC_NETHER_WRAITH, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
+ Wraith->AI()->AttackStart(target);
+ }
+ }
+ Talk(SAY_SUMMON);
+ events.ScheduleEvent(EVENT_SUMMON, urand(30000, 45000));
+ break;
+ case EVENT_MANA_TAP:
+ DoCastVictim(SPELL_MANA_TAP, true);
+ events.ScheduleEvent(EVENT_MANA_TAP, urand(14000, 22000));
+ break;
+ case EVENT_ARCANE_TORRENT:
+ DoCastVictim(SPELL_ARCANE_TORRENT, true);
+ events.ScheduleEvent(EVENT_ARCANE_TORRENT, urand(12000, 18000));
+ break;
+ case EVENT_DOMINATION:
+ Talk(SAY_DOMINATION);
+ DoCastVictim(SPELL_DOMINATION, true);
+ events.ScheduleEvent(EVENT_DOMINATION, urand(25000, 30000));
+ break;
+ case EVENT_ARCANE_EXPLOSION: // Heroic only
+ DoCastVictim(H_SPELL_ARCANE_EXPLOSION, true);
+ events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(10000, 14000));
+ break;
+ default:
+ break;
}
- else
- ArcaneExplosion_Timer -= diff;
- }
-
- if (!Enraged && HealthBelowPct(21))
- {
- DoCast(me, SPELL_FRENZY);
- Talk(SAY_ENRAGE);
- Enraged = true;
-
}
DoMeleeAttackIfReady();
}
};
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_pathaleon_the_calculatorAI (creature);
- }
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_pathaleon_the_calculatorAI (creature);
+ }
};
class mob_nether_wraith : public CreatureScript
{
public:
- mob_nether_wraith()
- : CreatureScript("mob_nether_wraith")
- {
- }
+ mob_nether_wraith() : CreatureScript("mob_nether_wraith") { }
struct mob_nether_wraithAI : public ScriptedAI
{
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
index 1f9ddfcdd0b..146569db284 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
@@ -16,68 +16,122 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Instance_Mechanar
-SD%Complete: 100
-SDComment:
-SDCategory: Mechanar
-EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "mechanar.h"
-#define MAX_ENCOUNTER 1
+static DoorData const doorData[] =
+{
+ { GO_DOOR_MOARG_1, DATA_GATEWATCHER_IRON_HAND, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
+ { GO_DOOR_MOARG_2, DATA_GATEWATCHER_GYROKILL, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
+ { GO_DOOR_NETHERMANCER, DATA_NETHERMANCER_SEPRETHREA, DOOR_TYPE_ROOM, BOUNDARY_NONE },
+ {0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
+};
class instance_mechanar : public InstanceMapScript
{
public:
- instance_mechanar()
- : InstanceMapScript("instance_mechanar", 554)
- {
- }
+ instance_mechanar(): InstanceMapScript("instance_mechanar", 554) { }
struct instance_mechanar_InstanceMapScript : public InstanceScript
{
- instance_mechanar_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_mechanar_InstanceMapScript(Map* map) : InstanceScript(map)
+ {
+ SetBossNumber(EncounterCount);
+ LoadDoorData(doorData);
+ }
- uint32 m_auiEncounter[MAX_ENCOUNTER];
- void Initialize()
+ void OnGameObjectCreate(GameObject* gameObject)
{
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
+ switch (gameObject->GetEntry())
+ {
+ case GO_DOOR_MOARG_1:
+ case GO_DOOR_MOARG_2:
+ case GO_DOOR_NETHERMANCER:
+ AddDoor(gameObject, true);
+ break;
+ default:
+ break;
+ }
}
- bool IsEncounterInProgress() const
+ void OnGameObjectRemove(GameObject* gameObject)
{
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- if (m_auiEncounter[i] == IN_PROGRESS)
- return true;
-
- return false;
+ switch (gameObject->GetEntry())
+ {
+ case GO_DOOR_MOARG_1:
+ case GO_DOOR_MOARG_2:
+ case GO_DOOR_NETHERMANCER:
+ AddDoor(gameObject, false);
+ break;
+ default:
+ break;
+ }
}
- uint32 GetData(uint32 type) const
+ bool SetBossState(uint32 type, EncounterState state)
{
+ if (!InstanceScript::SetBossState(type, state))
+ return false;
+
switch (type)
{
- case DATA_NETHERMANCER_EVENT: return m_auiEncounter[0];
+ case DATA_GATEWATCHER_GYROKILL:
+ case DATA_GATEWATCHER_IRON_HAND:
+ case DATA_MECHANOLORD_CAPACITUS:
+ case DATA_NETHERMANCER_SEPRETHREA:
+ case DATA_PATHALEON_THE_CALCULATOR:
+ break;
+ default:
+ break;
}
- return false;
+ return true;
}
- uint64 GetData64(uint32 /*identifier*/) const
+ std::string GetSaveData()
{
- return 0;
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << "M C " << GetBossSaveData();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
}
- void SetData(uint32 type, uint32 data)
+ void Load(const char* str)
{
- switch (type)
+ if (!str)
{
- case DATA_NETHERMANCER_EVENT: m_auiEncounter[0] = data; break;
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
}
+
+ OUT_LOAD_INST_DATA(str);
+
+ char dataHead1, dataHead2;
+
+ std::istringstream loadStream(str);
+ loadStream >> dataHead1 >> dataHead2;
+
+ if (dataHead1 == 'M' && dataHead2 == 'C')
+ {
+ for (uint32 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;
}
};
@@ -89,6 +143,5 @@ class instance_mechanar : public InstanceMapScript
void AddSC_instance_mechanar()
{
- new instance_mechanar;
+ new instance_mechanar();
}
-
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
index c933c90afef..0d3a4ea241d 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
@@ -1,6 +1,5 @@
/*
* 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
@@ -19,6 +18,22 @@
#ifndef DEF_MECHANAR_H
#define DEF_MECHANAR_H
-#define DATA_NETHERMANCER_EVENT 1
-#endif
+uint32 const EncounterCount = 5;
+
+enum DataTypes
+{
+ DATA_GATEWATCHER_GYROKILL = 0,
+ DATA_GATEWATCHER_IRON_HAND = 1,
+ DATA_MECHANOLORD_CAPACITUS = 2,
+ DATA_NETHERMANCER_SEPRETHREA = 3,
+ DATA_PATHALEON_THE_CALCULATOR = 4
+};
+enum GameobjectIds
+{
+ GO_DOOR_MOARG_1 = 184632,
+ GO_DOOR_MOARG_2 = 184322,
+ GO_DOOR_NETHERMANCER = 184449
+};
+
+#endif
diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp
index 0a92b985c95..edb7a2642d5 100644
--- a/src/server/scripts/Outland/zone_nagrand.cpp
+++ b/src/server/scripts/Outland/zone_nagrand.cpp
@@ -639,7 +639,7 @@ public:
if (ChainLightningTimer <= diff)
{
DoCast(me->getVictim(), SPELL_KUR_CHAIN_LIGHTNING);
- ChainLightningTimer = urand(7000,14000);
+ ChainLightningTimer = urand(7000, 14000);
} else ChainLightningTimer -= diff;
if (HealthBelowPct(30))
@@ -654,7 +654,7 @@ public:
if (FrostShockTimer <= diff)
{
DoCast(me->getVictim(), SPELL_KUR_FROST_SHOCK);
- FrostShockTimer = urand(7500,15000);
+ FrostShockTimer = urand(7500, 15000);
} else FrostShockTimer -= diff;
DoMeleeAttackIfReady();