*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:
1 parent
c6b940a078
commit
e490c33725
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user