private static void WriteStandPoint(Utf8JsonWriter writer, StandPoint standPoint)
 {
     writer.WriteNumber("mapId", standPoint.mapId);
     writer.WritePropertyName("location");
     // While World-Ed generally supports setting off_x, off_z (in some cases)
     // many objects just contain junk in the offset fields.
     writer.WriteTile(standPoint.location.location);
     writer.WriteNumber("jumpPointId", standPoint.jumpPointId);
 }
Exemple #2
0
    public static void SetStandpoint(this GameObject obj, StandPointType type, int jumpPointId)
    {
        var standpoint = new StandPoint();

        standpoint.jumpPointId = jumpPointId;
        if (!GameSystems.JumpPoint.TryGet(jumpPointId, out _, out standpoint.mapId,
                                          out standpoint.location.location))
        {
            Logger.Warn("Used invalid jump point id {0} when setting standpoint for {1}", jumpPointId, obj);
        }

        obj.SetStandPoint(type, standpoint);
    }