aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-21 10:52:02 -0500
committermegamage <none@none>2009-08-21 10:52:02 -0500
commitd8e5b86e543921606e450ebfcaa08aad02bdb3c1 (patch)
tree3fa30feb430ae609b489d4889b1bc30cb0524e68 /src
parent2ecd247dd438abf1949dfb56a52ed20ffe527231 (diff)
*Add assert back to antiair AI. spell[0] is necessary for this AI. If there is no spell[0] in db, then this ai should not be used.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
index 3a1f7304688..b13423e850f 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
@@ -104,16 +104,11 @@ struct TRINITY_DLL_DECL mob_anti_airAI : public ScriptedAI
{
mob_anti_airAI(Creature *c) : ScriptedAI(c)
{
- if(!me->m_spells[0])
- spell = NULL;
- else
- spell = me->m_spells[0];
-
+ assert(me->m_spells[0]);
range = DoGetSpellMaxRange(me->m_spells[0]);
}
float range;
- uint32 spell;
void MoveInLineOfSight(Unit *who)
{
@@ -141,7 +136,7 @@ struct TRINITY_DLL_DECL mob_anti_airAI : public ScriptedAI
if(me->getVictim()->IsFlying() || !me->IsWithinMeleeRange(me->getVictim()))
{
- if(!DoSpellAttackIfReady(spell))
+ if(!DoSpellAttackIfReady(me->m_spells[0]))
EnterEvadeMode();
}
else