-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ItemSlot and InventorySize encoding for character data
- Loading branch information
Showing
5 changed files
with
238 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...protocol/Edelstein.Protocol.Gameplay/Entities/StructuredCharacterDataInfoInventorySize.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using BinarySerialization; | ||
using Edelstein.Protocol.Network.Packets; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Entities; | ||
|
||
public record StructuredCharacterDataInfoInventorySize : StructuredBasePacket | ||
{ | ||
[FieldOrder(0)] | ||
public required byte Equip { get; set; } | ||
|
||
[FieldOrder(1)] | ||
public required byte Consume { get; set; } | ||
|
||
[FieldOrder(2)] | ||
public required byte Install { get; set; } | ||
|
||
[FieldOrder(3)] | ||
public required byte Etc { get; set; } | ||
|
||
[FieldOrder(4)] | ||
public required byte Cash { get; set; } | ||
} |
22 changes: 22 additions & 0 deletions
22
...otocol/Edelstein.Protocol.Gameplay/Entities/StructuredCharacterDataInfoItemSlotBundles.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Collections.Generic; | ||
using BinarySerialization; | ||
using Edelstein.Protocol.Gameplay.Entities.Inventories; | ||
using Edelstein.Protocol.Network.Packets; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Entities; | ||
|
||
public record StructuredCharacterDataInfoItemSlotBundles : StructuredBasePacket | ||
{ | ||
[FieldOrder(0)] | ||
[SerializeUntil((short)0)] | ||
public required List<StructuredCharacterDataInfoItemSlotBundle> Items { get; init; } | ||
} | ||
|
||
public record StructuredCharacterDataInfoItemSlotBundle : StructuredBasePacket | ||
{ | ||
[FieldOrder(0)] | ||
public required byte Slot { get; init; } | ||
|
||
[FieldOrder(1)] | ||
public required StructuredItemSlot Item { get; init; } | ||
} |
38 changes: 38 additions & 0 deletions
38
...rotocol/Edelstein.Protocol.Gameplay/Entities/StructuredCharacterDataInfoItemSlotEquips.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System.Collections.Generic; | ||
using BinarySerialization; | ||
using Edelstein.Protocol.Gameplay.Entities.Inventories; | ||
using Edelstein.Protocol.Network.Packets; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Entities; | ||
|
||
public record StructuredCharacterDataInfoItemSlotEquips : StructuredBasePacket | ||
{ | ||
[FieldOrder(0)] | ||
[SerializeUntil((short)0)] | ||
public required List<StructuredCharacterDataInfoItemSlotEquip> Equipped { get; init; } | ||
|
||
[FieldOrder(1)] | ||
[SerializeUntil((short)0)] | ||
public required List<StructuredCharacterDataInfoItemSlotEquip> Equipped2 { get; init; } | ||
|
||
[FieldOrder(2)] | ||
[SerializeUntil((short)0)] | ||
public required List<StructuredCharacterDataInfoItemSlotEquip> Equip { get; init; } | ||
|
||
[FieldOrder(3)] | ||
[SerializeUntil((short)0)] | ||
public required List<StructuredCharacterDataInfoItemSlotEquip> Dragon { get; init; } | ||
|
||
[FieldOrder(4)] | ||
[SerializeUntil((short)0)] | ||
public required List<StructuredCharacterDataInfoItemSlotEquip> Mechanic { get; init; } | ||
} | ||
|
||
public record StructuredCharacterDataInfoItemSlotEquip : StructuredBasePacket | ||
{ | ||
[FieldOrder(0)] | ||
public required short Slot { get; init; } | ||
|
||
[FieldOrder(1)] | ||
public required StructuredItemSlot Item { get; init; } | ||
} |