Partly revert 6760

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-26 11:57:57 +01:00
parent 2fa14abf42
commit 4638c8be9f

View File

@@ -11001,9 +11001,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)