diff options
| author | maximius <none@none> | 2009-10-14 15:18:02 -0700 |
|---|---|---|
| committer | maximius <none@none> | 2009-10-14 15:18:02 -0700 |
| commit | 3e8b377ac4d002fb16e513fe190ea0e13bf627f2 (patch) | |
| tree | 592557d0777b035ff4bb2cfbea46801fc7775590 /src/bindings/scripts/base | |
| parent | 27c7d6aa85bee461c15e81da23ed4d5fec4851f0 (diff) | |
*Some minor cleanup.
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts/base')
| -rw-r--r-- | src/bindings/scripts/base/simple_ai.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bindings/scripts/base/simple_ai.cpp b/src/bindings/scripts/base/simple_ai.cpp index d4755cfac8b..60511d163b7 100644 --- a/src/bindings/scripts/base/simple_ai.cpp +++ b/src/bindings/scripts/base/simple_ai.cpp @@ -95,7 +95,7 @@ void SimpleAI::EnterCombat(Unit *who) Spell_Timer[9] = Spell[9].First_Cast; else Spell_Timer[9] = 1000; - uint32 random_text = rand()%3; + uint8 random_text = urand(0,2); //Random text if (Aggro_TextId[random_text]) @@ -108,7 +108,7 @@ void SimpleAI::EnterCombat(Unit *who) void SimpleAI::KilledUnit(Unit *victim) { - uint32 random_text = rand()%3; + uint8 random_text = urand(0,2); //Random yell if (Kill_TextId[random_text]) @@ -156,7 +156,7 @@ void SimpleAI::DamageTaken(Unit *killer, uint32 &damage) if (m_creature->GetHealth() > damage) return; - uint32 random_text = rand()%3; + uint8 random_text = urand(0,2); //Random yell if (Death_TextId[random_text]) @@ -251,7 +251,7 @@ void SimpleAI::UpdateAI(const uint32 diff) //Yell and sound use the same number so that you can make //the Creature yell with the correct sound effect attached - uint32 random_text = rand()%3; + uint8 random_text = urand(0,2); //Random yell if (Spell[i].TextId[random_text]) |
