Skip to content

Commit

Permalink
Fix equips not showing properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaioru committed Sep 29, 2024
1 parent ddd7c68 commit 7be063b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public record StructuredItemSlotInfoBase : StructuredBasePacket
[FieldOrder(0)]
public required int ItemID { get; init; }

[FieldOrder(1)]
[FieldOrder(1)]
public BPNullable<long> CashItemSN { get; init; } = new();

[FieldOrder(2)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ namespace Edelstein.Protocol.Network.Packets.Types;

public record BPNullable<T>
{
[FieldOrder(0)] public bool HasValue { get; init; }
[FieldOrder(0)]
public bool HasValue { get; init; }

[FieldOrder(1)]
[SerializeWhen(nameof(HasValue), true)]
Expand Down

0 comments on commit 7be063b

Please sign in to comment.