diff options
Diffstat (limited to 'src/game/CreatureEventAI.cpp')
-rw-r--r-- | src/game/CreatureEventAI.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index 834741fd2ae..3eb3a75c874 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -957,11 +957,12 @@ void CreatureEventAI::MoveInLineOfSight(Unit *who) } } - //if (m_creature->isCivilian() && m_creature->IsNeutralToAll()) - // return; - - if(me->canStartAttack(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()); } void CreatureEventAI::SpellHit(Unit* pUnit, const SpellEntry* pSpell) |