From b524ef4abe727f8a15cafbadef9a7cbfce0fc8f4 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 22 Aug 2009 21:07:36 -0500 Subject: *Use canCreatureAttack in SelectVictim --HG-- branch : trunk --- src/game/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3