Core/CreatureAI: Properly initialize attack distance in CasterAI

This commit is contained in:
Shauren
2011-05-12 10:43:54 +02:00
parent c98438ae8f
commit 6396cf3e46
+1 -1
View File
@@ -123,7 +123,7 @@ void CasterAI::InitializeAI()
{ {
CombatAI::InitializeAI(); CombatAI::InitializeAI();
float m_attackDist = 30.0f; m_attackDist = 30.0f;
for (SpellVct::iterator itr = spells.begin(); itr != spells.end(); ++itr) for (SpellVct::iterator itr = spells.begin(); itr != spells.end(); ++itr)
if (AISpellInfo[*itr].condition == AICOND_COMBAT && m_attackDist > GetAISpellInfo(*itr)->maxRange) if (AISpellInfo[*itr].condition == AICOND_COMBAT && m_attackDist > GetAISpellInfo(*itr)->maxRange)
m_attackDist = GetAISpellInfo(*itr)->maxRange; m_attackDist = GetAISpellInfo(*itr)->maxRange;