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'
This commit is contained in:
Spp
2011-12-28 10:51:16 +01:00
parent 4fb634f9a5
commit 3792b470e0
66 changed files with 309 additions and 309 deletions
@@ -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
@@ -824,7 +824,7 @@ public:
void Reset()
{
ChaseTimer = 30000;
FearTimer = 25000 + rand()%10000;
FearTimer = urand(25000, 35000);
SwipeTimer = 5000;
HoodGUID = 0;
@@ -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;
}
};
@@ -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;
}
@@ -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;
}
@@ -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();
@@ -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
@@ -612,7 +612,7 @@ public:
KalecGUID = 0;
}
ShadowBoltTimer = 7000 + rand()%3 * 1000;
ShadowBoltTimer = urand(7, 10) * 1000;
AgonyCurseTimer = 20000;
CorruptionStrikeTimer = 13000;
CheckTimer = 1000;
@@ -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);
}
}
@@ -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;
@@ -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;
}
@@ -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;
@@ -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();
@@ -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();
@@ -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;
}
}
@@ -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();
@@ -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
@@ -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();
@@ -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();
@@ -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)
@@ -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;
}
@@ -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)
@@ -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();
@@ -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;