forked from aly/qstbak
muffin v7.4
This commit is contained in:
parent
8a7847ff37
commit
a4175abacd
54 changed files with 95984 additions and 123967 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
|
@ -11,20 +12,26 @@ public sealed class StringListOrValueConverter : JsonConverter<List<string>>
|
|||
{
|
||||
if (reader.TokenType == JsonTokenType.String)
|
||||
{
|
||||
return new List<string>(1) { reader.GetString() };
|
||||
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();
|
||||
return list;
|
||||
}
|
||||
if (reader.TokenType != JsonTokenType.StartArray)
|
||||
{
|
||||
throw new JsonException();
|
||||
}
|
||||
reader.Read();
|
||||
List<string> list = new List<string>();
|
||||
List<string> list2 = new List<string>();
|
||||
while (reader.TokenType != JsonTokenType.EndArray)
|
||||
{
|
||||
list.Add(reader.GetString());
|
||||
list2.Add(reader.GetString());
|
||||
reader.Read();
|
||||
}
|
||||
return list;
|
||||
return list2;
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, List<string>? value, JsonSerializerOptions options)
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public abstract class ElementId : IComparable<ElementId>, IEquatable<ElementId>
|
|||
if (value.StartsWith("A"))
|
||||
{
|
||||
value = value.Substring(1);
|
||||
string[] array = value.Split(new char[1] { 'x' });
|
||||
string[] array = value.Split('x');
|
||||
if (array.Length == 2)
|
||||
{
|
||||
return new AlliedSocietyDailyId(byte.Parse(array[0], CultureInfo.InvariantCulture), byte.Parse(array[1], CultureInfo.InvariantCulture));
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ public sealed class QuestRoot
|
|||
|
||||
public string? Comment { get; set; }
|
||||
|
||||
[JsonIgnore(/*Could not decode attribute arguments.*/)]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public bool? IsSeasonalQuest { get; set; }
|
||||
|
||||
[JsonIgnore(/*Could not decode attribute arguments.*/)]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public DateTime? SeasonalQuestExpiry { get; set; }
|
||||
|
||||
public List<QuestSequence> QuestSequence { get; set; } = new List<QuestSequence>();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public sealed class QuestStep
|
|||
|
||||
public ushort TerritoryId { get; set; }
|
||||
|
||||
[JsonIgnore(/*Could not decode attribute arguments.*/)]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public EInteractionType InteractionType { get; set; }
|
||||
|
||||
public float? NpcWaitDistance { get; set; }
|
||||
|
|
|
|||
|
|
@ -21,15 +21,15 @@ public sealed class QuestWorkValue(byte? high, byte? low, EQuestWorkMode mode)
|
|||
{
|
||||
if (High.HasValue && Low.HasValue)
|
||||
{
|
||||
return ((byte)(High << 4).Value + Low).ToString();
|
||||
return ((byte)((High.Value << 4) + Low.Value)).ToString();
|
||||
}
|
||||
if (High.HasValue)
|
||||
{
|
||||
return High + "H";
|
||||
return High.Value + "H";
|
||||
}
|
||||
if (Low.HasValue)
|
||||
{
|
||||
return Low + "L";
|
||||
return Low.Value + "L";
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,6 @@ public sealed class SkipStepConditions
|
|||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}: {1}, {2}: {3}, {4}: {5}, {6}: {7}, {8}: {9}, {10}: {11}, {12}: {13}, {14}: {15}, {16}: {17}, {18}: {19}, {20}: {21}, {22}: {23}, {24}: {25}, {26}: {27}", "Never", Never, "CompletionQuestVariablesFlags", CompletionQuestVariablesFlags, "Flying", Flying, "Chocobo", Chocobo, "Diving", Diving, "NotTargetable", NotTargetable, "InTerritory", string.Join(" ", InTerritory), "NotInTerritory", string.Join(" ", NotInTerritory), "Item", Item, "QuestsAccepted", string.Join(" ", QuestsAccepted), "QuestsCompleted", string.Join(" ", QuestsCompleted), "NotNamePlateIconId", string.Join(" ", NotNamePlateIconId), "NearPosition", NearPosition, "ExtraCondition", ExtraCondition);
|
||||
return $"{"Never"}: {Never}, {"CompletionQuestVariablesFlags"}: {CompletionQuestVariablesFlags}, {"Flying"}: {Flying}, {"Chocobo"}: {Chocobo}, {"Diving"}: {Diving}, {"NotTargetable"}: {NotTargetable}, {"InTerritory"}: {string.Join(" ", InTerritory)}, {"NotInTerritory"}: {string.Join(" ", NotInTerritory)}, {"Item"}: {Item}, {"QuestsAccepted"}: {string.Join(" ", QuestsAccepted)}, {"QuestsCompleted"}: {string.Join(" ", QuestsCompleted)}, {"NotNamePlateIconId"}: {string.Join(" ", NotNamePlateIconId)}, {"NearPosition"}: {NearPosition}, {"ExtraCondition"}: {ExtraCondition}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<AssemblyName>Questionable.Model</AssemblyName>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
|
|
@ -26,12 +26,5 @@
|
|||
<EmbeddedResource Include="Questionable.Model.CommonRequiredVariables" LogicalName="Questionable.Model.CommonRequiredVariables" />
|
||||
<EmbeddedResource Include="Questionable.Model.CommonVector3" LogicalName="Questionable.Model.CommonVector3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Numerics.Vectors">
|
||||
<HintPath>C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.32\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json">
|
||||
<HintPath>C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.32\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue