mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
*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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user