*Fix the bug that sometimes assisting mobs just chase the attacker without attacking.
--HG-- branch : trunk
This commit is contained in:
@@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user