[10528] Run creature_movement_scripts also at first waypoint

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-09-24 19:05:23 +02:00
parent 54980328f9
commit f92518ee14
2 changed files with 8 additions and 1 deletions

View file

@ -82,6 +82,13 @@ void WaypointMovementGenerator<Creature>::LoadPath(Creature &creature)
creature.AddSplineFlag(SPLINEFLAG_UNKNOWN7); creature.AddSplineFlag(SPLINEFLAG_UNKNOWN7);
const WaypointNode &node = i_path->at(i_currentNode); 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_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime()); i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10527" #define REVISION_NR "10528"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__