mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
*Try to fix the bug of mobs' chain aggro.
--HG-- branch : trunk
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user