aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-13 19:48:35 -0700
committermaximius <none@none>2009-10-13 19:48:35 -0700
commite490c33725c670e0a43718fbc9dc7e3ac69fb3aa (patch)
treec98d5cb3d51b5fa3e8b517436dcd2c80659ad769 /src/game/Unit.cpp
parentc6b940a078379c9c258ed04eb50b200df9194e8e (diff)
*Some cleanup, change some illogical conditions (if you can attack your target is no reason to ignore the target, o_O)
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 151ae917c82..af70169ee39 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -11368,7 +11368,7 @@ Unit* Creature::SelectVictim()
// Note: creature not have targeted movement generator but have attacker in this case
for(AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
{
- if((*itr) && canCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
+ if((*itr) && !canCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
&& !((Creature*)(*itr))->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
return NULL;
}