Skip to content

Cmd_CreateChar

GigaToni edited this page May 4, 2017 · 2 revisions

Client -> Server = Cmd_CreateChar (82)

This packet get sends when the user hits the create character button.

  • Unicode string containing the character name
  • The avatar / character
  • The car type
  • The car color

Answer Packet: Cmd_CreateCharAck (83)

Raw packet data sent by server

000000: 4C 00 79 00 73 00 65 00 72 00 67 00 69 00 63 00  L · y · s · e · r · g · i · c · 
000016: 00 00 00 00 C0 FF 00 00 00 00 00 00 00 00 00 00  · · · · · · · · · · · · · · · · 
000032: 00 00 00 00 00 00 00 00 00 00 00 00 5F 00 00 00  · · · · · · · · · · · · _ · · · 
000048: 02 00 00 01  · · · · 

Pseudo struct

typedef struct
{
    wstring_t CharacterName;
    short Avatar;
    unsigned int CarType;
    unsigned int Color;
};

Pseudo C# Class

public class CreateCharPacket
{
    public string CharacterName;
    public short Avatar;
    public uint CarType;
    public uint Color;

    public CreateCharPacket(Packet packet)
    {
        CharacterName = packet.Reader.ReadUnicodeStatic(21);
        Avatar = packet.Reader.ReadInt16();
        CarType = packet.Reader.ReadUInt32();
        Color = packet.Reader.ReadUInt32();
    }
}
Clone this wiki locally