updates #18401
This commit is contained in:
ccrs
2017-01-06 23:39:16 +01:00
parent 75fe9ebd7a
commit a58505eaf8
2 changed files with 6 additions and 2 deletions

View File

@@ -308,7 +308,8 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
else if (moveType == WAYPOINT_MOTION_TYPE)
{
//Call WP function
WaypointReached(pointId);
if (pointId < _path.size())
WaypointReached(_path.at(pointId).id);
//End of the line
if (LastWP && LastWP == pointId)

View File

@@ -473,7 +473,10 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data)
return;
if (MovementType == WAYPOINT_MOTION_TYPE || (MovementType == POINT_MOTION_TYPE && Data == SMART_ESCORT_LAST_OOC_POINT))
MovepointReached(Data);
{
if (Data < _path.size())
MovepointReached(_path.at(Data).id);
}
}
void SmartAI::EnterEvadeMode(EvadeReason /*why*/)