muffin v7.4.18
This commit is contained in:
parent
53aa9fdee8
commit
f82b9ce2a2
50 changed files with 142364 additions and 230361 deletions
|
|
@ -15,9 +15,7 @@ public sealed class StringListOrValueConverter : JsonConverter<List<string>>
|
|||
int num = 1;
|
||||
List<string> list = new List<string>(num);
|
||||
CollectionsMarshal.SetCount(list, num);
|
||||
Span<string> span = CollectionsMarshal.AsSpan(list);
|
||||
int index = 0;
|
||||
span[index] = reader.GetString();
|
||||
CollectionsMarshal.AsSpan(list)[0] = reader.GetString();
|
||||
return list;
|
||||
}
|
||||
if (reader.TokenType != JsonTokenType.StartArray)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Questionable.Model.Common.Converter;
|
||||
|
||||
public sealed class VectorListConverter : JsonConverter<List<Vector3>>
|
||||
{
|
||||
private static readonly VectorConverter ItemConverter = new VectorConverter();
|
||||
|
||||
public override List<Vector3> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
if (reader.TokenType != JsonTokenType.StartArray)
|
||||
{
|
||||
throw new JsonException();
|
||||
}
|
||||
List<Vector3> list = new List<Vector3>();
|
||||
while (reader.Read())
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.EndArray)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
list.Add(ItemConverter.Read(ref reader, typeof(Vector3), options));
|
||||
}
|
||||
throw new JsonException();
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, List<Vector3> value, JsonSerializerOptions options)
|
||||
{
|
||||
writer.WriteStartArray();
|
||||
foreach (Vector3 item in value)
|
||||
{
|
||||
ItemConverter.Write(writer, item, options);
|
||||
}
|
||||
writer.WriteEndArray();
|
||||
}
|
||||
}
|
||||
|
|
@ -219,6 +219,18 @@ public sealed class ActionConverter : EnumConverter<EAction>
|
|||
EAction.CheerRhythmYellow,
|
||||
"Cheer Rhythm: Yellow"
|
||||
},
|
||||
{
|
||||
EAction.PruningPirouette,
|
||||
"Pruning Pirouette"
|
||||
},
|
||||
{
|
||||
EAction.RoaringEggscapade,
|
||||
"Roaring Eggscapade"
|
||||
},
|
||||
{
|
||||
EAction.TheSpriganator,
|
||||
"The Spriganator"
|
||||
},
|
||||
{
|
||||
EAction.CurtainCall,
|
||||
"Curtain Call"
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ public enum EAction
|
|||
CheerRhythmBlue = 44502,
|
||||
CheerRhythmGreen = 44503,
|
||||
CheerRhythmYellow = 44504,
|
||||
PruningPirouette = 45127,
|
||||
RoaringEggscapade = 42039,
|
||||
TheSpriganator = 42038,
|
||||
CurtainCall = 11063,
|
||||
Prospect = 227,
|
||||
CollectMiner = 240,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ public sealed class QuestStep
|
|||
|
||||
public uint? DataId { get; set; }
|
||||
|
||||
public List<uint> DataIds { get; set; } = new List<uint>();
|
||||
|
||||
[JsonConverter(typeof(VectorListConverter))]
|
||||
public List<Vector3> WaypointPositions { get; set; } = new List<Vector3>();
|
||||
|
||||
[JsonConverter(typeof(VectorConverter))]
|
||||
public Vector3? Position { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Text.Json.Serialization;
|
||||
using Questionable.Model.Common;
|
||||
using Questionable.Model.Common.Converter;
|
||||
using Questionable.Model.Questing.Converter;
|
||||
|
||||
namespace Questionable.Model.Questing;
|
||||
|
||||
public sealed class SeasonalDutyDefinition
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public ushort TerritoryId { get; set; }
|
||||
|
||||
public EAetheryteLocation Aetheryte { get; set; }
|
||||
|
||||
public AethernetShortcut? AethernetShortcut { get; set; }
|
||||
|
||||
public uint NpcDataId { get; set; }
|
||||
|
||||
[JsonConverter(typeof(VectorConverter))]
|
||||
public Vector3 NpcPosition { get; set; }
|
||||
|
||||
public List<DialogueChoice> DialogueChoices { get; set; } = new List<DialogueChoice>();
|
||||
|
||||
public ushort DutyTerritoryId { get; set; }
|
||||
|
||||
public List<uint> DataIds { get; set; } = new List<uint>();
|
||||
|
||||
[JsonConverter(typeof(VectorListConverter))]
|
||||
public List<Vector3> WaypointPositions { get; set; } = new List<Vector3>();
|
||||
|
||||
[JsonConverter(typeof(ActionConverter))]
|
||||
public EAction Action { get; set; }
|
||||
|
||||
public float StopDistance { get; set; }
|
||||
|
||||
public ushort? RequiredQuestId { get; set; }
|
||||
|
||||
public DateTime? EventExpiry { get; set; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue