aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 f40eefe550b..634bbf12bf6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -11243,7 +11243,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)->IsInMap(this) && canAttack(*itr) && (*itr)->isInAccessiblePlaceFor((Creature*)this) && ((*itr)->GetTypeId() != TYPEID_PLAYER && (!((Creature*)(*itr))->HasSummonMask(SUMMON_MASK_CONTROLABLE_GUARDIAN))))
+ if(canCreatureAttack(*itr) && ((*itr)->GetTypeId() != TYPEID_PLAYER && (!((Creature*)(*itr))->HasSummonMask(SUMMON_MASK_CONTROLABLE_GUARDIAN))))
return NULL;
}