aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2009-12-25 11:40:48 +0100
committern0n4m3 <none@none>2009-12-25 11:40:48 +0100
commit2e1c4882416c9f88d3c0e6421dcf86499dd8ce90 (patch)
treefc9521f888dd8e9002836893f019a47e0b1efc74 /src/game/Unit.cpp
parent806a018ae32da774781fbcc6bf7cd59c91f49e95 (diff)
Fixed bug in SetInCombatState and script boss_four_horsemen
--HG-- branch : trunk
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)