// // CListPacket.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using NosSmooth.Packets.Enums.Players; using NosSmooth.Packets.Server.Maps; using NosSmooth.PacketSerializer.Abstractions.Attributes; using NosSmooth.PacketSerializer.Abstractions.Common; namespace NosSmooth.Packets.Server.Login; /// /// Contains information about a character in character /// slect upon login. /// /// /// Before clist, clist_start will be sent. /// clist for each character will follow, /// after that, clist_end will be sent. /// /// The character slot the character is from. /// The name of the character. /// Unknown, seems to be always 0. /// The sex of the character. /// The hair style of the character. /// The hair color of the character. /// Unknown, seems to be always 0. /// The class of the character. /// The level of the character. /// The hero level of the character. /// The equipment of the player. /// The job level of the character. /// There is an extra space in the packet, for the converter to work correctly, this should be an empty string. TODO add Prefix field to PacketIndex and put Prefix ' ' on Unknown2. /// Unknown, seems to be always 1. /// Unknown, seems to be always 1. /// The pets of the character. /// The design of the hat. /// Unknown, seems to be always 0. [GenerateSerializer(true)] [PacketHeader("clist", PacketSource.Server)] public record CListPacket ( [PacketIndex(0)] byte Slot, [PacketIndex(1)] NameString Name, [PacketIndex(2)] byte Unknown, [PacketIndex(3)] SexType Sex, [PacketIndex(4)] HairStyle HairStyle, [PacketIndex(5)] HairColor HairColor, [PacketIndex(6)] byte Unknown1, [PacketIndex(7)] PlayerClass Class, [PacketIndex(8)] byte Level, [PacketIndex(9)] byte HeroLevel, [PacketIndex(10, InnerSeparator = '.')] CListEquipmentSubPacket EquipmentSubPacket, [PacketIndex(11)] byte JobLevel, [PacketIndex(12)] string ExtraSpace, [PacketIndex(13)] byte Unknown2, [PacketIndex(14)] byte Unknown3, [PacketListIndex(15, ListSeparator = '.', InnerSeparator = '.')] IReadOnlyList PetsSubPacket, [PacketIndex(16)] byte HatDesign, [PacketIndex(17)] byte Unknown4 ) : IPacket;