*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
This commit is contained in:
maximius
2009-10-13 19:11:34 -07:00
parent 83b8b6590d
commit 9fdc4e137b

View File

@@ -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)