aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts/base
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-26 02:09:26 -0700
committermaximius <none@none>2009-09-26 02:09:26 -0700
commitf8a6434fc0c2ea7cfd325830bac6a208e171f0ab (patch)
treecb5feaedb834a02cb328525971f59140edb28c3b /src/bindings/scripts/base
parent2853aa1cd1bb3026d697672aefb6eace902f90b1 (diff)
*Replace a ton of switches with RAND(), and overload RAND() to support up to 16 parameters.
*Add a safety check to prevent knocking players off of transports, just in case they die while on one. *Fix a couple incorrect spell defines. --HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts/base')
-rw-r--r--src/bindings/scripts/base/guard_ai.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/bindings/scripts/base/guard_ai.cpp b/src/bindings/scripts/base/guard_ai.cpp
index b55eae2dbad..1001d3a1170 100644
--- a/src/bindings/scripts/base/guard_ai.cpp
+++ b/src/bindings/scripts/base/guard_ai.cpp
@@ -46,14 +46,7 @@ void guardAI::Reset()
void guardAI::EnterCombat(Unit *who)
{
if (m_creature->GetEntry() == 15184)
- {
- switch(rand()%3)
- {
- case 0: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
- case 1: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
- case 2: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
- }
- }
+ DoScriptText(RAND(SAY_GUARD_SIL_AGGRO1,SAY_GUARD_SIL_AGGRO2,SAY_GUARD_SIL_AGGRO3), m_creature, who);
if (SpellEntry const *spell = m_creature->reachWithSpellAttack(who))
DoCastSpell(who, spell);