diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index cb52b70a271..210060982a4 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8172,7 +8172,6 @@ bool Unit::Attack(Unit *victim, bool meleeAttack) ((WorldObject*)this)->SendMessageToSet(&data, true); ((Creature*)this)->CallAssistance(); - ((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); } // delay offhand weapon attack to next attack time @@ -9765,6 +9764,9 @@ void Unit::SetInCombatState(bool PvP) SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + if(GetTypeId() != TYPEID_PLAYER) + ((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); + if(GetTypeId() != TYPEID_PLAYER && ((Creature*)this)->isPet()) { UpdateSpeed(MOVE_RUN, true); |