From 9fdc4e137b51542a9528249f00eee3dea2ecb4bb Mon Sep 17 00:00:00 2001 From: maximius Date: Tue, 13 Oct 2009 19:11:34 -0700 Subject: *Don't require AI for waypoint creatures. Hopefully this will fix the NPCs outside of Shadow Labyrinth never entering combat unless a player attacks them. --HG-- branch : trunk --- src/game/Unit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 33109f6851d..151ae917c82 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10576,7 +10576,8 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) if(GetTypeId() != TYPEID_PLAYER) { // Set home position at place of engaging combat for escorted creatures - if((((Creature*)this)->IsAIEnabled && ((Creature*)this)->AI()->IsEscorted()) || ((Creature*)this)->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) + if(( ((Creature*)this)->IsAIEnabled && ((Creature*)this)->AI()->IsEscorted() ) || + ((Creature*)this)->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) ((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); if(enemy) -- cgit v1.2.3