*Fix a bug that mobs do not return home after wipe.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-15 10:50:10 -06:00
parent 3421942b2b
commit abe53c5cb6
3 changed files with 12 additions and 2 deletions

View File

@@ -9925,7 +9925,7 @@ void Unit::SetInCombatState(bool PvP)
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
if(GetTypeId() != TYPEID_PLAYER)
if(GetTypeId() != TYPEID_PLAYER && GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_IDLE) != IDLE_MOTION_TYPE)
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
if(GetTypeId() != TYPEID_PLAYER && ((Creature*)this)->isPet())