From d9535071780f769902cc51b253f3d1a059aa90a5 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 12 Mar 2018 11:40:41 -0400 Subject: [PATCH] Core\Waypoint: Fix waypoints not being started, and not starting combat when they do path. --- Source/Game/Movement/Generators/WaypointMovement.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Game/Movement/Generators/WaypointMovement.cs b/Source/Game/Movement/Generators/WaypointMovement.cs index 66791ffd7..bb2badeab 100644 --- a/Source/Game/Movement/Generators/WaypointMovement.cs +++ b/Source/Game/Movement/Generators/WaypointMovement.cs @@ -37,6 +37,7 @@ namespace Game.Movement isArrivalDone = false; pathId = pathid; repeating = _repeating; + loadedFromDB = true; } public WaypointMovementGenerator(WaypointPath _path, bool _repeating = true) @@ -90,6 +91,10 @@ namespace Game.Movement } else { + // Set home position at place on waypoint movement. + if (creature.GetTransGUID().IsEmpty()) + creature.SetHomePosition(creature.GetPosition()); + if (creature.IsStopped()) Stop(loadedFromDB ? WorldConfig.GetIntValue(WorldCfg.CreatureStopForPlayer) : 2 * Time.Hour * Time.InMilliseconds); else if (creature.moveSpline.Finalized())