*Fix the behavior of mob assistance.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-08-27 13:54:57 -05:00
1 parent 72c18a7354
commit d91903e5b1
2 files changed
+14 -7

No files matched your search

+4 -5
View File
@@ -110,11 +110,10 @@ void CreatureAI::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))
&& me->canStartAttack(who->getVictim(), false)) // TODO: if we use true, it will not attack it when it arrives
me->GetMotionMaster()->MoveChase(who->getVictim());
//else if(who->getVictim() && me->IsFriendlyTo(who)
// && me->IsWithinDistInMap(who, sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))
// && me->canStartAttack(who->getVictim(), true)) // TODO: if we use true, it will not attack it when it arrives
// me->GetMotionMaster()->MoveChase(who->getVictim());
}
void CreatureAI::SelectNearestTarget(Unit *who)