Fixed bug in SetInCombatState and script boss_four_horsemen

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-25 11:40:48 +01:00
parent 806a018ae3
commit 2e1c488241
4 changed files with 245 additions and 19 deletions
+3 -3
View File
@@ -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)