*Some cleanup, change some illogical conditions (if you can attack your target is no reason to ignore the target, o_O)

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-13 19:48:35 -07:00
parent c6b940a078
commit e490c33725
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}