From f92518ee148b4cfe08efc4ba59e7ae1e156f1f8a Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Fri, 24 Sep 2010 19:05:23 +0200 Subject: [PATCH] [10528] Run creature_movement_scripts also at first waypoint Signed-off-by: NoFantasy --- src/game/WaypointMovementGenerator.cpp | 7 +++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index 6a9aa0597..a15c32307 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -82,6 +82,13 @@ void WaypointMovementGenerator::LoadPath(Creature &creature) creature.AddSplineFlag(SPLINEFLAG_UNKNOWN7); const WaypointNode &node = i_path->at(i_currentNode); + + if (node.script_id) + { + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature movement start script %u at point %u for creature %u (entry %u).", i_path->at(i_currentNode).script_id, i_currentNode, creature.GetDBTableGUIDLow(), creature.GetEntry()); + creature.GetMap()->ScriptsStart(sCreatureMovementScripts, node.script_id, &creature, &creature); + } + i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z); i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime()); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 9894f8ea0..9f82e9183 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10527" + #define REVISION_NR "10528" #endif // __REVISION_NR_H__