From d38571535e650e4e3777b2f674bb336c2352ffaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sat, 1 Jan 2022 20:56:52 +0100 Subject: [PATCH] fix: make lists at end of packet optional --- Core/NosSmooth.Packets/Packets/Server/Entities/StPacket.cs | 4 ++-- Core/NosSmooth.Packets/Packets/Server/Groups/PinitPacket.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/StPacket.cs b/Core/NosSmooth.Packets/Packets/Server/Entities/StPacket.cs index b4b3c02..1dc6ede 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/StPacket.cs +++ b/Core/NosSmooth.Packets/Packets/Server/Entities/StPacket.cs @@ -42,6 +42,6 @@ public record StPacket long Hp, [PacketIndex(7)] long Mp, - [PacketListIndex(8, ListSeparator = ' ')] - List BuffVNums + [PacketListIndex(8, ListSeparator = ' ', IsOptional = true)] + List? BuffVNums ) : IPacket; \ No newline at end of file diff --git a/Core/NosSmooth.Packets/Packets/Server/Groups/PinitPacket.cs b/Core/NosSmooth.Packets/Packets/Server/Groups/PinitPacket.cs index 5332578..18e1aed 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Groups/PinitPacket.cs +++ b/Core/NosSmooth.Packets/Packets/Server/Groups/PinitPacket.cs @@ -22,6 +22,6 @@ namespace NosSmooth.Packets.Packets.Server.Groups; public record PinitPacket ( [PacketIndex(0)] int GroupSize, - [PacketListIndex(1, ListSeparator = ' ', InnerSeparator = '|')] - IReadOnlyList PinitSubPackets + [PacketListIndex(1, ListSeparator = ' ', InnerSeparator = '|', IsOptional = true)] + IReadOnlyList? PinitSubPackets ) : IPacket; \ No newline at end of file -- 2.49.0