aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-29 22:05:49 -0700
committermaximius <none@none>2009-09-29 22:05:49 -0700
commit693251497a751821711262382442b54b91446231 (patch)
tree217ccf868949eddc23798c04f43706bd1f5a6ead
parent09bb578d86d40e843c86c3d34b300893e17eb0fa (diff)
*Friends shouldn't fight friends, even if that means you have to watch your friends kill each other.
--HG-- branch : trunk
-rw-r--r--src/game/Creature.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index a9a7b6bf838..305df6ad20e 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -2171,6 +2171,9 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
// friendlies and other mobs they shouldn't attack
bool Creature::_IsTargetAcceptable(const Unit* target) const
{
+ if(IsFriendlyTo(target)) // friends shouldn't fight friends
+ return false;
+
const Unit* targetVictim = target->getAttackerForHelper();
if(!targetVictim) // if target does not have a victim, the target is acceptable