*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
This commit is contained in:
1 parent
2853aa1cd1
commit
f8a6434fc0
22 files changed
+323
-248
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user