diff --git a/src/protocol/Edelstein.Protocol.Gameplay/Entities/Inventories/StructuredItemSlotInfoBase.cs b/src/protocol/Edelstein.Protocol.Gameplay/Entities/Inventories/StructuredItemSlotInfoBase.cs index aec3a8659..4bad9e1b6 100644 --- a/src/protocol/Edelstein.Protocol.Gameplay/Entities/Inventories/StructuredItemSlotInfoBase.cs +++ b/src/protocol/Edelstein.Protocol.Gameplay/Entities/Inventories/StructuredItemSlotInfoBase.cs @@ -9,7 +9,7 @@ public record StructuredItemSlotInfoBase : StructuredBasePacket [FieldOrder(0)] public required int ItemID { get; init; } - [FieldOrder(1)] + [FieldOrder(1)] public BPNullable CashItemSN { get; init; } = new(); [FieldOrder(2)] diff --git a/src/protocol/Edelstein.Protocol.Gameplay/Entities/Inventories/StructuredItemSlotInfoEquip.cs b/src/protocol/Edelstein.Protocol.Gameplay/Entities/Inventories/StructuredItemSlotInfoEquip.cs index 888e1a17a..f44236e00 100644 --- a/src/protocol/Edelstein.Protocol.Gameplay/Entities/Inventories/StructuredItemSlotInfoEquip.cs +++ b/src/protocol/Edelstein.Protocol.Gameplay/Entities/Inventories/StructuredItemSlotInfoEquip.cs @@ -42,9 +42,11 @@ public record StructuredItemSlotInfoEquip : StructuredItemSlotInfoBase [FieldOrder(28)] public short Option3 { get; init; } [FieldOrder(29)] public short Socket1 { get; init; } [FieldOrder(30)] public short Socket2 { get; init; } + + [Ignore] public bool HasSN => !CashItemSN.HasValue; [FieldOrder(31)] - [SerializeWhen(nameof(CashItemSN), null)] + [SerializeWhen(nameof(HasSN), true)] public long SN { get; init; } [FieldOrder(32)] public FDateTime DateEquipped { get; init; } = new(); diff --git a/src/protocol/Edelstein.Protocol.Network/Packets/Types/BPNullable.cs b/src/protocol/Edelstein.Protocol.Network/Packets/Types/BPNullable.cs index 78e75b39b..409b2334e 100644 --- a/src/protocol/Edelstein.Protocol.Network/Packets/Types/BPNullable.cs +++ b/src/protocol/Edelstein.Protocol.Network/Packets/Types/BPNullable.cs @@ -4,7 +4,8 @@ namespace Edelstein.Protocol.Network.Packets.Types; public record BPNullable { - [FieldOrder(0)] public bool HasValue { get; init; } + [FieldOrder(0)] + public bool HasValue { get; init; } [FieldOrder(1)] [SerializeWhen(nameof(HasValue), true)]