mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix readoing and displaying DemiHuman IMC Identifiers.
This commit is contained in:
parent
76c0264cbe
commit
df0526e6e5
1 changed files with 9 additions and 4 deletions
|
|
@ -68,9 +68,13 @@ public readonly record struct ImcIdentifier(
|
||||||
=> (MetaIndex)(-1);
|
=> (MetaIndex)(-1);
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
=> ObjectType is ObjectType.Equipment or ObjectType.Accessory
|
=> ObjectType switch
|
||||||
? $"Imc - {PrimaryId} - {EquipSlot.ToName()} - {Variant}"
|
{
|
||||||
: $"Imc - {PrimaryId} - {ObjectType.ToName()} - {SecondaryId} - {BodySlot} - {Variant}";
|
ObjectType.Equipment or ObjectType.Accessory => $"Imc - {PrimaryId} - {EquipSlot.ToName()} - {Variant}",
|
||||||
|
ObjectType.DemiHuman => $"Imc - {PrimaryId} - DemiHuman - {SecondaryId} - {EquipSlot.ToName()} - {Variant}",
|
||||||
|
_ => $"Imc - {PrimaryId} - {ObjectType.ToName()} - {SecondaryId} - {BodySlot} - {Variant}",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
public bool Validate()
|
public bool Validate()
|
||||||
{
|
{
|
||||||
|
|
@ -102,6 +106,7 @@ public readonly record struct ImcIdentifier(
|
||||||
return false;
|
return false;
|
||||||
if (ItemData.AdaptOffhandImc(PrimaryId, out _))
|
if (ItemData.AdaptOffhandImc(PrimaryId, out _))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,7 +168,7 @@ public readonly record struct ImcIdentifier(
|
||||||
case ObjectType.DemiHuman:
|
case ObjectType.DemiHuman:
|
||||||
{
|
{
|
||||||
var secondaryId = new SecondaryId(jObj["SecondaryId"]?.ToObject<ushort>() ?? 0);
|
var secondaryId = new SecondaryId(jObj["SecondaryId"]?.ToObject<ushort>() ?? 0);
|
||||||
var slot = jObj["Slot"]?.ToObject<EquipSlot>() ?? EquipSlot.Unknown;
|
var slot = jObj["EquipSlot"]?.ToObject<EquipSlot>() ?? EquipSlot.Unknown;
|
||||||
ret = new ImcIdentifier(primaryId, (Variant)variant, objectType, secondaryId, slot, BodySlot.Unknown);
|
ret = new ImcIdentifier(primaryId, (Variant)variant, objectType, secondaryId, slot, BodySlot.Unknown);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue