*Fix a bug that mobs do not stop chasing players.
--HG-- branch : trunk
This commit is contained in:
+5
-2
@@ -10448,8 +10448,11 @@ 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())
|
||||||
{
|
{
|
||||||
((Creature*)this)->AI()->AttackStart(target);
|
if(!((Creature*)this)->IsOutOfThreatArea(target))
|
||||||
return true;
|
{
|
||||||
|
((Creature*)this)->AI()->AttackStart(target);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_invisibilityMask)
|
if(m_invisibilityMask)
|
||||||
|
|||||||
Reference in New Issue
Block a user