diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index c6fd2e5c270..d37aa91373a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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) |