mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*Fix exploit with preventing creature enter evade mode.
--HG-- branch : trunk
This commit is contained in:
@@ -11406,16 +11406,11 @@ Unit* Creature::SelectVictim()
|
||||
// it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list
|
||||
// for example at owner command to pet attack some far away creature
|
||||
// Note: creature not have targeted movement generator but have attacker in this case
|
||||
if(m_attackers.size() && CanHaveThreatList() && m_ThreatManager.isThreatListEmpty()) //there are some cases null target are always returned,so creature evade can not be called at all. such as pull creature at a distance beyond the attackdist to the attacker
|
||||
return NULL;
|
||||
/*if( GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE )
|
||||
for(AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
|
||||
{
|
||||
for(AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
|
||||
{
|
||||
if( (*itr)->IsInMap(this) && canAttack(*itr) && (*itr)->isInAccessiblePlaceFor((Creature*)this) )
|
||||
return NULL;
|
||||
}
|
||||
}*/
|
||||
if( (*itr)->IsInMap(this) && canAttack(*itr) && (*itr)->isInAccessiblePlaceFor((Creature*)this) && ((*itr)->GetTypeId() != TYPEID_PLAYER && (!((Creature*)(*itr))->HasSummonMask(SUMMON_MASK_CONTROLABLE_GUARDIAN))))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// search nearby enemy before enter evade mode
|
||||
if(HasReactState(REACT_AGGRESSIVE))
|
||||
|
||||
Reference in New Issue
Block a user