diff options
author | Machiavelli <none@none> | 2009-06-10 08:45:45 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2009-06-10 08:45:45 +0200 |
commit | ee9beadbc20d24ec11346858db36c029c9c04b90 (patch) | |
tree | ad8d5f89f9b7e1418c5bc00990370224b91453f3 /src/game/CreatureEventAI.cpp | |
parent | f137dc02ecadb515928655dd6603f33187731fec (diff) | |
parent | c9d9ae1e491243f82be5ac84dc2ad51dfbae35eb (diff) |
Merge
--HG--
branch : trunk
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) |