aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index f8d71b8db66..3a87804a48b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10991,9 +10991,9 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
if (GetTypeId() != TYPEID_PLAYER)
{
// Set home position at place of engaging combat for escorted creatures
- if (( IsAIEnabled && ((Creature*)this)->AI()->IsEscorted() ) ||
- GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE ||
- GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
+ if ((IsAIEnabled && ((Creature*)this)->AI()->IsEscorted()) &&
+ (GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE ||
+ GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE))
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
if (enemy)