mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 20:52:22 -04:00
*Better fix to the waypoint mobs returning to spawn issue, thanks XTElite1
--HG-- branch : trunk
This commit is contained in:
@@ -10528,9 +10528,9 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
||||
if(GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
// Set home position at place of engaging combat for escorted creatures
|
||||
//if(((Creature*)this)->IsAIEnabled)
|
||||
//if (((Creature *)this)->AI()->IsEscorted())
|
||||
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
if((((Creature*)this)->IsAIEnabled && ((Creature*)this)->AI()->IsEscorted()) || ((Creature*)this)->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
|
||||
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
|
||||
if(enemy)
|
||||
{
|
||||
if(((Creature*)this)->IsAIEnabled)
|
||||
|
||||
Reference in New Issue
Block a user