~ruther/NosSmooth

ref: 99dd6e8a59a58bc8ebb173b8422e93b3e094a258 NosSmooth/Packets/NosSmooth.Packets/Server/Login/CListPacket.cs -rw-r--r-- 3.0 KiB
99dd6e8a — Rutherther Merge pull request #52 from Rutherther/feat/optional-wrapper 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//
//  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;
using NosSmooth.PacketSerializer.Abstractions.Attributes;
using NosSmooth.PacketSerializer.Abstractions.Common;

namespace NosSmooth.Packets.Server.Login;

/// <summary>
/// Contains information about a character in character
/// slect upon login.
/// </summary>
/// <remarks>
/// Before clist, clist_start will be sent.
/// clist for each character will follow,
/// after that, clist_end will be sent.
/// </remarks>
/// <param name="Slot">The character slot the character is from.</param>
/// <param name="Name">The name of the character.</param>
/// <param name="Unknown">Unknown, seems to be always 0.</param>
/// <param name="Sex">The sex of the character.</param>
/// <param name="HairStyle">The hair style of the character.</param>
/// <param name="HairColor">The hair color of the character.</param>
/// <param name="Unknown1">Unknown, seems to be always 0.</param>
/// <param name="Class">The class of the character.</param>
/// <param name="Level">The level of the character.</param>
/// <param name="HeroLevel">The hero level of the character.</param>
/// <param name="EquipmentSubPacket">The equipment of the player.</param>
/// <param name="JobLevel">The job level of the character.</param>
/// <param name="ExtraSpace">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.</param>
/// <param name="Unknown2">Unknown, seems to be always 1.</param>
/// <param name="Unknown3">Unknown, seems to be always 1.</param>
/// <param name="PetsSubPacket">The pets of the character.</param>
/// <param name="HatDesign">The design of the hat.</param>
/// <param name="Unknown4">Unknown, seems to be always 0.</param>
[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<OptionalWrapper<NullableWrapper<CListPetSubPacket>>> PetsSubPacket,
    [PacketIndex(16)]
    byte HatDesign,
    [PacketIndex(17)]
    byte Unknown4
) : IPacket;
Do not follow this link