*Fix the bug that sometimes assisting mobs just chase the attacker without attacking.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-24 11:38:49 -05:00
parent bcc23fac92
commit 0dd6fa751f
+2 -1
View File
@@ -112,7 +112,8 @@ void CreatureAI::MoveInLineOfSight(Unit *who)
AttackStart(who); AttackStart(who);
else if(who->getVictim() && me->IsFriendlyTo(who) else if(who->getVictim() && me->IsFriendlyTo(who)
&& me->IsWithinDistInMap(who, sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS)) && me->IsWithinDistInMap(who, sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))
&& me->canStartAttack(who->getVictim(), true)) //&& 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()); me->GetMotionMaster()->MoveChase(who->getVictim());
} }