*Fix a bug that mobs do not stop chasing players.
--HG-- branch : trunk
This commit is contained in:
@@ -10447,10 +10447,13 @@ bool Unit::SelectHostilTarget()
|
|||||||
|
|
||||||
// search nearby enemy before enter evade mode
|
// search nearby enemy before enter evade mode
|
||||||
if(Unit *target = ((Creature*)this)->SelectNearestTarget())
|
if(Unit *target = ((Creature*)this)->SelectNearestTarget())
|
||||||
|
{
|
||||||
|
if(!((Creature*)this)->IsOutOfThreatArea(target))
|
||||||
{
|
{
|
||||||
((Creature*)this)->AI()->AttackStart(target);
|
((Creature*)this)->AI()->AttackStart(target);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(m_invisibilityMask)
|
if(m_invisibilityMask)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user