TurretAI::TurretAI(Creature *c) : CreatureAI(c) { ASSERT(me->m_spells[0]); m_minRange = GetSpellMinRange(me->m_spells[0], false); me->m_CombatDistance = GetSpellMaxRange(me->m_spells[0], false); me->m_SightDistance = me->m_CombatDistance; }
TurretAI::TurretAI(Creature *c) : CreatureAI(c) { if (!me->m_spells[0]) sLog.outError("TurretAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry()); m_minRange = GetSpellMinRange(me->m_spells[0], false); me->m_CombatDistance = GetSpellMaxRange(me->m_spells[0], false); me->m_SightDistance = me->m_CombatDistance; }
ArchorAI::ArchorAI(Creature *c) : CreatureAI(c) { ASSERT(me->m_spells[0]); m_minRange = GetSpellMinRange(me->m_spells[0], false); if (!m_minRange) m_minRange = MELEE_RANGE; me->m_CombatDistance = GetSpellMaxRange(me->m_spells[0], false); me->m_SightDistance = me->m_CombatDistance; }
ArchorAI::ArchorAI(Creature *c) : CreatureAI(c) { if (!me->m_spells[0]) sLog->outError("ArchorAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry()); m_minRange = GetSpellMinRange(me->m_spells[0], false); if (!m_minRange) m_minRange = MELEE_RANGE; me->m_CombatDistance = GetSpellMaxRange(me->m_spells[0], false); me->m_SightDistance = me->m_CombatDistance; }
ArcherAI::ArcherAI(Creature* c) : CreatureAI(c) { SpellEntry const* spellInfo = sSpellStore.LookupEntry(me->m_spells[0]); m_minRange = spellInfo ? GetSpellMinRange(spellInfo) : 0; if (!m_minRange) m_minRange = MELEE_RANGE; me->SetCombatDistance(spellInfo ? GetSpellMaxRange(spellInfo) : 0); me->m_SightDistance = me->GetCombatDistance(); }