aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2011-12-28 10:51:16 +0100
committerSpp <spp@jorge.gr>2011-12-28 10:51:16 +0100
commit3792b470e003adf9df3bcd380bf039b250832639 (patch)
tree5a5563fc8cef533b7764bab400d49ab191878e1a /src/server/scripts/EasternKingdoms
parent4fb634f9a50638e956423b7f091bc5795b784035 (diff)
Core/Scripts: Replace rand with urand in most cases (using regexp)
Used: perl -pi -e 's/([0-9]+) \+ rand\(\)\%([0-9]+)/"urand(".$1.", ".($1+$2).")"/ge'
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp32
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/eversong_woods.cpp6
24 files changed, 92 insertions, 92 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
index 4e44a70475f..a7c984fa536 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
@@ -70,7 +70,7 @@ public:
if (ShadowFlame_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWFLAME);
- ShadowFlame_Timer = 15000 + rand()%7000;
+ ShadowFlame_Timer = urand(15000, 22000);
} else ShadowFlame_Timer -= diff;
//WingBuffet_Timer
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index 8454150d830..389f0d0a959 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -824,7 +824,7 @@ public:
void Reset()
{
ChaseTimer = 30000;
- FearTimer = 25000 + rand()%10000;
+ FearTimer = urand(25000, 35000);
SwipeTimer = 5000;
HoodGUID = 0;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index 55254a3b8ee..bf58d6f2853 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -467,7 +467,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
if (ResetThreatTimer <= diff)
{
DoResetThreat();
- ResetThreatTimer = 5000 + rand()%15000;
+ ResetThreatTimer = urand(5000, 20000);
} else ResetThreatTimer -= diff;
}
};
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 305ce97687a..93b0b45a3e3 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -122,13 +122,13 @@ public:
instance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
} else sLog->outError(ERROR_INST_DATA);
- DrainLifeTimer = 3000 + rand()%4000;
+ DrainLifeTimer = urand(3000, 7000);
DrainManaTimer = DrainLifeTimer + 5000;
FelExplosionTimer = 2100;
if (IsHeroic())
- DrainCrystalTimer = 10000 + rand()%5000;
+ DrainCrystalTimer = urand(10000, 15000);
else
- DrainCrystalTimer = 20000 + rand()%5000;
+ DrainCrystalTimer = urand(20000, 25000);
EmpowerTimer = 10000;
IsDraining = false;
@@ -285,9 +285,9 @@ public:
{
SelectNearestCrystal();
if (IsHeroic())
- DrainCrystalTimer = 10000 + rand()%5000;
+ DrainCrystalTimer = urand(10000, 15000);
else
- DrainCrystalTimer = 20000 + rand()%5000;
+ DrainCrystalTimer = urand(20000, 25000);
} else DrainCrystalTimer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
index 12dd67e009d..d930dd4a14c 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
@@ -108,14 +108,14 @@ public:
if (ShadowShield_Timer <= diff)
{
DoCast(me, SPELL_SHADOWSHIELD);
- ShadowShield_Timer = 14000 + rand()%14000;
+ ShadowShield_Timer = urand(14000, 28000);
} else ShadowShield_Timer -= diff;
//Curse_Timer
if (Curse_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CURSE);
- Curse_Timer = 15000 + rand()%12000;
+ Curse_Timer = urand(15000, 27000);
} else Curse_Timer -= diff;
//Teleporting Random Target to one of the six pre boss rooms and spawn 3-4 skeletons near the gamer.
@@ -214,7 +214,7 @@ public:
break;
}
}
- Teleport_Timer = 20000 + rand()%15000;
+ Teleport_Timer = urand(20000, 35000);
} else Teleport_Timer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
index 9dd9f1fedb5..2d1d78193ed 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
@@ -171,7 +171,7 @@ public:
void Reset()
{
- Cleave_Timer = 2000 + rand()%6000;
+ Cleave_Timer = urand(2000, 8000);
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
}
@@ -192,7 +192,7 @@ public:
DoCast(me->getVictim(), SPELL_CLEAVE);
//5-8 seconds
- Cleave_Timer = 5000 + rand()%3000;
+ Cleave_Timer = urand(5000, 8000);
} else Cleave_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
index 17ea8a04293..3cbf00f291d 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
@@ -131,7 +131,7 @@ public:
if (m_uiMindBlast_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_MINDBLAST);
- m_uiMindBlast_Timer = 15000 + rand()%5000;
+ m_uiMindBlast_Timer = urand(15000, 20000);
} else m_uiMindBlast_Timer -= uiDiff;
//CrusadersHammer
@@ -173,7 +173,7 @@ public:
if (m_uiMindBlast_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_MINDBLAST);
- m_uiMindBlast_Timer = 15000 + rand()%5000;
+ m_uiMindBlast_Timer = urand(15000, 20000);
} else m_uiMindBlast_Timer -= uiDiff;
//ShadowShock
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index df3bb5d4525..747d9e29ec1 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -612,7 +612,7 @@ public:
KalecGUID = 0;
}
- ShadowBoltTimer = 7000 + rand()%3 * 1000;
+ ShadowBoltTimer = urand(7, 10) * 1000;
AgonyCurseTimer = 20000;
CorruptionStrikeTimer = 13000;
CheckTimer = 1000;
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index 413897c94e8..ffccfbce2b6 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -296,13 +296,13 @@ class boss_akilzon : public CreatureScript
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (!target) target = me->getVictim();
DoCast(target, SPELL_GUST_OF_WIND);
- GustOfWind_Timer = (20+rand()%10)*1000; //20 to 30 seconds(bosskillers)
+ GustOfWind_Timer = urand(20, 30) * 1000; //20 to 30 seconds(bosskillers)
} else GustOfWind_Timer -= diff;
if (CallLighting_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CALL_LIGHTNING);
- CallLighting_Timer = (12 + rand()%5)*1000; //totaly random timer. can't find any info on this
+ CallLighting_Timer = urand(12, 17) * 1000; //totaly random timer. can't find any info on this
} else CallLighting_Timer -= diff;
if (!isRaining && ElectricalStorm_Timer < uint32(8000 + rand() % 5000))
@@ -406,7 +406,7 @@ class mob_akilzon_eagle : public CreatureScript
void Reset()
{
- EagleSwoop_Timer = 5000 + rand()%5000;
+ EagleSwoop_Timer = urand(5000, 10000);
arrived = true;
TargetGUID = 0;
me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
@@ -425,7 +425,7 @@ class mob_akilzon_eagle : public CreatureScript
DoCast(target, SPELL_EAGLE_SWOOP, true);
TargetGUID = 0;
me->SetSpeed(MOVE_RUN, 1.2f);
- EagleSwoop_Timer = 5000 + rand()%5000;
+ EagleSwoop_Timer = urand(5000, 10000);
}
}
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
index a3c7aae4132..80c31d42a46 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
@@ -263,7 +263,7 @@ class boss_halazzi : public CreatureScript
DoCast(target, SPELL_EARTHSHOCK);
else
DoCast(target, SPELL_FLAMESHOCK);
- ShockTimer = 10000 + rand()%5000;
+ ShockTimer = urand(10000, 15000);
}
} else ShockTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
index 3ff465a3c1d..0ae8a9bc5c4 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
@@ -145,10 +145,10 @@ class boss_nalorakk : public CreatureScript
if (instance)
instance->SetData(DATA_NALORAKKEVENT, NOT_STARTED);
- Surge_Timer = 15000 + rand()%5000;
- BrutalSwipe_Timer = 7000 + rand()%5000;
- Mangle_Timer = 10000 + rand()%5000;
- ShapeShift_Timer = 45000 + rand()%5000;
+ Surge_Timer = urand(15000, 20000);
+ BrutalSwipe_Timer = urand(7000, 12000);
+ Mangle_Timer = urand(10000, 15000);
+ ShapeShift_Timer = urand(45000, 50000);
Berserk_Timer = 600000;
inBearForm = false;
@@ -371,10 +371,10 @@ class boss_nalorakk : public CreatureScript
me->MonsterYell(YELL_SHIFTEDTOTROLL, LANG_UNIVERSAL, 0);
DoPlaySoundToSet(me, SOUND_YELL_TOTROLL);
me->RemoveAurasDueToSpell(SPELL_BEARFORM);
- Surge_Timer = 15000 + rand()%5000;
- BrutalSwipe_Timer = 7000 + rand()%5000;
- Mangle_Timer = 10000 + rand()%5000;
- ShapeShift_Timer = 45000 + rand()%5000;
+ Surge_Timer = urand(15000, 20000);
+ BrutalSwipe_Timer = urand(7000, 12000);
+ Mangle_Timer = urand(10000, 15000);
+ ShapeShift_Timer = urand(45000, 50000);
inBearForm = false;
}
else
@@ -385,8 +385,8 @@ class boss_nalorakk : public CreatureScript
DoCast(me, SPELL_BEARFORM, true);
LaceratingSlash_Timer = 2000; // dur 18s
RendFlesh_Timer = 3000; // dur 5s
- DeafeningRoar_Timer = 5000 + rand()%5000; // dur 2s
- ShapeShift_Timer = 20000 + rand()%5000; // dur 30s
+ DeafeningRoar_Timer = urand(5000, 10000); // dur 2s
+ ShapeShift_Timer = urand(20000, 25000); // dur 30s
inBearForm = true;
}
} else ShapeShift_Timer -= diff;
@@ -396,7 +396,7 @@ class boss_nalorakk : public CreatureScript
if (BrutalSwipe_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_BRUTALSWIPE);
- BrutalSwipe_Timer = 7000 + rand()%5000;
+ BrutalSwipe_Timer = urand(7000, 12000);
} else BrutalSwipe_Timer -= diff;
if (Mangle_Timer <= diff)
@@ -406,7 +406,7 @@ class boss_nalorakk : public CreatureScript
DoCast(me->getVictim(), SPELL_MANGLE);
Mangle_Timer = 1000;
}
- else Mangle_Timer = 10000 + rand()%5000;
+ else Mangle_Timer = urand(10000, 15000);
} else Mangle_Timer -= diff;
if (Surge_Timer <= diff)
@@ -416,7 +416,7 @@ class boss_nalorakk : public CreatureScript
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 45, true);
if (target)
DoCast(target, SPELL_SURGE);
- Surge_Timer = 15000 + rand()%5000;
+ Surge_Timer = urand(15000, 20000);
} else Surge_Timer -= diff;
}
else
@@ -424,19 +424,19 @@ class boss_nalorakk : public CreatureScript
if (LaceratingSlash_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_LACERATINGSLASH);
- LaceratingSlash_Timer = 18000 + rand()%5000;
+ LaceratingSlash_Timer = urand(18000, 23000);
} else LaceratingSlash_Timer -= diff;
if (RendFlesh_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_RENDFLESH);
- RendFlesh_Timer = 5000 + rand()%5000;
+ RendFlesh_Timer = urand(5000, 10000);
} else RendFlesh_Timer -= diff;
if (DeafeningRoar_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_DEAFENINGROAR);
- DeafeningRoar_Timer = 15000 + rand()%5000;
+ DeafeningRoar_Timer = urand(15000, 20000);
} else DeafeningRoar_Timer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
index ae6a25d2c17..5dbe3fc9409 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
@@ -430,7 +430,7 @@ class boss_zuljin : public CreatureScript
if (Whirlwind_Timer <= diff)
{
DoCast(me, SPELL_WHIRLWIND);
- Whirlwind_Timer = 15000 + rand()%5000;
+ Whirlwind_Timer = urand(15000, 20000);
} else Whirlwind_Timer -= diff;
if (Grievous_Throw_Timer <= diff)
@@ -489,7 +489,7 @@ class boss_zuljin : public CreatureScript
++Claw_Counter;
if (Claw_Counter == 12)
{
- Claw_Rage_Timer = 15000 + rand()%5000;
+ Claw_Rage_Timer = urand(15000, 20000);
me->SetSpeed(MOVE_RUN, 1.2f);
AttackStart(Unit::GetUnit(*me, TankGUID));
TankGUID = 0;
@@ -537,7 +537,7 @@ class boss_zuljin : public CreatureScript
++Claw_Counter;
if (Claw_Counter == 9)
{
- Lynx_Rush_Timer = 15000 + rand()%5000;
+ Lynx_Rush_Timer = urand(15000, 20000);
me->SetSpeed(MOVE_RUN, 1.2f);
AttackStart(Unit::GetUnit(*me, TankGUID));
TankGUID = 0;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
index c515b625e6f..5ca43e9268e 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
@@ -66,7 +66,7 @@ class boss_gahzranka : public CreatureScript
if (Frostbreath_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FROSTBREATH);
- Frostbreath_Timer = 7000 + rand()%4000;
+ Frostbreath_Timer = urand(7000, 11000);
} else Frostbreath_Timer -= diff;
//MassiveGeyser_Timer
@@ -75,14 +75,14 @@ class boss_gahzranka : public CreatureScript
DoCast(me->getVictim(), SPELL_MASSIVEGEYSER);
DoResetThreat();
- MassiveGeyser_Timer = 22000 + rand()%10000;
+ MassiveGeyser_Timer = urand(22000, 32000);
} else MassiveGeyser_Timer -= diff;
//Slam_Timer
if (Slam_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SLAM);
- Slam_Timer = 12000 + rand()%8000;
+ Slam_Timer = urand(12000, 20000);
} else Slam_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
index e01dafd4777..d3922602a17 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
@@ -47,8 +47,8 @@ class boss_grilek : public CreatureScript
void Reset()
{
- Avartar_Timer = 15000 + rand()%10000;
- GroundTremor_Timer = 8000 + rand()%8000;
+ Avartar_Timer = urand(15000, 25000);
+ GroundTremor_Timer = urand(8000, 16000);
}
void EnterCombat(Unit* /*who*/)
@@ -75,14 +75,14 @@ class boss_grilek : public CreatureScript
if (target)
AttackStart(target);
- Avartar_Timer = 25000 + rand()%10000;
+ Avartar_Timer = urand(25000, 35000);
} else Avartar_Timer -= diff;
//GroundTremor_Timer
if (GroundTremor_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_GROUNDTREMOR);
- GroundTremor_Timer = 12000 + rand()%4000;
+ GroundTremor_Timer = urand(12000, 16000);
} else GroundTremor_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
index 77b8955158a..484499b1567 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
@@ -126,7 +126,7 @@ class boss_hakkar : public CreatureScript
if (CorruptedBlood_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CORRUPTEDBLOOD);
- CorruptedBlood_Timer = 30000 + rand()%15000;
+ CorruptedBlood_Timer = urand(30000, 45000);
} else CorruptedBlood_Timer -= diff;
//CauseInsanity_Timer
@@ -135,7 +135,7 @@ class boss_hakkar : public CreatureScript
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_CAUSEINSANITY);
- CauseInsanity_Timer = 35000 + rand()%8000;
+ CauseInsanity_Timer = urand(35000, 43000);
} else CauseInsanity_Timer -= diff;*/
//WillOfHakkar_Timer
@@ -144,7 +144,7 @@ class boss_hakkar : public CreatureScript
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_WILLOFHAKKAR);
- WillOfHakkar_Timer = 25000 + rand()%10000;
+ WillOfHakkar_Timer = urand(25000, 35000);
} else WillOfHakkar_Timer -= diff;
if (!Enraged && Enrage_Timer <= diff)
@@ -163,7 +163,7 @@ class boss_hakkar : public CreatureScript
if (AspectOfJeklik_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ASPECT_OF_JEKLIK);
- AspectOfJeklik_Timer = 10000 + rand()%4000;
+ AspectOfJeklik_Timer = urand(10000, 14000);
} else AspectOfJeklik_Timer -= diff;
}
}
@@ -234,7 +234,7 @@ class boss_hakkar : public CreatureScript
DoCast(me, SPELL_ASPECT_OF_ARLOKK);
DoResetThreat();
- AspectOfArlokk_Timer = 10000 + rand()%5000;
+ AspectOfArlokk_Timer = urand(10000, 15000);
} else AspectOfArlokk_Timer -= diff;
}
}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
index b8f4b0a50a1..73fa91dbdd8 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
@@ -48,9 +48,9 @@ class boss_hazzarah : public CreatureScript
void Reset()
{
- ManaBurn_Timer = 4000 + rand()%6000;
- Sleep_Timer = 10000 + rand()%8000;
- Illusions_Timer = 10000 + rand()%8000;
+ ManaBurn_Timer = urand(4000, 10000);
+ Sleep_Timer = urand(10000, 18000);
+ Illusions_Timer = urand(10000, 18000);
}
void EnterCombat(Unit* /*who*/)
@@ -66,14 +66,14 @@ class boss_hazzarah : public CreatureScript
if (ManaBurn_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MANABURN);
- ManaBurn_Timer = 8000 + rand()%8000;
+ ManaBurn_Timer = urand(8000, 16000);
} else ManaBurn_Timer -= diff;
//Sleep_Timer
if (Sleep_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SLEEP);
- Sleep_Timer = 12000 + rand()%8000;
+ Sleep_Timer = urand(12000, 20000);
} else Sleep_Timer -= diff;
//Illusions_Timer
@@ -93,7 +93,7 @@ class boss_hazzarah : public CreatureScript
Illusion->AI()->AttackStart(target);
}
- Illusions_Timer = 15000 + rand()%10000;
+ Illusions_Timer = urand(15000, 25000);
} else Illusions_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
index fcb492d47f7..87dc0e372f6 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -119,19 +119,19 @@ class boss_jeklik : public CreatureScript
AttackStart(target);
}
- Charge_Timer = 15000 + rand()%15000;
+ Charge_Timer = urand(15000, 30000);
} else Charge_Timer -= diff;
if (SonicBurst_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SONICBURST);
- SonicBurst_Timer = 8000 + rand()%5000;
+ SonicBurst_Timer = urand(8000, 13000);
} else SonicBurst_Timer -= diff;
if (Screech_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SCREECH);
- Screech_Timer = 18000 + rand()%8000;
+ Screech_Timer = urand(18000, 26000);
} else Screech_Timer -= diff;
if (SpawnBats_Timer <= diff)
@@ -168,7 +168,7 @@ class boss_jeklik : public CreatureScript
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(target, SPELL_SHADOW_WORD_PAIN);
- ShadowWordPain_Timer = 12000 + rand()%6000;
+ ShadowWordPain_Timer = urand(12000, 18000);
}
}ShadowWordPain_Timer -=diff;
@@ -182,14 +182,14 @@ class boss_jeklik : public CreatureScript
{
me->InterruptNonMeleeSpells(false);
DoCast(me->getVictim(), SPELL_CHAIN_MIND_FLAY);
- ChainMindFlay_Timer = 15000 + rand()%15000;
+ ChainMindFlay_Timer = urand(15000, 30000);
}ChainMindFlay_Timer -=diff;
if (GreaterHeal_Timer <= diff)
{
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_GREATERHEAL);
- GreaterHeal_Timer = 25000 + rand()%10000;
+ GreaterHeal_Timer = urand(25000, 35000);
}GreaterHeal_Timer -=diff;
if (SpawnFlyingBats_Timer <= diff)
@@ -202,7 +202,7 @@ class boss_jeklik : public CreatureScript
if (FlyingBat)
FlyingBat->AI()->AttackStart(target);
- SpawnFlyingBats_Timer = 10000 + rand()%5000;
+ SpawnFlyingBats_Timer = urand(10000, 15000);
} else SpawnFlyingBats_Timer -=diff;
}
else
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
index 7c8e53038ab..9c82c3eddfb 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
@@ -83,7 +83,7 @@ class boss_jindo : public CreatureScript
if (BrainWashTotem_Timer <= diff)
{
DoCast(me, SPELL_BRAINWASHTOTEM);
- BrainWashTotem_Timer = 18000 + rand()%8000;
+ BrainWashTotem_Timer = urand(18000, 26000);
} else BrainWashTotem_Timer -= diff;
//HealingWard_Timer
@@ -91,7 +91,7 @@ class boss_jindo : public CreatureScript
{
//DoCast(me, SPELL_POWERFULLHEALINGWARD);
me->SummonCreature(14987, me->GetPositionX()+3, me->GetPositionY()-2, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
- HealingWard_Timer = 14000 + rand()%6000;
+ HealingWard_Timer = urand(14000, 20000);
} else HealingWard_Timer -= diff;
//Hex_Timer
@@ -102,7 +102,7 @@ class boss_jindo : public CreatureScript
if (DoGetThreat(me->getVictim()))
DoModifyThreatPercent(me->getVictim(), -80);
- Hex_Timer = 12000 + rand()%8000;
+ Hex_Timer = urand(12000, 20000);
} else Hex_Timer -= diff;
//Casting the delusion curse with a shade. So shade will attack the same target with the curse.
@@ -117,7 +117,7 @@ class boss_jindo : public CreatureScript
Shade->AI()->AttackStart(target);
}
- Delusions_Timer = 4000 + rand()%8000;
+ Delusions_Timer = urand(4000, 12000);
} else Delusions_Timer -= diff;
//Teleporting a random gamer and spawning 9 skeletons that will attack this gamer
@@ -162,7 +162,7 @@ class boss_jindo : public CreatureScript
Skeletons->AI()->AttackStart(target);
}
- Teleport_Timer = 15000 + rand()%8000;
+ Teleport_Timer = urand(15000, 23000);
} else Teleport_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index 7dc357f692a..06ae34b79b2 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -325,7 +325,7 @@ class mob_ohgan : public CreatureScript
if (SunderArmor_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SUNDERARMOR);
- SunderArmor_Timer = 10000 + rand()%5000;
+ SunderArmor_Timer = urand(10000, 15000);
} else SunderArmor_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
index f6704a50e6f..5dafa54a2ba 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -105,13 +105,13 @@ class boss_marli : public CreatureScript
if (PoisonVolley_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_POISONVOLLEY);
- PoisonVolley_Timer = 10000 + rand()%10000;
+ PoisonVolley_Timer = urand(10000, 20000);
} else PoisonVolley_Timer -= diff;
if (!PhaseTwo && Aspect_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI);
- Aspect_Timer = 13000 + rand()%5000;
+ Aspect_Timer = urand(13000, 18000);
} else Aspect_Timer -= diff;
if (!Spawned && SpawnStartSpiders_Timer <= diff)
@@ -149,7 +149,7 @@ class boss_marli : public CreatureScript
Creature* Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
if (Spider)
Spider->AI()->AttackStart(target);
- SpawnSpider_Timer = 12000 + rand()%5000;
+ SpawnSpider_Timer = urand(12000, 17000);
} else SpawnSpider_Timer -= diff;
if (!PhaseTwo && Transform_Timer <= diff)
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
index bbff6a55ffb..c3bf09ee28d 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
@@ -55,11 +55,11 @@ class boss_renataki : public CreatureScript
void Reset()
{
- Invisible_Timer = 8000 + rand()%10000;
+ Invisible_Timer = urand(8000, 18000);
Ambush_Timer = 3000;
Visible_Timer = 4000;
- Aggro_Timer = 15000 + rand()%10000;
- ThousandBlades_Timer = 4000 + rand()%4000;
+ Aggro_Timer = urand(15000, 25000);
+ ThousandBlades_Timer = urand(4000, 8000);
Invisible = false;
Ambushed = false;
@@ -85,7 +85,7 @@ class boss_renataki : public CreatureScript
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Invisible = true;
- Invisible_Timer = 15000 + rand()%15000;
+ Invisible_Timer = urand(15000, 30000);
} else Invisible_Timer -= diff;
if (Invisible)
@@ -135,13 +135,13 @@ class boss_renataki : public CreatureScript
if (target)
AttackStart(target);
- Aggro_Timer = 7000 + rand()%13000;
+ Aggro_Timer = urand(7000, 20000);
} else Aggro_Timer -= diff;
if (ThousandBlades_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_THOUSANDBLADES);
- ThousandBlades_Timer = 7000 + rand()%5000;
+ ThousandBlades_Timer = urand(7000, 12000);
} else ThousandBlades_Timer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
index 4fbb5cd1109..743ec211529 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -167,13 +167,13 @@ class boss_thekal : public CreatureScript
if (!PhaseTwo && MortalCleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTALCLEAVE);
- MortalCleave_Timer = 15000 + rand()%5000;
+ MortalCleave_Timer = urand(15000, 20000);
} else MortalCleave_Timer -= diff;
if (!PhaseTwo && Silence_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SILENCE);
- Silence_Timer = 20000 + rand()%5000;
+ Silence_Timer = urand(20000, 25000);
} else Silence_Timer -= diff;
if (!PhaseTwo && !WasDead && !HealthAbovePct(5))
@@ -226,7 +226,7 @@ class boss_thekal : public CreatureScript
AttackStart(target);
}
- Charge_Timer = 15000 + rand()%7000;
+ Charge_Timer = urand(15000, 22000);
} else Charge_Timer -= diff;
if (Frenzy_Timer <= diff)
@@ -238,13 +238,13 @@ class boss_thekal : public CreatureScript
if (ForcePunch_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SILENCE);
- ForcePunch_Timer = 16000 + rand()%5000;
+ ForcePunch_Timer = urand(16000, 21000);
} else ForcePunch_Timer -= diff;
if (SummonTigers_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SUMMONTIGERS);
- SummonTigers_Timer = 10000 + rand()%4000;
+ SummonTigers_Timer = urand(10000, 14000);
} else SummonTigers_Timer -= diff;
if (HealthBelowPct(11) && !Enraged)
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
index 7288d063c21..179935524a8 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
@@ -47,8 +47,8 @@ class boss_wushoolay : public CreatureScript
void Reset()
{
- LightningCloud_Timer = 5000 + rand()%5000;
- LightningWave_Timer = 8000 + rand()%8000;
+ LightningCloud_Timer = urand(5000, 10000);
+ LightningWave_Timer = urand(8000, 16000);
}
void EnterCombat(Unit* /*who*/)
@@ -64,7 +64,7 @@ class boss_wushoolay : public CreatureScript
if (LightningCloud_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_LIGHTNINGCLOUD);
- LightningCloud_Timer = 15000 + rand()%5000;
+ LightningCloud_Timer = urand(15000, 20000);
} else LightningCloud_Timer -= diff;
//LightningWave_Timer
@@ -74,7 +74,7 @@ class boss_wushoolay : public CreatureScript
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (target) DoCast(target, SPELL_LIGHTNINGWAVE);
- LightningWave_Timer = 12000 + rand()%4000;
+ LightningWave_Timer = urand(12000, 16000);
} else LightningWave_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
index d02cce3f17c..d9171308ba6 100644
--- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
@@ -204,7 +204,7 @@ public:
if (timerJustice <= diff)
{
DoCast(me, SPELL_SEAL_OF_JUSTICE);
- timerJustice = 10000 + rand()%10000;
+ timerJustice = urand(10000, 20000);
}
else
timerJustice -= diff;
@@ -215,7 +215,7 @@ public:
if (timerJudLight <= diff)
{
DoCast(me, SPELL_JUDGEMENT_OF_LIGHT);
- timerJudLight = 10000 + rand()%10000;
+ timerJudLight = urand(10000, 20000);
}
else
timerJudLight -= diff;
@@ -226,7 +226,7 @@ public:
if (timerCommand <= diff)
{
DoCast(me, SPELL_SEAL_OF_COMMAND);
- timerCommand = 20000 + rand()%20000;
+ timerCommand = urand(20000, 40000);
}
else
timerCommand -= diff;