aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland/TempestKeep
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/Outland/TempestKeep
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/Outland/TempestKeep')
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp14
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp22
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp8
4 files changed, 24 insertions, 24 deletions
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 df7f95abe2a..cae13adfef7 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -102,7 +102,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript
if (Shadow_Power_Timer <= diff)
{
DoCast(me, SPELL_SHADOW_POWER);
- Shadow_Power_Timer = 20000 + rand()%8000;
+ Shadow_Power_Timer = urand(20000, 28000);
}
else
Shadow_Power_Timer -= diff;
@@ -128,7 +128,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript
if (Stream_of_Machine_Fluid_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_STREAM_OF_MACHINE_FLUID);
- Stream_of_Machine_Fluid_Timer = 35000 + rand()%15000;
+ Stream_of_Machine_Fluid_Timer = urand(35000, 50000);
}
else
Stream_of_Machine_Fluid_Timer -= diff;
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 05bf711432d..c5408b4bbf5 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -76,10 +76,10 @@ class boss_nethermancer_sepethrea : public CreatureScript
void Reset()
{
- frost_attack_Timer = 7000 + rand()%3000;
- arcane_blast_Timer = 12000 + rand()%6000;
- dragons_breath_Timer = 18000 + rand()%4000;
- knockback_Timer = 22000 + rand()%6000;
+ 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)
@@ -119,7 +119,7 @@ class boss_nethermancer_sepethrea : public CreatureScript
{
DoCast(me->getVictim(), SPELL_FROST_ATTACK);
- frost_attack_Timer = 7000 + rand()%3000;
+ frost_attack_Timer = urand(7000, 10000);
}
else
frost_attack_Timer -= diff;
@@ -141,7 +141,7 @@ class boss_nethermancer_sepethrea : public CreatureScript
return;
DoScriptText(RAND(SAY_DRAGONS_BREATH_1, SAY_DRAGONS_BREATH_2), me);
}
- dragons_breath_Timer = 12000 + rand()%10000;
+ dragons_breath_Timer = urand(12000, 22000);
}
else
dragons_breath_Timer -= diff;
@@ -150,7 +150,7 @@ class boss_nethermancer_sepethrea : public CreatureScript
if (knockback_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_KNOCKBACK);
- knockback_Timer = 15000 + rand()%10000;
+ knockback_Timer = urand(15000, 25000);
}
else
knockback_Timer -= diff;
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 54ecbdd621a..30a6bdbc0dd 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
@@ -83,10 +83,10 @@ class boss_pathaleon_the_calculator : public CreatureScript
void Reset()
{
Summon_Timer = 30000;
- ManaTap_Timer = 12000 + rand()%8000;
- ArcaneTorrent_Timer = 16000 + rand()%9000;
- Domination_Timer = 25000 + rand()%15000;
- ArcaneExplosion_Timer = 8000 + rand()%5000;
+ ManaTap_Timer = urand(12000, 20000);
+ ArcaneTorrent_Timer = urand(16000, 25000);
+ Domination_Timer = urand(25000, 40000);
+ ArcaneExplosion_Timer = urand(8000, 13000);
Enraged = false;
@@ -135,7 +135,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
Wraith->AI()->AttackStart(target);
}
DoScriptText(SAY_SUMMON, me);
- Summon_Timer = 30000 + rand()%15000;
+ Summon_Timer = urand(30000, 45000);
}
else
Summon_Timer -= diff;
@@ -143,7 +143,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
if (ManaTap_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MANA_TAP);
- ManaTap_Timer = 14000 + rand()%8000;
+ ManaTap_Timer = urand(14000, 22000);
}
else
ManaTap_Timer -= diff;
@@ -151,7 +151,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
if (ArcaneTorrent_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ARCANE_TORRENT);
- ArcaneTorrent_Timer = 12000 + rand()%6000;
+ ArcaneTorrent_Timer = urand(12000, 18000);
}
else
ArcaneTorrent_Timer -= diff;
@@ -163,7 +163,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
DoScriptText(RAND(SAY_DOMINATION_1, SAY_DOMINATION_2), me);
DoCast(target, SPELL_DOMINATION);
}
- Domination_Timer = 25000 + rand()%5000;
+ Domination_Timer = urand(25000, 30000);
}
else
Domination_Timer -= diff;
@@ -174,7 +174,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
if (ArcaneExplosion_Timer <= diff)
{
DoCast(me->getVictim(), H_SPELL_ARCANE_EXPLOSION);
- ArcaneExplosion_Timer = 10000 + rand()%4000;
+ ArcaneExplosion_Timer = urand(10000, 14000);
}
else
ArcaneExplosion_Timer -= diff;
@@ -218,7 +218,7 @@ class mob_nether_wraith : public CreatureScript
void Reset()
{
- ArcaneMissiles_Timer = 1000 + rand()%3000;
+ ArcaneMissiles_Timer = urand(1000, 4000);
Detonation_Timer = 20000;
Die_Timer = 2200;
Detonation = false;
@@ -237,7 +237,7 @@ class mob_nether_wraith : public CreatureScript
DoCast(target, SPELL_ARCANE_MISSILES);
else
DoCast(me->getVictim(), SPELL_ARCANE_MISSILES);
- ArcaneMissiles_Timer = 5000 + rand()%5000;
+ ArcaneMissiles_Timer = urand(5000, 10000);
}
else
ArcaneMissiles_Timer -=diff;
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
index 2bf4abbcb96..75c80b06816 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -152,9 +152,9 @@ class boss_warp_splinter : public CreatureScript
void Reset()
{
- War_Stomp_Timer = 25000 + rand()%15000;
+ War_Stomp_Timer = urand(25000, 40000);
Summon_Treants_Timer = 45000;
- Arcane_Volley_Timer = 8000 + rand()%12000;
+ Arcane_Volley_Timer = urand(8000, 20000);
me->SetSpeed(MOVE_RUN, 0.7f, true);
}
@@ -199,7 +199,7 @@ class boss_warp_splinter : public CreatureScript
if (War_Stomp_Timer <= diff)
{
DoCast(me->getVictim(), WAR_STOMP);
- War_Stomp_Timer = 25000 + rand()%15000;
+ War_Stomp_Timer = urand(25000, 40000);
}
else
War_Stomp_Timer -= diff;
@@ -208,7 +208,7 @@ class boss_warp_splinter : public CreatureScript
if (Arcane_Volley_Timer <= diff)
{
DoCast(me->getVictim(), DUNGEON_MODE(ARCANE_VOLLEY, ARCANE_VOLLEY_H));
- Arcane_Volley_Timer = 20000 + rand()%15000;
+ Arcane_Volley_Timer = urand(20000, 35000);
}
else
Arcane_Volley_Timer -= diff;