*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
This commit is contained in:
megamage
2009-08-21 10:52:02 -05:00
parent 2ecd247dd4
commit d8e5b86e54

View File

@@ -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