Skip to content

Commit

Permalink
[10528] Run creature_movement_scripts also at first waypoint
Browse files Browse the repository at this point in the history
Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Sep 24, 2010
1 parent 3d627b7 commit df8c770
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/game/WaypointMovementGenerator.cpp
Expand Up @@ -82,6 +82,13 @@ void WaypointMovementGenerator<Creature>::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());
}
Expand Down
2 changes: 1 addition & 1 deletion 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__

0 comments on commit df8c770

Please sign in to comment.