[svn] Use IsWithinCombatDist for all AI. This should fix the bug that pet and guard does not attack target. (Note: some scriptedAI may need to update)

--HG--
branch : trunk
This commit is contained in:
megamage committed 2008-11-03 14:11:09 -06:00
1 parent da5786249f
commit 6a8878fb5d
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -117,7 +117,7 @@ void GuardAI::UpdateAI(const uint32 /*diff*/)
if( i_creature.isAttackReady() )
{
if( i_creature.IsWithinDistInMap(i_creature.getVictim(), ATTACK_DISTANCE))
if( i_creature.IsWithinCombatDist(i_creature.getVictim(), ATTACK_DISTANCE))
{
i_creature.AttackerStateUpdate(i_creature.getVictim());
i_creature.resetAttackTimer();