From e490c33725c670e0a43718fbc9dc7e3ac69fb3aa Mon Sep 17 00:00:00 2001 From: maximius Date: Tue, 13 Oct 2009 19:48:35 -0700 Subject: *Some cleanup, change some illogical conditions (if you can attack your target is no reason to ignore the target, o_O) --HG-- branch : trunk --- src/game/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/Unit.cpp') 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; } -- cgit v1.2.3