mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-31 21:03:48 +01:00
Improve some IMC things.
This commit is contained in:
parent
fca1bf9d94
commit
992cdff58d
6 changed files with 267 additions and 185 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using Newtonsoft.Json.Linq;
|
||||
using Penumbra.GameData.Data;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Structs;
|
||||
|
|
@ -134,7 +135,7 @@ public readonly record struct ImcIdentifier(
|
|||
|
||||
var b = BodySlot.CompareTo(other.BodySlot);
|
||||
return b != 0 ? b : Variant.Id.CompareTo(other.Variant.Id);
|
||||
}
|
||||
}
|
||||
|
||||
public static ImcIdentifier? FromJson(JObject jObj)
|
||||
{
|
||||
|
|
@ -177,11 +178,12 @@ public readonly record struct ImcIdentifier(
|
|||
|
||||
public JObject AddToJson(JObject jObj)
|
||||
{
|
||||
var (gender, race) = GenderRace.Split();
|
||||
jObj["Gender"] = gender.ToString();
|
||||
jObj["Race"] = race.ToString();
|
||||
jObj["SetId"] = SetId.Id.ToString();
|
||||
jObj["Slot"] = Slot.ToString();
|
||||
jObj["ObjectType"] = ObjectType.ToString();
|
||||
jObj["PrimaryId"] = PrimaryId.Id;
|
||||
jObj["PrimaryId"] = SecondaryId.Id;
|
||||
jObj["Variant"] = Variant.Id;
|
||||
jObj["EquipSlot"] = EquipSlot.ToString();
|
||||
jObj["BodySlot"] = BodySlot.ToString();
|
||||
return jObj;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue