*Try to fix the bug of mobs' chain aggro.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-20 16:12:23 -05:00
parent 5f04f0c1f0
commit 2d4dac0711
2 changed files with 2 additions and 7 deletions

View File

@@ -112,7 +112,7 @@ void CreatureAI::MoveInLineOfSight(Unit *who)
else if(who->getVictim() && me->IsFriendlyTo(who)
&& me->IsWithinDistInMap(who, sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))
&& me->canStartAttack(who->getVictim(), true))
AttackStart(who->getVictim());
me->GetMotionMaster()->MoveChase(who->getVictim());
}
void CreatureAI::SelectNearestTarget(Unit *who)

View File

@@ -998,12 +998,7 @@ void CreatureEventAI::MoveInLineOfSight(Unit *who)
}
}
if(me->canStartAttack(who, false))
AttackStart(who);
else if(who->getVictim() && me->IsFriendlyTo(who)
&& me->IsWithinDistInMap(who, sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))
&& me->canStartAttack(who->getVictim(), true))
AttackStart(who->getVictim());
CreatureAI::MoveInLineOfSight(who);
}
void CreatureEventAI::SpellHit(Unit* pUnit, const SpellEntry* pSpell)