diff options
author | megamage <none@none> | 2009-08-22 21:07:36 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-22 21:07:36 -0500 |
commit | b524ef4abe727f8a15cafbadef9a7cbfce0fc8f4 (patch) | |
tree | f901428b6eb5d5734c57a20f550e3612d0c58321 | |
parent | ecf8d4cb527d88d9d26808ebbd118dbe4107e956 (diff) |
*Use canCreatureAttack in SelectVictim
--HG--
branch : trunk
-rw-r--r-- | src/game/Unit.cpp | 2 |
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; } |