aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/base/escort_ai.h2
-rw-r--r--src/game/Unit.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/bindings/scripts/base/escort_ai.h b/src/bindings/scripts/base/escort_ai.h
index 4ac826c6c80..37c2ea30117 100644
--- a/src/bindings/scripts/base/escort_ai.h
+++ b/src/bindings/scripts/base/escort_ai.h
@@ -71,7 +71,7 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI
void SetEscortPaused(bool uPaused);
bool HasEscortState(uint32 uiEscortState) { return (m_uiEscortState & uiEscortState); }
- virtual bool IsEscorted() { return true; }
+ virtual bool IsEscorted() { return (m_uiEscortState & STATE_ESCORT_ESCORTING); }
void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; }
float GetMaxPlayerDistance() { return MaxPlayerDistance; }
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 459d9c40bac..3c0e8a94c20 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10616,7 +10616,8 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
{
// Set home position at place of engaging combat for escorted creatures
if(( IsAIEnabled && ((Creature*)this)->AI()->IsEscorted() ) ||
- GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
+ GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE ||
+ ((Creature*)this)->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
if (enemy)