From a58505eaf8e8a97b7cab64608d88497a127f7465 Mon Sep 17 00:00:00 2001 From: ccrs Date: Fri, 6 Jan 2017 23:39:16 +0100 Subject: cb634e6fba followup updates #18401 --- src/server/game/AI/SmartScripts/SmartAI.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/server/game/AI/SmartScripts') diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 16206f91d58..f46860dce68 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -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*/) -- cgit v1.2.3