Core\Waypoint: Fix waypoints not being started, and not starting combat when they do path.
This commit is contained in:
@@ -37,6 +37,7 @@ namespace Game.Movement
|
|||||||
isArrivalDone = false;
|
isArrivalDone = false;
|
||||||
pathId = pathid;
|
pathId = pathid;
|
||||||
repeating = _repeating;
|
repeating = _repeating;
|
||||||
|
loadedFromDB = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WaypointMovementGenerator(WaypointPath _path, bool _repeating = true)
|
public WaypointMovementGenerator(WaypointPath _path, bool _repeating = true)
|
||||||
@@ -90,6 +91,10 @@ namespace Game.Movement
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Set home position at place on waypoint movement.
|
||||||
|
if (creature.GetTransGUID().IsEmpty())
|
||||||
|
creature.SetHomePosition(creature.GetPosition());
|
||||||
|
|
||||||
if (creature.IsStopped())
|
if (creature.IsStopped())
|
||||||
Stop(loadedFromDB ? WorldConfig.GetIntValue(WorldCfg.CreatureStopForPlayer) : 2 * Time.Hour * Time.InMilliseconds);
|
Stop(loadedFromDB ? WorldConfig.GetIntValue(WorldCfg.CreatureStopForPlayer) : 2 * Time.Hour * Time.InMilliseconds);
|
||||||
else if (creature.moveSpline.Finalized())
|
else if (creature.moveSpline.Finalized())
|
||||||
|
|||||||
Reference in New Issue
Block a user