Skip to content

client

EO network protocol data structures.

See Also

PacketFamily

Bases: IntEnum

The type of operation that a packet performs. Part of the unique packet ID.

Source code in src/eolib/protocol/_generated/net/packet_family.py
 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
class PacketFamily(IntEnum, metaclass=ProtocolEnumMeta):
    """
    The type of operation that a packet performs.
    Part of the unique packet ID.
    """
    Connection = 1
    Account = 2
    Character = 3
    Login = 4
    Welcome = 5
    Walk = 6
    Face = 7
    Chair = 8
    Emote = 9
    Attack = 11
    Spell = 12
    Shop = 13
    Item = 14
    StatSkill = 16
    Global = 17
    Talk = 18
    Warp = 19
    Jukebox = 21
    Players = 22
    Avatar = 23
    Party = 24
    Refresh = 25
    Npc = 26
    PlayerRange = 27
    NpcRange = 28
    Range = 29
    Paperdoll = 30
    Effect = 31
    Trade = 32
    Chest = 33
    Door = 34
    Message = 35
    Bank = 36
    Locker = 37
    Barber = 38
    Guild = 39
    Music = 40
    Sit = 41
    Recover = 42
    Board = 43
    Cast = 44
    Arena = 45
    Priest = 46
    Marriage = 47
    AdminInteract = 48
    Citizen = 49
    Quest = 50
    Book = 51
    Error = 250
    Init = 255

Connection = 1 class-attribute instance-attribute

Account = 2 class-attribute instance-attribute

Character = 3 class-attribute instance-attribute

Login = 4 class-attribute instance-attribute

Welcome = 5 class-attribute instance-attribute

Walk = 6 class-attribute instance-attribute

Face = 7 class-attribute instance-attribute

Chair = 8 class-attribute instance-attribute

Emote = 9 class-attribute instance-attribute

Attack = 11 class-attribute instance-attribute

Spell = 12 class-attribute instance-attribute

Shop = 13 class-attribute instance-attribute

Item = 14 class-attribute instance-attribute

StatSkill = 16 class-attribute instance-attribute

Global = 17 class-attribute instance-attribute

Talk = 18 class-attribute instance-attribute

Warp = 19 class-attribute instance-attribute

Jukebox = 21 class-attribute instance-attribute

Players = 22 class-attribute instance-attribute

Avatar = 23 class-attribute instance-attribute

Party = 24 class-attribute instance-attribute

Refresh = 25 class-attribute instance-attribute

Npc = 26 class-attribute instance-attribute

PlayerRange = 27 class-attribute instance-attribute

NpcRange = 28 class-attribute instance-attribute

Range = 29 class-attribute instance-attribute

Paperdoll = 30 class-attribute instance-attribute

Effect = 31 class-attribute instance-attribute

Trade = 32 class-attribute instance-attribute

Chest = 33 class-attribute instance-attribute

Door = 34 class-attribute instance-attribute

Message = 35 class-attribute instance-attribute

Bank = 36 class-attribute instance-attribute

Locker = 37 class-attribute instance-attribute

Barber = 38 class-attribute instance-attribute

Guild = 39 class-attribute instance-attribute

Music = 40 class-attribute instance-attribute

Sit = 41 class-attribute instance-attribute

Recover = 42 class-attribute instance-attribute

Board = 43 class-attribute instance-attribute

Cast = 44 class-attribute instance-attribute

Arena = 45 class-attribute instance-attribute

Priest = 46 class-attribute instance-attribute

Marriage = 47 class-attribute instance-attribute

AdminInteract = 48 class-attribute instance-attribute

Citizen = 49 class-attribute instance-attribute

Quest = 50 class-attribute instance-attribute

Book = 51 class-attribute instance-attribute

Error = 250 class-attribute instance-attribute

Init = 255 class-attribute instance-attribute

PacketAction

Bases: IntEnum

The specific action that a packet performs. Part of the unique packet ID.

Source code in src/eolib/protocol/_generated/net/packet_action.py
 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
class PacketAction(IntEnum, metaclass=ProtocolEnumMeta):
    """
    The specific action that a packet performs.
    Part of the unique packet ID.
    """
    Request = 1
    Accept = 2
    Reply = 3
    Remove = 4
    Agree = 5
    Create = 6
    Add = 7
    Player = 8
    Take = 9
    Use = 10
    Buy = 11
    Sell = 12
    Open = 13
    Close = 14
    Msg = 15
    Spec = 16
    Admin = 17
    List = 18
    Tell = 20
    Report = 21
    Announce = 22
    Server = 23
    Drop = 24
    Junk = 25
    Obtain = 26
    Get = 27
    Kick = 28
    Rank = 29
    TargetSelf = 30
    TargetOther = 31
    TargetGroup = 33
    Dialog = 34
    Ping = 240
    Pong = 241
    Net242 = 242
    Net243 = 243
    Net244 = 244
    Error = 250
    Init = 255

Request = 1 class-attribute instance-attribute

Accept = 2 class-attribute instance-attribute

Reply = 3 class-attribute instance-attribute

Remove = 4 class-attribute instance-attribute

Agree = 5 class-attribute instance-attribute

Create = 6 class-attribute instance-attribute

Add = 7 class-attribute instance-attribute

Player = 8 class-attribute instance-attribute

Take = 9 class-attribute instance-attribute

Use = 10 class-attribute instance-attribute

Buy = 11 class-attribute instance-attribute

Sell = 12 class-attribute instance-attribute

Open = 13 class-attribute instance-attribute

Close = 14 class-attribute instance-attribute

Msg = 15 class-attribute instance-attribute

Spec = 16 class-attribute instance-attribute

Admin = 17 class-attribute instance-attribute

List = 18 class-attribute instance-attribute

Tell = 20 class-attribute instance-attribute

Report = 21 class-attribute instance-attribute

Announce = 22 class-attribute instance-attribute

Server = 23 class-attribute instance-attribute

Drop = 24 class-attribute instance-attribute

Junk = 25 class-attribute instance-attribute

Obtain = 26 class-attribute instance-attribute

Get = 27 class-attribute instance-attribute

Kick = 28 class-attribute instance-attribute

Rank = 29 class-attribute instance-attribute

TargetSelf = 30 class-attribute instance-attribute

TargetOther = 31 class-attribute instance-attribute

TargetGroup = 33 class-attribute instance-attribute

Dialog = 34 class-attribute instance-attribute

Ping = 240 class-attribute instance-attribute

Pong = 241 class-attribute instance-attribute

Net242 = 242 class-attribute instance-attribute

Net243 = 243 class-attribute instance-attribute

Net244 = 244 class-attribute instance-attribute

Error = 250 class-attribute instance-attribute

Init = 255 class-attribute instance-attribute

SerializationError

Bases: Exception

Represents an error in serializing a protocol data structure.

Source code in src/eolib/protocol/serialization_error.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class SerializationError(Exception):
    """
    Represents an error in serializing a protocol data structure.
    """

    def __init__(self, message: str):
        """
        Constructs a SerializationError with the specified error message.

        Args:
            message (str): The error message.
        """
        super().__init__(message)

__init__(message)

Constructs a SerializationError with the specified error message.

Parameters:

Name Type Description Default
message str

The error message.

required
Source code in src/eolib/protocol/serialization_error.py
 6
 7
 8
 9
10
11
12
13
def __init__(self, message: str):
    """
    Constructs a SerializationError with the specified error message.

    Args:
        message (str): The error message.
    """
    super().__init__(message)

Packet

Bases: ABC

Object representation of a packet in the EO network protocol.

Source code in src/eolib/protocol/net/packet.py
 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
class Packet(ABC):
    """
    Object representation of a packet in the EO network protocol.
    """

    @staticmethod
    @abstractmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        raise NotImplementedError()

    @staticmethod
    @abstractmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        raise NotImplementedError()

    @abstractmethod
    def write(self, writer: EoWriter) -> None:
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        raise NotImplementedError()

family() abstractmethod staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/net/packet.py
13
14
15
16
17
18
19
20
21
22
@staticmethod
@abstractmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    raise NotImplementedError()

action() abstractmethod staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/net/packet.py
24
25
26
27
28
29
30
31
32
33
@staticmethod
@abstractmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    raise NotImplementedError()

write(writer) abstractmethod

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/net/packet.py
35
36
37
38
39
40
41
42
43
@abstractmethod
def write(self, writer: EoWriter) -> None:
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    raise NotImplementedError()

EoWriter

Source code in src/eolib/data/eo_writer.py
  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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
class EoWriter:
    def __init__(self):
        self.data = bytearray()
        self._string_sanitization_mode = False

    def add_byte(self, value: int) -> None:
        """
        Adds a raw byte to the writer data.

        Args:
            value (int): The byte to add.

        Raises:
            ValueError: If the value is above `0xFF`.
        """
        self._check_number_size(value, 0xFF)
        self.data.append(value)

    def add_bytes(self, bytes: bytes) -> None:
        """
        Adds raw bytes to the writer data.

        Args:
            bytes (bytes): The bytes to add.
        """
        self.data.extend(bytes)

    def add_char(self, number: int) -> None:
        """
        Adds an encoded 1-byte integer to the writer data.

        Args:
            number (int): The number to encode and add.

        Raises:
            ValueError: If the value is not below `CHAR_MAX`.
        """
        self._check_number_size(number, CHAR_MAX - 1)
        number_bytes = encode_number(number)
        self._add_bytes_with_length(number_bytes, 1)

    def add_short(self, number: int) -> None:
        """
        Adds an encoded 2-byte integer to the writer data.

        Args:
            number (int): The number to encode and add.

        Raises:
            ValueError: If the value is not below `SHORT_MAX`.
        """
        self._check_number_size(number, SHORT_MAX - 1)
        number_bytes = encode_number(number)
        self._add_bytes_with_length(number_bytes, 2)

    def add_three(self, number: int) -> None:
        """
        Adds an encoded 3-byte integer to the writer data.

        Args:
            number (int): The number to encode and add.

        Raises:
            ValueError: If the value is not below `THREE_MAX`.
        """
        self._check_number_size(number, THREE_MAX - 1)
        number_bytes = encode_number(number)
        self._add_bytes_with_length(number_bytes, 3)

    def add_int(self, number: int) -> None:
        """
        Adds an encoded 4-byte integer to the writer data.

        Args:
            number (int): The number to encode and add.

        Raises:
            ValueError: If the value is not below `INT_MAX`.
        """
        self._check_number_size(number, INT_MAX - 1)
        number_bytes = encode_number(number)
        self._add_bytes_with_length(number_bytes, 4)

    def add_string(self, string: str) -> None:
        """
        Adds a string to the writer data.

        Args:
            string (str): The string to be added.
        """
        string_bytes = self._encode_ansi(string)
        self._sanitize_string(string_bytes)
        self.add_bytes(string_bytes)

    def add_fixed_string(self, string: str, length: int, padded: bool = False) -> None:
        """
        Adds a fixed-length string to the writer data.

        Args:
            string (str): The string to be added.
            length (int): The expected length of the string.
            padded (bool, optional): True if the string should be padded to the length with
                trailing `0xFF` bytes. Defaults to False.
        """
        self._check_string_length(string, length, padded)
        string_bytes = self._encode_ansi(string)
        self._sanitize_string(string_bytes)
        if padded:
            string_bytes = self._add_padding(string_bytes, length)
        self.add_bytes(string_bytes)

    def add_encoded_string(self, string: str) -> None:
        """
        Adds an encoded string to the writer data.

        Args:
            string (str): The string to be encoded and added.
        """
        string_bytes = self._encode_ansi(string)
        self._sanitize_string(string_bytes)
        encode_string(string_bytes)
        self.add_bytes(string_bytes)

    def add_fixed_encoded_string(self, string: str, length: int, padded: bool = False) -> None:
        """
        Adds a fixed-length encoded string to the writer data.

        Args:
            string (str): The string to be encoded and added.
            length (int): The expected length of the string.
            padded (bool, optional): True if the string should be padded to the length with
                trailing `0xFF` bytes. Defaults to False.
        """
        self._check_string_length(string, length, padded)
        string_bytes = self._encode_ansi(string)
        self._sanitize_string(string_bytes)
        if padded:
            string_bytes = self._add_padding(string_bytes, length)
        encode_string(string_bytes)
        self.add_bytes(string_bytes)

    @property
    def string_sanitization_mode(self) -> bool:
        """
        Gets the string sanitization mode for the writer.

        Returns:
            bool: True if string sanitization is enabled.
        """
        return self._string_sanitization_mode

    @string_sanitization_mode.setter
    def string_sanitization_mode(self, string_sanitization_mode: bool) -> None:
        self._string_sanitization_mode = string_sanitization_mode

    def to_bytearray(self) -> bytearray:
        """
        Gets the writer data as a byte array.

        Returns:
            bytearray: A copy of the writer data as a byte array.
        """
        return self.data.copy()

    def __len__(self) -> int:
        """
        Gets the length of the writer data.

        Returns:
            int: The length of the writer data.
        """
        return len(self.data)

    def _add_bytes_with_length(self, bytes: bytes, bytes_length: int) -> None:
        """
        Adds raw bytes with a specified length to the writer data.

        Args:
            bytes (bytes): The bytes to add.
            bytes_length (int): The number of bytes to add.
        """
        self.data.extend(bytes[:bytes_length])

    def _sanitize_string(self, bytes: bytearray) -> None:
        if self.string_sanitization_mode:
            for i in range(len(bytes)):
                if bytes[i] == 0xFF:  # 'ÿ'
                    bytes[i] = 0x79  # 'y'

    @staticmethod
    def _check_number_size(number: int, max_value: int) -> None:
        if number > max_value:
            raise ValueError(f"Value {number} exceeds maximum of {max_value}.")

    @staticmethod
    def _add_padding(bytes: bytearray, length: int) -> bytearray:
        if len(bytes) == length:
            return bytes

        result = bytearray(length)
        result[: len(bytes)] = bytes
        result[len(bytes) :] = bytearray([0xFF] * (length - len(bytes)))

        return result

    @staticmethod
    def _check_string_length(string: str, length: int, padded: bool) -> None:
        if padded:
            if length >= len(string):
                return
            raise ValueError(f'Padded string "{string}" is too large for a length of {length}.')

        if len(string) != length:
            raise ValueError(f'String "{string}" does not have expected length of {length}.')

    @staticmethod
    def _encode_ansi(string: str) -> bytearray:
        """
        Encodes string to windows-1252 bytes.

        Args:
            string (str): The string to encode.

        Returns:
            bytearray: The encoded string.
        """
        return bytearray(string, 'windows-1252', 'replace')

data = bytearray() instance-attribute

string_sanitization_mode: bool property writable

Gets the string sanitization mode for the writer.

Returns:

Name Type Description
bool bool

True if string sanitization is enabled.

__init__()

Source code in src/eolib/data/eo_writer.py
7
8
9
def __init__(self):
    self.data = bytearray()
    self._string_sanitization_mode = False

add_byte(value)

Adds a raw byte to the writer data.

Parameters:

Name Type Description Default
value int

The byte to add.

required

Raises:

Type Description
ValueError

If the value is above 0xFF.

Source code in src/eolib/data/eo_writer.py
11
12
13
14
15
16
17
18
19
20
21
22
def add_byte(self, value: int) -> None:
    """
    Adds a raw byte to the writer data.

    Args:
        value (int): The byte to add.

    Raises:
        ValueError: If the value is above `0xFF`.
    """
    self._check_number_size(value, 0xFF)
    self.data.append(value)

add_bytes(bytes)

Adds raw bytes to the writer data.

Parameters:

Name Type Description Default
bytes bytes

The bytes to add.

required
Source code in src/eolib/data/eo_writer.py
24
25
26
27
28
29
30
31
def add_bytes(self, bytes: bytes) -> None:
    """
    Adds raw bytes to the writer data.

    Args:
        bytes (bytes): The bytes to add.
    """
    self.data.extend(bytes)

add_char(number)

Adds an encoded 1-byte integer to the writer data.

Parameters:

Name Type Description Default
number int

The number to encode and add.

required

Raises:

Type Description
ValueError

If the value is not below CHAR_MAX.

Source code in src/eolib/data/eo_writer.py
33
34
35
36
37
38
39
40
41
42
43
44
45
def add_char(self, number: int) -> None:
    """
    Adds an encoded 1-byte integer to the writer data.

    Args:
        number (int): The number to encode and add.

    Raises:
        ValueError: If the value is not below `CHAR_MAX`.
    """
    self._check_number_size(number, CHAR_MAX - 1)
    number_bytes = encode_number(number)
    self._add_bytes_with_length(number_bytes, 1)

add_short(number)

Adds an encoded 2-byte integer to the writer data.

Parameters:

Name Type Description Default
number int

The number to encode and add.

required

Raises:

Type Description
ValueError

If the value is not below SHORT_MAX.

Source code in src/eolib/data/eo_writer.py
47
48
49
50
51
52
53
54
55
56
57
58
59
def add_short(self, number: int) -> None:
    """
    Adds an encoded 2-byte integer to the writer data.

    Args:
        number (int): The number to encode and add.

    Raises:
        ValueError: If the value is not below `SHORT_MAX`.
    """
    self._check_number_size(number, SHORT_MAX - 1)
    number_bytes = encode_number(number)
    self._add_bytes_with_length(number_bytes, 2)

add_three(number)

Adds an encoded 3-byte integer to the writer data.

Parameters:

Name Type Description Default
number int

The number to encode and add.

required

Raises:

Type Description
ValueError

If the value is not below THREE_MAX.

Source code in src/eolib/data/eo_writer.py
61
62
63
64
65
66
67
68
69
70
71
72
73
def add_three(self, number: int) -> None:
    """
    Adds an encoded 3-byte integer to the writer data.

    Args:
        number (int): The number to encode and add.

    Raises:
        ValueError: If the value is not below `THREE_MAX`.
    """
    self._check_number_size(number, THREE_MAX - 1)
    number_bytes = encode_number(number)
    self._add_bytes_with_length(number_bytes, 3)

add_int(number)

Adds an encoded 4-byte integer to the writer data.

Parameters:

Name Type Description Default
number int

The number to encode and add.

required

Raises:

Type Description
ValueError

If the value is not below INT_MAX.

Source code in src/eolib/data/eo_writer.py
75
76
77
78
79
80
81
82
83
84
85
86
87
def add_int(self, number: int) -> None:
    """
    Adds an encoded 4-byte integer to the writer data.

    Args:
        number (int): The number to encode and add.

    Raises:
        ValueError: If the value is not below `INT_MAX`.
    """
    self._check_number_size(number, INT_MAX - 1)
    number_bytes = encode_number(number)
    self._add_bytes_with_length(number_bytes, 4)

add_string(string)

Adds a string to the writer data.

Parameters:

Name Type Description Default
string str

The string to be added.

required
Source code in src/eolib/data/eo_writer.py
89
90
91
92
93
94
95
96
97
98
def add_string(self, string: str) -> None:
    """
    Adds a string to the writer data.

    Args:
        string (str): The string to be added.
    """
    string_bytes = self._encode_ansi(string)
    self._sanitize_string(string_bytes)
    self.add_bytes(string_bytes)

add_fixed_string(string, length, padded=False)

Adds a fixed-length string to the writer data.

Parameters:

Name Type Description Default
string str

The string to be added.

required
length int

The expected length of the string.

required
padded bool

True if the string should be padded to the length with trailing 0xFF bytes. Defaults to False.

False
Source code in src/eolib/data/eo_writer.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
def add_fixed_string(self, string: str, length: int, padded: bool = False) -> None:
    """
    Adds a fixed-length string to the writer data.

    Args:
        string (str): The string to be added.
        length (int): The expected length of the string.
        padded (bool, optional): True if the string should be padded to the length with
            trailing `0xFF` bytes. Defaults to False.
    """
    self._check_string_length(string, length, padded)
    string_bytes = self._encode_ansi(string)
    self._sanitize_string(string_bytes)
    if padded:
        string_bytes = self._add_padding(string_bytes, length)
    self.add_bytes(string_bytes)

add_encoded_string(string)

Adds an encoded string to the writer data.

Parameters:

Name Type Description Default
string str

The string to be encoded and added.

required
Source code in src/eolib/data/eo_writer.py
117
118
119
120
121
122
123
124
125
126
127
def add_encoded_string(self, string: str) -> None:
    """
    Adds an encoded string to the writer data.

    Args:
        string (str): The string to be encoded and added.
    """
    string_bytes = self._encode_ansi(string)
    self._sanitize_string(string_bytes)
    encode_string(string_bytes)
    self.add_bytes(string_bytes)

add_fixed_encoded_string(string, length, padded=False)

Adds a fixed-length encoded string to the writer data.

Parameters:

Name Type Description Default
string str

The string to be encoded and added.

required
length int

The expected length of the string.

required
padded bool

True if the string should be padded to the length with trailing 0xFF bytes. Defaults to False.

False
Source code in src/eolib/data/eo_writer.py
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
def add_fixed_encoded_string(self, string: str, length: int, padded: bool = False) -> None:
    """
    Adds a fixed-length encoded string to the writer data.

    Args:
        string (str): The string to be encoded and added.
        length (int): The expected length of the string.
        padded (bool, optional): True if the string should be padded to the length with
            trailing `0xFF` bytes. Defaults to False.
    """
    self._check_string_length(string, length, padded)
    string_bytes = self._encode_ansi(string)
    self._sanitize_string(string_bytes)
    if padded:
        string_bytes = self._add_padding(string_bytes, length)
    encode_string(string_bytes)
    self.add_bytes(string_bytes)

to_bytearray()

Gets the writer data as a byte array.

Returns:

Name Type Description
bytearray bytearray

A copy of the writer data as a byte array.

Source code in src/eolib/data/eo_writer.py
161
162
163
164
165
166
167
168
def to_bytearray(self) -> bytearray:
    """
    Gets the writer data as a byte array.

    Returns:
        bytearray: A copy of the writer data as a byte array.
    """
    return self.data.copy()

__len__()

Gets the length of the writer data.

Returns:

Name Type Description
int int

The length of the writer data.

Source code in src/eolib/data/eo_writer.py
170
171
172
173
174
175
176
177
def __len__(self) -> int:
    """
    Gets the length of the writer data.

    Returns:
        int: The length of the writer data.
    """
    return len(self.data)

EoReader

Bases: object

A class for reading EO data from a sequence of bytes.

EoReader features a chunked reading mode, which is important for accurate emulation of the official game client.

See documentation for chunked reading: https://github.com/Cirras/eo-protocol/blob/master/docs/chunks.md

Source code in src/eolib/data/eo_reader.py
  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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
class EoReader(object):
    """
    A class for reading EO data from a sequence of bytes.

    `EoReader` features a chunked reading mode, which is important for accurate emulation of
    the official game client.

    See documentation for chunked reading:
    https://github.com/Cirras/eo-protocol/blob/master/docs/chunks.md
    """

    _data: memoryview
    _position: int
    _chunked_reading_mode: bool
    _chunk_start: int
    _next_break: int

    def __init__(self, data: bytes):
        """
        Creates a new `EoReader` instance for the specified data.

        Args:
            data (bytes): The byte array containing the input data.
        """
        self._data = memoryview(data)
        self._position = 0
        self._chunked_reading_mode = False
        self._chunk_start = 0
        self._next_break = -1

    def slice(self, index: Optional[int] = None, length: Optional[int] = None) -> "EoReader":
        """
        Creates a new `EoReader` whose input data is a shared subsequence of this reader's
        data.

        The input data of the new reader will start at position `index` in this reader and contain
        up to `length` bytes. The two reader's position and chunked reading mode will be
        independent.

        The new reader's position will be zero, and its chunked reading mode will be false.

        Args:
            index (int, optional): The position in this reader at which the data of the new reader
                will start; must be non-negative. Defaults to the current reader position.
            length (int, optional): The length of the shared subsequence of data to supply to the
                new reader; must be non-negative. Defaults to the length of the remaining data
                starting from `index`.

        Returns:
            EoReader: The new reader.

        Raises:
            ValueError: If `index` or `length` is negative.
        """
        if index is None:
            index = self.position
        if length is None:
            length = max(0, len(self._data) - index)

        if index < 0:
            raise ValueError(f"negative index: {index}")

        if length < 0:
            raise ValueError(f"negative length: {length}")

        begin = max(0, min(len(self._data), index))
        end = begin + min(len(self._data) - begin, length)

        return EoReader(self._data[begin:end])

    def get_byte(self) -> int:
        """
        Reads a raw byte from the input data.

        Returns:
            int: A raw byte.
        """
        return self._read_byte()

    def get_bytes(self, length: int) -> bytearray:
        """
        Reads an array of raw bytes from the input data.

        Args:
            length (int): The number of bytes to read.

        Returns:
            bytearray: An array of raw bytes.
        """
        return self._read_bytes(length)

    def get_char(self) -> int:
        """
        Reads an encoded 1-byte integer from the input data.

        Returns:
            int: A decoded 1-byte integer.
        """
        return decode_number(self._read_bytes(1))

    def get_short(self) -> int:
        """
        Reads an encoded 2-byte integer from the input data.

        Returns:
            int: A decoded 2-byte integer.
        """
        return decode_number(self._read_bytes(2))

    def get_three(self) -> int:
        """
        Reads an encoded 3-byte integer from the input data.

        Returns:
            int: A decoded 3-byte integer.
        """
        return decode_number(self._read_bytes(3))

    def get_int(self) -> int:
        """
        Reads an encoded 4-byte integer from the input data.

        Returns:
            int: A decoded 4-byte integer.
        """
        return decode_number(self._read_bytes(4))

    def get_string(self) -> str:
        """
        Reads a string from the input data.

        Returns:
            str: A string.
        """
        string_bytes = self._read_bytes(self.remaining)
        return self._decode_ansi(string_bytes)

    def get_fixed_string(self, length: int, padded: bool = False) -> str:
        """
        Reads a string with a fixed length from the input data.

        Args:
            length (int): The length of the string.
            padded (bool, optional): True if the string is padded with trailing `0xFF` bytes.

        Returns:
            str: A decoded string.

        Raises:
            ValueError: If the length is negative.
        """
        if length < 0:
            raise ValueError("Negative length")
        bytes_ = self._read_bytes(length)
        if padded:
            bytes_ = self._remove_padding(bytes_)
        return self._decode_ansi(bytes_)

    def get_encoded_string(self) -> str:
        """
        Reads an encoded string from the input data.

        Returns:
            str: A decoded string.
        """
        bytes_ = self._read_bytes(self.remaining)
        decode_string(bytes_)
        return self._decode_ansi(bytes_)

    def get_fixed_encoded_string(self, length: int, padded: bool = False) -> str:
        """
        Reads an encoded string with a fixed length from the input data.

        Args:
            length (int): The length of the string.
            padded (bool, optional): True if the string is padded with trailing `0xFF` bytes.

        Returns:
            str: A decoded string.

        Raises:
            ValueError: If the length is negative.
        """
        if length < 0:
            raise ValueError("Negative length")
        bytes_ = self._read_bytes(length)
        decode_string(bytes_)
        if padded:
            bytes_ = self._remove_padding(bytes_)
        return self._decode_ansi(bytes_)

    @property
    def chunked_reading_mode(self) -> bool:
        """
        bool: Gets or sets the chunked reading mode for the reader.

        In chunked reading mode:
        - The reader will treat `0xFF` bytes as the end of the current chunk.
        - `next_chunk()` can be called to move to the next chunk.
        """
        return self._chunked_reading_mode

    @chunked_reading_mode.setter
    def chunked_reading_mode(self, chunked_reading_mode: bool) -> None:
        self._chunked_reading_mode = chunked_reading_mode
        if self._next_break == -1:
            self._next_break = self._find_next_break_index()

    @property
    def remaining(self) -> int:
        """
        int: If chunked reading mode is enabled, gets the number of bytes remaining in the current
            chunk. Otherwise, gets the total number of bytes remaining in the input data.
        """
        if self.chunked_reading_mode:
            return self._next_break - min(self.position, self._next_break)
        else:
            return len(self._data) - self.position

    def next_chunk(self) -> None:
        """
        Moves the reader position to the start of the next chunk in the input data.

        Raises:
            RuntimeError: If not in chunked reading mode.
        """
        if not self.chunked_reading_mode:
            raise RuntimeError("Not in chunked reading mode.")

        self._position = self._next_break
        if self._position < len(self._data):
            # Skip the break byte
            self._position += 1

        self._chunk_start = self._position
        self._next_break = self._find_next_break_index()

    @property
    def position(self) -> int:
        """
        int: Gets the current position in the input data.
        """
        return self._position

    def _read_byte(self) -> int:
        """
        Reads a raw byte from the input data.

        Returns:
            int: A raw byte.
        """
        if self.remaining > 0:
            byte = self._data[self._position]
            self._position += 1
            return byte
        return 0

    def _read_bytes(self, length) -> bytearray:
        """
        Reads an array of raw bytes from the input data.

        Args:
            length (int): The number of bytes to read.

        Returns:
            bytearray: An array of raw bytes.
        """
        length = min(length, self.remaining)

        result = bytearray(self._data[self._position : self._position + length])
        self._position += length

        return result

    def _find_next_break_index(self) -> int:
        """
        Finds the index of the next break byte (0xFF) in the input data.

        Returns:
            int: The index of the next break byte, or the length of the data if not found.
        """
        for i in range(self._chunk_start, len(self._data)):
            if self._data[i] == 0xFF:
                return i
        return len(self._data)

    @staticmethod
    def _remove_padding(array: bytearray) -> bytearray:
        """
        Removes padding (trailing 0xFF bytes) from a sequence of bytes.

        Args:
            array (bytearray): The sequence of bytes.

        Returns:
            bytearray: The bytes without padding.
        """
        padding_start = array.find(bytes([0xFF]))
        if padding_start != -1:
            return array[:padding_start]
        return array

    @staticmethod
    def _decode_ansi(bytes: bytearray) -> str:
        """
        Decodes windows-1252 bytes to a string.

        Args:
            bytes (bytearray): The sequence of bytes to decode.

        Returns:
            str: The decoded string.
        """
        return bytes.decode('windows-1252', 'replace')

chunked_reading_mode: bool property writable

bool: Gets or sets the chunked reading mode for the reader.

In chunked reading mode: - The reader will treat 0xFF bytes as the end of the current chunk. - next_chunk() can be called to move to the next chunk.

remaining: int property

If chunked reading mode is enabled, gets the number of bytes remaining in the current

chunk. Otherwise, gets the total number of bytes remaining in the input data.

position: int property

int: Gets the current position in the input data.

__init__(data)

Creates a new EoReader instance for the specified data.

Parameters:

Name Type Description Default
data bytes

The byte array containing the input data.

required
Source code in src/eolib/data/eo_reader.py
23
24
25
26
27
28
29
30
31
32
33
34
def __init__(self, data: bytes):
    """
    Creates a new `EoReader` instance for the specified data.

    Args:
        data (bytes): The byte array containing the input data.
    """
    self._data = memoryview(data)
    self._position = 0
    self._chunked_reading_mode = False
    self._chunk_start = 0
    self._next_break = -1

slice(index=None, length=None)

Creates a new EoReader whose input data is a shared subsequence of this reader's data.

The input data of the new reader will start at position index in this reader and contain up to length bytes. The two reader's position and chunked reading mode will be independent.

The new reader's position will be zero, and its chunked reading mode will be false.

Parameters:

Name Type Description Default
index int

The position in this reader at which the data of the new reader will start; must be non-negative. Defaults to the current reader position.

None
length int

The length of the shared subsequence of data to supply to the new reader; must be non-negative. Defaults to the length of the remaining data starting from index.

None

Returns:

Name Type Description
EoReader EoReader

The new reader.

Raises:

Type Description
ValueError

If index or length is negative.

Source code in src/eolib/data/eo_reader.py
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
def slice(self, index: Optional[int] = None, length: Optional[int] = None) -> "EoReader":
    """
    Creates a new `EoReader` whose input data is a shared subsequence of this reader's
    data.

    The input data of the new reader will start at position `index` in this reader and contain
    up to `length` bytes. The two reader's position and chunked reading mode will be
    independent.

    The new reader's position will be zero, and its chunked reading mode will be false.

    Args:
        index (int, optional): The position in this reader at which the data of the new reader
            will start; must be non-negative. Defaults to the current reader position.
        length (int, optional): The length of the shared subsequence of data to supply to the
            new reader; must be non-negative. Defaults to the length of the remaining data
            starting from `index`.

    Returns:
        EoReader: The new reader.

    Raises:
        ValueError: If `index` or `length` is negative.
    """
    if index is None:
        index = self.position
    if length is None:
        length = max(0, len(self._data) - index)

    if index < 0:
        raise ValueError(f"negative index: {index}")

    if length < 0:
        raise ValueError(f"negative length: {length}")

    begin = max(0, min(len(self._data), index))
    end = begin + min(len(self._data) - begin, length)

    return EoReader(self._data[begin:end])

get_byte()

Reads a raw byte from the input data.

Returns:

Name Type Description
int int

A raw byte.

Source code in src/eolib/data/eo_reader.py
76
77
78
79
80
81
82
83
def get_byte(self) -> int:
    """
    Reads a raw byte from the input data.

    Returns:
        int: A raw byte.
    """
    return self._read_byte()

get_bytes(length)

Reads an array of raw bytes from the input data.

Parameters:

Name Type Description Default
length int

The number of bytes to read.

required

Returns:

Name Type Description
bytearray bytearray

An array of raw bytes.

Source code in src/eolib/data/eo_reader.py
85
86
87
88
89
90
91
92
93
94
95
def get_bytes(self, length: int) -> bytearray:
    """
    Reads an array of raw bytes from the input data.

    Args:
        length (int): The number of bytes to read.

    Returns:
        bytearray: An array of raw bytes.
    """
    return self._read_bytes(length)

get_char()

Reads an encoded 1-byte integer from the input data.

Returns:

Name Type Description
int int

A decoded 1-byte integer.

Source code in src/eolib/data/eo_reader.py
 97
 98
 99
100
101
102
103
104
def get_char(self) -> int:
    """
    Reads an encoded 1-byte integer from the input data.

    Returns:
        int: A decoded 1-byte integer.
    """
    return decode_number(self._read_bytes(1))

get_short()

Reads an encoded 2-byte integer from the input data.

Returns:

Name Type Description
int int

A decoded 2-byte integer.

Source code in src/eolib/data/eo_reader.py
106
107
108
109
110
111
112
113
def get_short(self) -> int:
    """
    Reads an encoded 2-byte integer from the input data.

    Returns:
        int: A decoded 2-byte integer.
    """
    return decode_number(self._read_bytes(2))

get_three()

Reads an encoded 3-byte integer from the input data.

Returns:

Name Type Description
int int

A decoded 3-byte integer.

Source code in src/eolib/data/eo_reader.py
115
116
117
118
119
120
121
122
def get_three(self) -> int:
    """
    Reads an encoded 3-byte integer from the input data.

    Returns:
        int: A decoded 3-byte integer.
    """
    return decode_number(self._read_bytes(3))

get_int()

Reads an encoded 4-byte integer from the input data.

Returns:

Name Type Description
int int

A decoded 4-byte integer.

Source code in src/eolib/data/eo_reader.py
124
125
126
127
128
129
130
131
def get_int(self) -> int:
    """
    Reads an encoded 4-byte integer from the input data.

    Returns:
        int: A decoded 4-byte integer.
    """
    return decode_number(self._read_bytes(4))

get_string()

Reads a string from the input data.

Returns:

Name Type Description
str str

A string.

Source code in src/eolib/data/eo_reader.py
133
134
135
136
137
138
139
140
141
def get_string(self) -> str:
    """
    Reads a string from the input data.

    Returns:
        str: A string.
    """
    string_bytes = self._read_bytes(self.remaining)
    return self._decode_ansi(string_bytes)

get_fixed_string(length, padded=False)

Reads a string with a fixed length from the input data.

Parameters:

Name Type Description Default
length int

The length of the string.

required
padded bool

True if the string is padded with trailing 0xFF bytes.

False

Returns:

Name Type Description
str str

A decoded string.

Raises:

Type Description
ValueError

If the length is negative.

Source code in src/eolib/data/eo_reader.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
def get_fixed_string(self, length: int, padded: bool = False) -> str:
    """
    Reads a string with a fixed length from the input data.

    Args:
        length (int): The length of the string.
        padded (bool, optional): True if the string is padded with trailing `0xFF` bytes.

    Returns:
        str: A decoded string.

    Raises:
        ValueError: If the length is negative.
    """
    if length < 0:
        raise ValueError("Negative length")
    bytes_ = self._read_bytes(length)
    if padded:
        bytes_ = self._remove_padding(bytes_)
    return self._decode_ansi(bytes_)

get_encoded_string()

Reads an encoded string from the input data.

Returns:

Name Type Description
str str

A decoded string.

Source code in src/eolib/data/eo_reader.py
164
165
166
167
168
169
170
171
172
173
def get_encoded_string(self) -> str:
    """
    Reads an encoded string from the input data.

    Returns:
        str: A decoded string.
    """
    bytes_ = self._read_bytes(self.remaining)
    decode_string(bytes_)
    return self._decode_ansi(bytes_)

get_fixed_encoded_string(length, padded=False)

Reads an encoded string with a fixed length from the input data.

Parameters:

Name Type Description Default
length int

The length of the string.

required
padded bool

True if the string is padded with trailing 0xFF bytes.

False

Returns:

Name Type Description
str str

A decoded string.

Raises:

Type Description
ValueError

If the length is negative.

Source code in src/eolib/data/eo_reader.py
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
def get_fixed_encoded_string(self, length: int, padded: bool = False) -> str:
    """
    Reads an encoded string with a fixed length from the input data.

    Args:
        length (int): The length of the string.
        padded (bool, optional): True if the string is padded with trailing `0xFF` bytes.

    Returns:
        str: A decoded string.

    Raises:
        ValueError: If the length is negative.
    """
    if length < 0:
        raise ValueError("Negative length")
    bytes_ = self._read_bytes(length)
    decode_string(bytes_)
    if padded:
        bytes_ = self._remove_padding(bytes_)
    return self._decode_ansi(bytes_)

next_chunk()

Moves the reader position to the start of the next chunk in the input data.

Raises:

Type Description
RuntimeError

If not in chunked reading mode.

Source code in src/eolib/data/eo_reader.py
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
def next_chunk(self) -> None:
    """
    Moves the reader position to the start of the next chunk in the input data.

    Raises:
        RuntimeError: If not in chunked reading mode.
    """
    if not self.chunked_reading_mode:
        raise RuntimeError("Not in chunked reading mode.")

    self._position = self._next_break
    if self._position < len(self._data):
        # Skip the break byte
        self._position += 1

    self._chunk_start = self._position
    self._next_break = self._find_next_break_index()

WelcomeRequestClientPacket

Bases: Packet

Selected a character

Source code in src/eolib/protocol/_generated/net/client/welcome_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class WelcomeRequestClientPacket(Packet):
    """
    Selected a character
    """
    _byte_size: int = 0
    _character_id: int

    def __init__(self, *, character_id: int):
        """
        Create a new instance of WelcomeRequestClientPacket.

        Args:
            character_id (int): (Value range is 0-4097152080.)
        """
        self._character_id = character_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def character_id(self) -> int:
        return self._character_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Welcome

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        WelcomeRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "WelcomeRequestClientPacket") -> None:
        """
        Serializes an instance of `WelcomeRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._character_id is None:
                raise SerializationError("character_id must be provided.")
            writer.add_int(data._character_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WelcomeRequestClientPacket":
        """
        Deserializes an instance of `WelcomeRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WelcomeRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            character_id = reader.get_int()
            result = WelcomeRequestClientPacket(character_id=character_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WelcomeRequestClientPacket(byte_size={repr(self._byte_size)}, character_id={repr(self._character_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

character_id: int property

__init__(*, character_id)

Create a new instance of WelcomeRequestClientPacket.

Parameters:

Name Type Description Default
character_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/welcome_request_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, character_id: int):
    """
    Create a new instance of WelcomeRequestClientPacket.

    Args:
        character_id (int): (Value range is 0-4097152080.)
    """
    self._character_id = character_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/welcome_request_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Welcome

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/welcome_request_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_request_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    WelcomeRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WelcomeRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_request_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeRequestClientPacket") -> None:
    """
    Serializes an instance of `WelcomeRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._character_id is None:
            raise SerializationError("character_id must be provided.")
        writer.add_int(data._character_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WelcomeRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomeRequestClientPacket WelcomeRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/welcome_request_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeRequestClientPacket":
    """
    Deserializes an instance of `WelcomeRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WelcomeRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        character_id = reader.get_int()
        result = WelcomeRequestClientPacket(character_id=character_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WelcomeMsgClientPacket

Bases: Packet

Entering game

Source code in src/eolib/protocol/_generated/net/client/welcome_msg_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class WelcomeMsgClientPacket(Packet):
    """
    Entering game
    """
    _byte_size: int = 0
    _session_id: int
    _character_id: int

    def __init__(self, *, session_id: int, character_id: int):
        """
        Create a new instance of WelcomeMsgClientPacket.

        Args:
            session_id (int): (Value range is 0-16194276.)
            character_id (int): (Value range is 0-4097152080.)
        """
        self._session_id = session_id
        self._character_id = character_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def character_id(self) -> int:
        return self._character_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Welcome

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Msg

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        WelcomeMsgClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "WelcomeMsgClientPacket") -> None:
        """
        Serializes an instance of `WelcomeMsgClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeMsgClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_three(data._session_id)
            if data._character_id is None:
                raise SerializationError("character_id must be provided.")
            writer.add_int(data._character_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WelcomeMsgClientPacket":
        """
        Deserializes an instance of `WelcomeMsgClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WelcomeMsgClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_three()
            character_id = reader.get_int()
            result = WelcomeMsgClientPacket(session_id=session_id, character_id=character_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WelcomeMsgClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, character_id={repr(self._character_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

character_id: int property

__init__(*, session_id, character_id)

Create a new instance of WelcomeMsgClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-16194276.)

required
character_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/welcome_msg_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, character_id: int):
    """
    Create a new instance of WelcomeMsgClientPacket.

    Args:
        session_id (int): (Value range is 0-16194276.)
        character_id (int): (Value range is 0-4097152080.)
    """
    self._session_id = session_id
    self._character_id = character_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/welcome_msg_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Welcome

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/welcome_msg_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Msg

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_msg_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    WelcomeMsgClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WelcomeMsgClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeMsgClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_msg_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeMsgClientPacket") -> None:
    """
    Serializes an instance of `WelcomeMsgClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeMsgClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_three(data._session_id)
        if data._character_id is None:
            raise SerializationError("character_id must be provided.")
        writer.add_int(data._character_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WelcomeMsgClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomeMsgClientPacket WelcomeMsgClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/welcome_msg_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeMsgClientPacket":
    """
    Deserializes an instance of `WelcomeMsgClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WelcomeMsgClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_three()
        character_id = reader.get_int()
        result = WelcomeMsgClientPacket(session_id=session_id, character_id=character_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

FileType

Bases: IntEnum

Data file type

Source code in src/eolib/protocol/_generated/net/client/file_type.py
 9
10
11
12
13
14
15
16
17
class FileType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Data file type
    """
    Emf = 1
    Eif = 2
    Enf = 3
    Esf = 4
    Ecf = 5

Emf = 1 class-attribute instance-attribute

Eif = 2 class-attribute instance-attribute

Enf = 3 class-attribute instance-attribute

Esf = 4 class-attribute instance-attribute

Ecf = 5 class-attribute instance-attribute

WelcomeAgreeClientPacket

Bases: Packet

Requesting a file

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
class WelcomeAgreeClientPacket(Packet):
    """
    Requesting a file
    """
    _byte_size: int = 0
    _file_type: FileType
    _session_id: int
    _file_type_data: 'WelcomeAgreeClientPacket.FileTypeData'

    def __init__(self, *, file_type: FileType, session_id: int, file_type_data: 'WelcomeAgreeClientPacket.FileTypeData' = None):
        """
        Create a new instance of WelcomeAgreeClientPacket.

        Args:
            file_type (FileType): 
            session_id (int): (Value range is 0-64008.)
            file_type_data (WelcomeAgreeClientPacket.FileTypeData): Data associated with the `file_type` field.
        """
        self._file_type = file_type
        self._session_id = session_id
        self._file_type_data = file_type_data

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def file_type(self) -> FileType:
        return self._file_type

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def file_type_data(self) -> 'WelcomeAgreeClientPacket.FileTypeData':
        """
        WelcomeAgreeClientPacket.FileTypeData: Data associated with the `file_type` field.
        """
        return self._file_type_data

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Welcome

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Agree

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        WelcomeAgreeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket") -> None:
        """
        Serializes an instance of `WelcomeAgreeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeAgreeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._file_type is None:
                raise SerializationError("file_type must be provided.")
            writer.add_char(int(data._file_type))
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
            if data._file_type == FileType.Emf:
                if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEmf):
                    raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEmf for file_type " + FileType(data._file_type).name + ".")
                WelcomeAgreeClientPacket.FileTypeDataEmf.serialize(writer, data._file_type_data)
            elif data._file_type == FileType.Eif:
                if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEif):
                    raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEif for file_type " + FileType(data._file_type).name + ".")
                WelcomeAgreeClientPacket.FileTypeDataEif.serialize(writer, data._file_type_data)
            elif data._file_type == FileType.Enf:
                if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEnf):
                    raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEnf for file_type " + FileType(data._file_type).name + ".")
                WelcomeAgreeClientPacket.FileTypeDataEnf.serialize(writer, data._file_type_data)
            elif data._file_type == FileType.Esf:
                if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEsf):
                    raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEsf for file_type " + FileType(data._file_type).name + ".")
                WelcomeAgreeClientPacket.FileTypeDataEsf.serialize(writer, data._file_type_data)
            elif data._file_type == FileType.Ecf:
                if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEcf):
                    raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEcf for file_type " + FileType(data._file_type).name + ".")
                WelcomeAgreeClientPacket.FileTypeDataEcf.serialize(writer, data._file_type_data)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket":
        """
        Deserializes an instance of `WelcomeAgreeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WelcomeAgreeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            file_type = FileType(reader.get_char())
            session_id = reader.get_short()
            file_type_data: WelcomeAgreeClientPacket.FileTypeData = None
            if file_type == FileType.Emf:
                file_type_data = WelcomeAgreeClientPacket.FileTypeDataEmf.deserialize(reader)
            elif file_type == FileType.Eif:
                file_type_data = WelcomeAgreeClientPacket.FileTypeDataEif.deserialize(reader)
            elif file_type == FileType.Enf:
                file_type_data = WelcomeAgreeClientPacket.FileTypeDataEnf.deserialize(reader)
            elif file_type == FileType.Esf:
                file_type_data = WelcomeAgreeClientPacket.FileTypeDataEsf.deserialize(reader)
            elif file_type == FileType.Ecf:
                file_type_data = WelcomeAgreeClientPacket.FileTypeDataEcf.deserialize(reader)
            result = WelcomeAgreeClientPacket(file_type=file_type, session_id=session_id, file_type_data=file_type_data)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WelcomeAgreeClientPacket(byte_size={repr(self._byte_size)}, file_type={repr(self._file_type)}, session_id={repr(self._session_id)}, file_type_data={repr(self._file_type_data)})"

    FileTypeData = Union['WelcomeAgreeClientPacket.FileTypeDataEmf', 'WelcomeAgreeClientPacket.FileTypeDataEif', 'WelcomeAgreeClientPacket.FileTypeDataEnf', 'WelcomeAgreeClientPacket.FileTypeDataEsf', 'WelcomeAgreeClientPacket.FileTypeDataEcf', None]
    """
    Data associated with different values of the `file_type` field.
    """

    class FileTypeDataEmf:
        """
        Data associated with file_type value FileType.Emf
        """
        _byte_size: int = 0
        _file_id: int

        def __init__(self, *, file_id: int):
            """
            Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEmf.

            Args:
                file_id (int): (Value range is 0-64008.)
            """
            self._file_id = file_id

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def file_id(self) -> int:
            return self._file_id

        @staticmethod
        def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEmf") -> None:
            """
            Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEmf` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WelcomeAgreeClientPacket.FileTypeDataEmf): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._file_id is None:
                    raise SerializationError("file_id must be provided.")
                writer.add_short(data._file_id)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEmf":
            """
            Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEmf` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                WelcomeAgreeClientPacket.FileTypeDataEmf: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                file_id = reader.get_short()
                result = WelcomeAgreeClientPacket.FileTypeDataEmf(file_id=file_id)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"WelcomeAgreeClientPacket.FileTypeDataEmf(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

    class FileTypeDataEif:
        """
        Data associated with file_type value FileType.Eif
        """
        _byte_size: int = 0
        _file_id: int

        def __init__(self, *, file_id: int):
            """
            Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEif.

            Args:
                file_id (int): (Value range is 0-252.)
            """
            self._file_id = file_id

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def file_id(self) -> int:
            return self._file_id

        @staticmethod
        def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEif") -> None:
            """
            Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEif` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WelcomeAgreeClientPacket.FileTypeDataEif): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._file_id is None:
                    raise SerializationError("file_id must be provided.")
                writer.add_char(data._file_id)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEif":
            """
            Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEif` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                WelcomeAgreeClientPacket.FileTypeDataEif: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                file_id = reader.get_char()
                result = WelcomeAgreeClientPacket.FileTypeDataEif(file_id=file_id)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"WelcomeAgreeClientPacket.FileTypeDataEif(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

    class FileTypeDataEnf:
        """
        Data associated with file_type value FileType.Enf
        """
        _byte_size: int = 0
        _file_id: int

        def __init__(self, *, file_id: int):
            """
            Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEnf.

            Args:
                file_id (int): (Value range is 0-252.)
            """
            self._file_id = file_id

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def file_id(self) -> int:
            return self._file_id

        @staticmethod
        def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEnf") -> None:
            """
            Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEnf` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WelcomeAgreeClientPacket.FileTypeDataEnf): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._file_id is None:
                    raise SerializationError("file_id must be provided.")
                writer.add_char(data._file_id)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEnf":
            """
            Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEnf` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                WelcomeAgreeClientPacket.FileTypeDataEnf: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                file_id = reader.get_char()
                result = WelcomeAgreeClientPacket.FileTypeDataEnf(file_id=file_id)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"WelcomeAgreeClientPacket.FileTypeDataEnf(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

    class FileTypeDataEsf:
        """
        Data associated with file_type value FileType.Esf
        """
        _byte_size: int = 0
        _file_id: int

        def __init__(self, *, file_id: int):
            """
            Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEsf.

            Args:
                file_id (int): (Value range is 0-252.)
            """
            self._file_id = file_id

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def file_id(self) -> int:
            return self._file_id

        @staticmethod
        def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEsf") -> None:
            """
            Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEsf` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WelcomeAgreeClientPacket.FileTypeDataEsf): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._file_id is None:
                    raise SerializationError("file_id must be provided.")
                writer.add_char(data._file_id)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEsf":
            """
            Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEsf` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                WelcomeAgreeClientPacket.FileTypeDataEsf: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                file_id = reader.get_char()
                result = WelcomeAgreeClientPacket.FileTypeDataEsf(file_id=file_id)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"WelcomeAgreeClientPacket.FileTypeDataEsf(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

    class FileTypeDataEcf:
        """
        Data associated with file_type value FileType.Ecf
        """
        _byte_size: int = 0
        _file_id: int

        def __init__(self, *, file_id: int):
            """
            Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEcf.

            Args:
                file_id (int): (Value range is 0-252.)
            """
            self._file_id = file_id

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def file_id(self) -> int:
            return self._file_id

        @staticmethod
        def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEcf") -> None:
            """
            Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEcf` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WelcomeAgreeClientPacket.FileTypeDataEcf): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._file_id is None:
                    raise SerializationError("file_id must be provided.")
                writer.add_char(data._file_id)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEcf":
            """
            Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEcf` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                WelcomeAgreeClientPacket.FileTypeDataEcf: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                file_id = reader.get_char()
                result = WelcomeAgreeClientPacket.FileTypeDataEcf(file_id=file_id)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"WelcomeAgreeClientPacket.FileTypeDataEcf(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

file_type: FileType property

session_id: int property

file_type_data: WelcomeAgreeClientPacket.FileTypeData property

WelcomeAgreeClientPacket.FileTypeData: Data associated with the file_type field.

FileTypeData = Union['WelcomeAgreeClientPacket.FileTypeDataEmf', 'WelcomeAgreeClientPacket.FileTypeDataEif', 'WelcomeAgreeClientPacket.FileTypeDataEnf', 'WelcomeAgreeClientPacket.FileTypeDataEsf', 'WelcomeAgreeClientPacket.FileTypeDataEcf', None] class-attribute instance-attribute

Data associated with different values of the file_type field.

FileTypeDataEmf

Data associated with file_type value FileType.Emf

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
class FileTypeDataEmf:
    """
    Data associated with file_type value FileType.Emf
    """
    _byte_size: int = 0
    _file_id: int

    def __init__(self, *, file_id: int):
        """
        Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEmf.

        Args:
            file_id (int): (Value range is 0-64008.)
        """
        self._file_id = file_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def file_id(self) -> int:
        return self._file_id

    @staticmethod
    def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEmf") -> None:
        """
        Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEmf` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeAgreeClientPacket.FileTypeDataEmf): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_short(data._file_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEmf":
        """
        Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEmf` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WelcomeAgreeClientPacket.FileTypeDataEmf: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            file_id = reader.get_short()
            result = WelcomeAgreeClientPacket.FileTypeDataEmf(file_id=file_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WelcomeAgreeClientPacket.FileTypeDataEmf(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

file_id: int property

__init__(*, file_id)

Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEmf.

Parameters:

Name Type Description Default
file_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
179
180
181
182
183
184
185
186
def __init__(self, *, file_id: int):
    """
    Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEmf.

    Args:
        file_id (int): (Value range is 0-64008.)
    """
    self._file_id = file_id

serialize(writer, data) staticmethod

Serializes an instance of WelcomeAgreeClientPacket.FileTypeDataEmf to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data FileTypeDataEmf

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEmf") -> None:
    """
    Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEmf` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeAgreeClientPacket.FileTypeDataEmf): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_short(data._file_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WelcomeAgreeClientPacket.FileTypeDataEmf from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
FileTypeDataEmf

WelcomeAgreeClientPacket.FileTypeDataEmf: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEmf":
    """
    Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEmf` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WelcomeAgreeClientPacket.FileTypeDataEmf: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        file_id = reader.get_short()
        result = WelcomeAgreeClientPacket.FileTypeDataEmf(file_id=file_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

FileTypeDataEif

Data associated with file_type value FileType.Eif

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
class FileTypeDataEif:
    """
    Data associated with file_type value FileType.Eif
    """
    _byte_size: int = 0
    _file_id: int

    def __init__(self, *, file_id: int):
        """
        Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEif.

        Args:
            file_id (int): (Value range is 0-252.)
        """
        self._file_id = file_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def file_id(self) -> int:
        return self._file_id

    @staticmethod
    def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEif") -> None:
        """
        Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEif` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeAgreeClientPacket.FileTypeDataEif): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_char(data._file_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEif":
        """
        Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEif` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WelcomeAgreeClientPacket.FileTypeDataEif: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            file_id = reader.get_char()
            result = WelcomeAgreeClientPacket.FileTypeDataEif(file_id=file_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WelcomeAgreeClientPacket.FileTypeDataEif(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

file_id: int property

__init__(*, file_id)

Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEif.

Parameters:

Name Type Description Default
file_id int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
250
251
252
253
254
255
256
257
def __init__(self, *, file_id: int):
    """
    Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEif.

    Args:
        file_id (int): (Value range is 0-252.)
    """
    self._file_id = file_id

serialize(writer, data) staticmethod

Serializes an instance of WelcomeAgreeClientPacket.FileTypeDataEif to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data FileTypeDataEif

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEif") -> None:
    """
    Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEif` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeAgreeClientPacket.FileTypeDataEif): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WelcomeAgreeClientPacket.FileTypeDataEif from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
FileTypeDataEif

WelcomeAgreeClientPacket.FileTypeDataEif: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEif":
    """
    Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEif` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WelcomeAgreeClientPacket.FileTypeDataEif: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        file_id = reader.get_char()
        result = WelcomeAgreeClientPacket.FileTypeDataEif(file_id=file_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

FileTypeDataEnf

Data associated with file_type value FileType.Enf

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
class FileTypeDataEnf:
    """
    Data associated with file_type value FileType.Enf
    """
    _byte_size: int = 0
    _file_id: int

    def __init__(self, *, file_id: int):
        """
        Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEnf.

        Args:
            file_id (int): (Value range is 0-252.)
        """
        self._file_id = file_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def file_id(self) -> int:
        return self._file_id

    @staticmethod
    def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEnf") -> None:
        """
        Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEnf` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeAgreeClientPacket.FileTypeDataEnf): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_char(data._file_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEnf":
        """
        Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEnf` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WelcomeAgreeClientPacket.FileTypeDataEnf: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            file_id = reader.get_char()
            result = WelcomeAgreeClientPacket.FileTypeDataEnf(file_id=file_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WelcomeAgreeClientPacket.FileTypeDataEnf(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

file_id: int property

__init__(*, file_id)

Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEnf.

Parameters:

Name Type Description Default
file_id int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
321
322
323
324
325
326
327
328
def __init__(self, *, file_id: int):
    """
    Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEnf.

    Args:
        file_id (int): (Value range is 0-252.)
    """
    self._file_id = file_id

serialize(writer, data) staticmethod

Serializes an instance of WelcomeAgreeClientPacket.FileTypeDataEnf to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data FileTypeDataEnf

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEnf") -> None:
    """
    Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEnf` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeAgreeClientPacket.FileTypeDataEnf): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WelcomeAgreeClientPacket.FileTypeDataEnf from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
FileTypeDataEnf

WelcomeAgreeClientPacket.FileTypeDataEnf: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEnf":
    """
    Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEnf` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WelcomeAgreeClientPacket.FileTypeDataEnf: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        file_id = reader.get_char()
        result = WelcomeAgreeClientPacket.FileTypeDataEnf(file_id=file_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

FileTypeDataEsf

Data associated with file_type value FileType.Esf

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
class FileTypeDataEsf:
    """
    Data associated with file_type value FileType.Esf
    """
    _byte_size: int = 0
    _file_id: int

    def __init__(self, *, file_id: int):
        """
        Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEsf.

        Args:
            file_id (int): (Value range is 0-252.)
        """
        self._file_id = file_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def file_id(self) -> int:
        return self._file_id

    @staticmethod
    def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEsf") -> None:
        """
        Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEsf` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeAgreeClientPacket.FileTypeDataEsf): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_char(data._file_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEsf":
        """
        Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEsf` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WelcomeAgreeClientPacket.FileTypeDataEsf: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            file_id = reader.get_char()
            result = WelcomeAgreeClientPacket.FileTypeDataEsf(file_id=file_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WelcomeAgreeClientPacket.FileTypeDataEsf(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

file_id: int property

__init__(*, file_id)

Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEsf.

Parameters:

Name Type Description Default
file_id int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
392
393
394
395
396
397
398
399
def __init__(self, *, file_id: int):
    """
    Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEsf.

    Args:
        file_id (int): (Value range is 0-252.)
    """
    self._file_id = file_id

serialize(writer, data) staticmethod

Serializes an instance of WelcomeAgreeClientPacket.FileTypeDataEsf to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data FileTypeDataEsf

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEsf") -> None:
    """
    Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEsf` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeAgreeClientPacket.FileTypeDataEsf): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WelcomeAgreeClientPacket.FileTypeDataEsf from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
FileTypeDataEsf

WelcomeAgreeClientPacket.FileTypeDataEsf: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEsf":
    """
    Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEsf` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WelcomeAgreeClientPacket.FileTypeDataEsf: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        file_id = reader.get_char()
        result = WelcomeAgreeClientPacket.FileTypeDataEsf(file_id=file_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

FileTypeDataEcf

Data associated with file_type value FileType.Ecf

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
class FileTypeDataEcf:
    """
    Data associated with file_type value FileType.Ecf
    """
    _byte_size: int = 0
    _file_id: int

    def __init__(self, *, file_id: int):
        """
        Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEcf.

        Args:
            file_id (int): (Value range is 0-252.)
        """
        self._file_id = file_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def file_id(self) -> int:
        return self._file_id

    @staticmethod
    def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEcf") -> None:
        """
        Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEcf` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeAgreeClientPacket.FileTypeDataEcf): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_char(data._file_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEcf":
        """
        Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEcf` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WelcomeAgreeClientPacket.FileTypeDataEcf: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            file_id = reader.get_char()
            result = WelcomeAgreeClientPacket.FileTypeDataEcf(file_id=file_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WelcomeAgreeClientPacket.FileTypeDataEcf(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

file_id: int property

__init__(*, file_id)

Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEcf.

Parameters:

Name Type Description Default
file_id int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
463
464
465
466
467
468
469
470
def __init__(self, *, file_id: int):
    """
    Create a new instance of WelcomeAgreeClientPacket.FileTypeDataEcf.

    Args:
        file_id (int): (Value range is 0-252.)
    """
    self._file_id = file_id

serialize(writer, data) staticmethod

Serializes an instance of WelcomeAgreeClientPacket.FileTypeDataEcf to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data FileTypeDataEcf

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket.FileTypeDataEcf") -> None:
    """
    Serializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEcf` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeAgreeClientPacket.FileTypeDataEcf): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WelcomeAgreeClientPacket.FileTypeDataEcf from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
FileTypeDataEcf

WelcomeAgreeClientPacket.FileTypeDataEcf: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket.FileTypeDataEcf":
    """
    Deserializes an instance of `WelcomeAgreeClientPacket.FileTypeDataEcf` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WelcomeAgreeClientPacket.FileTypeDataEcf: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        file_id = reader.get_char()
        result = WelcomeAgreeClientPacket.FileTypeDataEcf(file_id=file_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

__init__(*, file_type, session_id, file_type_data=None)

Create a new instance of WelcomeAgreeClientPacket.

Parameters:

Name Type Description Default
file_type FileType
required
session_id int

(Value range is 0-64008.)

required
file_type_data FileTypeData

Data associated with the file_type field.

None
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
24
25
26
27
28
29
30
31
32
33
34
35
def __init__(self, *, file_type: FileType, session_id: int, file_type_data: 'WelcomeAgreeClientPacket.FileTypeData' = None):
    """
    Create a new instance of WelcomeAgreeClientPacket.

    Args:
        file_type (FileType): 
        session_id (int): (Value range is 0-64008.)
        file_type_data (WelcomeAgreeClientPacket.FileTypeData): Data associated with the `file_type` field.
    """
    self._file_type = file_type
    self._session_id = session_id
    self._file_type_data = file_type_data

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Welcome

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
72
73
74
75
76
77
78
79
80
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Agree

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
82
83
84
85
86
87
88
89
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    WelcomeAgreeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WelcomeAgreeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeAgreeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeAgreeClientPacket") -> None:
    """
    Serializes an instance of `WelcomeAgreeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeAgreeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._file_type is None:
            raise SerializationError("file_type must be provided.")
        writer.add_char(int(data._file_type))
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
        if data._file_type == FileType.Emf:
            if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEmf):
                raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEmf for file_type " + FileType(data._file_type).name + ".")
            WelcomeAgreeClientPacket.FileTypeDataEmf.serialize(writer, data._file_type_data)
        elif data._file_type == FileType.Eif:
            if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEif):
                raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEif for file_type " + FileType(data._file_type).name + ".")
            WelcomeAgreeClientPacket.FileTypeDataEif.serialize(writer, data._file_type_data)
        elif data._file_type == FileType.Enf:
            if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEnf):
                raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEnf for file_type " + FileType(data._file_type).name + ".")
            WelcomeAgreeClientPacket.FileTypeDataEnf.serialize(writer, data._file_type_data)
        elif data._file_type == FileType.Esf:
            if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEsf):
                raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEsf for file_type " + FileType(data._file_type).name + ".")
            WelcomeAgreeClientPacket.FileTypeDataEsf.serialize(writer, data._file_type_data)
        elif data._file_type == FileType.Ecf:
            if not isinstance(data._file_type_data, WelcomeAgreeClientPacket.FileTypeDataEcf):
                raise SerializationError("Expected file_type_data to be type WelcomeAgreeClientPacket.FileTypeDataEcf for file_type " + FileType(data._file_type).name + ".")
            WelcomeAgreeClientPacket.FileTypeDataEcf.serialize(writer, data._file_type_data)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WelcomeAgreeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomeAgreeClientPacket WelcomeAgreeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeAgreeClientPacket":
    """
    Deserializes an instance of `WelcomeAgreeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WelcomeAgreeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        file_type = FileType(reader.get_char())
        session_id = reader.get_short()
        file_type_data: WelcomeAgreeClientPacket.FileTypeData = None
        if file_type == FileType.Emf:
            file_type_data = WelcomeAgreeClientPacket.FileTypeDataEmf.deserialize(reader)
        elif file_type == FileType.Eif:
            file_type_data = WelcomeAgreeClientPacket.FileTypeDataEif.deserialize(reader)
        elif file_type == FileType.Enf:
            file_type_data = WelcomeAgreeClientPacket.FileTypeDataEnf.deserialize(reader)
        elif file_type == FileType.Esf:
            file_type_data = WelcomeAgreeClientPacket.FileTypeDataEsf.deserialize(reader)
        elif file_type == FileType.Ecf:
            file_type_data = WelcomeAgreeClientPacket.FileTypeDataEcf.deserialize(reader)
        result = WelcomeAgreeClientPacket(file_type=file_type, session_id=session_id, file_type_data=file_type_data)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WarpTakeClientPacket

Bases: Packet

Request to download a copy of the map

Source code in src/eolib/protocol/_generated/net/client/warp_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class WarpTakeClientPacket(Packet):
    """
    Request to download a copy of the map
    """
    _byte_size: int = 0
    _map_id: int
    _session_id: int

    def __init__(self, *, map_id: int, session_id: int):
        """
        Create a new instance of WarpTakeClientPacket.

        Args:
            map_id (int): (Value range is 0-64008.)
            session_id (int): (Value range is 0-64008.)
        """
        self._map_id = map_id
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def map_id(self) -> int:
        return self._map_id

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Warp

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        WarpTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "WarpTakeClientPacket") -> None:
        """
        Serializes an instance of `WarpTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WarpTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._map_id is None:
                raise SerializationError("map_id must be provided.")
            writer.add_short(data._map_id)
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WarpTakeClientPacket":
        """
        Deserializes an instance of `WarpTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WarpTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            map_id = reader.get_short()
            session_id = reader.get_short()
            result = WarpTakeClientPacket(map_id=map_id, session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WarpTakeClientPacket(byte_size={repr(self._byte_size)}, map_id={repr(self._map_id)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

map_id: int property

session_id: int property

__init__(*, map_id, session_id)

Create a new instance of WarpTakeClientPacket.

Parameters:

Name Type Description Default
map_id int

(Value range is 0-64008.)

required
session_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/warp_take_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, map_id: int, session_id: int):
    """
    Create a new instance of WarpTakeClientPacket.

    Args:
        map_id (int): (Value range is 0-64008.)
        session_id (int): (Value range is 0-64008.)
    """
    self._map_id = map_id
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/warp_take_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Warp

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/warp_take_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/warp_take_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    WarpTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WarpTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WarpTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/warp_take_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "WarpTakeClientPacket") -> None:
    """
    Serializes an instance of `WarpTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WarpTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._map_id is None:
            raise SerializationError("map_id must be provided.")
        writer.add_short(data._map_id)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WarpTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WarpTakeClientPacket WarpTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/warp_take_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "WarpTakeClientPacket":
    """
    Deserializes an instance of `WarpTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WarpTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        map_id = reader.get_short()
        session_id = reader.get_short()
        result = WarpTakeClientPacket(map_id=map_id, session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WarpAcceptClientPacket

Bases: Packet

Accept a warp request from the server

Source code in src/eolib/protocol/_generated/net/client/warp_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class WarpAcceptClientPacket(Packet):
    """
    Accept a warp request from the server
    """
    _byte_size: int = 0
    _map_id: int
    _session_id: int

    def __init__(self, *, map_id: int, session_id: int):
        """
        Create a new instance of WarpAcceptClientPacket.

        Args:
            map_id (int): (Value range is 0-64008.)
            session_id (int): (Value range is 0-64008.)
        """
        self._map_id = map_id
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def map_id(self) -> int:
        return self._map_id

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Warp

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        WarpAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "WarpAcceptClientPacket") -> None:
        """
        Serializes an instance of `WarpAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WarpAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._map_id is None:
                raise SerializationError("map_id must be provided.")
            writer.add_short(data._map_id)
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WarpAcceptClientPacket":
        """
        Deserializes an instance of `WarpAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WarpAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            map_id = reader.get_short()
            session_id = reader.get_short()
            result = WarpAcceptClientPacket(map_id=map_id, session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WarpAcceptClientPacket(byte_size={repr(self._byte_size)}, map_id={repr(self._map_id)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

map_id: int property

session_id: int property

__init__(*, map_id, session_id)

Create a new instance of WarpAcceptClientPacket.

Parameters:

Name Type Description Default
map_id int

(Value range is 0-64008.)

required
session_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/warp_accept_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, map_id: int, session_id: int):
    """
    Create a new instance of WarpAcceptClientPacket.

    Args:
        map_id (int): (Value range is 0-64008.)
        session_id (int): (Value range is 0-64008.)
    """
    self._map_id = map_id
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/warp_accept_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Warp

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/warp_accept_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/warp_accept_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    WarpAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WarpAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WarpAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/warp_accept_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "WarpAcceptClientPacket") -> None:
    """
    Serializes an instance of `WarpAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WarpAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._map_id is None:
            raise SerializationError("map_id must be provided.")
        writer.add_short(data._map_id)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WarpAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WarpAcceptClientPacket WarpAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/warp_accept_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "WarpAcceptClientPacket":
    """
    Deserializes an instance of `WarpAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WarpAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        map_id = reader.get_short()
        session_id = reader.get_short()
        result = WarpAcceptClientPacket(map_id=map_id, session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WalkAction

Common data between walk packets

Source code in src/eolib/protocol/_generated/net/client/walk_action.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
class WalkAction:
    """
    Common data between walk packets
    """
    _byte_size: int = 0
    _direction: Direction
    _timestamp: int
    _coords: Coords

    def __init__(self, *, direction: Direction, timestamp: int, coords: Coords):
        """
        Create a new instance of WalkAction.

        Args:
            direction (Direction): 
            timestamp (int): (Value range is 0-16194276.)
            coords (Coords): 
        """
        self._direction = direction
        self._timestamp = timestamp
        self._coords = coords

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def direction(self) -> Direction:
        return self._direction

    @property
    def timestamp(self) -> int:
        return self._timestamp

    @property
    def coords(self) -> Coords:
        return self._coords

    @staticmethod
    def serialize(writer: EoWriter, data: "WalkAction") -> None:
        """
        Serializes an instance of `WalkAction` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WalkAction): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._direction is None:
                raise SerializationError("direction must be provided.")
            writer.add_char(int(data._direction))
            if data._timestamp is None:
                raise SerializationError("timestamp must be provided.")
            writer.add_three(data._timestamp)
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            Coords.serialize(writer, data._coords)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WalkAction":
        """
        Deserializes an instance of `WalkAction` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WalkAction: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            direction = Direction(reader.get_char())
            timestamp = reader.get_three()
            coords = Coords.deserialize(reader)
            result = WalkAction(direction=direction, timestamp=timestamp, coords=coords)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WalkAction(byte_size={repr(self._byte_size)}, direction={repr(self._direction)}, timestamp={repr(self._timestamp)}, coords={repr(self._coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

direction: Direction property

timestamp: int property

coords: Coords property

__init__(*, direction, timestamp, coords)

Create a new instance of WalkAction.

Parameters:

Name Type Description Default
direction Direction
required
timestamp int

(Value range is 0-16194276.)

required
coords Coords
required
Source code in src/eolib/protocol/_generated/net/client/walk_action.py
21
22
23
24
25
26
27
28
29
30
31
32
def __init__(self, *, direction: Direction, timestamp: int, coords: Coords):
    """
    Create a new instance of WalkAction.

    Args:
        direction (Direction): 
        timestamp (int): (Value range is 0-16194276.)
        coords (Coords): 
    """
    self._direction = direction
    self._timestamp = timestamp
    self._coords = coords

serialize(writer, data) staticmethod

Serializes an instance of WalkAction to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WalkAction

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/walk_action.py
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
@staticmethod
def serialize(writer: EoWriter, data: "WalkAction") -> None:
    """
    Serializes an instance of `WalkAction` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WalkAction): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        if data._timestamp is None:
            raise SerializationError("timestamp must be provided.")
        writer.add_three(data._timestamp)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WalkAction from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WalkAction WalkAction

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/walk_action.py
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def deserialize(reader: EoReader) -> "WalkAction":
    """
    Deserializes an instance of `WalkAction` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WalkAction: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        direction = Direction(reader.get_char())
        timestamp = reader.get_three()
        coords = Coords.deserialize(reader)
        result = WalkAction(direction=direction, timestamp=timestamp, coords=coords)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WalkSpecClientPacket

Bases: Packet

Walking through a player

Source code in src/eolib/protocol/_generated/net/client/walk_spec_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class WalkSpecClientPacket(Packet):
    """
    Walking through a player
    """
    _byte_size: int = 0
    _walk_action: WalkAction

    def __init__(self, *, walk_action: WalkAction):
        """
        Create a new instance of WalkSpecClientPacket.

        Args:
            walk_action (WalkAction): 
        """
        self._walk_action = walk_action

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def walk_action(self) -> WalkAction:
        return self._walk_action

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Walk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Spec

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        WalkSpecClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "WalkSpecClientPacket") -> None:
        """
        Serializes an instance of `WalkSpecClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WalkSpecClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._walk_action is None:
                raise SerializationError("walk_action must be provided.")
            WalkAction.serialize(writer, data._walk_action)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WalkSpecClientPacket":
        """
        Deserializes an instance of `WalkSpecClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WalkSpecClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            walk_action = WalkAction.deserialize(reader)
            result = WalkSpecClientPacket(walk_action=walk_action)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WalkSpecClientPacket(byte_size={repr(self._byte_size)}, walk_action={repr(self._walk_action)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

walk_action: WalkAction property

__init__(*, walk_action)

Create a new instance of WalkSpecClientPacket.

Parameters:

Name Type Description Default
walk_action WalkAction
required
Source code in src/eolib/protocol/_generated/net/client/walk_spec_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, walk_action: WalkAction):
    """
    Create a new instance of WalkSpecClientPacket.

    Args:
        walk_action (WalkAction): 
    """
    self._walk_action = walk_action

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/walk_spec_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Walk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/walk_spec_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Spec

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/walk_spec_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    WalkSpecClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WalkSpecClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WalkSpecClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/walk_spec_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "WalkSpecClientPacket") -> None:
    """
    Serializes an instance of `WalkSpecClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WalkSpecClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._walk_action is None:
            raise SerializationError("walk_action must be provided.")
        WalkAction.serialize(writer, data._walk_action)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WalkSpecClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WalkSpecClientPacket WalkSpecClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/walk_spec_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "WalkSpecClientPacket":
    """
    Deserializes an instance of `WalkSpecClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WalkSpecClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        walk_action = WalkAction.deserialize(reader)
        result = WalkSpecClientPacket(walk_action=walk_action)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WalkPlayerClientPacket

Bases: Packet

Walking

Source code in src/eolib/protocol/_generated/net/client/walk_player_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class WalkPlayerClientPacket(Packet):
    """
    Walking
    """
    _byte_size: int = 0
    _walk_action: WalkAction

    def __init__(self, *, walk_action: WalkAction):
        """
        Create a new instance of WalkPlayerClientPacket.

        Args:
            walk_action (WalkAction): 
        """
        self._walk_action = walk_action

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def walk_action(self) -> WalkAction:
        return self._walk_action

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Walk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Player

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        WalkPlayerClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "WalkPlayerClientPacket") -> None:
        """
        Serializes an instance of `WalkPlayerClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WalkPlayerClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._walk_action is None:
                raise SerializationError("walk_action must be provided.")
            WalkAction.serialize(writer, data._walk_action)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WalkPlayerClientPacket":
        """
        Deserializes an instance of `WalkPlayerClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WalkPlayerClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            walk_action = WalkAction.deserialize(reader)
            result = WalkPlayerClientPacket(walk_action=walk_action)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WalkPlayerClientPacket(byte_size={repr(self._byte_size)}, walk_action={repr(self._walk_action)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

walk_action: WalkAction property

__init__(*, walk_action)

Create a new instance of WalkPlayerClientPacket.

Parameters:

Name Type Description Default
walk_action WalkAction
required
Source code in src/eolib/protocol/_generated/net/client/walk_player_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, walk_action: WalkAction):
    """
    Create a new instance of WalkPlayerClientPacket.

    Args:
        walk_action (WalkAction): 
    """
    self._walk_action = walk_action

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/walk_player_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Walk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/walk_player_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Player

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/walk_player_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    WalkPlayerClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WalkPlayerClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WalkPlayerClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/walk_player_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "WalkPlayerClientPacket") -> None:
    """
    Serializes an instance of `WalkPlayerClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WalkPlayerClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._walk_action is None:
            raise SerializationError("walk_action must be provided.")
        WalkAction.serialize(writer, data._walk_action)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WalkPlayerClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WalkPlayerClientPacket WalkPlayerClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/walk_player_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "WalkPlayerClientPacket":
    """
    Deserializes an instance of `WalkPlayerClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WalkPlayerClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        walk_action = WalkAction.deserialize(reader)
        result = WalkPlayerClientPacket(walk_action=walk_action)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WalkAdminClientPacket

Bases: Packet

Walking with #nowall

Source code in src/eolib/protocol/_generated/net/client/walk_admin_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class WalkAdminClientPacket(Packet):
    """
    Walking with #nowall
    """
    _byte_size: int = 0
    _walk_action: WalkAction

    def __init__(self, *, walk_action: WalkAction):
        """
        Create a new instance of WalkAdminClientPacket.

        Args:
            walk_action (WalkAction): 
        """
        self._walk_action = walk_action

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def walk_action(self) -> WalkAction:
        return self._walk_action

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Walk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Admin

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        WalkAdminClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "WalkAdminClientPacket") -> None:
        """
        Serializes an instance of `WalkAdminClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WalkAdminClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._walk_action is None:
                raise SerializationError("walk_action must be provided.")
            WalkAction.serialize(writer, data._walk_action)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "WalkAdminClientPacket":
        """
        Deserializes an instance of `WalkAdminClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            WalkAdminClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            walk_action = WalkAction.deserialize(reader)
            result = WalkAdminClientPacket(walk_action=walk_action)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"WalkAdminClientPacket(byte_size={repr(self._byte_size)}, walk_action={repr(self._walk_action)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

walk_action: WalkAction property

__init__(*, walk_action)

Create a new instance of WalkAdminClientPacket.

Parameters:

Name Type Description Default
walk_action WalkAction
required
Source code in src/eolib/protocol/_generated/net/client/walk_admin_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, walk_action: WalkAction):
    """
    Create a new instance of WalkAdminClientPacket.

    Args:
        walk_action (WalkAction): 
    """
    self._walk_action = walk_action

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/walk_admin_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Walk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/walk_admin_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Admin

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/walk_admin_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    WalkAdminClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WalkAdminClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WalkAdminClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/walk_admin_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "WalkAdminClientPacket") -> None:
    """
    Serializes an instance of `WalkAdminClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WalkAdminClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._walk_action is None:
            raise SerializationError("walk_action must be provided.")
        WalkAction.serialize(writer, data._walk_action)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of WalkAdminClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WalkAdminClientPacket WalkAdminClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/walk_admin_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "WalkAdminClientPacket":
    """
    Deserializes an instance of `WalkAdminClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        WalkAdminClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        walk_action = WalkAction.deserialize(reader)
        result = WalkAdminClientPacket(walk_action=walk_action)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

Direction

Bases: IntEnum

The direction a player or NPC is facing

Source code in src/eolib/protocol/_generated/direction.py
 9
10
11
12
13
14
15
16
class Direction(IntEnum, metaclass=ProtocolEnumMeta):
    """
    The direction a player or NPC is facing
    """
    Down = 0
    Left = 1
    Up = 2
    Right = 3

Down = 0 class-attribute instance-attribute

Left = 1 class-attribute instance-attribute

Up = 2 class-attribute instance-attribute

Right = 3 class-attribute instance-attribute

Coords

Map coordinates

Source code in src/eolib/protocol/_generated/coords.py
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
83
84
85
86
87
88
89
90
class Coords:
    """
    Map coordinates
    """
    _byte_size: int = 0
    _x: int
    _y: int

    def __init__(self, *, x: int, y: int):
        """
        Create a new instance of Coords.

        Args:
            x (int): (Value range is 0-252.)
            y (int): (Value range is 0-252.)
        """
        self._x = x
        self._y = y

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def x(self) -> int:
        return self._x

    @property
    def y(self) -> int:
        return self._y

    @staticmethod
    def serialize(writer: EoWriter, data: "Coords") -> None:
        """
        Serializes an instance of `Coords` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (Coords): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._x is None:
                raise SerializationError("x must be provided.")
            writer.add_char(data._x)
            if data._y is None:
                raise SerializationError("y must be provided.")
            writer.add_char(data._y)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "Coords":
        """
        Deserializes an instance of `Coords` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            Coords: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            x = reader.get_char()
            y = reader.get_char()
            result = Coords(x=x, y=y)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"Coords(byte_size={repr(self._byte_size)}, x={repr(self._x)}, y={repr(self._y)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

x: int property

y: int property

__init__(*, x, y)

Create a new instance of Coords.

Parameters:

Name Type Description Default
x int

(Value range is 0-252.)

required
y int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/coords.py
18
19
20
21
22
23
24
25
26
27
def __init__(self, *, x: int, y: int):
    """
    Create a new instance of Coords.

    Args:
        x (int): (Value range is 0-252.)
        y (int): (Value range is 0-252.)
    """
    self._x = x
    self._y = y

serialize(writer, data) staticmethod

Serializes an instance of Coords to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data Coords

The data to serialize.

required
Source code in src/eolib/protocol/_generated/coords.py
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@staticmethod
def serialize(writer: EoWriter, data: "Coords") -> None:
    """
    Serializes an instance of `Coords` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (Coords): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._x is None:
            raise SerializationError("x must be provided.")
        writer.add_char(data._x)
        if data._y is None:
            raise SerializationError("y must be provided.")
        writer.add_char(data._y)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of Coords from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
Coords Coords

The data to serialize.

Source code in src/eolib/protocol/_generated/coords.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def deserialize(reader: EoReader) -> "Coords":
    """
    Deserializes an instance of `Coords` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        Coords: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        x = reader.get_char()
        y = reader.get_char()
        result = Coords(x=x, y=y)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ProtocolEnumMeta

Bases: EnumMeta

Source code in src/eolib/protocol/protocol_enum_meta.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
class ProtocolEnumMeta(EnumMeta):
    def __call__(cls, value, names=None, *, module=None, qualname=None, type=None, start=1):
        if names is not None:
            return super().__call__(
                value, names=names, module=module, qualname=qualname, type=type, start=start
            )
        try:
            return super().__call__(value, module=module, qualname=qualname, type=type, start=start)
        except ValueError:
            unrecognized = int.__new__(cls, value)
            unrecognized._name_ = f"Unrecognized({int(value)})"
            unrecognized._value_ = value
            return unrecognized

__call__(value, names=None, *, module=None, qualname=None, type=None, start=1)

Source code in src/eolib/protocol/protocol_enum_meta.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
def __call__(cls, value, names=None, *, module=None, qualname=None, type=None, start=1):
    if names is not None:
        return super().__call__(
            value, names=names, module=module, qualname=qualname, type=type, start=start
        )
    try:
        return super().__call__(value, module=module, qualname=qualname, type=type, start=start)
    except ValueError:
        unrecognized = int.__new__(cls, value)
        unrecognized._name_ = f"Unrecognized({int(value)})"
        unrecognized._value_ = value
        return unrecognized

TrainType

Bases: IntEnum

Whether the player is spending a stat point or a skill point

Source code in src/eolib/protocol/_generated/net/client/train_type.py
 9
10
11
12
13
14
class TrainType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Whether the player is spending a stat point or a skill point
    """
    Stat = 1
    Skill = 2

Stat = 1 class-attribute instance-attribute

Skill = 2 class-attribute instance-attribute

TradeRequestClientPacket

Bases: Packet

Requesting a trade with another player

Source code in src/eolib/protocol/_generated/net/client/trade_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
class TradeRequestClientPacket(Packet):
    """
    Requesting a trade with another player
    """
    _byte_size: int = 0
    _player_id: int

    def __init__(self, *, player_id: int):
        """
        Create a new instance of TradeRequestClientPacket.

        Args:
            player_id (int): (Value range is 0-64008.)
        """
        self._player_id = player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def player_id(self) -> int:
        return self._player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Trade

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TradeRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TradeRequestClientPacket") -> None:
        """
        Serializes an instance of `TradeRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_char(138)
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TradeRequestClientPacket":
        """
        Deserializes an instance of `TradeRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TradeRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            player_id = reader.get_short()
            result = TradeRequestClientPacket(player_id=player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TradeRequestClientPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

player_id: int property

__init__(*, player_id)

Create a new instance of TradeRequestClientPacket.

Parameters:

Name Type Description Default
player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/trade_request_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, player_id: int):
    """
    Create a new instance of TradeRequestClientPacket.

    Args:
        player_id (int): (Value range is 0-64008.)
    """
    self._player_id = player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_request_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Trade

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_request_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/trade_request_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TradeRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/trade_request_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "TradeRequestClientPacket") -> None:
    """
    Serializes an instance of `TradeRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_char(138)
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TradeRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeRequestClientPacket TradeRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/trade_request_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@staticmethod
def deserialize(reader: EoReader) -> "TradeRequestClientPacket":
    """
    Deserializes an instance of `TradeRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TradeRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        player_id = reader.get_short()
        result = TradeRequestClientPacket(player_id=player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TradeRemoveClientPacket

Bases: Packet

Remove an item from the trade screen

Source code in src/eolib/protocol/_generated/net/client/trade_remove_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TradeRemoveClientPacket(Packet):
    """
    Remove an item from the trade screen
    """
    _byte_size: int = 0
    _item_id: int

    def __init__(self, *, item_id: int):
        """
        Create a new instance of TradeRemoveClientPacket.

        Args:
            item_id (int): (Value range is 0-64008.)
        """
        self._item_id = item_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def item_id(self) -> int:
        return self._item_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Trade

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TradeRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TradeRemoveClientPacket") -> None:
        """
        Serializes an instance of `TradeRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._item_id is None:
                raise SerializationError("item_id must be provided.")
            writer.add_short(data._item_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TradeRemoveClientPacket":
        """
        Deserializes an instance of `TradeRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TradeRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            item_id = reader.get_short()
            result = TradeRemoveClientPacket(item_id=item_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TradeRemoveClientPacket(byte_size={repr(self._byte_size)}, item_id={repr(self._item_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

item_id: int property

__init__(*, item_id)

Create a new instance of TradeRemoveClientPacket.

Parameters:

Name Type Description Default
item_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/trade_remove_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, item_id: int):
    """
    Create a new instance of TradeRemoveClientPacket.

    Args:
        item_id (int): (Value range is 0-64008.)
    """
    self._item_id = item_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_remove_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Trade

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_remove_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/trade_remove_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TradeRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/trade_remove_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TradeRemoveClientPacket") -> None:
    """
    Serializes an instance of `TradeRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._item_id is None:
            raise SerializationError("item_id must be provided.")
        writer.add_short(data._item_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TradeRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeRemoveClientPacket TradeRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/trade_remove_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TradeRemoveClientPacket":
    """
    Deserializes an instance of `TradeRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TradeRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        item_id = reader.get_short()
        result = TradeRemoveClientPacket(item_id=item_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TradeCloseClientPacket

Bases: Packet

Cancel the trade

Source code in src/eolib/protocol/_generated/net/client/trade_close_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class TradeCloseClientPacket(Packet):
    """
    Cancel the trade
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of TradeCloseClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Trade

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Close

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TradeCloseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TradeCloseClientPacket") -> None:
        """
        Serializes an instance of `TradeCloseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeCloseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_char(0)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TradeCloseClientPacket":
        """
        Deserializes an instance of `TradeCloseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TradeCloseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            result = TradeCloseClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TradeCloseClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of TradeCloseClientPacket.

Source code in src/eolib/protocol/_generated/net/client/trade_close_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of TradeCloseClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_close_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Trade

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_close_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Close

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/trade_close_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TradeCloseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeCloseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeCloseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/trade_close_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "TradeCloseClientPacket") -> None:
    """
    Serializes an instance of `TradeCloseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeCloseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_char(0)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TradeCloseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeCloseClientPacket TradeCloseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/trade_close_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "TradeCloseClientPacket":
    """
    Deserializes an instance of `TradeCloseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TradeCloseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        result = TradeCloseClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TradeAgreeClientPacket

Bases: Packet

Mark trade as agreed

Source code in src/eolib/protocol/_generated/net/client/trade_agree_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TradeAgreeClientPacket(Packet):
    """
    Mark trade as agreed
    """
    _byte_size: int = 0
    _agree: bool

    def __init__(self, *, agree: bool):
        """
        Create a new instance of TradeAgreeClientPacket.

        Args:
            agree (bool): 
        """
        self._agree = agree

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def agree(self) -> bool:
        return self._agree

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Trade

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Agree

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TradeAgreeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TradeAgreeClientPacket") -> None:
        """
        Serializes an instance of `TradeAgreeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeAgreeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._agree is None:
                raise SerializationError("agree must be provided.")
            writer.add_char(1 if data._agree else 0)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TradeAgreeClientPacket":
        """
        Deserializes an instance of `TradeAgreeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TradeAgreeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            agree = reader.get_char() != 0
            result = TradeAgreeClientPacket(agree=agree)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TradeAgreeClientPacket(byte_size={repr(self._byte_size)}, agree={repr(self._agree)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

agree: bool property

__init__(*, agree)

Create a new instance of TradeAgreeClientPacket.

Parameters:

Name Type Description Default
agree bool
required
Source code in src/eolib/protocol/_generated/net/client/trade_agree_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, agree: bool):
    """
    Create a new instance of TradeAgreeClientPacket.

    Args:
        agree (bool): 
    """
    self._agree = agree

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_agree_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Trade

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_agree_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Agree

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/trade_agree_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TradeAgreeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeAgreeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeAgreeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/trade_agree_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TradeAgreeClientPacket") -> None:
    """
    Serializes an instance of `TradeAgreeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeAgreeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._agree is None:
            raise SerializationError("agree must be provided.")
        writer.add_char(1 if data._agree else 0)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TradeAgreeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeAgreeClientPacket TradeAgreeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/trade_agree_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TradeAgreeClientPacket":
    """
    Deserializes an instance of `TradeAgreeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TradeAgreeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        agree = reader.get_char() != 0
        result = TradeAgreeClientPacket(agree=agree)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

Item

An item reference with a 4-byte amount

Source code in src/eolib/protocol/_generated/net/item.py
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
83
84
85
86
87
88
89
90
class Item:
    """
    An item reference with a 4-byte amount
    """
    _byte_size: int = 0
    _id: int
    _amount: int

    def __init__(self, *, id: int, amount: int):
        """
        Create a new instance of Item.

        Args:
            id (int): (Value range is 0-64008.)
            amount (int): (Value range is 0-4097152080.)
        """
        self._id = id
        self._amount = amount

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def id(self) -> int:
        return self._id

    @property
    def amount(self) -> int:
        return self._amount

    @staticmethod
    def serialize(writer: EoWriter, data: "Item") -> None:
        """
        Serializes an instance of `Item` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (Item): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._id is None:
                raise SerializationError("id must be provided.")
            writer.add_short(data._id)
            if data._amount is None:
                raise SerializationError("amount must be provided.")
            writer.add_int(data._amount)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "Item":
        """
        Deserializes an instance of `Item` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            Item: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            id = reader.get_short()
            amount = reader.get_int()
            result = Item(id=id, amount=amount)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"Item(byte_size={repr(self._byte_size)}, id={repr(self._id)}, amount={repr(self._amount)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

id: int property

amount: int property

__init__(*, id, amount)

Create a new instance of Item.

Parameters:

Name Type Description Default
id int

(Value range is 0-64008.)

required
amount int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/item.py
18
19
20
21
22
23
24
25
26
27
def __init__(self, *, id: int, amount: int):
    """
    Create a new instance of Item.

    Args:
        id (int): (Value range is 0-64008.)
        amount (int): (Value range is 0-4097152080.)
    """
    self._id = id
    self._amount = amount

serialize(writer, data) staticmethod

Serializes an instance of Item to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data Item

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/item.py
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@staticmethod
def serialize(writer: EoWriter, data: "Item") -> None:
    """
    Serializes an instance of `Item` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (Item): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._id is None:
            raise SerializationError("id must be provided.")
        writer.add_short(data._id)
        if data._amount is None:
            raise SerializationError("amount must be provided.")
        writer.add_int(data._amount)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of Item from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
Item Item

The data to serialize.

Source code in src/eolib/protocol/_generated/net/item.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def deserialize(reader: EoReader) -> "Item":
    """
    Deserializes an instance of `Item` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        Item: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        id = reader.get_short()
        amount = reader.get_int()
        result = Item(id=id, amount=amount)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TradeAddClientPacket

Bases: Packet

Add an item to the trade screen

Source code in src/eolib/protocol/_generated/net/client/trade_add_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class TradeAddClientPacket(Packet):
    """
    Add an item to the trade screen
    """
    _byte_size: int = 0
    _add_item: Item

    def __init__(self, *, add_item: Item):
        """
        Create a new instance of TradeAddClientPacket.

        Args:
            add_item (Item): 
        """
        self._add_item = add_item

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def add_item(self) -> Item:
        return self._add_item

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Trade

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Add

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TradeAddClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TradeAddClientPacket") -> None:
        """
        Serializes an instance of `TradeAddClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeAddClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._add_item is None:
                raise SerializationError("add_item must be provided.")
            Item.serialize(writer, data._add_item)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TradeAddClientPacket":
        """
        Deserializes an instance of `TradeAddClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TradeAddClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            add_item = Item.deserialize(reader)
            result = TradeAddClientPacket(add_item=add_item)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TradeAddClientPacket(byte_size={repr(self._byte_size)}, add_item={repr(self._add_item)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

add_item: Item property

__init__(*, add_item)

Create a new instance of TradeAddClientPacket.

Parameters:

Name Type Description Default
add_item Item
required
Source code in src/eolib/protocol/_generated/net/client/trade_add_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, add_item: Item):
    """
    Create a new instance of TradeAddClientPacket.

    Args:
        add_item (Item): 
    """
    self._add_item = add_item

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_add_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Trade

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_add_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Add

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/trade_add_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TradeAddClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeAddClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeAddClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/trade_add_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "TradeAddClientPacket") -> None:
    """
    Serializes an instance of `TradeAddClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeAddClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._add_item is None:
            raise SerializationError("add_item must be provided.")
        Item.serialize(writer, data._add_item)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TradeAddClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeAddClientPacket TradeAddClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/trade_add_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "TradeAddClientPacket":
    """
    Deserializes an instance of `TradeAddClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TradeAddClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        add_item = Item.deserialize(reader)
        result = TradeAddClientPacket(add_item=add_item)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TradeAcceptClientPacket

Bases: Packet

Accepting a trade request

Source code in src/eolib/protocol/_generated/net/client/trade_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
class TradeAcceptClientPacket(Packet):
    """
    Accepting a trade request
    """
    _byte_size: int = 0
    _player_id: int

    def __init__(self, *, player_id: int):
        """
        Create a new instance of TradeAcceptClientPacket.

        Args:
            player_id (int): (Value range is 0-64008.)
        """
        self._player_id = player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def player_id(self) -> int:
        return self._player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Trade

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TradeAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TradeAcceptClientPacket") -> None:
        """
        Serializes an instance of `TradeAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_char(0)
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TradeAcceptClientPacket":
        """
        Deserializes an instance of `TradeAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TradeAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            player_id = reader.get_short()
            result = TradeAcceptClientPacket(player_id=player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TradeAcceptClientPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

player_id: int property

__init__(*, player_id)

Create a new instance of TradeAcceptClientPacket.

Parameters:

Name Type Description Default
player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/trade_accept_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, player_id: int):
    """
    Create a new instance of TradeAcceptClientPacket.

    Args:
        player_id (int): (Value range is 0-64008.)
    """
    self._player_id = player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_accept_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Trade

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/trade_accept_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/trade_accept_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TradeAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/trade_accept_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "TradeAcceptClientPacket") -> None:
    """
    Serializes an instance of `TradeAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_char(0)
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TradeAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeAcceptClientPacket TradeAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/trade_accept_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@staticmethod
def deserialize(reader: EoReader) -> "TradeAcceptClientPacket":
    """
    Deserializes an instance of `TradeAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TradeAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        player_id = reader.get_short()
        result = TradeAcceptClientPacket(player_id=player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkUseClientPacket

Bases: Packet

Public chat message - alias of TALK_REPORT (vestigial)

Source code in src/eolib/protocol/_generated/net/client/talk_use_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TalkUseClientPacket(Packet):
    """
    Public chat message - alias of TALK_REPORT (vestigial)
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of TalkUseClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Use

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkUseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkUseClientPacket") -> None:
        """
        Serializes an instance of `TalkUseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkUseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkUseClientPacket":
        """
        Deserializes an instance of `TalkUseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkUseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = TalkUseClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkUseClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of TalkUseClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_use_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of TalkUseClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_use_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_use_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Use

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_use_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkUseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkUseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkUseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_use_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TalkUseClientPacket") -> None:
    """
    Serializes an instance of `TalkUseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkUseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkUseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkUseClientPacket TalkUseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_use_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TalkUseClientPacket":
    """
    Deserializes an instance of `TalkUseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkUseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = TalkUseClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkTellClientPacket

Bases: Packet

Private chat message

Source code in src/eolib/protocol/_generated/net/client/talk_tell_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
class TalkTellClientPacket(Packet):
    """
    Private chat message
    """
    _byte_size: int = 0
    _name: str
    _message: str

    def __init__(self, *, name: str, message: str):
        """
        Create a new instance of TalkTellClientPacket.

        Args:
            name (str): 
            message (str): 
        """
        self._name = name
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def name(self) -> str:
        return self._name

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Tell

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkTellClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkTellClientPacket") -> None:
        """
        Serializes an instance of `TalkTellClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkTellClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._name is None:
                raise SerializationError("name must be provided.")
            writer.add_string(data._name)
            writer.add_byte(0xFF)
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkTellClientPacket":
        """
        Deserializes an instance of `TalkTellClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkTellClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            name = reader.get_string()
            reader.next_chunk()
            message = reader.get_string()
            reader.chunked_reading_mode = False
            result = TalkTellClientPacket(name=name, message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkTellClientPacket(byte_size={repr(self._byte_size)}, name={repr(self._name)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

name: str property

message: str property

__init__(*, name, message)

Create a new instance of TalkTellClientPacket.

Parameters:

Name Type Description Default
name str
required
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_tell_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, name: str, message: str):
    """
    Create a new instance of TalkTellClientPacket.

    Args:
        name (str): 
        message (str): 
    """
    self._name = name
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_tell_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_tell_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Tell

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_tell_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkTellClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkTellClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkTellClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_tell_client_packet.py
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def serialize(writer: EoWriter, data: "TalkTellClientPacket") -> None:
    """
    Serializes an instance of `TalkTellClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkTellClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)
        writer.add_byte(0xFF)
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkTellClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkTellClientPacket TalkTellClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_tell_client_packet.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@staticmethod
def deserialize(reader: EoReader) -> "TalkTellClientPacket":
    """
    Deserializes an instance of `TalkTellClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkTellClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        name = reader.get_string()
        reader.next_chunk()
        message = reader.get_string()
        reader.chunked_reading_mode = False
        result = TalkTellClientPacket(name=name, message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkRequestClientPacket

Bases: Packet

Guild chat message

Source code in src/eolib/protocol/_generated/net/client/talk_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TalkRequestClientPacket(Packet):
    """
    Guild chat message
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of TalkRequestClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkRequestClientPacket") -> None:
        """
        Serializes an instance of `TalkRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkRequestClientPacket":
        """
        Deserializes an instance of `TalkRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = TalkRequestClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkRequestClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of TalkRequestClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_request_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of TalkRequestClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_request_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_request_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_request_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_request_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TalkRequestClientPacket") -> None:
    """
    Serializes an instance of `TalkRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkRequestClientPacket TalkRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_request_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TalkRequestClientPacket":
    """
    Deserializes an instance of `TalkRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = TalkRequestClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkReportClientPacket

Bases: Packet

Public chat message

Source code in src/eolib/protocol/_generated/net/client/talk_report_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TalkReportClientPacket(Packet):
    """
    Public chat message
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of TalkReportClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Report

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkReportClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkReportClientPacket") -> None:
        """
        Serializes an instance of `TalkReportClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkReportClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkReportClientPacket":
        """
        Deserializes an instance of `TalkReportClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkReportClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = TalkReportClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkReportClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of TalkReportClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_report_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of TalkReportClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_report_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_report_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Report

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_report_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkReportClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkReportClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkReportClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_report_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TalkReportClientPacket") -> None:
    """
    Serializes an instance of `TalkReportClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkReportClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkReportClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkReportClientPacket TalkReportClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_report_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TalkReportClientPacket":
    """
    Deserializes an instance of `TalkReportClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkReportClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = TalkReportClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkPlayerClientPacket

Bases: Packet

Public chat message - alias of TALK_REPORT (vestigial)

Source code in src/eolib/protocol/_generated/net/client/talk_player_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TalkPlayerClientPacket(Packet):
    """
    Public chat message - alias of TALK_REPORT (vestigial)
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of TalkPlayerClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Player

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkPlayerClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkPlayerClientPacket") -> None:
        """
        Serializes an instance of `TalkPlayerClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkPlayerClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkPlayerClientPacket":
        """
        Deserializes an instance of `TalkPlayerClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkPlayerClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = TalkPlayerClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkPlayerClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of TalkPlayerClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_player_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of TalkPlayerClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_player_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_player_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Player

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_player_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkPlayerClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkPlayerClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkPlayerClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_player_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TalkPlayerClientPacket") -> None:
    """
    Serializes an instance of `TalkPlayerClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkPlayerClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkPlayerClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkPlayerClientPacket TalkPlayerClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_player_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TalkPlayerClientPacket":
    """
    Deserializes an instance of `TalkPlayerClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkPlayerClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = TalkPlayerClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkOpenClientPacket

Bases: Packet

Party chat message

Source code in src/eolib/protocol/_generated/net/client/talk_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TalkOpenClientPacket(Packet):
    """
    Party chat message
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of TalkOpenClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkOpenClientPacket") -> None:
        """
        Serializes an instance of `TalkOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkOpenClientPacket":
        """
        Deserializes an instance of `TalkOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = TalkOpenClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkOpenClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of TalkOpenClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of TalkOpenClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TalkOpenClientPacket") -> None:
    """
    Serializes an instance of `TalkOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkOpenClientPacket TalkOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TalkOpenClientPacket":
    """
    Deserializes an instance of `TalkOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = TalkOpenClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkMsgClientPacket

Bases: Packet

Global chat message

Source code in src/eolib/protocol/_generated/net/client/talk_msg_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TalkMsgClientPacket(Packet):
    """
    Global chat message
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of TalkMsgClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Msg

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkMsgClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkMsgClientPacket") -> None:
        """
        Serializes an instance of `TalkMsgClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkMsgClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkMsgClientPacket":
        """
        Deserializes an instance of `TalkMsgClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkMsgClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = TalkMsgClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkMsgClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of TalkMsgClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_msg_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of TalkMsgClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_msg_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_msg_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Msg

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_msg_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkMsgClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkMsgClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkMsgClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_msg_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TalkMsgClientPacket") -> None:
    """
    Serializes an instance of `TalkMsgClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkMsgClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkMsgClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkMsgClientPacket TalkMsgClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_msg_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TalkMsgClientPacket":
    """
    Deserializes an instance of `TalkMsgClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkMsgClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = TalkMsgClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkAnnounceClientPacket

Bases: Packet

Admin announcement

Source code in src/eolib/protocol/_generated/net/client/talk_announce_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TalkAnnounceClientPacket(Packet):
    """
    Admin announcement
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of TalkAnnounceClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Announce

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkAnnounceClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkAnnounceClientPacket") -> None:
        """
        Serializes an instance of `TalkAnnounceClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkAnnounceClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkAnnounceClientPacket":
        """
        Deserializes an instance of `TalkAnnounceClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkAnnounceClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = TalkAnnounceClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkAnnounceClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of TalkAnnounceClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_announce_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of TalkAnnounceClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_announce_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_announce_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Announce

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_announce_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkAnnounceClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkAnnounceClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkAnnounceClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_announce_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TalkAnnounceClientPacket") -> None:
    """
    Serializes an instance of `TalkAnnounceClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkAnnounceClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkAnnounceClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkAnnounceClientPacket TalkAnnounceClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_announce_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TalkAnnounceClientPacket":
    """
    Deserializes an instance of `TalkAnnounceClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkAnnounceClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = TalkAnnounceClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkAdminClientPacket

Bases: Packet

Admin chat message

Source code in src/eolib/protocol/_generated/net/client/talk_admin_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class TalkAdminClientPacket(Packet):
    """
    Admin chat message
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of TalkAdminClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Talk

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Admin

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        TalkAdminClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "TalkAdminClientPacket") -> None:
        """
        Serializes an instance of `TalkAdminClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkAdminClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "TalkAdminClientPacket":
        """
        Deserializes an instance of `TalkAdminClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            TalkAdminClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = TalkAdminClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"TalkAdminClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of TalkAdminClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/talk_admin_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of TalkAdminClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_admin_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Talk

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/talk_admin_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Admin

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/talk_admin_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    TalkAdminClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkAdminClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkAdminClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/talk_admin_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "TalkAdminClientPacket") -> None:
    """
    Serializes an instance of `TalkAdminClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkAdminClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of TalkAdminClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkAdminClientPacket TalkAdminClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/talk_admin_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "TalkAdminClientPacket":
    """
    Deserializes an instance of `TalkAdminClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        TalkAdminClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = TalkAdminClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillTakeClientPacket

Bases: Packet

Learning a skill from a skill master NPC

Source code in src/eolib/protocol/_generated/net/client/stat_skill_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class StatSkillTakeClientPacket(Packet):
    """
    Learning a skill from a skill master NPC
    """
    _byte_size: int = 0
    _session_id: int
    _spell_id: int

    def __init__(self, *, session_id: int, spell_id: int):
        """
        Create a new instance of StatSkillTakeClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            spell_id (int): (Value range is 0-64008.)
        """
        self._session_id = session_id
        self._spell_id = spell_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def spell_id(self) -> int:
        return self._spell_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.StatSkill

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        StatSkillTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "StatSkillTakeClientPacket") -> None:
        """
        Serializes an instance of `StatSkillTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._spell_id is None:
                raise SerializationError("spell_id must be provided.")
            writer.add_short(data._spell_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "StatSkillTakeClientPacket":
        """
        Deserializes an instance of `StatSkillTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            StatSkillTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            spell_id = reader.get_short()
            result = StatSkillTakeClientPacket(session_id=session_id, spell_id=spell_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"StatSkillTakeClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, spell_id={repr(self._spell_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

spell_id: int property

__init__(*, session_id, spell_id)

Create a new instance of StatSkillTakeClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
spell_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_take_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, spell_id: int):
    """
    Create a new instance of StatSkillTakeClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        spell_id (int): (Value range is 0-64008.)
    """
    self._session_id = session_id
    self._spell_id = spell_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_take_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.StatSkill

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_take_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_take_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    StatSkillTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_take_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillTakeClientPacket") -> None:
    """
    Serializes an instance of `StatSkillTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of StatSkillTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillTakeClientPacket StatSkillTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_take_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillTakeClientPacket":
    """
    Deserializes an instance of `StatSkillTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        StatSkillTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        spell_id = reader.get_short()
        result = StatSkillTakeClientPacket(session_id=session_id, spell_id=spell_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillRemoveClientPacket

Bases: Packet

Forgetting a skill at a skill master NPC

Source code in src/eolib/protocol/_generated/net/client/stat_skill_remove_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class StatSkillRemoveClientPacket(Packet):
    """
    Forgetting a skill at a skill master NPC
    """
    _byte_size: int = 0
    _session_id: int
    _spell_id: int

    def __init__(self, *, session_id: int, spell_id: int):
        """
        Create a new instance of StatSkillRemoveClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            spell_id (int): (Value range is 0-64008.)
        """
        self._session_id = session_id
        self._spell_id = spell_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def spell_id(self) -> int:
        return self._spell_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.StatSkill

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        StatSkillRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "StatSkillRemoveClientPacket") -> None:
        """
        Serializes an instance of `StatSkillRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._spell_id is None:
                raise SerializationError("spell_id must be provided.")
            writer.add_short(data._spell_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "StatSkillRemoveClientPacket":
        """
        Deserializes an instance of `StatSkillRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            StatSkillRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            spell_id = reader.get_short()
            result = StatSkillRemoveClientPacket(session_id=session_id, spell_id=spell_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"StatSkillRemoveClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, spell_id={repr(self._spell_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

spell_id: int property

__init__(*, session_id, spell_id)

Create a new instance of StatSkillRemoveClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
spell_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_remove_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, spell_id: int):
    """
    Create a new instance of StatSkillRemoveClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        spell_id (int): (Value range is 0-64008.)
    """
    self._session_id = session_id
    self._spell_id = spell_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_remove_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.StatSkill

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_remove_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_remove_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    StatSkillRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_remove_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillRemoveClientPacket") -> None:
    """
    Serializes an instance of `StatSkillRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of StatSkillRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillRemoveClientPacket StatSkillRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_remove_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillRemoveClientPacket":
    """
    Deserializes an instance of `StatSkillRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        StatSkillRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        spell_id = reader.get_short()
        result = StatSkillRemoveClientPacket(session_id=session_id, spell_id=spell_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillOpenClientPacket

Bases: Packet

Talking to a skill master NPC

Source code in src/eolib/protocol/_generated/net/client/stat_skill_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class StatSkillOpenClientPacket(Packet):
    """
    Talking to a skill master NPC
    """
    _byte_size: int = 0
    _npc_index: int

    def __init__(self, *, npc_index: int):
        """
        Create a new instance of StatSkillOpenClientPacket.

        Args:
            npc_index (int): (Value range is 0-64008.)
        """
        self._npc_index = npc_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.StatSkill

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        StatSkillOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "StatSkillOpenClientPacket") -> None:
        """
        Serializes an instance of `StatSkillOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "StatSkillOpenClientPacket":
        """
        Deserializes an instance of `StatSkillOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            StatSkillOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_short()
            result = StatSkillOpenClientPacket(npc_index=npc_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"StatSkillOpenClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

__init__(*, npc_index)

Create a new instance of StatSkillOpenClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, npc_index: int):
    """
    Create a new instance of StatSkillOpenClientPacket.

    Args:
        npc_index (int): (Value range is 0-64008.)
    """
    self._npc_index = npc_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.StatSkill

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    StatSkillOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillOpenClientPacket") -> None:
    """
    Serializes an instance of `StatSkillOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of StatSkillOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillOpenClientPacket StatSkillOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillOpenClientPacket":
    """
    Deserializes an instance of `StatSkillOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        StatSkillOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_short()
        result = StatSkillOpenClientPacket(npc_index=npc_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillJunkClientPacket

Bases: Packet

Resetting stats at a skill master

Source code in src/eolib/protocol/_generated/net/client/stat_skill_junk_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class StatSkillJunkClientPacket(Packet):
    """
    Resetting stats at a skill master
    """
    _byte_size: int = 0
    _session_id: int

    def __init__(self, *, session_id: int):
        """
        Create a new instance of StatSkillJunkClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
        """
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.StatSkill

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Junk

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        StatSkillJunkClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "StatSkillJunkClientPacket") -> None:
        """
        Serializes an instance of `StatSkillJunkClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillJunkClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "StatSkillJunkClientPacket":
        """
        Deserializes an instance of `StatSkillJunkClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            StatSkillJunkClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            result = StatSkillJunkClientPacket(session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"StatSkillJunkClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

__init__(*, session_id)

Create a new instance of StatSkillJunkClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_junk_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, session_id: int):
    """
    Create a new instance of StatSkillJunkClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
    """
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_junk_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.StatSkill

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_junk_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Junk

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_junk_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    StatSkillJunkClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillJunkClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillJunkClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_junk_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillJunkClientPacket") -> None:
    """
    Serializes an instance of `StatSkillJunkClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillJunkClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of StatSkillJunkClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillJunkClientPacket StatSkillJunkClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_junk_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillJunkClientPacket":
    """
    Deserializes an instance of `StatSkillJunkClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        StatSkillJunkClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        result = StatSkillJunkClientPacket(session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatId

Bases: IntEnum

Base character stat

Source code in src/eolib/protocol/_generated/net/client/stat_id.py
 9
10
11
12
13
14
15
16
17
18
class StatId(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Base character stat
    """
    Str = 1
    Int = 2
    Wis = 3
    Agi = 4
    Con = 5
    Cha = 6

Str = 1 class-attribute instance-attribute

Int = 2 class-attribute instance-attribute

Wis = 3 class-attribute instance-attribute

Agi = 4 class-attribute instance-attribute

Con = 5 class-attribute instance-attribute

Cha = 6 class-attribute instance-attribute

StatSkillAddClientPacket

Bases: Packet

Spending a stat point on a stat or skill

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
class StatSkillAddClientPacket(Packet):
    """
    Spending a stat point on a stat or skill
    """
    _byte_size: int = 0
    _action_type: TrainType
    _action_type_data: 'StatSkillAddClientPacket.ActionTypeData'

    def __init__(self, *, action_type: TrainType, action_type_data: 'StatSkillAddClientPacket.ActionTypeData' = None):
        """
        Create a new instance of StatSkillAddClientPacket.

        Args:
            action_type (TrainType): 
            action_type_data (StatSkillAddClientPacket.ActionTypeData): Data associated with the `action_type` field.
        """
        self._action_type = action_type
        self._action_type_data = action_type_data

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def action_type(self) -> TrainType:
        return self._action_type

    @property
    def action_type_data(self) -> 'StatSkillAddClientPacket.ActionTypeData':
        """
        StatSkillAddClientPacket.ActionTypeData: Data associated with the `action_type` field.
        """
        return self._action_type_data

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.StatSkill

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Add

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        StatSkillAddClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "StatSkillAddClientPacket") -> None:
        """
        Serializes an instance of `StatSkillAddClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillAddClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._action_type is None:
                raise SerializationError("action_type must be provided.")
            writer.add_char(int(data._action_type))
            if data._action_type == TrainType.Stat:
                if not isinstance(data._action_type_data, StatSkillAddClientPacket.ActionTypeDataStat):
                    raise SerializationError("Expected action_type_data to be type StatSkillAddClientPacket.ActionTypeDataStat for action_type " + TrainType(data._action_type).name + ".")
                StatSkillAddClientPacket.ActionTypeDataStat.serialize(writer, data._action_type_data)
            elif data._action_type == TrainType.Skill:
                if not isinstance(data._action_type_data, StatSkillAddClientPacket.ActionTypeDataSkill):
                    raise SerializationError("Expected action_type_data to be type StatSkillAddClientPacket.ActionTypeDataSkill for action_type " + TrainType(data._action_type).name + ".")
                StatSkillAddClientPacket.ActionTypeDataSkill.serialize(writer, data._action_type_data)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "StatSkillAddClientPacket":
        """
        Deserializes an instance of `StatSkillAddClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            StatSkillAddClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            action_type = TrainType(reader.get_char())
            action_type_data: StatSkillAddClientPacket.ActionTypeData = None
            if action_type == TrainType.Stat:
                action_type_data = StatSkillAddClientPacket.ActionTypeDataStat.deserialize(reader)
            elif action_type == TrainType.Skill:
                action_type_data = StatSkillAddClientPacket.ActionTypeDataSkill.deserialize(reader)
            result = StatSkillAddClientPacket(action_type=action_type, action_type_data=action_type_data)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"StatSkillAddClientPacket(byte_size={repr(self._byte_size)}, action_type={repr(self._action_type)}, action_type_data={repr(self._action_type_data)})"

    ActionTypeData = Union['StatSkillAddClientPacket.ActionTypeDataStat', 'StatSkillAddClientPacket.ActionTypeDataSkill', None]
    """
    Data associated with different values of the `action_type` field.
    """

    class ActionTypeDataStat:
        """
        Data associated with action_type value TrainType.Stat
        """
        _byte_size: int = 0
        _stat_id: StatId

        def __init__(self, *, stat_id: StatId):
            """
            Create a new instance of StatSkillAddClientPacket.ActionTypeDataStat.

            Args:
                stat_id (StatId): 
            """
            self._stat_id = stat_id

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def stat_id(self) -> StatId:
            return self._stat_id

        @staticmethod
        def serialize(writer: EoWriter, data: "StatSkillAddClientPacket.ActionTypeDataStat") -> None:
            """
            Serializes an instance of `StatSkillAddClientPacket.ActionTypeDataStat` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (StatSkillAddClientPacket.ActionTypeDataStat): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._stat_id is None:
                    raise SerializationError("stat_id must be provided.")
                writer.add_short(int(data._stat_id))
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "StatSkillAddClientPacket.ActionTypeDataStat":
            """
            Deserializes an instance of `StatSkillAddClientPacket.ActionTypeDataStat` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                StatSkillAddClientPacket.ActionTypeDataStat: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                stat_id = StatId(reader.get_short())
                result = StatSkillAddClientPacket.ActionTypeDataStat(stat_id=stat_id)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"StatSkillAddClientPacket.ActionTypeDataStat(byte_size={repr(self._byte_size)}, stat_id={repr(self._stat_id)})"

    class ActionTypeDataSkill:
        """
        Data associated with action_type value TrainType.Skill
        """
        _byte_size: int = 0
        _spell_id: int

        def __init__(self, *, spell_id: int):
            """
            Create a new instance of StatSkillAddClientPacket.ActionTypeDataSkill.

            Args:
                spell_id (int): (Value range is 0-64008.)
            """
            self._spell_id = spell_id

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def spell_id(self) -> int:
            return self._spell_id

        @staticmethod
        def serialize(writer: EoWriter, data: "StatSkillAddClientPacket.ActionTypeDataSkill") -> None:
            """
            Serializes an instance of `StatSkillAddClientPacket.ActionTypeDataSkill` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (StatSkillAddClientPacket.ActionTypeDataSkill): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._spell_id is None:
                    raise SerializationError("spell_id must be provided.")
                writer.add_short(data._spell_id)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "StatSkillAddClientPacket.ActionTypeDataSkill":
            """
            Deserializes an instance of `StatSkillAddClientPacket.ActionTypeDataSkill` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                StatSkillAddClientPacket.ActionTypeDataSkill: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                spell_id = reader.get_short()
                result = StatSkillAddClientPacket.ActionTypeDataSkill(spell_id=spell_id)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"StatSkillAddClientPacket.ActionTypeDataSkill(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

action_type: TrainType property

action_type_data: StatSkillAddClientPacket.ActionTypeData property

StatSkillAddClientPacket.ActionTypeData: Data associated with the action_type field.

ActionTypeData = Union['StatSkillAddClientPacket.ActionTypeDataStat', 'StatSkillAddClientPacket.ActionTypeDataSkill', None] class-attribute instance-attribute

Data associated with different values of the action_type field.

ActionTypeDataStat

Data associated with action_type value TrainType.Stat

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
class ActionTypeDataStat:
    """
    Data associated with action_type value TrainType.Stat
    """
    _byte_size: int = 0
    _stat_id: StatId

    def __init__(self, *, stat_id: StatId):
        """
        Create a new instance of StatSkillAddClientPacket.ActionTypeDataStat.

        Args:
            stat_id (StatId): 
        """
        self._stat_id = stat_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def stat_id(self) -> StatId:
        return self._stat_id

    @staticmethod
    def serialize(writer: EoWriter, data: "StatSkillAddClientPacket.ActionTypeDataStat") -> None:
        """
        Serializes an instance of `StatSkillAddClientPacket.ActionTypeDataStat` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillAddClientPacket.ActionTypeDataStat): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._stat_id is None:
                raise SerializationError("stat_id must be provided.")
            writer.add_short(int(data._stat_id))
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "StatSkillAddClientPacket.ActionTypeDataStat":
        """
        Deserializes an instance of `StatSkillAddClientPacket.ActionTypeDataStat` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            StatSkillAddClientPacket.ActionTypeDataStat: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            stat_id = StatId(reader.get_short())
            result = StatSkillAddClientPacket.ActionTypeDataStat(stat_id=stat_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"StatSkillAddClientPacket.ActionTypeDataStat(byte_size={repr(self._byte_size)}, stat_id={repr(self._stat_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

stat_id: StatId property

__init__(*, stat_id)

Create a new instance of StatSkillAddClientPacket.ActionTypeDataStat.

Parameters:

Name Type Description Default
stat_id StatId
required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
151
152
153
154
155
156
157
158
def __init__(self, *, stat_id: StatId):
    """
    Create a new instance of StatSkillAddClientPacket.ActionTypeDataStat.

    Args:
        stat_id (StatId): 
    """
    self._stat_id = stat_id

serialize(writer, data) staticmethod

Serializes an instance of StatSkillAddClientPacket.ActionTypeDataStat to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ActionTypeDataStat

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillAddClientPacket.ActionTypeDataStat") -> None:
    """
    Serializes an instance of `StatSkillAddClientPacket.ActionTypeDataStat` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillAddClientPacket.ActionTypeDataStat): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._stat_id is None:
            raise SerializationError("stat_id must be provided.")
        writer.add_short(int(data._stat_id))
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of StatSkillAddClientPacket.ActionTypeDataStat from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ActionTypeDataStat

StatSkillAddClientPacket.ActionTypeDataStat: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillAddClientPacket.ActionTypeDataStat":
    """
    Deserializes an instance of `StatSkillAddClientPacket.ActionTypeDataStat` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        StatSkillAddClientPacket.ActionTypeDataStat: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        stat_id = StatId(reader.get_short())
        result = StatSkillAddClientPacket.ActionTypeDataStat(stat_id=stat_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ActionTypeDataSkill

Data associated with action_type value TrainType.Skill

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
class ActionTypeDataSkill:
    """
    Data associated with action_type value TrainType.Skill
    """
    _byte_size: int = 0
    _spell_id: int

    def __init__(self, *, spell_id: int):
        """
        Create a new instance of StatSkillAddClientPacket.ActionTypeDataSkill.

        Args:
            spell_id (int): (Value range is 0-64008.)
        """
        self._spell_id = spell_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def spell_id(self) -> int:
        return self._spell_id

    @staticmethod
    def serialize(writer: EoWriter, data: "StatSkillAddClientPacket.ActionTypeDataSkill") -> None:
        """
        Serializes an instance of `StatSkillAddClientPacket.ActionTypeDataSkill` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillAddClientPacket.ActionTypeDataSkill): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._spell_id is None:
                raise SerializationError("spell_id must be provided.")
            writer.add_short(data._spell_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "StatSkillAddClientPacket.ActionTypeDataSkill":
        """
        Deserializes an instance of `StatSkillAddClientPacket.ActionTypeDataSkill` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            StatSkillAddClientPacket.ActionTypeDataSkill: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            spell_id = reader.get_short()
            result = StatSkillAddClientPacket.ActionTypeDataSkill(spell_id=spell_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"StatSkillAddClientPacket.ActionTypeDataSkill(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

spell_id: int property

__init__(*, spell_id)

Create a new instance of StatSkillAddClientPacket.ActionTypeDataSkill.

Parameters:

Name Type Description Default
spell_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
222
223
224
225
226
227
228
229
def __init__(self, *, spell_id: int):
    """
    Create a new instance of StatSkillAddClientPacket.ActionTypeDataSkill.

    Args:
        spell_id (int): (Value range is 0-64008.)
    """
    self._spell_id = spell_id

serialize(writer, data) staticmethod

Serializes an instance of StatSkillAddClientPacket.ActionTypeDataSkill to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ActionTypeDataSkill

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillAddClientPacket.ActionTypeDataSkill") -> None:
    """
    Serializes an instance of `StatSkillAddClientPacket.ActionTypeDataSkill` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillAddClientPacket.ActionTypeDataSkill): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of StatSkillAddClientPacket.ActionTypeDataSkill from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ActionTypeDataSkill

StatSkillAddClientPacket.ActionTypeDataSkill: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillAddClientPacket.ActionTypeDataSkill":
    """
    Deserializes an instance of `StatSkillAddClientPacket.ActionTypeDataSkill` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        StatSkillAddClientPacket.ActionTypeDataSkill: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        spell_id = reader.get_short()
        result = StatSkillAddClientPacket.ActionTypeDataSkill(spell_id=spell_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

__init__(*, action_type, action_type_data=None)

Create a new instance of StatSkillAddClientPacket.

Parameters:

Name Type Description Default
action_type TrainType
required
action_type_data ActionTypeData

Data associated with the action_type field.

None
Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, action_type: TrainType, action_type_data: 'StatSkillAddClientPacket.ActionTypeData' = None):
    """
    Create a new instance of StatSkillAddClientPacket.

    Args:
        action_type (TrainType): 
        action_type_data (StatSkillAddClientPacket.ActionTypeData): Data associated with the `action_type` field.
    """
    self._action_type = action_type
    self._action_type_data = action_type_data

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.StatSkill

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
66
67
68
69
70
71
72
73
74
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Add

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
76
77
78
79
80
81
82
83
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    StatSkillAddClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillAddClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillAddClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillAddClientPacket") -> None:
    """
    Serializes an instance of `StatSkillAddClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillAddClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._action_type is None:
            raise SerializationError("action_type must be provided.")
        writer.add_char(int(data._action_type))
        if data._action_type == TrainType.Stat:
            if not isinstance(data._action_type_data, StatSkillAddClientPacket.ActionTypeDataStat):
                raise SerializationError("Expected action_type_data to be type StatSkillAddClientPacket.ActionTypeDataStat for action_type " + TrainType(data._action_type).name + ".")
            StatSkillAddClientPacket.ActionTypeDataStat.serialize(writer, data._action_type_data)
        elif data._action_type == TrainType.Skill:
            if not isinstance(data._action_type_data, StatSkillAddClientPacket.ActionTypeDataSkill):
                raise SerializationError("Expected action_type_data to be type StatSkillAddClientPacket.ActionTypeDataSkill for action_type " + TrainType(data._action_type).name + ".")
            StatSkillAddClientPacket.ActionTypeDataSkill.serialize(writer, data._action_type_data)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of StatSkillAddClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillAddClientPacket StatSkillAddClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillAddClientPacket":
    """
    Deserializes an instance of `StatSkillAddClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        StatSkillAddClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        action_type = TrainType(reader.get_char())
        action_type_data: StatSkillAddClientPacket.ActionTypeData = None
        if action_type == TrainType.Stat:
            action_type_data = StatSkillAddClientPacket.ActionTypeDataStat.deserialize(reader)
        elif action_type == TrainType.Skill:
            action_type_data = StatSkillAddClientPacket.ActionTypeDataSkill.deserialize(reader)
        result = StatSkillAddClientPacket(action_type=action_type, action_type_data=action_type_data)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellUseClientPacket

Bases: Packet

Raise arm to cast a spell (vestigial)

Source code in src/eolib/protocol/_generated/net/client/spell_use_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class SpellUseClientPacket(Packet):
    """
    Raise arm to cast a spell (vestigial)
    """
    _byte_size: int = 0
    _direction: Direction

    def __init__(self, *, direction: Direction):
        """
        Create a new instance of SpellUseClientPacket.

        Args:
            direction (Direction): 
        """
        self._direction = direction

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def direction(self) -> Direction:
        return self._direction

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Spell

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Use

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        SpellUseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "SpellUseClientPacket") -> None:
        """
        Serializes an instance of `SpellUseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellUseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._direction is None:
                raise SerializationError("direction must be provided.")
            writer.add_char(int(data._direction))
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "SpellUseClientPacket":
        """
        Deserializes an instance of `SpellUseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            SpellUseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            direction = Direction(reader.get_char())
            result = SpellUseClientPacket(direction=direction)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"SpellUseClientPacket(byte_size={repr(self._byte_size)}, direction={repr(self._direction)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

direction: Direction property

__init__(*, direction)

Create a new instance of SpellUseClientPacket.

Parameters:

Name Type Description Default
direction Direction
required
Source code in src/eolib/protocol/_generated/net/client/spell_use_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, direction: Direction):
    """
    Create a new instance of SpellUseClientPacket.

    Args:
        direction (Direction): 
    """
    self._direction = direction

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_use_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Spell

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_use_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Use

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/spell_use_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    SpellUseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SpellUseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellUseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/spell_use_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "SpellUseClientPacket") -> None:
    """
    Serializes an instance of `SpellUseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellUseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of SpellUseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellUseClientPacket SpellUseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/spell_use_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "SpellUseClientPacket":
    """
    Deserializes an instance of `SpellUseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        SpellUseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        direction = Direction(reader.get_char())
        result = SpellUseClientPacket(direction=direction)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellTargetType

Bases: IntEnum

Target type of a spell cast

Source code in src/eolib/protocol/_generated/net/client/spell_target_type.py
 9
10
11
12
13
14
class SpellTargetType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Target type of a spell cast
    """
    Player = 1
    Npc = 2

Player = 1 class-attribute instance-attribute

Npc = 2 class-attribute instance-attribute

SpellTargetSelfClientPacket

Bases: Packet

Self-targeted spell cast

Source code in src/eolib/protocol/_generated/net/client/spell_target_self_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
class SpellTargetSelfClientPacket(Packet):
    """
    Self-targeted spell cast
    """
    _byte_size: int = 0
    _direction: Direction
    _spell_id: int
    _timestamp: int

    def __init__(self, *, direction: Direction, spell_id: int, timestamp: int):
        """
        Create a new instance of SpellTargetSelfClientPacket.

        Args:
            direction (Direction): 
            spell_id (int): (Value range is 0-64008.)
            timestamp (int): (Value range is 0-16194276.)
        """
        self._direction = direction
        self._spell_id = spell_id
        self._timestamp = timestamp

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def direction(self) -> Direction:
        return self._direction

    @property
    def spell_id(self) -> int:
        return self._spell_id

    @property
    def timestamp(self) -> int:
        return self._timestamp

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Spell

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.TargetSelf

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        SpellTargetSelfClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "SpellTargetSelfClientPacket") -> None:
        """
        Serializes an instance of `SpellTargetSelfClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellTargetSelfClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._direction is None:
                raise SerializationError("direction must be provided.")
            writer.add_char(int(data._direction))
            if data._spell_id is None:
                raise SerializationError("spell_id must be provided.")
            writer.add_short(data._spell_id)
            if data._timestamp is None:
                raise SerializationError("timestamp must be provided.")
            writer.add_three(data._timestamp)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "SpellTargetSelfClientPacket":
        """
        Deserializes an instance of `SpellTargetSelfClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            SpellTargetSelfClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            direction = Direction(reader.get_char())
            spell_id = reader.get_short()
            timestamp = reader.get_three()
            result = SpellTargetSelfClientPacket(direction=direction, spell_id=spell_id, timestamp=timestamp)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"SpellTargetSelfClientPacket(byte_size={repr(self._byte_size)}, direction={repr(self._direction)}, spell_id={repr(self._spell_id)}, timestamp={repr(self._timestamp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

direction: Direction property

spell_id: int property

timestamp: int property

__init__(*, direction, spell_id, timestamp)

Create a new instance of SpellTargetSelfClientPacket.

Parameters:

Name Type Description Default
direction Direction
required
spell_id int

(Value range is 0-64008.)

required
timestamp int

(Value range is 0-16194276.)

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_self_client_packet.py
23
24
25
26
27
28
29
30
31
32
33
34
def __init__(self, *, direction: Direction, spell_id: int, timestamp: int):
    """
    Create a new instance of SpellTargetSelfClientPacket.

    Args:
        direction (Direction): 
        spell_id (int): (Value range is 0-64008.)
        timestamp (int): (Value range is 0-16194276.)
    """
    self._direction = direction
    self._spell_id = spell_id
    self._timestamp = timestamp

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_target_self_client_packet.py
58
59
60
61
62
63
64
65
66
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Spell

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_target_self_client_packet.py
68
69
70
71
72
73
74
75
76
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.TargetSelf

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_self_client_packet.py
78
79
80
81
82
83
84
85
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    SpellTargetSelfClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SpellTargetSelfClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellTargetSelfClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_self_client_packet.py
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def serialize(writer: EoWriter, data: "SpellTargetSelfClientPacket") -> None:
    """
    Serializes an instance of `SpellTargetSelfClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellTargetSelfClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
        if data._timestamp is None:
            raise SerializationError("timestamp must be provided.")
        writer.add_three(data._timestamp)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of SpellTargetSelfClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellTargetSelfClientPacket SpellTargetSelfClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/spell_target_self_client_packet.py
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
@staticmethod
def deserialize(reader: EoReader) -> "SpellTargetSelfClientPacket":
    """
    Deserializes an instance of `SpellTargetSelfClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        SpellTargetSelfClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        direction = Direction(reader.get_char())
        spell_id = reader.get_short()
        timestamp = reader.get_three()
        result = SpellTargetSelfClientPacket(direction=direction, spell_id=spell_id, timestamp=timestamp)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellTargetOtherClientPacket

Bases: Packet

Targeted spell cast

Source code in src/eolib/protocol/_generated/net/client/spell_target_other_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
class SpellTargetOtherClientPacket(Packet):
    """
    Targeted spell cast
    """
    _byte_size: int = 0
    _target_type: SpellTargetType
    _previous_timestamp: int
    _spell_id: int
    _victim_id: int
    _timestamp: int

    def __init__(self, *, target_type: SpellTargetType, previous_timestamp: int, spell_id: int, victim_id: int, timestamp: int):
        """
        Create a new instance of SpellTargetOtherClientPacket.

        Args:
            target_type (SpellTargetType): 
            previous_timestamp (int): (Value range is 0-16194276.)
            spell_id (int): (Value range is 0-64008.)
            victim_id (int): (Value range is 0-64008.)
            timestamp (int): (Value range is 0-16194276.)
        """
        self._target_type = target_type
        self._previous_timestamp = previous_timestamp
        self._spell_id = spell_id
        self._victim_id = victim_id
        self._timestamp = timestamp

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def target_type(self) -> SpellTargetType:
        return self._target_type

    @property
    def previous_timestamp(self) -> int:
        return self._previous_timestamp

    @property
    def spell_id(self) -> int:
        return self._spell_id

    @property
    def victim_id(self) -> int:
        return self._victim_id

    @property
    def timestamp(self) -> int:
        return self._timestamp

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Spell

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.TargetOther

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        SpellTargetOtherClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "SpellTargetOtherClientPacket") -> None:
        """
        Serializes an instance of `SpellTargetOtherClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellTargetOtherClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._target_type is None:
                raise SerializationError("target_type must be provided.")
            writer.add_char(int(data._target_type))
            if data._previous_timestamp is None:
                raise SerializationError("previous_timestamp must be provided.")
            writer.add_three(data._previous_timestamp)
            if data._spell_id is None:
                raise SerializationError("spell_id must be provided.")
            writer.add_short(data._spell_id)
            if data._victim_id is None:
                raise SerializationError("victim_id must be provided.")
            writer.add_short(data._victim_id)
            if data._timestamp is None:
                raise SerializationError("timestamp must be provided.")
            writer.add_three(data._timestamp)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "SpellTargetOtherClientPacket":
        """
        Deserializes an instance of `SpellTargetOtherClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            SpellTargetOtherClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            target_type = SpellTargetType(reader.get_char())
            previous_timestamp = reader.get_three()
            spell_id = reader.get_short()
            victim_id = reader.get_short()
            timestamp = reader.get_three()
            result = SpellTargetOtherClientPacket(target_type=target_type, previous_timestamp=previous_timestamp, spell_id=spell_id, victim_id=victim_id, timestamp=timestamp)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"SpellTargetOtherClientPacket(byte_size={repr(self._byte_size)}, target_type={repr(self._target_type)}, previous_timestamp={repr(self._previous_timestamp)}, spell_id={repr(self._spell_id)}, victim_id={repr(self._victim_id)}, timestamp={repr(self._timestamp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

target_type: SpellTargetType property

previous_timestamp: int property

spell_id: int property

victim_id: int property

timestamp: int property

__init__(*, target_type, previous_timestamp, spell_id, victim_id, timestamp)

Create a new instance of SpellTargetOtherClientPacket.

Parameters:

Name Type Description Default
target_type SpellTargetType
required
previous_timestamp int

(Value range is 0-16194276.)

required
spell_id int

(Value range is 0-64008.)

required
victim_id int

(Value range is 0-64008.)

required
timestamp int

(Value range is 0-16194276.)

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_other_client_packet.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
def __init__(self, *, target_type: SpellTargetType, previous_timestamp: int, spell_id: int, victim_id: int, timestamp: int):
    """
    Create a new instance of SpellTargetOtherClientPacket.

    Args:
        target_type (SpellTargetType): 
        previous_timestamp (int): (Value range is 0-16194276.)
        spell_id (int): (Value range is 0-64008.)
        victim_id (int): (Value range is 0-64008.)
        timestamp (int): (Value range is 0-16194276.)
    """
    self._target_type = target_type
    self._previous_timestamp = previous_timestamp
    self._spell_id = spell_id
    self._victim_id = victim_id
    self._timestamp = timestamp

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_target_other_client_packet.py
72
73
74
75
76
77
78
79
80
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Spell

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_target_other_client_packet.py
82
83
84
85
86
87
88
89
90
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.TargetOther

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_other_client_packet.py
92
93
94
95
96
97
98
99
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    SpellTargetOtherClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SpellTargetOtherClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellTargetOtherClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_other_client_packet.py
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@staticmethod
def serialize(writer: EoWriter, data: "SpellTargetOtherClientPacket") -> None:
    """
    Serializes an instance of `SpellTargetOtherClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellTargetOtherClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._target_type is None:
            raise SerializationError("target_type must be provided.")
        writer.add_char(int(data._target_type))
        if data._previous_timestamp is None:
            raise SerializationError("previous_timestamp must be provided.")
        writer.add_three(data._previous_timestamp)
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
        if data._victim_id is None:
            raise SerializationError("victim_id must be provided.")
        writer.add_short(data._victim_id)
        if data._timestamp is None:
            raise SerializationError("timestamp must be provided.")
        writer.add_three(data._timestamp)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of SpellTargetOtherClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellTargetOtherClientPacket SpellTargetOtherClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/spell_target_other_client_packet.py
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
@staticmethod
def deserialize(reader: EoReader) -> "SpellTargetOtherClientPacket":
    """
    Deserializes an instance of `SpellTargetOtherClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        SpellTargetOtherClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        target_type = SpellTargetType(reader.get_char())
        previous_timestamp = reader.get_three()
        spell_id = reader.get_short()
        victim_id = reader.get_short()
        timestamp = reader.get_three()
        result = SpellTargetOtherClientPacket(target_type=target_type, previous_timestamp=previous_timestamp, spell_id=spell_id, victim_id=victim_id, timestamp=timestamp)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellTargetGroupClientPacket

Bases: Packet

Group spell cast

Source code in src/eolib/protocol/_generated/net/client/spell_target_group_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class SpellTargetGroupClientPacket(Packet):
    """
    Group spell cast
    """
    _byte_size: int = 0
    _spell_id: int
    _timestamp: int

    def __init__(self, *, spell_id: int, timestamp: int):
        """
        Create a new instance of SpellTargetGroupClientPacket.

        Args:
            spell_id (int): (Value range is 0-64008.)
            timestamp (int): (Value range is 0-16194276.)
        """
        self._spell_id = spell_id
        self._timestamp = timestamp

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def spell_id(self) -> int:
        return self._spell_id

    @property
    def timestamp(self) -> int:
        return self._timestamp

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Spell

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.TargetGroup

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        SpellTargetGroupClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "SpellTargetGroupClientPacket") -> None:
        """
        Serializes an instance of `SpellTargetGroupClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellTargetGroupClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._spell_id is None:
                raise SerializationError("spell_id must be provided.")
            writer.add_short(data._spell_id)
            if data._timestamp is None:
                raise SerializationError("timestamp must be provided.")
            writer.add_three(data._timestamp)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "SpellTargetGroupClientPacket":
        """
        Deserializes an instance of `SpellTargetGroupClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            SpellTargetGroupClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            spell_id = reader.get_short()
            timestamp = reader.get_three()
            result = SpellTargetGroupClientPacket(spell_id=spell_id, timestamp=timestamp)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"SpellTargetGroupClientPacket(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_id)}, timestamp={repr(self._timestamp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

spell_id: int property

timestamp: int property

__init__(*, spell_id, timestamp)

Create a new instance of SpellTargetGroupClientPacket.

Parameters:

Name Type Description Default
spell_id int

(Value range is 0-64008.)

required
timestamp int

(Value range is 0-16194276.)

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_group_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, spell_id: int, timestamp: int):
    """
    Create a new instance of SpellTargetGroupClientPacket.

    Args:
        spell_id (int): (Value range is 0-64008.)
        timestamp (int): (Value range is 0-16194276.)
    """
    self._spell_id = spell_id
    self._timestamp = timestamp

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_target_group_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Spell

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_target_group_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.TargetGroup

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_group_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    SpellTargetGroupClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SpellTargetGroupClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellTargetGroupClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/spell_target_group_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "SpellTargetGroupClientPacket") -> None:
    """
    Serializes an instance of `SpellTargetGroupClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellTargetGroupClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
        if data._timestamp is None:
            raise SerializationError("timestamp must be provided.")
        writer.add_three(data._timestamp)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of SpellTargetGroupClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellTargetGroupClientPacket SpellTargetGroupClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/spell_target_group_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "SpellTargetGroupClientPacket":
    """
    Deserializes an instance of `SpellTargetGroupClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        SpellTargetGroupClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        spell_id = reader.get_short()
        timestamp = reader.get_three()
        result = SpellTargetGroupClientPacket(spell_id=spell_id, timestamp=timestamp)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellRequestClientPacket

Bases: Packet

Begin spell chanting

Source code in src/eolib/protocol/_generated/net/client/spell_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class SpellRequestClientPacket(Packet):
    """
    Begin spell chanting
    """
    _byte_size: int = 0
    _spell_id: int
    _timestamp: int

    def __init__(self, *, spell_id: int, timestamp: int):
        """
        Create a new instance of SpellRequestClientPacket.

        Args:
            spell_id (int): (Value range is 0-64008.)
            timestamp (int): (Value range is 0-16194276.)
        """
        self._spell_id = spell_id
        self._timestamp = timestamp

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def spell_id(self) -> int:
        return self._spell_id

    @property
    def timestamp(self) -> int:
        return self._timestamp

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Spell

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        SpellRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "SpellRequestClientPacket") -> None:
        """
        Serializes an instance of `SpellRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._spell_id is None:
                raise SerializationError("spell_id must be provided.")
            writer.add_short(data._spell_id)
            if data._timestamp is None:
                raise SerializationError("timestamp must be provided.")
            writer.add_three(data._timestamp)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "SpellRequestClientPacket":
        """
        Deserializes an instance of `SpellRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            SpellRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            spell_id = reader.get_short()
            timestamp = reader.get_three()
            result = SpellRequestClientPacket(spell_id=spell_id, timestamp=timestamp)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"SpellRequestClientPacket(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_id)}, timestamp={repr(self._timestamp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

spell_id: int property

timestamp: int property

__init__(*, spell_id, timestamp)

Create a new instance of SpellRequestClientPacket.

Parameters:

Name Type Description Default
spell_id int

(Value range is 0-64008.)

required
timestamp int

(Value range is 0-16194276.)

required
Source code in src/eolib/protocol/_generated/net/client/spell_request_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, spell_id: int, timestamp: int):
    """
    Create a new instance of SpellRequestClientPacket.

    Args:
        spell_id (int): (Value range is 0-64008.)
        timestamp (int): (Value range is 0-16194276.)
    """
    self._spell_id = spell_id
    self._timestamp = timestamp

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_request_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Spell

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/spell_request_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/spell_request_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    SpellRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SpellRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/spell_request_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "SpellRequestClientPacket") -> None:
    """
    Serializes an instance of `SpellRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
        if data._timestamp is None:
            raise SerializationError("timestamp must be provided.")
        writer.add_three(data._timestamp)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of SpellRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellRequestClientPacket SpellRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/spell_request_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "SpellRequestClientPacket":
    """
    Deserializes an instance of `SpellRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        SpellRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        spell_id = reader.get_short()
        timestamp = reader.get_three()
        result = SpellRequestClientPacket(spell_id=spell_id, timestamp=timestamp)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SitAction

Bases: IntEnum

Whether the player wants to sit or stand

Source code in src/eolib/protocol/_generated/net/client/sit_action.py
 9
10
11
12
13
14
class SitAction(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Whether the player wants to sit or stand
    """
    Sit = 1
    Stand = 2

Sit = 1 class-attribute instance-attribute

Stand = 2 class-attribute instance-attribute

SitRequestClientPacket

Bases: Packet

Sit/stand request

Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
class SitRequestClientPacket(Packet):
    """
    Sit/stand request
    """
    _byte_size: int = 0
    _sit_action: SitAction
    _sit_action_data: 'SitRequestClientPacket.SitActionData'

    def __init__(self, *, sit_action: SitAction, sit_action_data: 'SitRequestClientPacket.SitActionData' = None):
        """
        Create a new instance of SitRequestClientPacket.

        Args:
            sit_action (SitAction): 
            sit_action_data (SitRequestClientPacket.SitActionData): Data associated with the `sit_action` field.
        """
        self._sit_action = sit_action
        self._sit_action_data = sit_action_data

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def sit_action(self) -> SitAction:
        return self._sit_action

    @property
    def sit_action_data(self) -> 'SitRequestClientPacket.SitActionData':
        """
        SitRequestClientPacket.SitActionData: Data associated with the `sit_action` field.
        """
        return self._sit_action_data

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Sit

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        SitRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "SitRequestClientPacket") -> None:
        """
        Serializes an instance of `SitRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SitRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._sit_action is None:
                raise SerializationError("sit_action must be provided.")
            writer.add_char(int(data._sit_action))
            if data._sit_action == SitAction.Sit:
                if not isinstance(data._sit_action_data, SitRequestClientPacket.SitActionDataSit):
                    raise SerializationError("Expected sit_action_data to be type SitRequestClientPacket.SitActionDataSit for sit_action " + SitAction(data._sit_action).name + ".")
                SitRequestClientPacket.SitActionDataSit.serialize(writer, data._sit_action_data)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "SitRequestClientPacket":
        """
        Deserializes an instance of `SitRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            SitRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            sit_action = SitAction(reader.get_char())
            sit_action_data: SitRequestClientPacket.SitActionData = None
            if sit_action == SitAction.Sit:
                sit_action_data = SitRequestClientPacket.SitActionDataSit.deserialize(reader)
            result = SitRequestClientPacket(sit_action=sit_action, sit_action_data=sit_action_data)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"SitRequestClientPacket(byte_size={repr(self._byte_size)}, sit_action={repr(self._sit_action)}, sit_action_data={repr(self._sit_action_data)})"

    SitActionData = Union['SitRequestClientPacket.SitActionDataSit', None]
    """
    Data associated with different values of the `sit_action` field.
    """

    class SitActionDataSit:
        """
        Data associated with sit_action value SitAction.Sit
        """
        _byte_size: int = 0
        _cursor_coords: Coords

        def __init__(self, *, cursor_coords: Coords):
            """
            Create a new instance of SitRequestClientPacket.SitActionDataSit.

            Args:
                cursor_coords (Coords): The coordinates of the map cursor
            """
            self._cursor_coords = cursor_coords

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def cursor_coords(self) -> Coords:
            """
            The coordinates of the map cursor
            """
            return self._cursor_coords

        @staticmethod
        def serialize(writer: EoWriter, data: "SitRequestClientPacket.SitActionDataSit") -> None:
            """
            Serializes an instance of `SitRequestClientPacket.SitActionDataSit` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (SitRequestClientPacket.SitActionDataSit): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._cursor_coords is None:
                    raise SerializationError("cursor_coords must be provided.")
                Coords.serialize(writer, data._cursor_coords)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "SitRequestClientPacket.SitActionDataSit":
            """
            Deserializes an instance of `SitRequestClientPacket.SitActionDataSit` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                SitRequestClientPacket.SitActionDataSit: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                cursor_coords = Coords.deserialize(reader)
                result = SitRequestClientPacket.SitActionDataSit(cursor_coords=cursor_coords)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"SitRequestClientPacket.SitActionDataSit(byte_size={repr(self._byte_size)}, cursor_coords={repr(self._cursor_coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

sit_action: SitAction property

sit_action_data: SitRequestClientPacket.SitActionData property

SitRequestClientPacket.SitActionData: Data associated with the sit_action field.

SitActionData = Union['SitRequestClientPacket.SitActionDataSit', None] class-attribute instance-attribute

Data associated with different values of the sit_action field.

SitActionDataSit

Data associated with sit_action value SitAction.Sit

Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
class SitActionDataSit:
    """
    Data associated with sit_action value SitAction.Sit
    """
    _byte_size: int = 0
    _cursor_coords: Coords

    def __init__(self, *, cursor_coords: Coords):
        """
        Create a new instance of SitRequestClientPacket.SitActionDataSit.

        Args:
            cursor_coords (Coords): The coordinates of the map cursor
        """
        self._cursor_coords = cursor_coords

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def cursor_coords(self) -> Coords:
        """
        The coordinates of the map cursor
        """
        return self._cursor_coords

    @staticmethod
    def serialize(writer: EoWriter, data: "SitRequestClientPacket.SitActionDataSit") -> None:
        """
        Serializes an instance of `SitRequestClientPacket.SitActionDataSit` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SitRequestClientPacket.SitActionDataSit): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._cursor_coords is None:
                raise SerializationError("cursor_coords must be provided.")
            Coords.serialize(writer, data._cursor_coords)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "SitRequestClientPacket.SitActionDataSit":
        """
        Deserializes an instance of `SitRequestClientPacket.SitActionDataSit` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            SitRequestClientPacket.SitActionDataSit: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            cursor_coords = Coords.deserialize(reader)
            result = SitRequestClientPacket.SitActionDataSit(cursor_coords=cursor_coords)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"SitRequestClientPacket.SitActionDataSit(byte_size={repr(self._byte_size)}, cursor_coords={repr(self._cursor_coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

cursor_coords: Coords property

The coordinates of the map cursor

__init__(*, cursor_coords)

Create a new instance of SitRequestClientPacket.SitActionDataSit.

Parameters:

Name Type Description Default
cursor_coords Coords

The coordinates of the map cursor

required
Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
145
146
147
148
149
150
151
152
def __init__(self, *, cursor_coords: Coords):
    """
    Create a new instance of SitRequestClientPacket.SitActionDataSit.

    Args:
        cursor_coords (Coords): The coordinates of the map cursor
    """
    self._cursor_coords = cursor_coords

serialize(writer, data) staticmethod

Serializes an instance of SitRequestClientPacket.SitActionDataSit to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SitActionDataSit

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
@staticmethod
def serialize(writer: EoWriter, data: "SitRequestClientPacket.SitActionDataSit") -> None:
    """
    Serializes an instance of `SitRequestClientPacket.SitActionDataSit` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SitRequestClientPacket.SitActionDataSit): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._cursor_coords is None:
            raise SerializationError("cursor_coords must be provided.")
        Coords.serialize(writer, data._cursor_coords)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of SitRequestClientPacket.SitActionDataSit from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
SitActionDataSit

SitRequestClientPacket.SitActionDataSit: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
@staticmethod
def deserialize(reader: EoReader) -> "SitRequestClientPacket.SitActionDataSit":
    """
    Deserializes an instance of `SitRequestClientPacket.SitActionDataSit` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        SitRequestClientPacket.SitActionDataSit: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        cursor_coords = Coords.deserialize(reader)
        result = SitRequestClientPacket.SitActionDataSit(cursor_coords=cursor_coords)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

__init__(*, sit_action, sit_action_data=None)

Create a new instance of SitRequestClientPacket.

Parameters:

Name Type Description Default
sit_action SitAction
required
sit_action_data SitActionData

Data associated with the sit_action field.

None
Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, sit_action: SitAction, sit_action_data: 'SitRequestClientPacket.SitActionData' = None):
    """
    Create a new instance of SitRequestClientPacket.

    Args:
        sit_action (SitAction): 
        sit_action_data (SitRequestClientPacket.SitActionData): Data associated with the `sit_action` field.
    """
    self._sit_action = sit_action
    self._sit_action_data = sit_action_data

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Sit

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
66
67
68
69
70
71
72
73
74
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
76
77
78
79
80
81
82
83
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    SitRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SitRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SitRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
@staticmethod
def serialize(writer: EoWriter, data: "SitRequestClientPacket") -> None:
    """
    Serializes an instance of `SitRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SitRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._sit_action is None:
            raise SerializationError("sit_action must be provided.")
        writer.add_char(int(data._sit_action))
        if data._sit_action == SitAction.Sit:
            if not isinstance(data._sit_action_data, SitRequestClientPacket.SitActionDataSit):
                raise SerializationError("Expected sit_action_data to be type SitRequestClientPacket.SitActionDataSit for sit_action " + SitAction(data._sit_action).name + ".")
            SitRequestClientPacket.SitActionDataSit.serialize(writer, data._sit_action_data)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of SitRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SitRequestClientPacket SitRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@staticmethod
def deserialize(reader: EoReader) -> "SitRequestClientPacket":
    """
    Deserializes an instance of `SitRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        SitRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        sit_action = SitAction(reader.get_char())
        sit_action_data: SitRequestClientPacket.SitActionData = None
        if sit_action == SitAction.Sit:
            sit_action_data = SitRequestClientPacket.SitActionDataSit.deserialize(reader)
        result = SitRequestClientPacket(sit_action=sit_action, sit_action_data=sit_action_data)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopSellClientPacket

Bases: Packet

Selling an item to a shop

Source code in src/eolib/protocol/_generated/net/client/shop_sell_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
class ShopSellClientPacket(Packet):
    """
    Selling an item to a shop
    """
    _byte_size: int = 0
    _sell_item: Item
    _session_id: int

    def __init__(self, *, sell_item: Item, session_id: int):
        """
        Create a new instance of ShopSellClientPacket.

        Args:
            sell_item (Item): 
            session_id (int): (Value range is 0-4097152080.)
        """
        self._sell_item = sell_item
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def sell_item(self) -> Item:
        return self._sell_item

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Shop

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Sell

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ShopSellClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ShopSellClientPacket") -> None:
        """
        Serializes an instance of `ShopSellClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopSellClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._sell_item is None:
                raise SerializationError("sell_item must be provided.")
            Item.serialize(writer, data._sell_item)
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ShopSellClientPacket":
        """
        Deserializes an instance of `ShopSellClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ShopSellClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            sell_item = Item.deserialize(reader)
            session_id = reader.get_int()
            result = ShopSellClientPacket(sell_item=sell_item, session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ShopSellClientPacket(byte_size={repr(self._byte_size)}, sell_item={repr(self._sell_item)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

sell_item: Item property

session_id: int property

__init__(*, sell_item, session_id)

Create a new instance of ShopSellClientPacket.

Parameters:

Name Type Description Default
sell_item Item
required
session_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/shop_sell_client_packet.py
22
23
24
25
26
27
28
29
30
31
def __init__(self, *, sell_item: Item, session_id: int):
    """
    Create a new instance of ShopSellClientPacket.

    Args:
        sell_item (Item): 
        session_id (int): (Value range is 0-4097152080.)
    """
    self._sell_item = sell_item
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/shop_sell_client_packet.py
51
52
53
54
55
56
57
58
59
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Shop

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/shop_sell_client_packet.py
61
62
63
64
65
66
67
68
69
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Sell

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/shop_sell_client_packet.py
71
72
73
74
75
76
77
78
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ShopSellClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ShopSellClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopSellClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/shop_sell_client_packet.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "ShopSellClientPacket") -> None:
    """
    Serializes an instance of `ShopSellClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopSellClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._sell_item is None:
            raise SerializationError("sell_item must be provided.")
        Item.serialize(writer, data._sell_item)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ShopSellClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopSellClientPacket ShopSellClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/shop_sell_client_packet.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@staticmethod
def deserialize(reader: EoReader) -> "ShopSellClientPacket":
    """
    Deserializes an instance of `ShopSellClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ShopSellClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        sell_item = Item.deserialize(reader)
        session_id = reader.get_int()
        result = ShopSellClientPacket(sell_item=sell_item, session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopOpenClientPacket

Bases: Packet

Talking to a shop NPC

Source code in src/eolib/protocol/_generated/net/client/shop_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class ShopOpenClientPacket(Packet):
    """
    Talking to a shop NPC
    """
    _byte_size: int = 0
    _npc_index: int

    def __init__(self, *, npc_index: int):
        """
        Create a new instance of ShopOpenClientPacket.

        Args:
            npc_index (int): (Value range is 0-64008.)
        """
        self._npc_index = npc_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Shop

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ShopOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ShopOpenClientPacket") -> None:
        """
        Serializes an instance of `ShopOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ShopOpenClientPacket":
        """
        Deserializes an instance of `ShopOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ShopOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_short()
            result = ShopOpenClientPacket(npc_index=npc_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ShopOpenClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

__init__(*, npc_index)

Create a new instance of ShopOpenClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/shop_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, npc_index: int):
    """
    Create a new instance of ShopOpenClientPacket.

    Args:
        npc_index (int): (Value range is 0-64008.)
    """
    self._npc_index = npc_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/shop_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Shop

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/shop_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/shop_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ShopOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ShopOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/shop_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "ShopOpenClientPacket") -> None:
    """
    Serializes an instance of `ShopOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ShopOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopOpenClientPacket ShopOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/shop_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "ShopOpenClientPacket":
    """
    Deserializes an instance of `ShopOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ShopOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_short()
        result = ShopOpenClientPacket(npc_index=npc_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopCreateClientPacket

Bases: Packet

Crafting an item from a shop

Source code in src/eolib/protocol/_generated/net/client/shop_create_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class ShopCreateClientPacket(Packet):
    """
    Crafting an item from a shop
    """
    _byte_size: int = 0
    _craft_item_id: int
    _session_id: int

    def __init__(self, *, craft_item_id: int, session_id: int):
        """
        Create a new instance of ShopCreateClientPacket.

        Args:
            craft_item_id (int): (Value range is 0-64008.)
            session_id (int): (Value range is 0-4097152080.)
        """
        self._craft_item_id = craft_item_id
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def craft_item_id(self) -> int:
        return self._craft_item_id

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Shop

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Create

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ShopCreateClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ShopCreateClientPacket") -> None:
        """
        Serializes an instance of `ShopCreateClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopCreateClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._craft_item_id is None:
                raise SerializationError("craft_item_id must be provided.")
            writer.add_short(data._craft_item_id)
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ShopCreateClientPacket":
        """
        Deserializes an instance of `ShopCreateClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ShopCreateClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            craft_item_id = reader.get_short()
            session_id = reader.get_int()
            result = ShopCreateClientPacket(craft_item_id=craft_item_id, session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ShopCreateClientPacket(byte_size={repr(self._byte_size)}, craft_item_id={repr(self._craft_item_id)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

craft_item_id: int property

session_id: int property

__init__(*, craft_item_id, session_id)

Create a new instance of ShopCreateClientPacket.

Parameters:

Name Type Description Default
craft_item_id int

(Value range is 0-64008.)

required
session_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/shop_create_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, craft_item_id: int, session_id: int):
    """
    Create a new instance of ShopCreateClientPacket.

    Args:
        craft_item_id (int): (Value range is 0-64008.)
        session_id (int): (Value range is 0-4097152080.)
    """
    self._craft_item_id = craft_item_id
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/shop_create_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Shop

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/shop_create_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Create

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/shop_create_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ShopCreateClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ShopCreateClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopCreateClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/shop_create_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "ShopCreateClientPacket") -> None:
    """
    Serializes an instance of `ShopCreateClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopCreateClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._craft_item_id is None:
            raise SerializationError("craft_item_id must be provided.")
        writer.add_short(data._craft_item_id)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ShopCreateClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopCreateClientPacket ShopCreateClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/shop_create_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "ShopCreateClientPacket":
    """
    Deserializes an instance of `ShopCreateClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ShopCreateClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        craft_item_id = reader.get_short()
        session_id = reader.get_int()
        result = ShopCreateClientPacket(craft_item_id=craft_item_id, session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopBuyClientPacket

Bases: Packet

Purchasing an item from a shop

Source code in src/eolib/protocol/_generated/net/client/shop_buy_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
class ShopBuyClientPacket(Packet):
    """
    Purchasing an item from a shop
    """
    _byte_size: int = 0
    _buy_item: Item
    _session_id: int

    def __init__(self, *, buy_item: Item, session_id: int):
        """
        Create a new instance of ShopBuyClientPacket.

        Args:
            buy_item (Item): 
            session_id (int): (Value range is 0-4097152080.)
        """
        self._buy_item = buy_item
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def buy_item(self) -> Item:
        return self._buy_item

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Shop

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Buy

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ShopBuyClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ShopBuyClientPacket") -> None:
        """
        Serializes an instance of `ShopBuyClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopBuyClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._buy_item is None:
                raise SerializationError("buy_item must be provided.")
            Item.serialize(writer, data._buy_item)
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ShopBuyClientPacket":
        """
        Deserializes an instance of `ShopBuyClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ShopBuyClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            buy_item = Item.deserialize(reader)
            session_id = reader.get_int()
            result = ShopBuyClientPacket(buy_item=buy_item, session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ShopBuyClientPacket(byte_size={repr(self._byte_size)}, buy_item={repr(self._buy_item)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

buy_item: Item property

session_id: int property

__init__(*, buy_item, session_id)

Create a new instance of ShopBuyClientPacket.

Parameters:

Name Type Description Default
buy_item Item
required
session_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/shop_buy_client_packet.py
22
23
24
25
26
27
28
29
30
31
def __init__(self, *, buy_item: Item, session_id: int):
    """
    Create a new instance of ShopBuyClientPacket.

    Args:
        buy_item (Item): 
        session_id (int): (Value range is 0-4097152080.)
    """
    self._buy_item = buy_item
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/shop_buy_client_packet.py
51
52
53
54
55
56
57
58
59
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Shop

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/shop_buy_client_packet.py
61
62
63
64
65
66
67
68
69
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Buy

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/shop_buy_client_packet.py
71
72
73
74
75
76
77
78
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ShopBuyClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ShopBuyClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopBuyClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/shop_buy_client_packet.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "ShopBuyClientPacket") -> None:
    """
    Serializes an instance of `ShopBuyClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopBuyClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._buy_item is None:
            raise SerializationError("buy_item must be provided.")
        Item.serialize(writer, data._buy_item)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ShopBuyClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopBuyClientPacket ShopBuyClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/shop_buy_client_packet.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@staticmethod
def deserialize(reader: EoReader) -> "ShopBuyClientPacket":
    """
    Deserializes an instance of `ShopBuyClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ShopBuyClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        buy_item = Item.deserialize(reader)
        session_id = reader.get_int()
        result = ShopBuyClientPacket(buy_item=buy_item, session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

RefreshRequestClientPacket

Bases: Packet

Requesting new info about nearby objects

Source code in src/eolib/protocol/_generated/net/client/refresh_request_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class RefreshRequestClientPacket(Packet):
    """
    Requesting new info about nearby objects
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of RefreshRequestClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Refresh

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        RefreshRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "RefreshRequestClientPacket") -> None:
        """
        Serializes an instance of `RefreshRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RefreshRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_byte(255)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "RefreshRequestClientPacket":
        """
        Deserializes an instance of `RefreshRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            RefreshRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_byte()
            result = RefreshRequestClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"RefreshRequestClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of RefreshRequestClientPacket.

Source code in src/eolib/protocol/_generated/net/client/refresh_request_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of RefreshRequestClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/refresh_request_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Refresh

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/refresh_request_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/refresh_request_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    RefreshRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of RefreshRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RefreshRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/refresh_request_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "RefreshRequestClientPacket") -> None:
    """
    Serializes an instance of `RefreshRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RefreshRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_byte(255)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of RefreshRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RefreshRequestClientPacket RefreshRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/refresh_request_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "RefreshRequestClientPacket":
    """
    Deserializes an instance of `RefreshRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        RefreshRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_byte()
        result = RefreshRequestClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

RangeRequestClientPacket

Bases: Packet

Requesting info about nearby players and NPCs

Source code in src/eolib/protocol/_generated/net/client/range_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class RangeRequestClientPacket(Packet):
    """
    Requesting info about nearby players and NPCs
    """
    _byte_size: int = 0
    _player_ids: tuple[int, ...]
    _npc_indexes: tuple[int, ...]

    def __init__(self, *, player_ids: Iterable[int], npc_indexes: Iterable[int]):
        """
        Create a new instance of RangeRequestClientPacket.

        Args:
            player_ids (Iterable[int]): (Element value range is 0-64008.)
            npc_indexes (Iterable[int]): (Element value range is 0-252.)
        """
        self._player_ids = tuple(player_ids)
        self._npc_indexes = tuple(npc_indexes)

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def player_ids(self) -> tuple[int, ...]:
        return self._player_ids

    @property
    def npc_indexes(self) -> tuple[int, ...]:
        return self._npc_indexes

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Range

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        RangeRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "RangeRequestClientPacket") -> None:
        """
        Serializes an instance of `RangeRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RangeRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._player_ids is None:
                raise SerializationError("player_ids must be provided.")
            for i in range(len(data._player_ids)):
                writer.add_short(data._player_ids[i])
            writer.add_byte(0xFF)
            if data._npc_indexes is None:
                raise SerializationError("npc_indexes must be provided.")
            for i in range(len(data._npc_indexes)):
                writer.add_char(data._npc_indexes[i])
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "RangeRequestClientPacket":
        """
        Deserializes an instance of `RangeRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            RangeRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            player_ids_length = int(reader.remaining / 2)
            player_ids = []
            for i in range(player_ids_length):
                player_ids.append(reader.get_short())
            reader.next_chunk()
            npc_indexes_length = int(reader.remaining / 1)
            npc_indexes = []
            for i in range(npc_indexes_length):
                npc_indexes.append(reader.get_char())
            reader.chunked_reading_mode = False
            result = RangeRequestClientPacket(player_ids=player_ids, npc_indexes=npc_indexes)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"RangeRequestClientPacket(byte_size={repr(self._byte_size)}, player_ids={repr(self._player_ids)}, npc_indexes={repr(self._npc_indexes)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

player_ids: tuple[int, ...] property

npc_indexes: tuple[int, ...] property

__init__(*, player_ids, npc_indexes)

Create a new instance of RangeRequestClientPacket.

Parameters:

Name Type Description Default
player_ids Iterable[int]

(Element value range is 0-64008.)

required
npc_indexes Iterable[int]

(Element value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/range_request_client_packet.py
23
24
25
26
27
28
29
30
31
32
def __init__(self, *, player_ids: Iterable[int], npc_indexes: Iterable[int]):
    """
    Create a new instance of RangeRequestClientPacket.

    Args:
        player_ids (Iterable[int]): (Element value range is 0-64008.)
        npc_indexes (Iterable[int]): (Element value range is 0-252.)
    """
    self._player_ids = tuple(player_ids)
    self._npc_indexes = tuple(npc_indexes)

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/range_request_client_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Range

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/range_request_client_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/range_request_client_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    RangeRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of RangeRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RangeRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/range_request_client_packet.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
@staticmethod
def serialize(writer: EoWriter, data: "RangeRequestClientPacket") -> None:
    """
    Serializes an instance of `RangeRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RangeRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._player_ids is None:
            raise SerializationError("player_ids must be provided.")
        for i in range(len(data._player_ids)):
            writer.add_short(data._player_ids[i])
        writer.add_byte(0xFF)
        if data._npc_indexes is None:
            raise SerializationError("npc_indexes must be provided.")
        for i in range(len(data._npc_indexes)):
            writer.add_char(data._npc_indexes[i])
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of RangeRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RangeRequestClientPacket 'RangeRequestClientPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/range_request_client_packet.py
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@staticmethod
def deserialize(reader: EoReader) -> "RangeRequestClientPacket":
    """
    Deserializes an instance of `RangeRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        RangeRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        player_ids_length = int(reader.remaining / 2)
        player_ids = []
        for i in range(player_ids_length):
            player_ids.append(reader.get_short())
        reader.next_chunk()
        npc_indexes_length = int(reader.remaining / 1)
        npc_indexes = []
        for i in range(npc_indexes_length):
            npc_indexes.append(reader.get_char())
        reader.chunked_reading_mode = False
        result = RangeRequestClientPacket(player_ids=player_ids, npc_indexes=npc_indexes)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

QuestUseClientPacket

Bases: Packet

Talking to a quest NPC

Source code in src/eolib/protocol/_generated/net/client/quest_use_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
class QuestUseClientPacket(Packet):
    """
    Talking to a quest NPC
    """
    _byte_size: int = 0
    _npc_index: int
    _quest_id: int

    def __init__(self, *, npc_index: int, quest_id: int):
        """
        Create a new instance of QuestUseClientPacket.

        Args:
            npc_index (int): (Value range is 0-64008.)
            quest_id (int): Quest ID is 0 unless the player explicitly selects a quest from the quest switcher (Value range is 0-64008.)
        """
        self._npc_index = npc_index
        self._quest_id = quest_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @property
    def quest_id(self) -> int:
        """
        Quest ID is 0 unless the player explicitly selects a quest from the quest switcher
        """
        return self._quest_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Quest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Use

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        QuestUseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "QuestUseClientPacket") -> None:
        """
        Serializes an instance of `QuestUseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestUseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
            if data._quest_id is None:
                raise SerializationError("quest_id must be provided.")
            writer.add_short(data._quest_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "QuestUseClientPacket":
        """
        Deserializes an instance of `QuestUseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            QuestUseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_short()
            quest_id = reader.get_short()
            result = QuestUseClientPacket(npc_index=npc_index, quest_id=quest_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"QuestUseClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)}, quest_id={repr(self._quest_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

quest_id: int property

Quest ID is 0 unless the player explicitly selects a quest from the quest switcher

__init__(*, npc_index, quest_id)

Create a new instance of QuestUseClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-64008.)

required
quest_id int

Quest ID is 0 unless the player explicitly selects a quest from the quest switcher (Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/quest_use_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, npc_index: int, quest_id: int):
    """
    Create a new instance of QuestUseClientPacket.

    Args:
        npc_index (int): (Value range is 0-64008.)
        quest_id (int): Quest ID is 0 unless the player explicitly selects a quest from the quest switcher (Value range is 0-64008.)
    """
    self._npc_index = npc_index
    self._quest_id = quest_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/quest_use_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Quest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/quest_use_client_packet.py
63
64
65
66
67
68
69
70
71
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Use

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/quest_use_client_packet.py
73
74
75
76
77
78
79
80
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    QuestUseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of QuestUseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data QuestUseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/quest_use_client_packet.py
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def serialize(writer: EoWriter, data: "QuestUseClientPacket") -> None:
    """
    Serializes an instance of `QuestUseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestUseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
        if data._quest_id is None:
            raise SerializationError("quest_id must be provided.")
        writer.add_short(data._quest_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of QuestUseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
QuestUseClientPacket QuestUseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/quest_use_client_packet.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
@staticmethod
def deserialize(reader: EoReader) -> "QuestUseClientPacket":
    """
    Deserializes an instance of `QuestUseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        QuestUseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_short()
        quest_id = reader.get_short()
        result = QuestUseClientPacket(npc_index=npc_index, quest_id=quest_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

QuestPage

Bases: IntEnum

A page in the Quest menu

Source code in src/eolib/protocol/_generated/net/quest_page.py
 9
10
11
12
13
14
class QuestPage(IntEnum, metaclass=ProtocolEnumMeta):
    """
    A page in the Quest menu
    """
    Progress = 1
    History = 2

Progress = 1 class-attribute instance-attribute

History = 2 class-attribute instance-attribute

QuestListClientPacket

Bases: Packet

Quest history / progress request

Source code in src/eolib/protocol/_generated/net/client/quest_list_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class QuestListClientPacket(Packet):
    """
    Quest history / progress request
    """
    _byte_size: int = 0
    _page: QuestPage

    def __init__(self, *, page: QuestPage):
        """
        Create a new instance of QuestListClientPacket.

        Args:
            page (QuestPage): 
        """
        self._page = page

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def page(self) -> QuestPage:
        return self._page

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Quest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.List

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        QuestListClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "QuestListClientPacket") -> None:
        """
        Serializes an instance of `QuestListClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestListClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._page is None:
                raise SerializationError("page must be provided.")
            writer.add_char(int(data._page))
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "QuestListClientPacket":
        """
        Deserializes an instance of `QuestListClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            QuestListClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            page = QuestPage(reader.get_char())
            result = QuestListClientPacket(page=page)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"QuestListClientPacket(byte_size={repr(self._byte_size)}, page={repr(self._page)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

page: QuestPage property

__init__(*, page)

Create a new instance of QuestListClientPacket.

Parameters:

Name Type Description Default
page QuestPage
required
Source code in src/eolib/protocol/_generated/net/client/quest_list_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, page: QuestPage):
    """
    Create a new instance of QuestListClientPacket.

    Args:
        page (QuestPage): 
    """
    self._page = page

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/quest_list_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Quest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/quest_list_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.List

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/quest_list_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    QuestListClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of QuestListClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data QuestListClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/quest_list_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "QuestListClientPacket") -> None:
    """
    Serializes an instance of `QuestListClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestListClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._page is None:
            raise SerializationError("page must be provided.")
        writer.add_char(int(data._page))
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of QuestListClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
QuestListClientPacket QuestListClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/quest_list_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "QuestListClientPacket":
    """
    Deserializes an instance of `QuestListClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        QuestListClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        page = QuestPage(reader.get_char())
        result = QuestListClientPacket(page=page)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

DialogReply

Bases: IntEnum

Whether the player has clicked the OK button or a link in a quest dialog

Source code in src/eolib/protocol/_generated/net/client/dialog_reply.py
 9
10
11
12
13
14
class DialogReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Whether the player has clicked the OK button or a link in a quest dialog
    """
    Ok = 1
    Link = 2

Ok = 1 class-attribute instance-attribute

QuestAcceptClientPacket

Bases: Packet

Response to a quest NPC dialog

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
class QuestAcceptClientPacket(Packet):
    """
    Response to a quest NPC dialog
    """
    _byte_size: int = 0
    _session_id: int
    _dialog_id: int
    _quest_id: int
    _npc_index: int
    _reply_type: DialogReply
    _reply_type_data: 'QuestAcceptClientPacket.ReplyTypeData'

    def __init__(self, *, session_id: int, dialog_id: int, quest_id: int, npc_index: int, reply_type: DialogReply, reply_type_data: 'QuestAcceptClientPacket.ReplyTypeData' = None):
        """
        Create a new instance of QuestAcceptClientPacket.

        Args:
            session_id (int): (Value range is 0-64008.)
            dialog_id (int): (Value range is 0-64008.)
            quest_id (int): (Value range is 0-64008.)
            npc_index (int): (Value range is 0-64008.)
            reply_type (DialogReply): 
            reply_type_data (QuestAcceptClientPacket.ReplyTypeData): Data associated with the `reply_type` field.
        """
        self._session_id = session_id
        self._dialog_id = dialog_id
        self._quest_id = quest_id
        self._npc_index = npc_index
        self._reply_type = reply_type
        self._reply_type_data = reply_type_data

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def dialog_id(self) -> int:
        return self._dialog_id

    @property
    def quest_id(self) -> int:
        return self._quest_id

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @property
    def reply_type(self) -> DialogReply:
        return self._reply_type

    @property
    def reply_type_data(self) -> 'QuestAcceptClientPacket.ReplyTypeData':
        """
        QuestAcceptClientPacket.ReplyTypeData: Data associated with the `reply_type` field.
        """
        return self._reply_type_data

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Quest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        QuestAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "QuestAcceptClientPacket") -> None:
        """
        Serializes an instance of `QuestAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
            if data._dialog_id is None:
                raise SerializationError("dialog_id must be provided.")
            writer.add_short(data._dialog_id)
            if data._quest_id is None:
                raise SerializationError("quest_id must be provided.")
            writer.add_short(data._quest_id)
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
            if data._reply_type is None:
                raise SerializationError("reply_type must be provided.")
            writer.add_char(int(data._reply_type))
            if data._reply_type == DialogReply.Ok:
                if not isinstance(data._reply_type_data, QuestAcceptClientPacket.ReplyTypeDataOk):
                    raise SerializationError("Expected reply_type_data to be type QuestAcceptClientPacket.ReplyTypeDataOk for reply_type " + DialogReply(data._reply_type).name + ".")
                QuestAcceptClientPacket.ReplyTypeDataOk.serialize(writer, data._reply_type_data)
            elif data._reply_type == DialogReply.Link:
                if not isinstance(data._reply_type_data, QuestAcceptClientPacket.ReplyTypeDataLink):
                    raise SerializationError("Expected reply_type_data to be type QuestAcceptClientPacket.ReplyTypeDataLink for reply_type " + DialogReply(data._reply_type).name + ".")
                QuestAcceptClientPacket.ReplyTypeDataLink.serialize(writer, data._reply_type_data)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "QuestAcceptClientPacket":
        """
        Deserializes an instance of `QuestAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            QuestAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_short()
            dialog_id = reader.get_short()
            quest_id = reader.get_short()
            npc_index = reader.get_short()
            reply_type = DialogReply(reader.get_char())
            reply_type_data: QuestAcceptClientPacket.ReplyTypeData = None
            if reply_type == DialogReply.Ok:
                reply_type_data = QuestAcceptClientPacket.ReplyTypeDataOk.deserialize(reader)
            elif reply_type == DialogReply.Link:
                reply_type_data = QuestAcceptClientPacket.ReplyTypeDataLink.deserialize(reader)
            result = QuestAcceptClientPacket(session_id=session_id, dialog_id=dialog_id, quest_id=quest_id, npc_index=npc_index, reply_type=reply_type, reply_type_data=reply_type_data)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"QuestAcceptClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, dialog_id={repr(self._dialog_id)}, quest_id={repr(self._quest_id)}, npc_index={repr(self._npc_index)}, reply_type={repr(self._reply_type)}, reply_type_data={repr(self._reply_type_data)})"

    ReplyTypeData = Union['QuestAcceptClientPacket.ReplyTypeDataOk', 'QuestAcceptClientPacket.ReplyTypeDataLink', None]
    """
    Data associated with different values of the `reply_type` field.
    """

    class ReplyTypeDataOk:
        """
        Data associated with reply_type value DialogReply.Ok
        """
        _byte_size: int = 0

        def __init__(self):
            """
            Create a new instance of QuestAcceptClientPacket.ReplyTypeDataOk.
            """

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size


        @staticmethod
        def serialize(writer: EoWriter, data: "QuestAcceptClientPacket.ReplyTypeDataOk") -> None:
            """
            Serializes an instance of `QuestAcceptClientPacket.ReplyTypeDataOk` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (QuestAcceptClientPacket.ReplyTypeDataOk): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                writer.add_char(0)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "QuestAcceptClientPacket.ReplyTypeDataOk":
            """
            Deserializes an instance of `QuestAcceptClientPacket.ReplyTypeDataOk` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                QuestAcceptClientPacket.ReplyTypeDataOk: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                reader.get_char()
                result = QuestAcceptClientPacket.ReplyTypeDataOk()
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"QuestAcceptClientPacket.ReplyTypeDataOk(byte_size={repr(self._byte_size)})"

    class ReplyTypeDataLink:
        """
        Data associated with reply_type value DialogReply.Link
        """
        _byte_size: int = 0
        _action: int

        def __init__(self, *, action: int):
            """
            Create a new instance of QuestAcceptClientPacket.ReplyTypeDataLink.

            Args:
                action (int): (Value range is 0-252.)
            """
            self._action = action

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def action(self) -> int:
            return self._action

        @staticmethod
        def serialize(writer: EoWriter, data: "QuestAcceptClientPacket.ReplyTypeDataLink") -> None:
            """
            Serializes an instance of `QuestAcceptClientPacket.ReplyTypeDataLink` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (QuestAcceptClientPacket.ReplyTypeDataLink): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._action is None:
                    raise SerializationError("action must be provided.")
                writer.add_char(data._action)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "QuestAcceptClientPacket.ReplyTypeDataLink":
            """
            Deserializes an instance of `QuestAcceptClientPacket.ReplyTypeDataLink` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                QuestAcceptClientPacket.ReplyTypeDataLink: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                action = reader.get_char()
                result = QuestAcceptClientPacket.ReplyTypeDataLink(action=action)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"QuestAcceptClientPacket.ReplyTypeDataLink(byte_size={repr(self._byte_size)}, action={repr(self._action)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

dialog_id: int property

quest_id: int property

npc_index: int property

reply_type: DialogReply property

reply_type_data: QuestAcceptClientPacket.ReplyTypeData property

QuestAcceptClientPacket.ReplyTypeData: Data associated with the reply_type field.

ReplyTypeData = Union['QuestAcceptClientPacket.ReplyTypeDataOk', 'QuestAcceptClientPacket.ReplyTypeDataLink', None] class-attribute instance-attribute

Data associated with different values of the reply_type field.

ReplyTypeDataOk

Data associated with reply_type value DialogReply.Ok

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
class ReplyTypeDataOk:
    """
    Data associated with reply_type value DialogReply.Ok
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of QuestAcceptClientPacket.ReplyTypeDataOk.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size


    @staticmethod
    def serialize(writer: EoWriter, data: "QuestAcceptClientPacket.ReplyTypeDataOk") -> None:
        """
        Serializes an instance of `QuestAcceptClientPacket.ReplyTypeDataOk` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestAcceptClientPacket.ReplyTypeDataOk): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_char(0)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "QuestAcceptClientPacket.ReplyTypeDataOk":
        """
        Deserializes an instance of `QuestAcceptClientPacket.ReplyTypeDataOk` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            QuestAcceptClientPacket.ReplyTypeDataOk: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            result = QuestAcceptClientPacket.ReplyTypeDataOk()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"QuestAcceptClientPacket.ReplyTypeDataOk(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of QuestAcceptClientPacket.ReplyTypeDataOk.

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
193
194
195
196
def __init__(self):
    """
    Create a new instance of QuestAcceptClientPacket.ReplyTypeDataOk.
    """

serialize(writer, data) staticmethod

Serializes an instance of QuestAcceptClientPacket.ReplyTypeDataOk to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyTypeDataOk

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
209
210
211
212
213
214
215
216
217
218
219
220
221
222
@staticmethod
def serialize(writer: EoWriter, data: "QuestAcceptClientPacket.ReplyTypeDataOk") -> None:
    """
    Serializes an instance of `QuestAcceptClientPacket.ReplyTypeDataOk` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestAcceptClientPacket.ReplyTypeDataOk): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_char(0)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of QuestAcceptClientPacket.ReplyTypeDataOk from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyTypeDataOk

QuestAcceptClientPacket.ReplyTypeDataOk: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
@staticmethod
def deserialize(reader: EoReader) -> "QuestAcceptClientPacket.ReplyTypeDataOk":
    """
    Deserializes an instance of `QuestAcceptClientPacket.ReplyTypeDataOk` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        QuestAcceptClientPacket.ReplyTypeDataOk: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        result = QuestAcceptClientPacket.ReplyTypeDataOk()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

Data associated with reply_type value DialogReply.Link

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
class ReplyTypeDataLink:
    """
    Data associated with reply_type value DialogReply.Link
    """
    _byte_size: int = 0
    _action: int

    def __init__(self, *, action: int):
        """
        Create a new instance of QuestAcceptClientPacket.ReplyTypeDataLink.

        Args:
            action (int): (Value range is 0-252.)
        """
        self._action = action

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def action(self) -> int:
        return self._action

    @staticmethod
    def serialize(writer: EoWriter, data: "QuestAcceptClientPacket.ReplyTypeDataLink") -> None:
        """
        Serializes an instance of `QuestAcceptClientPacket.ReplyTypeDataLink` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestAcceptClientPacket.ReplyTypeDataLink): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._action is None:
                raise SerializationError("action must be provided.")
            writer.add_char(data._action)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "QuestAcceptClientPacket.ReplyTypeDataLink":
        """
        Deserializes an instance of `QuestAcceptClientPacket.ReplyTypeDataLink` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            QuestAcceptClientPacket.ReplyTypeDataLink: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            action = reader.get_char()
            result = QuestAcceptClientPacket.ReplyTypeDataLink(action=action)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"QuestAcceptClientPacket.ReplyTypeDataLink(byte_size={repr(self._byte_size)}, action={repr(self._action)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

action: int property

__init__(*, action)

Create a new instance of QuestAcceptClientPacket.ReplyTypeDataLink.

Parameters:

Name Type Description Default
action int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
255
256
257
258
259
260
261
262
def __init__(self, *, action: int):
    """
    Create a new instance of QuestAcceptClientPacket.ReplyTypeDataLink.

    Args:
        action (int): (Value range is 0-252.)
    """
    self._action = action

serialize(writer, data) staticmethod

Serializes an instance of QuestAcceptClientPacket.ReplyTypeDataLink to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyTypeDataLink

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
@staticmethod
def serialize(writer: EoWriter, data: "QuestAcceptClientPacket.ReplyTypeDataLink") -> None:
    """
    Serializes an instance of `QuestAcceptClientPacket.ReplyTypeDataLink` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestAcceptClientPacket.ReplyTypeDataLink): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._action is None:
            raise SerializationError("action must be provided.")
        writer.add_char(data._action)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of QuestAcceptClientPacket.ReplyTypeDataLink from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyTypeDataLink

QuestAcceptClientPacket.ReplyTypeDataLink: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
@staticmethod
def deserialize(reader: EoReader) -> "QuestAcceptClientPacket.ReplyTypeDataLink":
    """
    Deserializes an instance of `QuestAcceptClientPacket.ReplyTypeDataLink` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        QuestAcceptClientPacket.ReplyTypeDataLink: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        action = reader.get_char()
        result = QuestAcceptClientPacket.ReplyTypeDataLink(action=action)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

__init__(*, session_id, dialog_id, quest_id, npc_index, reply_type, reply_type_data=None)

Create a new instance of QuestAcceptClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-64008.)

required
dialog_id int

(Value range is 0-64008.)

required
quest_id int

(Value range is 0-64008.)

required
npc_index int

(Value range is 0-64008.)

required
reply_type DialogReply
required
reply_type_data ReplyTypeData

Data associated with the reply_type field.

None
Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
def __init__(self, *, session_id: int, dialog_id: int, quest_id: int, npc_index: int, reply_type: DialogReply, reply_type_data: 'QuestAcceptClientPacket.ReplyTypeData' = None):
    """
    Create a new instance of QuestAcceptClientPacket.

    Args:
        session_id (int): (Value range is 0-64008.)
        dialog_id (int): (Value range is 0-64008.)
        quest_id (int): (Value range is 0-64008.)
        npc_index (int): (Value range is 0-64008.)
        reply_type (DialogReply): 
        reply_type_data (QuestAcceptClientPacket.ReplyTypeData): Data associated with the `reply_type` field.
    """
    self._session_id = session_id
    self._dialog_id = dialog_id
    self._quest_id = quest_id
    self._npc_index = npc_index
    self._reply_type = reply_type
    self._reply_type_data = reply_type_data

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
83
84
85
86
87
88
89
90
91
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Quest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
 93
 94
 95
 96
 97
 98
 99
100
101
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
103
104
105
106
107
108
109
110
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    QuestAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of QuestAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data QuestAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@staticmethod
def serialize(writer: EoWriter, data: "QuestAcceptClientPacket") -> None:
    """
    Serializes an instance of `QuestAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
        if data._dialog_id is None:
            raise SerializationError("dialog_id must be provided.")
        writer.add_short(data._dialog_id)
        if data._quest_id is None:
            raise SerializationError("quest_id must be provided.")
        writer.add_short(data._quest_id)
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
        if data._reply_type is None:
            raise SerializationError("reply_type must be provided.")
        writer.add_char(int(data._reply_type))
        if data._reply_type == DialogReply.Ok:
            if not isinstance(data._reply_type_data, QuestAcceptClientPacket.ReplyTypeDataOk):
                raise SerializationError("Expected reply_type_data to be type QuestAcceptClientPacket.ReplyTypeDataOk for reply_type " + DialogReply(data._reply_type).name + ".")
            QuestAcceptClientPacket.ReplyTypeDataOk.serialize(writer, data._reply_type_data)
        elif data._reply_type == DialogReply.Link:
            if not isinstance(data._reply_type_data, QuestAcceptClientPacket.ReplyTypeDataLink):
                raise SerializationError("Expected reply_type_data to be type QuestAcceptClientPacket.ReplyTypeDataLink for reply_type " + DialogReply(data._reply_type).name + ".")
            QuestAcceptClientPacket.ReplyTypeDataLink.serialize(writer, data._reply_type_data)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of QuestAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
QuestAcceptClientPacket QuestAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
@staticmethod
def deserialize(reader: EoReader) -> "QuestAcceptClientPacket":
    """
    Deserializes an instance of `QuestAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        QuestAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_short()
        dialog_id = reader.get_short()
        quest_id = reader.get_short()
        npc_index = reader.get_short()
        reply_type = DialogReply(reader.get_char())
        reply_type_data: QuestAcceptClientPacket.ReplyTypeData = None
        if reply_type == DialogReply.Ok:
            reply_type_data = QuestAcceptClientPacket.ReplyTypeDataOk.deserialize(reader)
        elif reply_type == DialogReply.Link:
            reply_type_data = QuestAcceptClientPacket.ReplyTypeDataLink.deserialize(reader)
        result = QuestAcceptClientPacket(session_id=session_id, dialog_id=dialog_id, quest_id=quest_id, npc_index=npc_index, reply_type=reply_type, reply_type_data=reply_type_data)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PriestUseClientPacket

Bases: Packet

Saying "I do" at a wedding

Source code in src/eolib/protocol/_generated/net/client/priest_use_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class PriestUseClientPacket(Packet):
    """
    Saying "I do" at a wedding
    """
    _byte_size: int = 0
    _session_id: int

    def __init__(self, *, session_id: int):
        """
        Create a new instance of PriestUseClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
        """
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Priest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Use

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PriestUseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PriestUseClientPacket") -> None:
        """
        Serializes an instance of `PriestUseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PriestUseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PriestUseClientPacket":
        """
        Deserializes an instance of `PriestUseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PriestUseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            result = PriestUseClientPacket(session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PriestUseClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

__init__(*, session_id)

Create a new instance of PriestUseClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/priest_use_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, session_id: int):
    """
    Create a new instance of PriestUseClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
    """
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/priest_use_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Priest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/priest_use_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Use

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/priest_use_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PriestUseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PriestUseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PriestUseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/priest_use_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "PriestUseClientPacket") -> None:
    """
    Serializes an instance of `PriestUseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PriestUseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PriestUseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PriestUseClientPacket PriestUseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/priest_use_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "PriestUseClientPacket":
    """
    Deserializes an instance of `PriestUseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PriestUseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        result = PriestUseClientPacket(session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PriestRequestClientPacket

Bases: Packet

Requesting marriage at a priest

Source code in src/eolib/protocol/_generated/net/client/priest_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
class PriestRequestClientPacket(Packet):
    """
    Requesting marriage at a priest
    """
    _byte_size: int = 0
    _session_id: int
    _name: str

    def __init__(self, *, session_id: int, name: str):
        """
        Create a new instance of PriestRequestClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            name (str): 
        """
        self._session_id = session_id
        self._name = name

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def name(self) -> str:
        return self._name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Priest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PriestRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PriestRequestClientPacket") -> None:
        """
        Serializes an instance of `PriestRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PriestRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            writer.add_byte(0xFF)
            if data._name is None:
                raise SerializationError("name must be provided.")
            writer.add_string(data._name)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PriestRequestClientPacket":
        """
        Deserializes an instance of `PriestRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PriestRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            session_id = reader.get_int()
            reader.next_chunk()
            name = reader.get_string()
            reader.chunked_reading_mode = False
            result = PriestRequestClientPacket(session_id=session_id, name=name)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PriestRequestClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, name={repr(self._name)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

name: str property

__init__(*, session_id, name)

Create a new instance of PriestRequestClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
name str
required
Source code in src/eolib/protocol/_generated/net/client/priest_request_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, name: str):
    """
    Create a new instance of PriestRequestClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        name (str): 
    """
    self._session_id = session_id
    self._name = name

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/priest_request_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Priest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/priest_request_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/priest_request_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PriestRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PriestRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PriestRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/priest_request_client_packet.py
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def serialize(writer: EoWriter, data: "PriestRequestClientPacket") -> None:
    """
    Serializes an instance of `PriestRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PriestRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        writer.add_byte(0xFF)
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PriestRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PriestRequestClientPacket PriestRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/priest_request_client_packet.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@staticmethod
def deserialize(reader: EoReader) -> "PriestRequestClientPacket":
    """
    Deserializes an instance of `PriestRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PriestRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        session_id = reader.get_int()
        reader.next_chunk()
        name = reader.get_string()
        reader.chunked_reading_mode = False
        result = PriestRequestClientPacket(session_id=session_id, name=name)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PriestOpenClientPacket

Bases: Packet

Talking to a priest NPC

Source code in src/eolib/protocol/_generated/net/client/priest_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class PriestOpenClientPacket(Packet):
    """
    Talking to a priest NPC
    """
    _byte_size: int = 0
    _npc_index: int

    def __init__(self, *, npc_index: int):
        """
        Create a new instance of PriestOpenClientPacket.

        Args:
            npc_index (int): (Value range is 0-4097152080.)
        """
        self._npc_index = npc_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Priest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PriestOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PriestOpenClientPacket") -> None:
        """
        Serializes an instance of `PriestOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PriestOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_int(data._npc_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PriestOpenClientPacket":
        """
        Deserializes an instance of `PriestOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PriestOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_int()
            result = PriestOpenClientPacket(npc_index=npc_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PriestOpenClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

__init__(*, npc_index)

Create a new instance of PriestOpenClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/priest_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, npc_index: int):
    """
    Create a new instance of PriestOpenClientPacket.

    Args:
        npc_index (int): (Value range is 0-4097152080.)
    """
    self._npc_index = npc_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/priest_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Priest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/priest_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/priest_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PriestOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PriestOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PriestOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/priest_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "PriestOpenClientPacket") -> None:
    """
    Serializes an instance of `PriestOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PriestOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_int(data._npc_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PriestOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PriestOpenClientPacket PriestOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/priest_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "PriestOpenClientPacket":
    """
    Deserializes an instance of `PriestOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PriestOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_int()
        result = PriestOpenClientPacket(npc_index=npc_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PriestAcceptClientPacket

Bases: Packet

Accepting a marriage request

Source code in src/eolib/protocol/_generated/net/client/priest_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class PriestAcceptClientPacket(Packet):
    """
    Accepting a marriage request
    """
    _byte_size: int = 0
    _session_id: int

    def __init__(self, *, session_id: int):
        """
        Create a new instance of PriestAcceptClientPacket.

        Args:
            session_id (int): (Value range is 0-64008.)
        """
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Priest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PriestAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PriestAcceptClientPacket") -> None:
        """
        Serializes an instance of `PriestAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PriestAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PriestAcceptClientPacket":
        """
        Deserializes an instance of `PriestAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PriestAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_short()
            result = PriestAcceptClientPacket(session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PriestAcceptClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

__init__(*, session_id)

Create a new instance of PriestAcceptClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/priest_accept_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, session_id: int):
    """
    Create a new instance of PriestAcceptClientPacket.

    Args:
        session_id (int): (Value range is 0-64008.)
    """
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/priest_accept_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Priest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/priest_accept_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/priest_accept_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PriestAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PriestAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PriestAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/priest_accept_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "PriestAcceptClientPacket") -> None:
    """
    Serializes an instance of `PriestAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PriestAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PriestAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PriestAcceptClientPacket PriestAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/priest_accept_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "PriestAcceptClientPacket":
    """
    Deserializes an instance of `PriestAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PriestAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_short()
        result = PriestAcceptClientPacket(session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PlayersRequestClientPacket

Bases: Packet

Requesting a list of online players

Source code in src/eolib/protocol/_generated/net/client/players_request_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class PlayersRequestClientPacket(Packet):
    """
    Requesting a list of online players
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of PlayersRequestClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Players

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PlayersRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PlayersRequestClientPacket") -> None:
        """
        Serializes an instance of `PlayersRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_byte(255)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PlayersRequestClientPacket":
        """
        Deserializes an instance of `PlayersRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PlayersRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_byte()
            result = PlayersRequestClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PlayersRequestClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of PlayersRequestClientPacket.

Source code in src/eolib/protocol/_generated/net/client/players_request_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of PlayersRequestClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/players_request_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Players

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/players_request_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/players_request_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PlayersRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/players_request_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "PlayersRequestClientPacket") -> None:
    """
    Serializes an instance of `PlayersRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_byte(255)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PlayersRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersRequestClientPacket PlayersRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/players_request_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "PlayersRequestClientPacket":
    """
    Deserializes an instance of `PlayersRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PlayersRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_byte()
        result = PlayersRequestClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PlayersListClientPacket

Bases: Packet

Requesting a list of online friends

Source code in src/eolib/protocol/_generated/net/client/players_list_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class PlayersListClientPacket(Packet):
    """
    Requesting a list of online friends
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of PlayersListClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Players

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.List

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PlayersListClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PlayersListClientPacket") -> None:
        """
        Serializes an instance of `PlayersListClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersListClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_byte(255)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PlayersListClientPacket":
        """
        Deserializes an instance of `PlayersListClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PlayersListClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_byte()
            result = PlayersListClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PlayersListClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of PlayersListClientPacket.

Source code in src/eolib/protocol/_generated/net/client/players_list_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of PlayersListClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/players_list_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Players

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/players_list_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.List

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/players_list_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PlayersListClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersListClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersListClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/players_list_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "PlayersListClientPacket") -> None:
    """
    Serializes an instance of `PlayersListClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersListClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_byte(255)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PlayersListClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersListClientPacket PlayersListClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/players_list_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "PlayersListClientPacket":
    """
    Deserializes an instance of `PlayersListClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PlayersListClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_byte()
        result = PlayersListClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PlayersAcceptClientPacket

Bases: Packet

find command request

Source code in src/eolib/protocol/_generated/net/client/players_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class PlayersAcceptClientPacket(Packet):
    """
    #find command request
    """
    _byte_size: int = 0
    _name: str

    def __init__(self, *, name: str):
        """
        Create a new instance of PlayersAcceptClientPacket.

        Args:
            name (str): 
        """
        self._name = name

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def name(self) -> str:
        return self._name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Players

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PlayersAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PlayersAcceptClientPacket") -> None:
        """
        Serializes an instance of `PlayersAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._name is None:
                raise SerializationError("name must be provided.")
            writer.add_string(data._name)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PlayersAcceptClientPacket":
        """
        Deserializes an instance of `PlayersAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PlayersAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            name = reader.get_string()
            result = PlayersAcceptClientPacket(name=name)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PlayersAcceptClientPacket(byte_size={repr(self._byte_size)}, name={repr(self._name)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

name: str property

__init__(*, name)

Create a new instance of PlayersAcceptClientPacket.

Parameters:

Name Type Description Default
name str
required
Source code in src/eolib/protocol/_generated/net/client/players_accept_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, name: str):
    """
    Create a new instance of PlayersAcceptClientPacket.

    Args:
        name (str): 
    """
    self._name = name

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/players_accept_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Players

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/players_accept_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/players_accept_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PlayersAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/players_accept_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "PlayersAcceptClientPacket") -> None:
    """
    Serializes an instance of `PlayersAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PlayersAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersAcceptClientPacket PlayersAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/players_accept_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "PlayersAcceptClientPacket":
    """
    Deserializes an instance of `PlayersAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PlayersAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        name = reader.get_string()
        result = PlayersAcceptClientPacket(name=name)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PlayerRangeRequestClientPacket

Bases: Packet

Requesting info about nearby players

Source code in src/eolib/protocol/_generated/net/client/player_range_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
class PlayerRangeRequestClientPacket(Packet):
    """
    Requesting info about nearby players
    """
    _byte_size: int = 0
    _player_ids: tuple[int, ...]

    def __init__(self, *, player_ids: Iterable[int]):
        """
        Create a new instance of PlayerRangeRequestClientPacket.

        Args:
            player_ids (Iterable[int]): (Element value range is 0-64008.)
        """
        self._player_ids = tuple(player_ids)

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def player_ids(self) -> tuple[int, ...]:
        return self._player_ids

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.PlayerRange

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PlayerRangeRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PlayerRangeRequestClientPacket") -> None:
        """
        Serializes an instance of `PlayerRangeRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayerRangeRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._player_ids is None:
                raise SerializationError("player_ids must be provided.")
            for i in range(len(data._player_ids)):
                writer.add_short(data._player_ids[i])
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PlayerRangeRequestClientPacket":
        """
        Deserializes an instance of `PlayerRangeRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PlayerRangeRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            player_ids_length = int(reader.remaining / 2)
            player_ids = []
            for i in range(player_ids_length):
                player_ids.append(reader.get_short())
            result = PlayerRangeRequestClientPacket(player_ids=player_ids)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PlayerRangeRequestClientPacket(byte_size={repr(self._byte_size)}, player_ids={repr(self._player_ids)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

player_ids: tuple[int, ...] property

__init__(*, player_ids)

Create a new instance of PlayerRangeRequestClientPacket.

Parameters:

Name Type Description Default
player_ids Iterable[int]

(Element value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/player_range_request_client_packet.py
22
23
24
25
26
27
28
29
def __init__(self, *, player_ids: Iterable[int]):
    """
    Create a new instance of PlayerRangeRequestClientPacket.

    Args:
        player_ids (Iterable[int]): (Element value range is 0-64008.)
    """
    self._player_ids = tuple(player_ids)

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/player_range_request_client_packet.py
45
46
47
48
49
50
51
52
53
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.PlayerRange

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/player_range_request_client_packet.py
55
56
57
58
59
60
61
62
63
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/player_range_request_client_packet.py
65
66
67
68
69
70
71
72
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PlayerRangeRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayerRangeRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayerRangeRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/player_range_request_client_packet.py
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@staticmethod
def serialize(writer: EoWriter, data: "PlayerRangeRequestClientPacket") -> None:
    """
    Serializes an instance of `PlayerRangeRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayerRangeRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._player_ids is None:
            raise SerializationError("player_ids must be provided.")
        for i in range(len(data._player_ids)):
            writer.add_short(data._player_ids[i])
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PlayerRangeRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayerRangeRequestClientPacket 'PlayerRangeRequestClientPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/player_range_request_client_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
@staticmethod
def deserialize(reader: EoReader) -> "PlayerRangeRequestClientPacket":
    """
    Deserializes an instance of `PlayerRangeRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PlayerRangeRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        player_ids_length = int(reader.remaining / 2)
        player_ids = []
        for i in range(player_ids_length):
            player_ids.append(reader.get_short())
        result = PlayerRangeRequestClientPacket(player_ids=player_ids)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyTakeClientPacket

Bases: Packet

Request updated party info

Source code in src/eolib/protocol/_generated/net/client/party_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class PartyTakeClientPacket(Packet):
    """
    Request updated party info
    """
    _byte_size: int = 0
    _members_count: int

    def __init__(self, *, members_count: int):
        """
        Create a new instance of PartyTakeClientPacket.

        Args:
            members_count (int): (Value range is 0-252.)
        """
        self._members_count = members_count

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def members_count(self) -> int:
        return self._members_count

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Party

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PartyTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyTakeClientPacket") -> None:
        """
        Serializes an instance of `PartyTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._members_count is None:
                raise SerializationError("members_count must be provided.")
            writer.add_char(data._members_count)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyTakeClientPacket":
        """
        Deserializes an instance of `PartyTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            members_count = reader.get_char()
            result = PartyTakeClientPacket(members_count=members_count)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PartyTakeClientPacket(byte_size={repr(self._byte_size)}, members_count={repr(self._members_count)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

members_count: int property

__init__(*, members_count)

Create a new instance of PartyTakeClientPacket.

Parameters:

Name Type Description Default
members_count int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/party_take_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, members_count: int):
    """
    Create a new instance of PartyTakeClientPacket.

    Args:
        members_count (int): (Value range is 0-252.)
    """
    self._members_count = members_count

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/party_take_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Party

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/party_take_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/party_take_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PartyTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/party_take_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "PartyTakeClientPacket") -> None:
    """
    Serializes an instance of `PartyTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._members_count is None:
            raise SerializationError("members_count must be provided.")
        writer.add_char(data._members_count)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PartyTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyTakeClientPacket PartyTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/party_take_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "PartyTakeClientPacket":
    """
    Deserializes an instance of `PartyTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        members_count = reader.get_char()
        result = PartyTakeClientPacket(members_count=members_count)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyRequestType

Bases: IntEnum

Whether a player is requesting to join a party, or inviting someone to join theirs

Source code in src/eolib/protocol/_generated/net/party_request_type.py
 9
10
11
12
13
14
class PartyRequestType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Whether a player is requesting to join a party, or inviting someone to join theirs
    """
    Join = 0
    Invite = 1

Join = 0 class-attribute instance-attribute

Invite = 1 class-attribute instance-attribute

PartyRequestClientPacket

Bases: Packet

Send party invite / join request

Source code in src/eolib/protocol/_generated/net/client/party_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
class PartyRequestClientPacket(Packet):
    """
    Send party invite / join request
    """
    _byte_size: int = 0
    _request_type: PartyRequestType
    _player_id: int

    def __init__(self, *, request_type: PartyRequestType, player_id: int):
        """
        Create a new instance of PartyRequestClientPacket.

        Args:
            request_type (PartyRequestType): 
            player_id (int): (Value range is 0-64008.)
        """
        self._request_type = request_type
        self._player_id = player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def request_type(self) -> PartyRequestType:
        return self._request_type

    @property
    def player_id(self) -> int:
        return self._player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Party

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PartyRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyRequestClientPacket") -> None:
        """
        Serializes an instance of `PartyRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._request_type is None:
                raise SerializationError("request_type must be provided.")
            writer.add_char(int(data._request_type))
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyRequestClientPacket":
        """
        Deserializes an instance of `PartyRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            request_type = PartyRequestType(reader.get_char())
            player_id = reader.get_short()
            result = PartyRequestClientPacket(request_type=request_type, player_id=player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PartyRequestClientPacket(byte_size={repr(self._byte_size)}, request_type={repr(self._request_type)}, player_id={repr(self._player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

request_type: PartyRequestType property

player_id: int property

__init__(*, request_type, player_id)

Create a new instance of PartyRequestClientPacket.

Parameters:

Name Type Description Default
request_type PartyRequestType
required
player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/party_request_client_packet.py
22
23
24
25
26
27
28
29
30
31
def __init__(self, *, request_type: PartyRequestType, player_id: int):
    """
    Create a new instance of PartyRequestClientPacket.

    Args:
        request_type (PartyRequestType): 
        player_id (int): (Value range is 0-64008.)
    """
    self._request_type = request_type
    self._player_id = player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/party_request_client_packet.py
51
52
53
54
55
56
57
58
59
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Party

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/party_request_client_packet.py
61
62
63
64
65
66
67
68
69
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/party_request_client_packet.py
71
72
73
74
75
76
77
78
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PartyRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/party_request_client_packet.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "PartyRequestClientPacket") -> None:
    """
    Serializes an instance of `PartyRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._request_type is None:
            raise SerializationError("request_type must be provided.")
        writer.add_char(int(data._request_type))
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PartyRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyRequestClientPacket PartyRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/party_request_client_packet.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@staticmethod
def deserialize(reader: EoReader) -> "PartyRequestClientPacket":
    """
    Deserializes an instance of `PartyRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        request_type = PartyRequestType(reader.get_char())
        player_id = reader.get_short()
        result = PartyRequestClientPacket(request_type=request_type, player_id=player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyRemoveClientPacket

Bases: Packet

Remove player from a party

Source code in src/eolib/protocol/_generated/net/client/party_remove_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class PartyRemoveClientPacket(Packet):
    """
    Remove player from a party
    """
    _byte_size: int = 0
    _player_id: int

    def __init__(self, *, player_id: int):
        """
        Create a new instance of PartyRemoveClientPacket.

        Args:
            player_id (int): (Value range is 0-64008.)
        """
        self._player_id = player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def player_id(self) -> int:
        return self._player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Party

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PartyRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyRemoveClientPacket") -> None:
        """
        Serializes an instance of `PartyRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyRemoveClientPacket":
        """
        Deserializes an instance of `PartyRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            player_id = reader.get_short()
            result = PartyRemoveClientPacket(player_id=player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PartyRemoveClientPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

player_id: int property

__init__(*, player_id)

Create a new instance of PartyRemoveClientPacket.

Parameters:

Name Type Description Default
player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/party_remove_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, player_id: int):
    """
    Create a new instance of PartyRemoveClientPacket.

    Args:
        player_id (int): (Value range is 0-64008.)
    """
    self._player_id = player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/party_remove_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Party

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/party_remove_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/party_remove_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PartyRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/party_remove_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "PartyRemoveClientPacket") -> None:
    """
    Serializes an instance of `PartyRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PartyRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyRemoveClientPacket PartyRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/party_remove_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "PartyRemoveClientPacket":
    """
    Deserializes an instance of `PartyRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        player_id = reader.get_short()
        result = PartyRemoveClientPacket(player_id=player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyAcceptClientPacket

Bases: Packet

Accept party invite / join request

Source code in src/eolib/protocol/_generated/net/client/party_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
class PartyAcceptClientPacket(Packet):
    """
    Accept party invite / join request
    """
    _byte_size: int = 0
    _request_type: PartyRequestType
    _inviter_player_id: int

    def __init__(self, *, request_type: PartyRequestType, inviter_player_id: int):
        """
        Create a new instance of PartyAcceptClientPacket.

        Args:
            request_type (PartyRequestType): 
            inviter_player_id (int): (Value range is 0-64008.)
        """
        self._request_type = request_type
        self._inviter_player_id = inviter_player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def request_type(self) -> PartyRequestType:
        return self._request_type

    @property
    def inviter_player_id(self) -> int:
        return self._inviter_player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Party

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PartyAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyAcceptClientPacket") -> None:
        """
        Serializes an instance of `PartyAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._request_type is None:
                raise SerializationError("request_type must be provided.")
            writer.add_char(int(data._request_type))
            if data._inviter_player_id is None:
                raise SerializationError("inviter_player_id must be provided.")
            writer.add_short(data._inviter_player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyAcceptClientPacket":
        """
        Deserializes an instance of `PartyAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            request_type = PartyRequestType(reader.get_char())
            inviter_player_id = reader.get_short()
            result = PartyAcceptClientPacket(request_type=request_type, inviter_player_id=inviter_player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PartyAcceptClientPacket(byte_size={repr(self._byte_size)}, request_type={repr(self._request_type)}, inviter_player_id={repr(self._inviter_player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

request_type: PartyRequestType property

inviter_player_id: int property

__init__(*, request_type, inviter_player_id)

Create a new instance of PartyAcceptClientPacket.

Parameters:

Name Type Description Default
request_type PartyRequestType
required
inviter_player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/party_accept_client_packet.py
22
23
24
25
26
27
28
29
30
31
def __init__(self, *, request_type: PartyRequestType, inviter_player_id: int):
    """
    Create a new instance of PartyAcceptClientPacket.

    Args:
        request_type (PartyRequestType): 
        inviter_player_id (int): (Value range is 0-64008.)
    """
    self._request_type = request_type
    self._inviter_player_id = inviter_player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/party_accept_client_packet.py
51
52
53
54
55
56
57
58
59
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Party

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/party_accept_client_packet.py
61
62
63
64
65
66
67
68
69
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/party_accept_client_packet.py
71
72
73
74
75
76
77
78
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PartyAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/party_accept_client_packet.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "PartyAcceptClientPacket") -> None:
    """
    Serializes an instance of `PartyAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._request_type is None:
            raise SerializationError("request_type must be provided.")
        writer.add_char(int(data._request_type))
        if data._inviter_player_id is None:
            raise SerializationError("inviter_player_id must be provided.")
        writer.add_short(data._inviter_player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PartyAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyAcceptClientPacket PartyAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/party_accept_client_packet.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@staticmethod
def deserialize(reader: EoReader) -> "PartyAcceptClientPacket":
    """
    Deserializes an instance of `PartyAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        request_type = PartyRequestType(reader.get_char())
        inviter_player_id = reader.get_short()
        result = PartyAcceptClientPacket(request_type=request_type, inviter_player_id=inviter_player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PaperdollRequestClientPacket

Bases: Packet

Request for a player's paperdoll

Source code in src/eolib/protocol/_generated/net/client/paperdoll_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class PaperdollRequestClientPacket(Packet):
    """
    Request for a player's paperdoll
    """
    _byte_size: int = 0
    _player_id: int

    def __init__(self, *, player_id: int):
        """
        Create a new instance of PaperdollRequestClientPacket.

        Args:
            player_id (int): (Value range is 0-64008.)
        """
        self._player_id = player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def player_id(self) -> int:
        return self._player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Paperdoll

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PaperdollRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PaperdollRequestClientPacket") -> None:
        """
        Serializes an instance of `PaperdollRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PaperdollRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PaperdollRequestClientPacket":
        """
        Deserializes an instance of `PaperdollRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PaperdollRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            player_id = reader.get_short()
            result = PaperdollRequestClientPacket(player_id=player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PaperdollRequestClientPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

player_id: int property

__init__(*, player_id)

Create a new instance of PaperdollRequestClientPacket.

Parameters:

Name Type Description Default
player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_request_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, player_id: int):
    """
    Create a new instance of PaperdollRequestClientPacket.

    Args:
        player_id (int): (Value range is 0-64008.)
    """
    self._player_id = player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_request_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Paperdoll

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_request_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_request_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PaperdollRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PaperdollRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PaperdollRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_request_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "PaperdollRequestClientPacket") -> None:
    """
    Serializes an instance of `PaperdollRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PaperdollRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PaperdollRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PaperdollRequestClientPacket PaperdollRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_request_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "PaperdollRequestClientPacket":
    """
    Deserializes an instance of `PaperdollRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PaperdollRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        player_id = reader.get_short()
        result = PaperdollRequestClientPacket(player_id=player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PaperdollRemoveClientPacket

Bases: Packet

Unequipping an item

Source code in src/eolib/protocol/_generated/net/client/paperdoll_remove_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class PaperdollRemoveClientPacket(Packet):
    """
    Unequipping an item
    """
    _byte_size: int = 0
    _item_id: int
    _sub_loc: int

    def __init__(self, *, item_id: int, sub_loc: int):
        """
        Create a new instance of PaperdollRemoveClientPacket.

        Args:
            item_id (int): (Value range is 0-64008.)
            sub_loc (int): (Value range is 0-252.)
        """
        self._item_id = item_id
        self._sub_loc = sub_loc

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def item_id(self) -> int:
        return self._item_id

    @property
    def sub_loc(self) -> int:
        return self._sub_loc

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Paperdoll

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PaperdollRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PaperdollRemoveClientPacket") -> None:
        """
        Serializes an instance of `PaperdollRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PaperdollRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._item_id is None:
                raise SerializationError("item_id must be provided.")
            writer.add_short(data._item_id)
            if data._sub_loc is None:
                raise SerializationError("sub_loc must be provided.")
            writer.add_char(data._sub_loc)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PaperdollRemoveClientPacket":
        """
        Deserializes an instance of `PaperdollRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PaperdollRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            item_id = reader.get_short()
            sub_loc = reader.get_char()
            result = PaperdollRemoveClientPacket(item_id=item_id, sub_loc=sub_loc)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PaperdollRemoveClientPacket(byte_size={repr(self._byte_size)}, item_id={repr(self._item_id)}, sub_loc={repr(self._sub_loc)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

item_id: int property

sub_loc: int property

__init__(*, item_id, sub_loc)

Create a new instance of PaperdollRemoveClientPacket.

Parameters:

Name Type Description Default
item_id int

(Value range is 0-64008.)

required
sub_loc int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_remove_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, item_id: int, sub_loc: int):
    """
    Create a new instance of PaperdollRemoveClientPacket.

    Args:
        item_id (int): (Value range is 0-64008.)
        sub_loc (int): (Value range is 0-252.)
    """
    self._item_id = item_id
    self._sub_loc = sub_loc

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_remove_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Paperdoll

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_remove_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_remove_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PaperdollRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PaperdollRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PaperdollRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_remove_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "PaperdollRemoveClientPacket") -> None:
    """
    Serializes an instance of `PaperdollRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PaperdollRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._item_id is None:
            raise SerializationError("item_id must be provided.")
        writer.add_short(data._item_id)
        if data._sub_loc is None:
            raise SerializationError("sub_loc must be provided.")
        writer.add_char(data._sub_loc)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PaperdollRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PaperdollRemoveClientPacket PaperdollRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_remove_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "PaperdollRemoveClientPacket":
    """
    Deserializes an instance of `PaperdollRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PaperdollRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        item_id = reader.get_short()
        sub_loc = reader.get_char()
        result = PaperdollRemoveClientPacket(item_id=item_id, sub_loc=sub_loc)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PaperdollAddClientPacket

Bases: Packet

Equipping an item

Source code in src/eolib/protocol/_generated/net/client/paperdoll_add_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class PaperdollAddClientPacket(Packet):
    """
    Equipping an item
    """
    _byte_size: int = 0
    _item_id: int
    _sub_loc: int

    def __init__(self, *, item_id: int, sub_loc: int):
        """
        Create a new instance of PaperdollAddClientPacket.

        Args:
            item_id (int): (Value range is 0-64008.)
            sub_loc (int): (Value range is 0-252.)
        """
        self._item_id = item_id
        self._sub_loc = sub_loc

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def item_id(self) -> int:
        return self._item_id

    @property
    def sub_loc(self) -> int:
        return self._sub_loc

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Paperdoll

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Add

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        PaperdollAddClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PaperdollAddClientPacket") -> None:
        """
        Serializes an instance of `PaperdollAddClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PaperdollAddClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._item_id is None:
                raise SerializationError("item_id must be provided.")
            writer.add_short(data._item_id)
            if data._sub_loc is None:
                raise SerializationError("sub_loc must be provided.")
            writer.add_char(data._sub_loc)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "PaperdollAddClientPacket":
        """
        Deserializes an instance of `PaperdollAddClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PaperdollAddClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            item_id = reader.get_short()
            sub_loc = reader.get_char()
            result = PaperdollAddClientPacket(item_id=item_id, sub_loc=sub_loc)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PaperdollAddClientPacket(byte_size={repr(self._byte_size)}, item_id={repr(self._item_id)}, sub_loc={repr(self._sub_loc)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

item_id: int property

sub_loc: int property

__init__(*, item_id, sub_loc)

Create a new instance of PaperdollAddClientPacket.

Parameters:

Name Type Description Default
item_id int

(Value range is 0-64008.)

required
sub_loc int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_add_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, item_id: int, sub_loc: int):
    """
    Create a new instance of PaperdollAddClientPacket.

    Args:
        item_id (int): (Value range is 0-64008.)
        sub_loc (int): (Value range is 0-252.)
    """
    self._item_id = item_id
    self._sub_loc = sub_loc

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_add_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Paperdoll

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_add_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Add

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_add_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PaperdollAddClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PaperdollAddClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PaperdollAddClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/paperdoll_add_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "PaperdollAddClientPacket") -> None:
    """
    Serializes an instance of `PaperdollAddClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PaperdollAddClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._item_id is None:
            raise SerializationError("item_id must be provided.")
        writer.add_short(data._item_id)
        if data._sub_loc is None:
            raise SerializationError("sub_loc must be provided.")
        writer.add_char(data._sub_loc)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of PaperdollAddClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PaperdollAddClientPacket PaperdollAddClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/paperdoll_add_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "PaperdollAddClientPacket":
    """
    Deserializes an instance of `PaperdollAddClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PaperdollAddClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        item_id = reader.get_short()
        sub_loc = reader.get_char()
        result = PaperdollAddClientPacket(item_id=item_id, sub_loc=sub_loc)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcRangeRequestClientPacket

Bases: Packet

Requesting info about nearby NPCs

Source code in src/eolib/protocol/_generated/net/client/npc_range_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
class NpcRangeRequestClientPacket(Packet):
    """
    Requesting info about nearby NPCs
    """
    _byte_size: int = 0
    _npc_indexes_length: int
    _npc_indexes: tuple[int, ...]

    def __init__(self, *, npc_indexes: Iterable[int]):
        """
        Create a new instance of NpcRangeRequestClientPacket.

        Args:
            npc_indexes (Iterable[int]): (Length must be 252 or less.) (Element value range is 0-252.)
        """
        self._npc_indexes = tuple(npc_indexes)
        self._npc_indexes_length = len(self._npc_indexes)

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_indexes(self) -> tuple[int, ...]:
        return self._npc_indexes

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.NpcRange

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        NpcRangeRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcRangeRequestClientPacket") -> None:
        """
        Serializes an instance of `NpcRangeRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcRangeRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_indexes_length is None:
                raise SerializationError("npc_indexes_length must be provided.")
            writer.add_char(data._npc_indexes_length)
            writer.add_byte(255)
            if data._npc_indexes is None:
                raise SerializationError("npc_indexes must be provided.")
            if len(data._npc_indexes) > 252:
                raise SerializationError(f"Expected length of npc_indexes to be 252 or less, got {len(data._npc_indexes)}.")
            for i in range(data._npc_indexes_length):
                writer.add_char(data._npc_indexes[i])
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcRangeRequestClientPacket":
        """
        Deserializes an instance of `NpcRangeRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcRangeRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_indexes_length = reader.get_char()
            reader.get_byte()
            npc_indexes = []
            for i in range(npc_indexes_length):
                npc_indexes.append(reader.get_char())
            result = NpcRangeRequestClientPacket(npc_indexes=npc_indexes)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"NpcRangeRequestClientPacket(byte_size={repr(self._byte_size)}, npc_indexes={repr(self._npc_indexes)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_indexes: tuple[int, ...] property

__init__(*, npc_indexes)

Create a new instance of NpcRangeRequestClientPacket.

Parameters:

Name Type Description Default
npc_indexes Iterable[int]

(Length must be 252 or less.) (Element value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/npc_range_request_client_packet.py
23
24
25
26
27
28
29
30
31
def __init__(self, *, npc_indexes: Iterable[int]):
    """
    Create a new instance of NpcRangeRequestClientPacket.

    Args:
        npc_indexes (Iterable[int]): (Length must be 252 or less.) (Element value range is 0-252.)
    """
    self._npc_indexes = tuple(npc_indexes)
    self._npc_indexes_length = len(self._npc_indexes)

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/npc_range_request_client_packet.py
47
48
49
50
51
52
53
54
55
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.NpcRange

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/npc_range_request_client_packet.py
57
58
59
60
61
62
63
64
65
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/npc_range_request_client_packet.py
67
68
69
70
71
72
73
74
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    NpcRangeRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of NpcRangeRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcRangeRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/npc_range_request_client_packet.py
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "NpcRangeRequestClientPacket") -> None:
    """
    Serializes an instance of `NpcRangeRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcRangeRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_indexes_length is None:
            raise SerializationError("npc_indexes_length must be provided.")
        writer.add_char(data._npc_indexes_length)
        writer.add_byte(255)
        if data._npc_indexes is None:
            raise SerializationError("npc_indexes must be provided.")
        if len(data._npc_indexes) > 252:
            raise SerializationError(f"Expected length of npc_indexes to be 252 or less, got {len(data._npc_indexes)}.")
        for i in range(data._npc_indexes_length):
            writer.add_char(data._npc_indexes[i])
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of NpcRangeRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcRangeRequestClientPacket 'NpcRangeRequestClientPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/npc_range_request_client_packet.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
@staticmethod
def deserialize(reader: EoReader) -> "NpcRangeRequestClientPacket":
    """
    Deserializes an instance of `NpcRangeRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcRangeRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_indexes_length = reader.get_char()
        reader.get_byte()
        npc_indexes = []
        for i in range(npc_indexes_length):
            npc_indexes.append(reader.get_char())
        result = NpcRangeRequestClientPacket(npc_indexes=npc_indexes)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MessagePingClientPacket

Bases: Packet

ping command request

Source code in src/eolib/protocol/_generated/net/client/message_ping_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class MessagePingClientPacket(Packet):
    """
    #ping command request
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of MessagePingClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Message

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Ping

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        MessagePingClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MessagePingClientPacket") -> None:
        """
        Serializes an instance of `MessagePingClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MessagePingClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_short(2)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "MessagePingClientPacket":
        """
        Deserializes an instance of `MessagePingClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MessagePingClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_short()
            result = MessagePingClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"MessagePingClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of MessagePingClientPacket.

Source code in src/eolib/protocol/_generated/net/client/message_ping_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of MessagePingClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/message_ping_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Message

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/message_ping_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Ping

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/message_ping_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    MessagePingClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MessagePingClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MessagePingClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/message_ping_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "MessagePingClientPacket") -> None:
    """
    Serializes an instance of `MessagePingClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MessagePingClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_short(2)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of MessagePingClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MessagePingClientPacket MessagePingClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/message_ping_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "MessagePingClientPacket":
    """
    Deserializes an instance of `MessagePingClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MessagePingClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_short()
        result = MessagePingClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MarriageRequestType

Bases: IntEnum

Request type sent with MARRIAGE_REQUEST packet

Source code in src/eolib/protocol/_generated/net/client/marriage_request_type.py
 9
10
11
12
13
14
class MarriageRequestType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Request type sent with MARRIAGE_REQUEST packet
    """
    MarriageApproval = 1
    Divorce = 2

MarriageApproval = 1 class-attribute instance-attribute

Divorce = 2 class-attribute instance-attribute

MarriageRequestClientPacket

Bases: Packet

Requesting marriage approval

Source code in src/eolib/protocol/_generated/net/client/marriage_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
class MarriageRequestClientPacket(Packet):
    """
    Requesting marriage approval
    """
    _byte_size: int = 0
    _request_type: MarriageRequestType
    _session_id: int
    _name: str

    def __init__(self, *, request_type: MarriageRequestType, session_id: int, name: str):
        """
        Create a new instance of MarriageRequestClientPacket.

        Args:
            request_type (MarriageRequestType): 
            session_id (int): (Value range is 0-4097152080.)
            name (str): 
        """
        self._request_type = request_type
        self._session_id = session_id
        self._name = name

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def request_type(self) -> MarriageRequestType:
        return self._request_type

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def name(self) -> str:
        return self._name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Marriage

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        MarriageRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MarriageRequestClientPacket") -> None:
        """
        Serializes an instance of `MarriageRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MarriageRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._request_type is None:
                raise SerializationError("request_type must be provided.")
            writer.add_char(int(data._request_type))
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            writer.add_byte(0xFF)
            if data._name is None:
                raise SerializationError("name must be provided.")
            writer.add_string(data._name)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "MarriageRequestClientPacket":
        """
        Deserializes an instance of `MarriageRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MarriageRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            request_type = MarriageRequestType(reader.get_char())
            session_id = reader.get_int()
            reader.next_chunk()
            name = reader.get_string()
            reader.chunked_reading_mode = False
            result = MarriageRequestClientPacket(request_type=request_type, session_id=session_id, name=name)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"MarriageRequestClientPacket(byte_size={repr(self._byte_size)}, request_type={repr(self._request_type)}, session_id={repr(self._session_id)}, name={repr(self._name)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

request_type: MarriageRequestType property

session_id: int property

name: str property

__init__(*, request_type, session_id, name)

Create a new instance of MarriageRequestClientPacket.

Parameters:

Name Type Description Default
request_type MarriageRequestType
required
session_id int

(Value range is 0-4097152080.)

required
name str
required
Source code in src/eolib/protocol/_generated/net/client/marriage_request_client_packet.py
23
24
25
26
27
28
29
30
31
32
33
34
def __init__(self, *, request_type: MarriageRequestType, session_id: int, name: str):
    """
    Create a new instance of MarriageRequestClientPacket.

    Args:
        request_type (MarriageRequestType): 
        session_id (int): (Value range is 0-4097152080.)
        name (str): 
    """
    self._request_type = request_type
    self._session_id = session_id
    self._name = name

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/marriage_request_client_packet.py
58
59
60
61
62
63
64
65
66
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Marriage

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/marriage_request_client_packet.py
68
69
70
71
72
73
74
75
76
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/marriage_request_client_packet.py
78
79
80
81
82
83
84
85
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    MarriageRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MarriageRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MarriageRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/marriage_request_client_packet.py
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
@staticmethod
def serialize(writer: EoWriter, data: "MarriageRequestClientPacket") -> None:
    """
    Serializes an instance of `MarriageRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MarriageRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._request_type is None:
            raise SerializationError("request_type must be provided.")
        writer.add_char(int(data._request_type))
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        writer.add_byte(0xFF)
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of MarriageRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MarriageRequestClientPacket MarriageRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/marriage_request_client_packet.py
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
@staticmethod
def deserialize(reader: EoReader) -> "MarriageRequestClientPacket":
    """
    Deserializes an instance of `MarriageRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MarriageRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        request_type = MarriageRequestType(reader.get_char())
        session_id = reader.get_int()
        reader.next_chunk()
        name = reader.get_string()
        reader.chunked_reading_mode = False
        result = MarriageRequestClientPacket(request_type=request_type, session_id=session_id, name=name)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MarriageOpenClientPacket

Bases: Packet

Talking to a law NPC

Source code in src/eolib/protocol/_generated/net/client/marriage_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class MarriageOpenClientPacket(Packet):
    """
    Talking to a law NPC
    """
    _byte_size: int = 0
    _npc_index: int

    def __init__(self, *, npc_index: int):
        """
        Create a new instance of MarriageOpenClientPacket.

        Args:
            npc_index (int): (Value range is 0-64008.)
        """
        self._npc_index = npc_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Marriage

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        MarriageOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MarriageOpenClientPacket") -> None:
        """
        Serializes an instance of `MarriageOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MarriageOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "MarriageOpenClientPacket":
        """
        Deserializes an instance of `MarriageOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MarriageOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_short()
            result = MarriageOpenClientPacket(npc_index=npc_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"MarriageOpenClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

__init__(*, npc_index)

Create a new instance of MarriageOpenClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/marriage_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, npc_index: int):
    """
    Create a new instance of MarriageOpenClientPacket.

    Args:
        npc_index (int): (Value range is 0-64008.)
    """
    self._npc_index = npc_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/marriage_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Marriage

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/marriage_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/marriage_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    MarriageOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MarriageOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MarriageOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/marriage_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "MarriageOpenClientPacket") -> None:
    """
    Serializes an instance of `MarriageOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MarriageOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of MarriageOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MarriageOpenClientPacket MarriageOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/marriage_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "MarriageOpenClientPacket":
    """
    Deserializes an instance of `MarriageOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MarriageOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_short()
        result = MarriageOpenClientPacket(npc_index=npc_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LoginRequestClientPacket

Bases: Packet

Login request

Source code in src/eolib/protocol/_generated/net/client/login_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
class LoginRequestClientPacket(Packet):
    """
    Login request
    """
    _byte_size: int = 0
    _username: str
    _password: str

    def __init__(self, *, username: str, password: str):
        """
        Create a new instance of LoginRequestClientPacket.

        Args:
            username (str): 
            password (str): 
        """
        self._username = username
        self._password = password

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def username(self) -> str:
        return self._username

    @property
    def password(self) -> str:
        return self._password

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Login

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        LoginRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LoginRequestClientPacket") -> None:
        """
        Serializes an instance of `LoginRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LoginRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._username is None:
                raise SerializationError("username must be provided.")
            writer.add_string(data._username)
            writer.add_byte(0xFF)
            if data._password is None:
                raise SerializationError("password must be provided.")
            writer.add_string(data._password)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "LoginRequestClientPacket":
        """
        Deserializes an instance of `LoginRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LoginRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            username = reader.get_string()
            reader.next_chunk()
            password = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = LoginRequestClientPacket(username=username, password=password)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"LoginRequestClientPacket(byte_size={repr(self._byte_size)}, username={repr(self._username)}, password={repr(self._password)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

username: str property

password: str property

__init__(*, username, password)

Create a new instance of LoginRequestClientPacket.

Parameters:

Name Type Description Default
username str
required
password str
required
Source code in src/eolib/protocol/_generated/net/client/login_request_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, username: str, password: str):
    """
    Create a new instance of LoginRequestClientPacket.

    Args:
        username (str): 
        password (str): 
    """
    self._username = username
    self._password = password

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/login_request_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Login

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/login_request_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/login_request_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LoginRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LoginRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LoginRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/login_request_client_packet.py
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@staticmethod
def serialize(writer: EoWriter, data: "LoginRequestClientPacket") -> None:
    """
    Serializes an instance of `LoginRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LoginRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._username is None:
            raise SerializationError("username must be provided.")
        writer.add_string(data._username)
        writer.add_byte(0xFF)
        if data._password is None:
            raise SerializationError("password must be provided.")
        writer.add_string(data._password)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of LoginRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LoginRequestClientPacket LoginRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/login_request_client_packet.py
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
@staticmethod
def deserialize(reader: EoReader) -> "LoginRequestClientPacket":
    """
    Deserializes an instance of `LoginRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LoginRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        username = reader.get_string()
        reader.next_chunk()
        password = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = LoginRequestClientPacket(username=username, password=password)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LockerTakeClientPacket

Bases: Packet

Taking an item from a bank locker

Source code in src/eolib/protocol/_generated/net/client/locker_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
class LockerTakeClientPacket(Packet):
    """
    Taking an item from a bank locker
    """
    _byte_size: int = 0
    _locker_coords: Coords
    _take_item_id: int

    def __init__(self, *, locker_coords: Coords, take_item_id: int):
        """
        Create a new instance of LockerTakeClientPacket.

        Args:
            locker_coords (Coords): 
            take_item_id (int): (Value range is 0-64008.)
        """
        self._locker_coords = locker_coords
        self._take_item_id = take_item_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def locker_coords(self) -> Coords:
        return self._locker_coords

    @property
    def take_item_id(self) -> int:
        return self._take_item_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Locker

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        LockerTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerTakeClientPacket") -> None:
        """
        Serializes an instance of `LockerTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._locker_coords is None:
                raise SerializationError("locker_coords must be provided.")
            Coords.serialize(writer, data._locker_coords)
            if data._take_item_id is None:
                raise SerializationError("take_item_id must be provided.")
            writer.add_short(data._take_item_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerTakeClientPacket":
        """
        Deserializes an instance of `LockerTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            locker_coords = Coords.deserialize(reader)
            take_item_id = reader.get_short()
            result = LockerTakeClientPacket(locker_coords=locker_coords, take_item_id=take_item_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"LockerTakeClientPacket(byte_size={repr(self._byte_size)}, locker_coords={repr(self._locker_coords)}, take_item_id={repr(self._take_item_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

locker_coords: Coords property

take_item_id: int property

__init__(*, locker_coords, take_item_id)

Create a new instance of LockerTakeClientPacket.

Parameters:

Name Type Description Default
locker_coords Coords
required
take_item_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/locker_take_client_packet.py
22
23
24
25
26
27
28
29
30
31
def __init__(self, *, locker_coords: Coords, take_item_id: int):
    """
    Create a new instance of LockerTakeClientPacket.

    Args:
        locker_coords (Coords): 
        take_item_id (int): (Value range is 0-64008.)
    """
    self._locker_coords = locker_coords
    self._take_item_id = take_item_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/locker_take_client_packet.py
51
52
53
54
55
56
57
58
59
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Locker

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/locker_take_client_packet.py
61
62
63
64
65
66
67
68
69
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/locker_take_client_packet.py
71
72
73
74
75
76
77
78
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LockerTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/locker_take_client_packet.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "LockerTakeClientPacket") -> None:
    """
    Serializes an instance of `LockerTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._locker_coords is None:
            raise SerializationError("locker_coords must be provided.")
        Coords.serialize(writer, data._locker_coords)
        if data._take_item_id is None:
            raise SerializationError("take_item_id must be provided.")
        writer.add_short(data._take_item_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of LockerTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerTakeClientPacket LockerTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/locker_take_client_packet.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@staticmethod
def deserialize(reader: EoReader) -> "LockerTakeClientPacket":
    """
    Deserializes an instance of `LockerTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        locker_coords = Coords.deserialize(reader)
        take_item_id = reader.get_short()
        result = LockerTakeClientPacket(locker_coords=locker_coords, take_item_id=take_item_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LockerOpenClientPacket

Bases: Packet

Opening a bank locker

Source code in src/eolib/protocol/_generated/net/client/locker_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class LockerOpenClientPacket(Packet):
    """
    Opening a bank locker
    """
    _byte_size: int = 0
    _locker_coords: Coords

    def __init__(self, *, locker_coords: Coords):
        """
        Create a new instance of LockerOpenClientPacket.

        Args:
            locker_coords (Coords): 
        """
        self._locker_coords = locker_coords

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def locker_coords(self) -> Coords:
        return self._locker_coords

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Locker

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        LockerOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerOpenClientPacket") -> None:
        """
        Serializes an instance of `LockerOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._locker_coords is None:
                raise SerializationError("locker_coords must be provided.")
            Coords.serialize(writer, data._locker_coords)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerOpenClientPacket":
        """
        Deserializes an instance of `LockerOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            locker_coords = Coords.deserialize(reader)
            result = LockerOpenClientPacket(locker_coords=locker_coords)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"LockerOpenClientPacket(byte_size={repr(self._byte_size)}, locker_coords={repr(self._locker_coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

locker_coords: Coords property

__init__(*, locker_coords)

Create a new instance of LockerOpenClientPacket.

Parameters:

Name Type Description Default
locker_coords Coords
required
Source code in src/eolib/protocol/_generated/net/client/locker_open_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, locker_coords: Coords):
    """
    Create a new instance of LockerOpenClientPacket.

    Args:
        locker_coords (Coords): 
    """
    self._locker_coords = locker_coords

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/locker_open_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Locker

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/locker_open_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/locker_open_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LockerOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/locker_open_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "LockerOpenClientPacket") -> None:
    """
    Serializes an instance of `LockerOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._locker_coords is None:
            raise SerializationError("locker_coords must be provided.")
        Coords.serialize(writer, data._locker_coords)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of LockerOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerOpenClientPacket LockerOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/locker_open_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "LockerOpenClientPacket":
    """
    Deserializes an instance of `LockerOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        locker_coords = Coords.deserialize(reader)
        result = LockerOpenClientPacket(locker_coords=locker_coords)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LockerBuyClientPacket

Bases: Packet

Buying a locker space upgrade from a banker NPC

Source code in src/eolib/protocol/_generated/net/client/locker_buy_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class LockerBuyClientPacket(Packet):
    """
    Buying a locker space upgrade from a banker NPC
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of LockerBuyClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Locker

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Buy

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        LockerBuyClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerBuyClientPacket") -> None:
        """
        Serializes an instance of `LockerBuyClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerBuyClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_char(1)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerBuyClientPacket":
        """
        Deserializes an instance of `LockerBuyClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerBuyClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            result = LockerBuyClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"LockerBuyClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of LockerBuyClientPacket.

Source code in src/eolib/protocol/_generated/net/client/locker_buy_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of LockerBuyClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/locker_buy_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Locker

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/locker_buy_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Buy

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/locker_buy_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LockerBuyClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerBuyClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerBuyClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/locker_buy_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "LockerBuyClientPacket") -> None:
    """
    Serializes an instance of `LockerBuyClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerBuyClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_char(1)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of LockerBuyClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerBuyClientPacket LockerBuyClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/locker_buy_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "LockerBuyClientPacket":
    """
    Deserializes an instance of `LockerBuyClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerBuyClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        result = LockerBuyClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ThreeItem

An item reference with a 3-byte amount. Used for shops, lockers, and various item transfers.

Source code in src/eolib/protocol/_generated/net/three_item.py
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
83
84
85
86
87
88
89
90
91
class ThreeItem:
    """
    An item reference with a 3-byte amount.
    Used for shops, lockers, and various item transfers.
    """
    _byte_size: int = 0
    _id: int
    _amount: int

    def __init__(self, *, id: int, amount: int):
        """
        Create a new instance of ThreeItem.

        Args:
            id (int): (Value range is 0-64008.)
            amount (int): (Value range is 0-16194276.)
        """
        self._id = id
        self._amount = amount

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def id(self) -> int:
        return self._id

    @property
    def amount(self) -> int:
        return self._amount

    @staticmethod
    def serialize(writer: EoWriter, data: "ThreeItem") -> None:
        """
        Serializes an instance of `ThreeItem` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ThreeItem): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._id is None:
                raise SerializationError("id must be provided.")
            writer.add_short(data._id)
            if data._amount is None:
                raise SerializationError("amount must be provided.")
            writer.add_three(data._amount)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ThreeItem":
        """
        Deserializes an instance of `ThreeItem` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ThreeItem: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            id = reader.get_short()
            amount = reader.get_three()
            result = ThreeItem(id=id, amount=amount)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ThreeItem(byte_size={repr(self._byte_size)}, id={repr(self._id)}, amount={repr(self._amount)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

id: int property

amount: int property

__init__(*, id, amount)

Create a new instance of ThreeItem.

Parameters:

Name Type Description Default
id int

(Value range is 0-64008.)

required
amount int

(Value range is 0-16194276.)

required
Source code in src/eolib/protocol/_generated/net/three_item.py
19
20
21
22
23
24
25
26
27
28
def __init__(self, *, id: int, amount: int):
    """
    Create a new instance of ThreeItem.

    Args:
        id (int): (Value range is 0-64008.)
        amount (int): (Value range is 0-16194276.)
    """
    self._id = id
    self._amount = amount

serialize(writer, data) staticmethod

Serializes an instance of ThreeItem to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ThreeItem

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/three_item.py
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@staticmethod
def serialize(writer: EoWriter, data: "ThreeItem") -> None:
    """
    Serializes an instance of `ThreeItem` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ThreeItem): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._id is None:
            raise SerializationError("id must be provided.")
        writer.add_short(data._id)
        if data._amount is None:
            raise SerializationError("amount must be provided.")
        writer.add_three(data._amount)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ThreeItem from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ThreeItem ThreeItem

The data to serialize.

Source code in src/eolib/protocol/_generated/net/three_item.py
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def deserialize(reader: EoReader) -> "ThreeItem":
    """
    Deserializes an instance of `ThreeItem` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ThreeItem: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        id = reader.get_short()
        amount = reader.get_three()
        result = ThreeItem(id=id, amount=amount)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LockerAddClientPacket

Bases: Packet

Adding an item to a bank locker

Source code in src/eolib/protocol/_generated/net/client/locker_add_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
class LockerAddClientPacket(Packet):
    """
    Adding an item to a bank locker
    """
    _byte_size: int = 0
    _locker_coords: Coords
    _deposit_item: ThreeItem

    def __init__(self, *, locker_coords: Coords, deposit_item: ThreeItem):
        """
        Create a new instance of LockerAddClientPacket.

        Args:
            locker_coords (Coords): 
            deposit_item (ThreeItem): 
        """
        self._locker_coords = locker_coords
        self._deposit_item = deposit_item

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def locker_coords(self) -> Coords:
        return self._locker_coords

    @property
    def deposit_item(self) -> ThreeItem:
        return self._deposit_item

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Locker

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Add

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        LockerAddClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerAddClientPacket") -> None:
        """
        Serializes an instance of `LockerAddClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerAddClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._locker_coords is None:
                raise SerializationError("locker_coords must be provided.")
            Coords.serialize(writer, data._locker_coords)
            if data._deposit_item is None:
                raise SerializationError("deposit_item must be provided.")
            ThreeItem.serialize(writer, data._deposit_item)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerAddClientPacket":
        """
        Deserializes an instance of `LockerAddClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerAddClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            locker_coords = Coords.deserialize(reader)
            deposit_item = ThreeItem.deserialize(reader)
            result = LockerAddClientPacket(locker_coords=locker_coords, deposit_item=deposit_item)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"LockerAddClientPacket(byte_size={repr(self._byte_size)}, locker_coords={repr(self._locker_coords)}, deposit_item={repr(self._deposit_item)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

locker_coords: Coords property

deposit_item: ThreeItem property

__init__(*, locker_coords, deposit_item)

Create a new instance of LockerAddClientPacket.

Parameters:

Name Type Description Default
locker_coords Coords
required
deposit_item ThreeItem
required
Source code in src/eolib/protocol/_generated/net/client/locker_add_client_packet.py
23
24
25
26
27
28
29
30
31
32
def __init__(self, *, locker_coords: Coords, deposit_item: ThreeItem):
    """
    Create a new instance of LockerAddClientPacket.

    Args:
        locker_coords (Coords): 
        deposit_item (ThreeItem): 
    """
    self._locker_coords = locker_coords
    self._deposit_item = deposit_item

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/locker_add_client_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Locker

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/locker_add_client_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Add

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/locker_add_client_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LockerAddClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerAddClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerAddClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/locker_add_client_packet.py
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "LockerAddClientPacket") -> None:
    """
    Serializes an instance of `LockerAddClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerAddClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._locker_coords is None:
            raise SerializationError("locker_coords must be provided.")
        Coords.serialize(writer, data._locker_coords)
        if data._deposit_item is None:
            raise SerializationError("deposit_item must be provided.")
        ThreeItem.serialize(writer, data._deposit_item)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of LockerAddClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerAddClientPacket LockerAddClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/locker_add_client_packet.py
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
@staticmethod
def deserialize(reader: EoReader) -> "LockerAddClientPacket":
    """
    Deserializes an instance of `LockerAddClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerAddClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        locker_coords = Coords.deserialize(reader)
        deposit_item = ThreeItem.deserialize(reader)
        result = LockerAddClientPacket(locker_coords=locker_coords, deposit_item=deposit_item)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

JukeboxUseClientPacket

Bases: Packet

Playing a note with the bard skill

Source code in src/eolib/protocol/_generated/net/client/jukebox_use_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class JukeboxUseClientPacket(Packet):
    """
    Playing a note with the bard skill
    """
    _byte_size: int = 0
    _instrument_id: int
    _note_id: int

    def __init__(self, *, instrument_id: int, note_id: int):
        """
        Create a new instance of JukeboxUseClientPacket.

        Args:
            instrument_id (int): (Value range is 0-252.)
            note_id (int): (Value range is 0-252.)
        """
        self._instrument_id = instrument_id
        self._note_id = note_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def instrument_id(self) -> int:
        return self._instrument_id

    @property
    def note_id(self) -> int:
        return self._note_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Jukebox

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Use

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        JukeboxUseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxUseClientPacket") -> None:
        """
        Serializes an instance of `JukeboxUseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxUseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._instrument_id is None:
                raise SerializationError("instrument_id must be provided.")
            writer.add_char(data._instrument_id)
            if data._note_id is None:
                raise SerializationError("note_id must be provided.")
            writer.add_char(data._note_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "JukeboxUseClientPacket":
        """
        Deserializes an instance of `JukeboxUseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxUseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            instrument_id = reader.get_char()
            note_id = reader.get_char()
            result = JukeboxUseClientPacket(instrument_id=instrument_id, note_id=note_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"JukeboxUseClientPacket(byte_size={repr(self._byte_size)}, instrument_id={repr(self._instrument_id)}, note_id={repr(self._note_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

instrument_id: int property

note_id: int property

__init__(*, instrument_id, note_id)

Create a new instance of JukeboxUseClientPacket.

Parameters:

Name Type Description Default
instrument_id int

(Value range is 0-252.)

required
note_id int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/client/jukebox_use_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, instrument_id: int, note_id: int):
    """
    Create a new instance of JukeboxUseClientPacket.

    Args:
        instrument_id (int): (Value range is 0-252.)
        note_id (int): (Value range is 0-252.)
    """
    self._instrument_id = instrument_id
    self._note_id = note_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/jukebox_use_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Jukebox

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/jukebox_use_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Use

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/jukebox_use_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    JukeboxUseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxUseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxUseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/jukebox_use_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxUseClientPacket") -> None:
    """
    Serializes an instance of `JukeboxUseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxUseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._instrument_id is None:
            raise SerializationError("instrument_id must be provided.")
        writer.add_char(data._instrument_id)
        if data._note_id is None:
            raise SerializationError("note_id must be provided.")
        writer.add_char(data._note_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of JukeboxUseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxUseClientPacket JukeboxUseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/jukebox_use_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "JukeboxUseClientPacket":
    """
    Deserializes an instance of `JukeboxUseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxUseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        instrument_id = reader.get_char()
        note_id = reader.get_char()
        result = JukeboxUseClientPacket(instrument_id=instrument_id, note_id=note_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

JukeboxOpenClientPacket

Bases: Packet

Opening the jukebox listing

Source code in src/eolib/protocol/_generated/net/client/jukebox_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class JukeboxOpenClientPacket(Packet):
    """
    Opening the jukebox listing
    """
    _byte_size: int = 0
    _coords: Coords

    def __init__(self, *, coords: Coords):
        """
        Create a new instance of JukeboxOpenClientPacket.

        Args:
            coords (Coords): 
        """
        self._coords = coords

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def coords(self) -> Coords:
        return self._coords

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Jukebox

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        JukeboxOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxOpenClientPacket") -> None:
        """
        Serializes an instance of `JukeboxOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            Coords.serialize(writer, data._coords)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "JukeboxOpenClientPacket":
        """
        Deserializes an instance of `JukeboxOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            coords = Coords.deserialize(reader)
            result = JukeboxOpenClientPacket(coords=coords)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"JukeboxOpenClientPacket(byte_size={repr(self._byte_size)}, coords={repr(self._coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

coords: Coords property

__init__(*, coords)

Create a new instance of JukeboxOpenClientPacket.

Parameters:

Name Type Description Default
coords Coords
required
Source code in src/eolib/protocol/_generated/net/client/jukebox_open_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, coords: Coords):
    """
    Create a new instance of JukeboxOpenClientPacket.

    Args:
        coords (Coords): 
    """
    self._coords = coords

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/jukebox_open_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Jukebox

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/jukebox_open_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/jukebox_open_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    JukeboxOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/jukebox_open_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxOpenClientPacket") -> None:
    """
    Serializes an instance of `JukeboxOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of JukeboxOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxOpenClientPacket JukeboxOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/jukebox_open_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "JukeboxOpenClientPacket":
    """
    Deserializes an instance of `JukeboxOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        coords = Coords.deserialize(reader)
        result = JukeboxOpenClientPacket(coords=coords)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

JukeboxMsgClientPacket

Bases: Packet

Requesting a song on a jukebox

Source code in src/eolib/protocol/_generated/net/client/jukebox_msg_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
class JukeboxMsgClientPacket(Packet):
    """
    Requesting a song on a jukebox
    """
    _byte_size: int = 0
    _track_id: int

    def __init__(self, *, track_id: int):
        """
        Create a new instance of JukeboxMsgClientPacket.

        Args:
            track_id (int): This value is 0-indexed (Value range is 0-64008.)
        """
        self._track_id = track_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def track_id(self) -> int:
        """
        This value is 0-indexed
        """
        return self._track_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Jukebox

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Msg

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        JukeboxMsgClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxMsgClientPacket") -> None:
        """
        Serializes an instance of `JukeboxMsgClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxMsgClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_char(0)
            writer.add_char(0)
            if data._track_id is None:
                raise SerializationError("track_id must be provided.")
            writer.add_short(data._track_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "JukeboxMsgClientPacket":
        """
        Deserializes an instance of `JukeboxMsgClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxMsgClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            reader.get_char()
            track_id = reader.get_short()
            result = JukeboxMsgClientPacket(track_id=track_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"JukeboxMsgClientPacket(byte_size={repr(self._byte_size)}, track_id={repr(self._track_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

track_id: int property

This value is 0-indexed

__init__(*, track_id)

Create a new instance of JukeboxMsgClientPacket.

Parameters:

Name Type Description Default
track_id int

This value is 0-indexed (Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/jukebox_msg_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, track_id: int):
    """
    Create a new instance of JukeboxMsgClientPacket.

    Args:
        track_id (int): This value is 0-indexed (Value range is 0-64008.)
    """
    self._track_id = track_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/jukebox_msg_client_packet.py
46
47
48
49
50
51
52
53
54
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Jukebox

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/jukebox_msg_client_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Msg

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/jukebox_msg_client_packet.py
66
67
68
69
70
71
72
73
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    JukeboxMsgClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxMsgClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxMsgClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/jukebox_msg_client_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxMsgClientPacket") -> None:
    """
    Serializes an instance of `JukeboxMsgClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxMsgClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_char(0)
        writer.add_char(0)
        if data._track_id is None:
            raise SerializationError("track_id must be provided.")
        writer.add_short(data._track_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of JukeboxMsgClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxMsgClientPacket JukeboxMsgClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/jukebox_msg_client_packet.py
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@staticmethod
def deserialize(reader: EoReader) -> "JukeboxMsgClientPacket":
    """
    Deserializes an instance of `JukeboxMsgClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxMsgClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        reader.get_char()
        track_id = reader.get_short()
        result = JukeboxMsgClientPacket(track_id=track_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemUseClientPacket

Bases: Packet

Using an item

Source code in src/eolib/protocol/_generated/net/client/item_use_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class ItemUseClientPacket(Packet):
    """
    Using an item
    """
    _byte_size: int = 0
    _item_id: int

    def __init__(self, *, item_id: int):
        """
        Create a new instance of ItemUseClientPacket.

        Args:
            item_id (int): (Value range is 0-64008.)
        """
        self._item_id = item_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def item_id(self) -> int:
        return self._item_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Item

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Use

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ItemUseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemUseClientPacket") -> None:
        """
        Serializes an instance of `ItemUseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemUseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._item_id is None:
                raise SerializationError("item_id must be provided.")
            writer.add_short(data._item_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemUseClientPacket":
        """
        Deserializes an instance of `ItemUseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemUseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            item_id = reader.get_short()
            result = ItemUseClientPacket(item_id=item_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ItemUseClientPacket(byte_size={repr(self._byte_size)}, item_id={repr(self._item_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

item_id: int property

__init__(*, item_id)

Create a new instance of ItemUseClientPacket.

Parameters:

Name Type Description Default
item_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/item_use_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, item_id: int):
    """
    Create a new instance of ItemUseClientPacket.

    Args:
        item_id (int): (Value range is 0-64008.)
    """
    self._item_id = item_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/item_use_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Item

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/item_use_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Use

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/item_use_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ItemUseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemUseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemUseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/item_use_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "ItemUseClientPacket") -> None:
    """
    Serializes an instance of `ItemUseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemUseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._item_id is None:
            raise SerializationError("item_id must be provided.")
        writer.add_short(data._item_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ItemUseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemUseClientPacket ItemUseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/item_use_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "ItemUseClientPacket":
    """
    Deserializes an instance of `ItemUseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemUseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        item_id = reader.get_short()
        result = ItemUseClientPacket(item_id=item_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemJunkClientPacket

Bases: Packet

Junking items

Source code in src/eolib/protocol/_generated/net/client/item_junk_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class ItemJunkClientPacket(Packet):
    """
    Junking items
    """
    _byte_size: int = 0
    _item: Item

    def __init__(self, *, item: Item):
        """
        Create a new instance of ItemJunkClientPacket.

        Args:
            item (Item): 
        """
        self._item = item

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def item(self) -> Item:
        return self._item

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Item

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Junk

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ItemJunkClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemJunkClientPacket") -> None:
        """
        Serializes an instance of `ItemJunkClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemJunkClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._item is None:
                raise SerializationError("item must be provided.")
            Item.serialize(writer, data._item)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemJunkClientPacket":
        """
        Deserializes an instance of `ItemJunkClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemJunkClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            item = Item.deserialize(reader)
            result = ItemJunkClientPacket(item=item)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ItemJunkClientPacket(byte_size={repr(self._byte_size)}, item={repr(self._item)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

item: Item property

__init__(*, item)

Create a new instance of ItemJunkClientPacket.

Parameters:

Name Type Description Default
item Item
required
Source code in src/eolib/protocol/_generated/net/client/item_junk_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, item: Item):
    """
    Create a new instance of ItemJunkClientPacket.

    Args:
        item (Item): 
    """
    self._item = item

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/item_junk_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Item

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/item_junk_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Junk

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/item_junk_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ItemJunkClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemJunkClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemJunkClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/item_junk_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "ItemJunkClientPacket") -> None:
    """
    Serializes an instance of `ItemJunkClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemJunkClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._item is None:
            raise SerializationError("item must be provided.")
        Item.serialize(writer, data._item)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ItemJunkClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemJunkClientPacket ItemJunkClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/item_junk_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "ItemJunkClientPacket":
    """
    Deserializes an instance of `ItemJunkClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemJunkClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        item = Item.deserialize(reader)
        result = ItemJunkClientPacket(item=item)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemGetClientPacket

Bases: Packet

Taking items from the ground

Source code in src/eolib/protocol/_generated/net/client/item_get_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class ItemGetClientPacket(Packet):
    """
    Taking items from the ground
    """
    _byte_size: int = 0
    _item_index: int

    def __init__(self, *, item_index: int):
        """
        Create a new instance of ItemGetClientPacket.

        Args:
            item_index (int): (Value range is 0-64008.)
        """
        self._item_index = item_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def item_index(self) -> int:
        return self._item_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Item

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Get

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ItemGetClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemGetClientPacket") -> None:
        """
        Serializes an instance of `ItemGetClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemGetClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._item_index is None:
                raise SerializationError("item_index must be provided.")
            writer.add_short(data._item_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemGetClientPacket":
        """
        Deserializes an instance of `ItemGetClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemGetClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            item_index = reader.get_short()
            result = ItemGetClientPacket(item_index=item_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ItemGetClientPacket(byte_size={repr(self._byte_size)}, item_index={repr(self._item_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

item_index: int property

__init__(*, item_index)

Create a new instance of ItemGetClientPacket.

Parameters:

Name Type Description Default
item_index int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/item_get_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, item_index: int):
    """
    Create a new instance of ItemGetClientPacket.

    Args:
        item_index (int): (Value range is 0-64008.)
    """
    self._item_index = item_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/item_get_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Item

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/item_get_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Get

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/item_get_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ItemGetClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemGetClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemGetClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/item_get_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "ItemGetClientPacket") -> None:
    """
    Serializes an instance of `ItemGetClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemGetClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._item_index is None:
            raise SerializationError("item_index must be provided.")
        writer.add_short(data._item_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ItemGetClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemGetClientPacket ItemGetClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/item_get_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "ItemGetClientPacket":
    """
    Deserializes an instance of `ItemGetClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemGetClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        item_index = reader.get_short()
        result = ItemGetClientPacket(item_index=item_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ByteCoords

Map coordinates with raw 1-byte values

Source code in src/eolib/protocol/_generated/net/client/byte_coords.py
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
83
84
85
86
87
88
89
90
class ByteCoords:
    """
    Map coordinates with raw 1-byte values
    """
    _byte_size: int = 0
    _x: int
    _y: int

    def __init__(self, *, x: int, y: int):
        """
        Create a new instance of ByteCoords.

        Args:
            x (int): (Value range is 0-255.)
            y (int): (Value range is 0-255.)
        """
        self._x = x
        self._y = y

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def x(self) -> int:
        return self._x

    @property
    def y(self) -> int:
        return self._y

    @staticmethod
    def serialize(writer: EoWriter, data: "ByteCoords") -> None:
        """
        Serializes an instance of `ByteCoords` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ByteCoords): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._x is None:
                raise SerializationError("x must be provided.")
            writer.add_byte(data._x)
            if data._y is None:
                raise SerializationError("y must be provided.")
            writer.add_byte(data._y)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ByteCoords":
        """
        Deserializes an instance of `ByteCoords` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ByteCoords: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            x = reader.get_byte()
            y = reader.get_byte()
            result = ByteCoords(x=x, y=y)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ByteCoords(byte_size={repr(self._byte_size)}, x={repr(self._x)}, y={repr(self._y)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

x: int property

y: int property

__init__(*, x, y)

Create a new instance of ByteCoords.

Parameters:

Name Type Description Default
x int

(Value range is 0-255.)

required
y int

(Value range is 0-255.)

required
Source code in src/eolib/protocol/_generated/net/client/byte_coords.py
18
19
20
21
22
23
24
25
26
27
def __init__(self, *, x: int, y: int):
    """
    Create a new instance of ByteCoords.

    Args:
        x (int): (Value range is 0-255.)
        y (int): (Value range is 0-255.)
    """
    self._x = x
    self._y = y

serialize(writer, data) staticmethod

Serializes an instance of ByteCoords to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ByteCoords

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/byte_coords.py
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@staticmethod
def serialize(writer: EoWriter, data: "ByteCoords") -> None:
    """
    Serializes an instance of `ByteCoords` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ByteCoords): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._x is None:
            raise SerializationError("x must be provided.")
        writer.add_byte(data._x)
        if data._y is None:
            raise SerializationError("y must be provided.")
        writer.add_byte(data._y)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ByteCoords from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ByteCoords ByteCoords

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/byte_coords.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def deserialize(reader: EoReader) -> "ByteCoords":
    """
    Deserializes an instance of `ByteCoords` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ByteCoords: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        x = reader.get_byte()
        y = reader.get_byte()
        result = ByteCoords(x=x, y=y)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemDropClientPacket

Bases: Packet

Dropping items on the ground

Source code in src/eolib/protocol/_generated/net/client/item_drop_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
class ItemDropClientPacket(Packet):
    """
    Dropping items on the ground
    """
    _byte_size: int = 0
    _item: ThreeItem
    _coords: ByteCoords

    def __init__(self, *, item: ThreeItem, coords: ByteCoords):
        """
        Create a new instance of ItemDropClientPacket.

        Args:
            item (ThreeItem): 
            coords (ByteCoords): The official client sends 255 byte values for the coords if an item is dropped via the GUI button. 255 values here should be interpreted to mean "drop at current coords". Otherwise, the x and y fields contain encoded numbers that must be explicitly decoded to get the actual x and y values.
        """
        self._item = item
        self._coords = coords

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def item(self) -> ThreeItem:
        return self._item

    @property
    def coords(self) -> ByteCoords:
        """
        The official client sends 255 byte values for the coords if an item is dropped via
        the GUI button.
        255 values here should be interpreted to mean "drop at current coords".
        Otherwise, the x and y fields contain encoded numbers that must be explicitly
        decoded to get the actual x and y values.
        """
        return self._coords

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Item

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Drop

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ItemDropClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemDropClientPacket") -> None:
        """
        Serializes an instance of `ItemDropClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemDropClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._item is None:
                raise SerializationError("item must be provided.")
            ThreeItem.serialize(writer, data._item)
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            ByteCoords.serialize(writer, data._coords)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemDropClientPacket":
        """
        Deserializes an instance of `ItemDropClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemDropClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            item = ThreeItem.deserialize(reader)
            coords = ByteCoords.deserialize(reader)
            result = ItemDropClientPacket(item=item, coords=coords)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ItemDropClientPacket(byte_size={repr(self._byte_size)}, item={repr(self._item)}, coords={repr(self._coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

item: ThreeItem property

coords: ByteCoords property

The official client sends 255 byte values for the coords if an item is dropped via the GUI button. 255 values here should be interpreted to mean "drop at current coords". Otherwise, the x and y fields contain encoded numbers that must be explicitly decoded to get the actual x and y values.

__init__(*, item, coords)

Create a new instance of ItemDropClientPacket.

Parameters:

Name Type Description Default
item ThreeItem
required
coords ByteCoords

The official client sends 255 byte values for the coords if an item is dropped via the GUI button. 255 values here should be interpreted to mean "drop at current coords". Otherwise, the x and y fields contain encoded numbers that must be explicitly decoded to get the actual x and y values.

required
Source code in src/eolib/protocol/_generated/net/client/item_drop_client_packet.py
23
24
25
26
27
28
29
30
31
32
def __init__(self, *, item: ThreeItem, coords: ByteCoords):
    """
    Create a new instance of ItemDropClientPacket.

    Args:
        item (ThreeItem): 
        coords (ByteCoords): The official client sends 255 byte values for the coords if an item is dropped via the GUI button. 255 values here should be interpreted to mean "drop at current coords". Otherwise, the x and y fields contain encoded numbers that must be explicitly decoded to get the actual x and y values.
    """
    self._item = item
    self._coords = coords

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/item_drop_client_packet.py
59
60
61
62
63
64
65
66
67
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Item

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/item_drop_client_packet.py
69
70
71
72
73
74
75
76
77
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Drop

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/item_drop_client_packet.py
79
80
81
82
83
84
85
86
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ItemDropClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemDropClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemDropClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/item_drop_client_packet.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "ItemDropClientPacket") -> None:
    """
    Serializes an instance of `ItemDropClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemDropClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._item is None:
            raise SerializationError("item must be provided.")
        ThreeItem.serialize(writer, data._item)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        ByteCoords.serialize(writer, data._coords)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ItemDropClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemDropClientPacket ItemDropClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/item_drop_client_packet.py
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@staticmethod
def deserialize(reader: EoReader) -> "ItemDropClientPacket":
    """
    Deserializes an instance of `ItemDropClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemDropClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        item = ThreeItem.deserialize(reader)
        coords = ByteCoords.deserialize(reader)
        result = ItemDropClientPacket(item=item, coords=coords)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

Version

Client version

Source code in src/eolib/protocol/_generated/net/version.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
class Version:
    """
    Client version
    """
    _byte_size: int = 0
    _major: int
    _minor: int
    _patch: int

    def __init__(self, *, major: int, minor: int, patch: int):
        """
        Create a new instance of Version.

        Args:
            major (int): (Value range is 0-252.)
            minor (int): (Value range is 0-252.)
            patch (int): (Value range is 0-252.)
        """
        self._major = major
        self._minor = minor
        self._patch = patch

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def major(self) -> int:
        return self._major

    @property
    def minor(self) -> int:
        return self._minor

    @property
    def patch(self) -> int:
        return self._patch

    @staticmethod
    def serialize(writer: EoWriter, data: "Version") -> None:
        """
        Serializes an instance of `Version` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (Version): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._major is None:
                raise SerializationError("major must be provided.")
            writer.add_char(data._major)
            if data._minor is None:
                raise SerializationError("minor must be provided.")
            writer.add_char(data._minor)
            if data._patch is None:
                raise SerializationError("patch must be provided.")
            writer.add_char(data._patch)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "Version":
        """
        Deserializes an instance of `Version` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            Version: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            major = reader.get_char()
            minor = reader.get_char()
            patch = reader.get_char()
            result = Version(major=major, minor=minor, patch=patch)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"Version(byte_size={repr(self._byte_size)}, major={repr(self._major)}, minor={repr(self._minor)}, patch={repr(self._patch)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

major: int property

minor: int property

patch: int property

__init__(*, major, minor, patch)

Create a new instance of Version.

Parameters:

Name Type Description Default
major int

(Value range is 0-252.)

required
minor int

(Value range is 0-252.)

required
patch int

(Value range is 0-252.)

required
Source code in src/eolib/protocol/_generated/net/version.py
19
20
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, major: int, minor: int, patch: int):
    """
    Create a new instance of Version.

    Args:
        major (int): (Value range is 0-252.)
        minor (int): (Value range is 0-252.)
        patch (int): (Value range is 0-252.)
    """
    self._major = major
    self._minor = minor
    self._patch = patch

serialize(writer, data) staticmethod

Serializes an instance of Version to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data Version

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/version.py
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "Version") -> None:
    """
    Serializes an instance of `Version` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (Version): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._major is None:
            raise SerializationError("major must be provided.")
        writer.add_char(data._major)
        if data._minor is None:
            raise SerializationError("minor must be provided.")
        writer.add_char(data._minor)
        if data._patch is None:
            raise SerializationError("patch must be provided.")
        writer.add_char(data._patch)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of Version from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
Version Version

The data to serialize.

Source code in src/eolib/protocol/_generated/net/version.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def deserialize(reader: EoReader) -> "Version":
    """
    Deserializes an instance of `Version` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        Version: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        major = reader.get_char()
        minor = reader.get_char()
        patch = reader.get_char()
        result = Version(major=major, minor=minor, patch=patch)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

InitInitClientPacket

Bases: Packet

Connection initialization request. This packet is unencrypted.

Source code in src/eolib/protocol/_generated/net/client/init_init_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
class InitInitClientPacket(Packet):
    """
    Connection initialization request.
    This packet is unencrypted.
    """
    _byte_size: int = 0
    _challenge: int
    _version: Version
    _hdid_length: int
    _hdid: str

    def __init__(self, *, challenge: int, version: Version, hdid: str):
        """
        Create a new instance of InitInitClientPacket.

        Args:
            challenge (int): (Value range is 0-16194276.)
            version (Version): 
            hdid (str): (Length must be 252 or less.)
        """
        self._challenge = challenge
        self._version = version
        self._hdid = hdid
        self._hdid_length = len(self._hdid)

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def challenge(self) -> int:
        return self._challenge

    @property
    def version(self) -> Version:
        return self._version

    @property
    def hdid(self) -> str:
        return self._hdid

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Init

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Init

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        InitInitClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitClientPacket") -> None:
        """
        Serializes an instance of `InitInitClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._challenge is None:
                raise SerializationError("challenge must be provided.")
            writer.add_three(data._challenge)
            if data._version is None:
                raise SerializationError("version must be provided.")
            Version.serialize(writer, data._version)
            writer.add_char(112)
            if data._hdid_length is None:
                raise SerializationError("hdid_length must be provided.")
            writer.add_char(data._hdid_length)
            if data._hdid is None:
                raise SerializationError("hdid must be provided.")
            if len(data._hdid) > 252:
                raise SerializationError(f"Expected length of hdid to be 252 or less, got {len(data._hdid)}.")
            writer.add_fixed_string(data._hdid, data._hdid_length, False)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitClientPacket":
        """
        Deserializes an instance of `InitInitClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            challenge = reader.get_three()
            version = Version.deserialize(reader)
            reader.get_char()
            hdid_length = reader.get_char()
            hdid = reader.get_fixed_string(hdid_length, False)
            result = InitInitClientPacket(challenge=challenge, version=version, hdid=hdid)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"InitInitClientPacket(byte_size={repr(self._byte_size)}, challenge={repr(self._challenge)}, version={repr(self._version)}, hdid={repr(self._hdid)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

challenge: int property

version: Version property

hdid: str property

__init__(*, challenge, version, hdid)

Create a new instance of InitInitClientPacket.

Parameters:

Name Type Description Default
challenge int

(Value range is 0-16194276.)

required
version Version
required
hdid str

(Length must be 252 or less.)

required
Source code in src/eolib/protocol/_generated/net/client/init_init_client_packet.py
25
26
27
28
29
30
31
32
33
34
35
36
37
def __init__(self, *, challenge: int, version: Version, hdid: str):
    """
    Create a new instance of InitInitClientPacket.

    Args:
        challenge (int): (Value range is 0-16194276.)
        version (Version): 
        hdid (str): (Length must be 252 or less.)
    """
    self._challenge = challenge
    self._version = version
    self._hdid = hdid
    self._hdid_length = len(self._hdid)

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/init_init_client_packet.py
61
62
63
64
65
66
67
68
69
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Init

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/init_init_client_packet.py
71
72
73
74
75
76
77
78
79
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Init

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/init_init_client_packet.py
81
82
83
84
85
86
87
88
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    InitInitClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of InitInitClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data InitInitClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/init_init_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
@staticmethod
def serialize(writer: EoWriter, data: "InitInitClientPacket") -> None:
    """
    Serializes an instance of `InitInitClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._challenge is None:
            raise SerializationError("challenge must be provided.")
        writer.add_three(data._challenge)
        if data._version is None:
            raise SerializationError("version must be provided.")
        Version.serialize(writer, data._version)
        writer.add_char(112)
        if data._hdid_length is None:
            raise SerializationError("hdid_length must be provided.")
        writer.add_char(data._hdid_length)
        if data._hdid is None:
            raise SerializationError("hdid must be provided.")
        if len(data._hdid) > 252:
            raise SerializationError(f"Expected length of hdid to be 252 or less, got {len(data._hdid)}.")
        writer.add_fixed_string(data._hdid, data._hdid_length, False)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of InitInitClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
InitInitClientPacket InitInitClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/init_init_client_packet.py
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
@staticmethod
def deserialize(reader: EoReader) -> "InitInitClientPacket":
    """
    Deserializes an instance of `InitInitClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        challenge = reader.get_three()
        version = Version.deserialize(reader)
        reader.get_char()
        hdid_length = reader.get_char()
        hdid = reader.get_fixed_string(hdid_length, False)
        result = InitInitClientPacket(challenge=challenge, version=version, hdid=hdid)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildUseClientPacket

Bases: Packet

Accepted a join request

Source code in src/eolib/protocol/_generated/net/client/guild_use_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class GuildUseClientPacket(Packet):
    """
    Accepted a join request
    """
    _byte_size: int = 0
    _player_id: int

    def __init__(self, *, player_id: int):
        """
        Create a new instance of GuildUseClientPacket.

        Args:
            player_id (int): (Value range is 0-64008.)
        """
        self._player_id = player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def player_id(self) -> int:
        return self._player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Use

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildUseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildUseClientPacket") -> None:
        """
        Serializes an instance of `GuildUseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildUseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildUseClientPacket":
        """
        Deserializes an instance of `GuildUseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildUseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            player_id = reader.get_short()
            result = GuildUseClientPacket(player_id=player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildUseClientPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

player_id: int property

__init__(*, player_id)

Create a new instance of GuildUseClientPacket.

Parameters:

Name Type Description Default
player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/guild_use_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, player_id: int):
    """
    Create a new instance of GuildUseClientPacket.

    Args:
        player_id (int): (Value range is 0-64008.)
    """
    self._player_id = player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_use_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_use_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Use

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_use_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildUseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildUseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildUseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_use_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "GuildUseClientPacket") -> None:
    """
    Serializes an instance of `GuildUseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildUseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildUseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildUseClientPacket GuildUseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_use_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "GuildUseClientPacket":
    """
    Deserializes an instance of `GuildUseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildUseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        player_id = reader.get_short()
        result = GuildUseClientPacket(player_id=player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildTellClientPacket

Bases: Packet

Requested member list of a guild

Source code in src/eolib/protocol/_generated/net/client/guild_tell_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class GuildTellClientPacket(Packet):
    """
    Requested member list of a guild
    """
    _byte_size: int = 0
    _session_id: int
    _guild_identity: str

    def __init__(self, *, session_id: int, guild_identity: str):
        """
        Create a new instance of GuildTellClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            guild_identity (str): 
        """
        self._session_id = session_id
        self._guild_identity = guild_identity

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def guild_identity(self) -> str:
        return self._guild_identity

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Tell

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildTellClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildTellClientPacket") -> None:
        """
        Serializes an instance of `GuildTellClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildTellClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._guild_identity is None:
                raise SerializationError("guild_identity must be provided.")
            writer.add_string(data._guild_identity)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildTellClientPacket":
        """
        Deserializes an instance of `GuildTellClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildTellClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            guild_identity = reader.get_string()
            result = GuildTellClientPacket(session_id=session_id, guild_identity=guild_identity)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildTellClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, guild_identity={repr(self._guild_identity)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

guild_identity: str property

__init__(*, session_id, guild_identity)

Create a new instance of GuildTellClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
guild_identity str
required
Source code in src/eolib/protocol/_generated/net/client/guild_tell_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, guild_identity: str):
    """
    Create a new instance of GuildTellClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        guild_identity (str): 
    """
    self._session_id = session_id
    self._guild_identity = guild_identity

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_tell_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_tell_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Tell

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_tell_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildTellClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildTellClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildTellClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_tell_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "GuildTellClientPacket") -> None:
    """
    Serializes an instance of `GuildTellClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildTellClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._guild_identity is None:
            raise SerializationError("guild_identity must be provided.")
        writer.add_string(data._guild_identity)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildTellClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildTellClientPacket GuildTellClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_tell_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "GuildTellClientPacket":
    """
    Deserializes an instance of `GuildTellClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildTellClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        guild_identity = reader.get_string()
        result = GuildTellClientPacket(session_id=session_id, guild_identity=guild_identity)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildInfoType

Bases: IntEnum

The type of guild info being interacted with

Source code in src/eolib/protocol/_generated/net/client/guild_info_type.py
 9
10
11
12
13
14
15
class GuildInfoType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    The type of guild info being interacted with
    """
    Description = 1
    Ranks = 2
    Bank = 3

Description = 1 class-attribute instance-attribute

Ranks = 2 class-attribute instance-attribute

Bank = 3 class-attribute instance-attribute

GuildTakeClientPacket

Bases: Packet

Request guild description, rank list, or bank balance

Source code in src/eolib/protocol/_generated/net/client/guild_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
class GuildTakeClientPacket(Packet):
    """
    Request guild description, rank list, or bank balance
    """
    _byte_size: int = 0
    _session_id: int
    _info_type: GuildInfoType
    _guild_tag: str

    def __init__(self, *, session_id: int, info_type: GuildInfoType, guild_tag: str):
        """
        Create a new instance of GuildTakeClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            info_type (GuildInfoType): 
            guild_tag (str): (Length must be `3`.)
        """
        self._session_id = session_id
        self._info_type = info_type
        self._guild_tag = guild_tag

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def info_type(self) -> GuildInfoType:
        return self._info_type

    @property
    def guild_tag(self) -> str:
        return self._guild_tag

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildTakeClientPacket") -> None:
        """
        Serializes an instance of `GuildTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._info_type is None:
                raise SerializationError("info_type must be provided.")
            writer.add_short(int(data._info_type))
            if data._guild_tag is None:
                raise SerializationError("guild_tag must be provided.")
            if len(data._guild_tag) != 3:
                raise SerializationError(f"Expected length of guild_tag to be exactly 3, got {len(data._guild_tag)}.")
            writer.add_fixed_string(data._guild_tag, 3, False)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildTakeClientPacket":
        """
        Deserializes an instance of `GuildTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            info_type = GuildInfoType(reader.get_short())
            guild_tag = reader.get_fixed_string(3, False)
            result = GuildTakeClientPacket(session_id=session_id, info_type=info_type, guild_tag=guild_tag)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildTakeClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, info_type={repr(self._info_type)}, guild_tag={repr(self._guild_tag)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

info_type: GuildInfoType property

guild_tag: str property

__init__(*, session_id, info_type, guild_tag)

Create a new instance of GuildTakeClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
info_type GuildInfoType
required
guild_tag str

(Length must be 3.)

required
Source code in src/eolib/protocol/_generated/net/client/guild_take_client_packet.py
23
24
25
26
27
28
29
30
31
32
33
34
def __init__(self, *, session_id: int, info_type: GuildInfoType, guild_tag: str):
    """
    Create a new instance of GuildTakeClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        info_type (GuildInfoType): 
        guild_tag (str): (Length must be `3`.)
    """
    self._session_id = session_id
    self._info_type = info_type
    self._guild_tag = guild_tag

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_take_client_packet.py
58
59
60
61
62
63
64
65
66
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_take_client_packet.py
68
69
70
71
72
73
74
75
76
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_take_client_packet.py
78
79
80
81
82
83
84
85
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_take_client_packet.py
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@staticmethod
def serialize(writer: EoWriter, data: "GuildTakeClientPacket") -> None:
    """
    Serializes an instance of `GuildTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._info_type is None:
            raise SerializationError("info_type must be provided.")
        writer.add_short(int(data._info_type))
        if data._guild_tag is None:
            raise SerializationError("guild_tag must be provided.")
        if len(data._guild_tag) != 3:
            raise SerializationError(f"Expected length of guild_tag to be exactly 3, got {len(data._guild_tag)}.")
        writer.add_fixed_string(data._guild_tag, 3, False)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildTakeClientPacket GuildTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_take_client_packet.py
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
@staticmethod
def deserialize(reader: EoReader) -> "GuildTakeClientPacket":
    """
    Deserializes an instance of `GuildTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        info_type = GuildInfoType(reader.get_short())
        guild_tag = reader.get_fixed_string(3, False)
        result = GuildTakeClientPacket(session_id=session_id, info_type=info_type, guild_tag=guild_tag)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildRequestClientPacket

Bases: Packet

Requested to create a guild

Source code in src/eolib/protocol/_generated/net/client/guild_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
class GuildRequestClientPacket(Packet):
    """
    Requested to create a guild
    """
    _byte_size: int = 0
    _session_id: int
    _guild_tag: str
    _guild_name: str

    def __init__(self, *, session_id: int, guild_tag: str, guild_name: str):
        """
        Create a new instance of GuildRequestClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            guild_tag (str): 
            guild_name (str): 
        """
        self._session_id = session_id
        self._guild_tag = guild_tag
        self._guild_name = guild_name

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def guild_tag(self) -> str:
        return self._guild_tag

    @property
    def guild_name(self) -> str:
        return self._guild_name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildRequestClientPacket") -> None:
        """
        Serializes an instance of `GuildRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            writer.add_byte(0xFF)
            if data._guild_tag is None:
                raise SerializationError("guild_tag must be provided.")
            writer.add_string(data._guild_tag)
            writer.add_byte(0xFF)
            if data._guild_name is None:
                raise SerializationError("guild_name must be provided.")
            writer.add_string(data._guild_name)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildRequestClientPacket":
        """
        Deserializes an instance of `GuildRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            session_id = reader.get_int()
            reader.next_chunk()
            guild_tag = reader.get_string()
            reader.next_chunk()
            guild_name = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = GuildRequestClientPacket(session_id=session_id, guild_tag=guild_tag, guild_name=guild_name)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildRequestClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, guild_tag={repr(self._guild_tag)}, guild_name={repr(self._guild_name)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

guild_tag: str property

guild_name: str property

__init__(*, session_id, guild_tag, guild_name)

Create a new instance of GuildRequestClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
guild_tag str
required
guild_name str
required
Source code in src/eolib/protocol/_generated/net/client/guild_request_client_packet.py
22
23
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, session_id: int, guild_tag: str, guild_name: str):
    """
    Create a new instance of GuildRequestClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        guild_tag (str): 
        guild_name (str): 
    """
    self._session_id = session_id
    self._guild_tag = guild_tag
    self._guild_name = guild_name

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_request_client_packet.py
57
58
59
60
61
62
63
64
65
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_request_client_packet.py
67
68
69
70
71
72
73
74
75
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_request_client_packet.py
77
78
79
80
81
82
83
84
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_request_client_packet.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "GuildRequestClientPacket") -> None:
    """
    Serializes an instance of `GuildRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        writer.add_byte(0xFF)
        if data._guild_tag is None:
            raise SerializationError("guild_tag must be provided.")
        writer.add_string(data._guild_tag)
        writer.add_byte(0xFF)
        if data._guild_name is None:
            raise SerializationError("guild_name must be provided.")
        writer.add_string(data._guild_name)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildRequestClientPacket GuildRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_request_client_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
@staticmethod
def deserialize(reader: EoReader) -> "GuildRequestClientPacket":
    """
    Deserializes an instance of `GuildRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        session_id = reader.get_int()
        reader.next_chunk()
        guild_tag = reader.get_string()
        reader.next_chunk()
        guild_name = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = GuildRequestClientPacket(session_id=session_id, guild_tag=guild_tag, guild_name=guild_name)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildReportClientPacket

Bases: Packet

Requested general information of a guild

Source code in src/eolib/protocol/_generated/net/client/guild_report_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class GuildReportClientPacket(Packet):
    """
    Requested general information of a guild
    """
    _byte_size: int = 0
    _session_id: int
    _guild_identity: str

    def __init__(self, *, session_id: int, guild_identity: str):
        """
        Create a new instance of GuildReportClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            guild_identity (str): 
        """
        self._session_id = session_id
        self._guild_identity = guild_identity

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def guild_identity(self) -> str:
        return self._guild_identity

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Report

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildReportClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildReportClientPacket") -> None:
        """
        Serializes an instance of `GuildReportClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildReportClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._guild_identity is None:
                raise SerializationError("guild_identity must be provided.")
            writer.add_string(data._guild_identity)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildReportClientPacket":
        """
        Deserializes an instance of `GuildReportClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildReportClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            guild_identity = reader.get_string()
            result = GuildReportClientPacket(session_id=session_id, guild_identity=guild_identity)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildReportClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, guild_identity={repr(self._guild_identity)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

guild_identity: str property

__init__(*, session_id, guild_identity)

Create a new instance of GuildReportClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
guild_identity str
required
Source code in src/eolib/protocol/_generated/net/client/guild_report_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, guild_identity: str):
    """
    Create a new instance of GuildReportClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        guild_identity (str): 
    """
    self._session_id = session_id
    self._guild_identity = guild_identity

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_report_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_report_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Report

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_report_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildReportClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildReportClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildReportClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_report_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "GuildReportClientPacket") -> None:
    """
    Serializes an instance of `GuildReportClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildReportClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._guild_identity is None:
            raise SerializationError("guild_identity must be provided.")
        writer.add_string(data._guild_identity)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildReportClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildReportClientPacket GuildReportClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_report_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "GuildReportClientPacket":
    """
    Deserializes an instance of `GuildReportClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildReportClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        guild_identity = reader.get_string()
        result = GuildReportClientPacket(session_id=session_id, guild_identity=guild_identity)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildRemoveClientPacket

Bases: Packet

Leave guild

Source code in src/eolib/protocol/_generated/net/client/guild_remove_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class GuildRemoveClientPacket(Packet):
    """
    Leave guild
    """
    _byte_size: int = 0
    _session_id: int

    def __init__(self, *, session_id: int):
        """
        Create a new instance of GuildRemoveClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
        """
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildRemoveClientPacket") -> None:
        """
        Serializes an instance of `GuildRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildRemoveClientPacket":
        """
        Deserializes an instance of `GuildRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            result = GuildRemoveClientPacket(session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildRemoveClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

__init__(*, session_id)

Create a new instance of GuildRemoveClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/guild_remove_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, session_id: int):
    """
    Create a new instance of GuildRemoveClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
    """
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_remove_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_remove_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_remove_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_remove_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "GuildRemoveClientPacket") -> None:
    """
    Serializes an instance of `GuildRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildRemoveClientPacket GuildRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_remove_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "GuildRemoveClientPacket":
    """
    Deserializes an instance of `GuildRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        result = GuildRemoveClientPacket(session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildRankClientPacket

Bases: Packet

Update a member's rank

Source code in src/eolib/protocol/_generated/net/client/guild_rank_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
class GuildRankClientPacket(Packet):
    """
    Update a member's rank
    """
    _byte_size: int = 0
    _session_id: int
    _rank: int
    _member_name: str

    def __init__(self, *, session_id: int, rank: int, member_name: str):
        """
        Create a new instance of GuildRankClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            rank (int): (Value range is 0-252.)
            member_name (str): 
        """
        self._session_id = session_id
        self._rank = rank
        self._member_name = member_name

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def rank(self) -> int:
        return self._rank

    @property
    def member_name(self) -> str:
        return self._member_name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Rank

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildRankClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildRankClientPacket") -> None:
        """
        Serializes an instance of `GuildRankClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildRankClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._rank is None:
                raise SerializationError("rank must be provided.")
            writer.add_char(data._rank)
            if data._member_name is None:
                raise SerializationError("member_name must be provided.")
            writer.add_string(data._member_name)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildRankClientPacket":
        """
        Deserializes an instance of `GuildRankClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildRankClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            rank = reader.get_char()
            member_name = reader.get_string()
            result = GuildRankClientPacket(session_id=session_id, rank=rank, member_name=member_name)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildRankClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, rank={repr(self._rank)}, member_name={repr(self._member_name)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

rank: int property

member_name: str property

__init__(*, session_id, rank, member_name)

Create a new instance of GuildRankClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
rank int

(Value range is 0-252.)

required
member_name str
required
Source code in src/eolib/protocol/_generated/net/client/guild_rank_client_packet.py
22
23
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, session_id: int, rank: int, member_name: str):
    """
    Create a new instance of GuildRankClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        rank (int): (Value range is 0-252.)
        member_name (str): 
    """
    self._session_id = session_id
    self._rank = rank
    self._member_name = member_name

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_rank_client_packet.py
57
58
59
60
61
62
63
64
65
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_rank_client_packet.py
67
68
69
70
71
72
73
74
75
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Rank

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_rank_client_packet.py
77
78
79
80
81
82
83
84
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildRankClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildRankClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildRankClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_rank_client_packet.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@staticmethod
def serialize(writer: EoWriter, data: "GuildRankClientPacket") -> None:
    """
    Serializes an instance of `GuildRankClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildRankClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._rank is None:
            raise SerializationError("rank must be provided.")
        writer.add_char(data._rank)
        if data._member_name is None:
            raise SerializationError("member_name must be provided.")
        writer.add_string(data._member_name)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildRankClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildRankClientPacket GuildRankClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_rank_client_packet.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@staticmethod
def deserialize(reader: EoReader) -> "GuildRankClientPacket":
    """
    Deserializes an instance of `GuildRankClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildRankClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        rank = reader.get_char()
        member_name = reader.get_string()
        result = GuildRankClientPacket(session_id=session_id, rank=rank, member_name=member_name)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildPlayerClientPacket

Bases: Packet

Request to join a guild

Source code in src/eolib/protocol/_generated/net/client/guild_player_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
class GuildPlayerClientPacket(Packet):
    """
    Request to join a guild
    """
    _byte_size: int = 0
    _session_id: int
    _guild_tag: str
    _recruiter_name: str

    def __init__(self, *, session_id: int, guild_tag: str, recruiter_name: str):
        """
        Create a new instance of GuildPlayerClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            guild_tag (str): 
            recruiter_name (str): 
        """
        self._session_id = session_id
        self._guild_tag = guild_tag
        self._recruiter_name = recruiter_name

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def guild_tag(self) -> str:
        return self._guild_tag

    @property
    def recruiter_name(self) -> str:
        return self._recruiter_name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Player

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildPlayerClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildPlayerClientPacket") -> None:
        """
        Serializes an instance of `GuildPlayerClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildPlayerClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            writer.add_byte(0xFF)
            if data._guild_tag is None:
                raise SerializationError("guild_tag must be provided.")
            writer.add_string(data._guild_tag)
            writer.add_byte(0xFF)
            if data._recruiter_name is None:
                raise SerializationError("recruiter_name must be provided.")
            writer.add_string(data._recruiter_name)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildPlayerClientPacket":
        """
        Deserializes an instance of `GuildPlayerClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildPlayerClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            session_id = reader.get_int()
            reader.next_chunk()
            guild_tag = reader.get_string()
            reader.next_chunk()
            recruiter_name = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = GuildPlayerClientPacket(session_id=session_id, guild_tag=guild_tag, recruiter_name=recruiter_name)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildPlayerClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, guild_tag={repr(self._guild_tag)}, recruiter_name={repr(self._recruiter_name)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

guild_tag: str property

recruiter_name: str property

__init__(*, session_id, guild_tag, recruiter_name)

Create a new instance of GuildPlayerClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
guild_tag str
required
recruiter_name str
required
Source code in src/eolib/protocol/_generated/net/client/guild_player_client_packet.py
22
23
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, session_id: int, guild_tag: str, recruiter_name: str):
    """
    Create a new instance of GuildPlayerClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        guild_tag (str): 
        recruiter_name (str): 
    """
    self._session_id = session_id
    self._guild_tag = guild_tag
    self._recruiter_name = recruiter_name

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_player_client_packet.py
57
58
59
60
61
62
63
64
65
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_player_client_packet.py
67
68
69
70
71
72
73
74
75
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Player

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_player_client_packet.py
77
78
79
80
81
82
83
84
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildPlayerClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildPlayerClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildPlayerClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_player_client_packet.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "GuildPlayerClientPacket") -> None:
    """
    Serializes an instance of `GuildPlayerClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildPlayerClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        writer.add_byte(0xFF)
        if data._guild_tag is None:
            raise SerializationError("guild_tag must be provided.")
        writer.add_string(data._guild_tag)
        writer.add_byte(0xFF)
        if data._recruiter_name is None:
            raise SerializationError("recruiter_name must be provided.")
        writer.add_string(data._recruiter_name)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildPlayerClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildPlayerClientPacket GuildPlayerClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_player_client_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
@staticmethod
def deserialize(reader: EoReader) -> "GuildPlayerClientPacket":
    """
    Deserializes an instance of `GuildPlayerClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildPlayerClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        session_id = reader.get_int()
        reader.next_chunk()
        guild_tag = reader.get_string()
        reader.next_chunk()
        recruiter_name = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = GuildPlayerClientPacket(session_id=session_id, guild_tag=guild_tag, recruiter_name=recruiter_name)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildOpenClientPacket

Bases: Packet

Talking to a guild master NPC

Source code in src/eolib/protocol/_generated/net/client/guild_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class GuildOpenClientPacket(Packet):
    """
    Talking to a guild master NPC
    """
    _byte_size: int = 0
    _npc_index: int

    def __init__(self, *, npc_index: int):
        """
        Create a new instance of GuildOpenClientPacket.

        Args:
            npc_index (int): (Value range is 0-64008.)
        """
        self._npc_index = npc_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildOpenClientPacket") -> None:
        """
        Serializes an instance of `GuildOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildOpenClientPacket":
        """
        Deserializes an instance of `GuildOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_short()
            result = GuildOpenClientPacket(npc_index=npc_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildOpenClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

__init__(*, npc_index)

Create a new instance of GuildOpenClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/guild_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, npc_index: int):
    """
    Create a new instance of GuildOpenClientPacket.

    Args:
        npc_index (int): (Value range is 0-64008.)
    """
    self._npc_index = npc_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "GuildOpenClientPacket") -> None:
    """
    Serializes an instance of `GuildOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildOpenClientPacket GuildOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "GuildOpenClientPacket":
    """
    Deserializes an instance of `GuildOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_short()
        result = GuildOpenClientPacket(npc_index=npc_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildKickClientPacket

Bases: Packet

Kick member from guild

Source code in src/eolib/protocol/_generated/net/client/guild_kick_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class GuildKickClientPacket(Packet):
    """
    Kick member from guild
    """
    _byte_size: int = 0
    _session_id: int
    _member_name: str

    def __init__(self, *, session_id: int, member_name: str):
        """
        Create a new instance of GuildKickClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            member_name (str): 
        """
        self._session_id = session_id
        self._member_name = member_name

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def member_name(self) -> str:
        return self._member_name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Kick

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildKickClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildKickClientPacket") -> None:
        """
        Serializes an instance of `GuildKickClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildKickClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._member_name is None:
                raise SerializationError("member_name must be provided.")
            writer.add_string(data._member_name)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildKickClientPacket":
        """
        Deserializes an instance of `GuildKickClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildKickClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            member_name = reader.get_string()
            result = GuildKickClientPacket(session_id=session_id, member_name=member_name)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildKickClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, member_name={repr(self._member_name)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

member_name: str property

__init__(*, session_id, member_name)

Create a new instance of GuildKickClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
member_name str
required
Source code in src/eolib/protocol/_generated/net/client/guild_kick_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, member_name: str):
    """
    Create a new instance of GuildKickClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        member_name (str): 
    """
    self._session_id = session_id
    self._member_name = member_name

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_kick_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_kick_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Kick

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_kick_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildKickClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildKickClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildKickClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_kick_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "GuildKickClientPacket") -> None:
    """
    Serializes an instance of `GuildKickClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildKickClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._member_name is None:
            raise SerializationError("member_name must be provided.")
        writer.add_string(data._member_name)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildKickClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildKickClientPacket GuildKickClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_kick_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "GuildKickClientPacket":
    """
    Deserializes an instance of `GuildKickClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildKickClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        member_name = reader.get_string()
        result = GuildKickClientPacket(session_id=session_id, member_name=member_name)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildJunkClientPacket

Bases: Packet

Disband guild

Source code in src/eolib/protocol/_generated/net/client/guild_junk_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class GuildJunkClientPacket(Packet):
    """
    Disband guild
    """
    _byte_size: int = 0
    _session_id: int

    def __init__(self, *, session_id: int):
        """
        Create a new instance of GuildJunkClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
        """
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Junk

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildJunkClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildJunkClientPacket") -> None:
        """
        Serializes an instance of `GuildJunkClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildJunkClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildJunkClientPacket":
        """
        Deserializes an instance of `GuildJunkClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildJunkClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            result = GuildJunkClientPacket(session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildJunkClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

__init__(*, session_id)

Create a new instance of GuildJunkClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/guild_junk_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, session_id: int):
    """
    Create a new instance of GuildJunkClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
    """
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_junk_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_junk_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Junk

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_junk_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildJunkClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildJunkClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildJunkClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_junk_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "GuildJunkClientPacket") -> None:
    """
    Serializes an instance of `GuildJunkClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildJunkClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildJunkClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildJunkClientPacket GuildJunkClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_junk_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "GuildJunkClientPacket":
    """
    Deserializes an instance of `GuildJunkClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildJunkClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        result = GuildJunkClientPacket(session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildCreateClientPacket

Bases: Packet

Final confirm creating a guild

Source code in src/eolib/protocol/_generated/net/client/guild_create_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
class GuildCreateClientPacket(Packet):
    """
    Final confirm creating a guild
    """
    _byte_size: int = 0
    _session_id: int
    _guild_tag: str
    _guild_name: str
    _description: str

    def __init__(self, *, session_id: int, guild_tag: str, guild_name: str, description: str):
        """
        Create a new instance of GuildCreateClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            guild_tag (str): 
            guild_name (str): 
            description (str): 
        """
        self._session_id = session_id
        self._guild_tag = guild_tag
        self._guild_name = guild_name
        self._description = description

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def guild_tag(self) -> str:
        return self._guild_tag

    @property
    def guild_name(self) -> str:
        return self._guild_name

    @property
    def description(self) -> str:
        return self._description

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Create

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildCreateClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildCreateClientPacket") -> None:
        """
        Serializes an instance of `GuildCreateClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildCreateClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            writer.add_byte(0xFF)
            if data._guild_tag is None:
                raise SerializationError("guild_tag must be provided.")
            writer.add_string(data._guild_tag)
            writer.add_byte(0xFF)
            if data._guild_name is None:
                raise SerializationError("guild_name must be provided.")
            writer.add_string(data._guild_name)
            writer.add_byte(0xFF)
            if data._description is None:
                raise SerializationError("description must be provided.")
            writer.add_string(data._description)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildCreateClientPacket":
        """
        Deserializes an instance of `GuildCreateClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildCreateClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            session_id = reader.get_int()
            reader.next_chunk()
            guild_tag = reader.get_string()
            reader.next_chunk()
            guild_name = reader.get_string()
            reader.next_chunk()
            description = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = GuildCreateClientPacket(session_id=session_id, guild_tag=guild_tag, guild_name=guild_name, description=description)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildCreateClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, guild_tag={repr(self._guild_tag)}, guild_name={repr(self._guild_name)}, description={repr(self._description)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

guild_tag: str property

guild_name: str property

description: str property

__init__(*, session_id, guild_tag, guild_name, description)

Create a new instance of GuildCreateClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
guild_tag str
required
guild_name str
required
description str
required
Source code in src/eolib/protocol/_generated/net/client/guild_create_client_packet.py
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def __init__(self, *, session_id: int, guild_tag: str, guild_name: str, description: str):
    """
    Create a new instance of GuildCreateClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        guild_tag (str): 
        guild_name (str): 
        description (str): 
    """
    self._session_id = session_id
    self._guild_tag = guild_tag
    self._guild_name = guild_name
    self._description = description

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_create_client_packet.py
64
65
66
67
68
69
70
71
72
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_create_client_packet.py
74
75
76
77
78
79
80
81
82
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Create

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_create_client_packet.py
84
85
86
87
88
89
90
91
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildCreateClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildCreateClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildCreateClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_create_client_packet.py
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
@staticmethod
def serialize(writer: EoWriter, data: "GuildCreateClientPacket") -> None:
    """
    Serializes an instance of `GuildCreateClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildCreateClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        writer.add_byte(0xFF)
        if data._guild_tag is None:
            raise SerializationError("guild_tag must be provided.")
        writer.add_string(data._guild_tag)
        writer.add_byte(0xFF)
        if data._guild_name is None:
            raise SerializationError("guild_name must be provided.")
        writer.add_string(data._guild_name)
        writer.add_byte(0xFF)
        if data._description is None:
            raise SerializationError("description must be provided.")
        writer.add_string(data._description)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildCreateClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildCreateClientPacket GuildCreateClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_create_client_packet.py
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
@staticmethod
def deserialize(reader: EoReader) -> "GuildCreateClientPacket":
    """
    Deserializes an instance of `GuildCreateClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildCreateClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        session_id = reader.get_int()
        reader.next_chunk()
        guild_tag = reader.get_string()
        reader.next_chunk()
        guild_name = reader.get_string()
        reader.next_chunk()
        description = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = GuildCreateClientPacket(session_id=session_id, guild_tag=guild_tag, guild_name=guild_name, description=description)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildBuyClientPacket

Bases: Packet

Deposit gold in to the guild bank

Source code in src/eolib/protocol/_generated/net/client/guild_buy_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class GuildBuyClientPacket(Packet):
    """
    Deposit gold in to the guild bank
    """
    _byte_size: int = 0
    _session_id: int
    _gold_amount: int

    def __init__(self, *, session_id: int, gold_amount: int):
        """
        Create a new instance of GuildBuyClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            gold_amount (int): (Value range is 0-4097152080.)
        """
        self._session_id = session_id
        self._gold_amount = gold_amount

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def gold_amount(self) -> int:
        return self._gold_amount

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Buy

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildBuyClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildBuyClientPacket") -> None:
        """
        Serializes an instance of `GuildBuyClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildBuyClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._gold_amount is None:
                raise SerializationError("gold_amount must be provided.")
            writer.add_int(data._gold_amount)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildBuyClientPacket":
        """
        Deserializes an instance of `GuildBuyClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildBuyClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_int()
            gold_amount = reader.get_int()
            result = GuildBuyClientPacket(session_id=session_id, gold_amount=gold_amount)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildBuyClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, gold_amount={repr(self._gold_amount)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

gold_amount: int property

__init__(*, session_id, gold_amount)

Create a new instance of GuildBuyClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
gold_amount int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/guild_buy_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, gold_amount: int):
    """
    Create a new instance of GuildBuyClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        gold_amount (int): (Value range is 0-4097152080.)
    """
    self._session_id = session_id
    self._gold_amount = gold_amount

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_buy_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_buy_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Buy

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_buy_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildBuyClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildBuyClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildBuyClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_buy_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "GuildBuyClientPacket") -> None:
    """
    Serializes an instance of `GuildBuyClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildBuyClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildBuyClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildBuyClientPacket GuildBuyClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_buy_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "GuildBuyClientPacket":
    """
    Deserializes an instance of `GuildBuyClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildBuyClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_int()
        gold_amount = reader.get_int()
        result = GuildBuyClientPacket(session_id=session_id, gold_amount=gold_amount)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildAgreeClientPacket

Bases: Packet

Update the guild description or rank list

Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
class GuildAgreeClientPacket(Packet):
    """
    Update the guild description or rank list
    """
    _byte_size: int = 0
    _session_id: int
    _info_type: GuildInfoType
    _info_type_data: 'GuildAgreeClientPacket.InfoTypeData'

    def __init__(self, *, session_id: int, info_type: GuildInfoType, info_type_data: 'GuildAgreeClientPacket.InfoTypeData' = None):
        """
        Create a new instance of GuildAgreeClientPacket.

        Args:
            session_id (int): (Value range is 0-4097152080.)
            info_type (GuildInfoType): 
            info_type_data (GuildAgreeClientPacket.InfoTypeData): Data associated with the `info_type` field.
        """
        self._session_id = session_id
        self._info_type = info_type
        self._info_type_data = info_type_data

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def info_type(self) -> GuildInfoType:
        return self._info_type

    @property
    def info_type_data(self) -> 'GuildAgreeClientPacket.InfoTypeData':
        """
        GuildAgreeClientPacket.InfoTypeData: Data associated with the `info_type` field.
        """
        return self._info_type_data

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Agree

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildAgreeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildAgreeClientPacket") -> None:
        """
        Serializes an instance of `GuildAgreeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildAgreeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
            if data._info_type is None:
                raise SerializationError("info_type must be provided.")
            writer.add_short(int(data._info_type))
            if data._info_type == GuildInfoType.Description:
                if not isinstance(data._info_type_data, GuildAgreeClientPacket.InfoTypeDataDescription):
                    raise SerializationError("Expected info_type_data to be type GuildAgreeClientPacket.InfoTypeDataDescription for info_type " + GuildInfoType(data._info_type).name + ".")
                GuildAgreeClientPacket.InfoTypeDataDescription.serialize(writer, data._info_type_data)
            elif data._info_type == GuildInfoType.Ranks:
                if not isinstance(data._info_type_data, GuildAgreeClientPacket.InfoTypeDataRanks):
                    raise SerializationError("Expected info_type_data to be type GuildAgreeClientPacket.InfoTypeDataRanks for info_type " + GuildInfoType(data._info_type).name + ".")
                GuildAgreeClientPacket.InfoTypeDataRanks.serialize(writer, data._info_type_data)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildAgreeClientPacket":
        """
        Deserializes an instance of `GuildAgreeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildAgreeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            session_id = reader.get_int()
            info_type = GuildInfoType(reader.get_short())
            info_type_data: GuildAgreeClientPacket.InfoTypeData = None
            if info_type == GuildInfoType.Description:
                info_type_data = GuildAgreeClientPacket.InfoTypeDataDescription.deserialize(reader)
            elif info_type == GuildInfoType.Ranks:
                info_type_data = GuildAgreeClientPacket.InfoTypeDataRanks.deserialize(reader)
            reader.chunked_reading_mode = False
            result = GuildAgreeClientPacket(session_id=session_id, info_type=info_type, info_type_data=info_type_data)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildAgreeClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, info_type={repr(self._info_type)}, info_type_data={repr(self._info_type_data)})"

    InfoTypeData = Union['GuildAgreeClientPacket.InfoTypeDataDescription', 'GuildAgreeClientPacket.InfoTypeDataRanks', None]
    """
    Data associated with different values of the `info_type` field.
    """

    class InfoTypeDataDescription:
        """
        Data associated with info_type value GuildInfoType.Description
        """
        _byte_size: int = 0
        _description: str

        def __init__(self, *, description: str):
            """
            Create a new instance of GuildAgreeClientPacket.InfoTypeDataDescription.

            Args:
                description (str): 
            """
            self._description = description

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def description(self) -> str:
            return self._description

        @staticmethod
        def serialize(writer: EoWriter, data: "GuildAgreeClientPacket.InfoTypeDataDescription") -> None:
            """
            Serializes an instance of `GuildAgreeClientPacket.InfoTypeDataDescription` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (GuildAgreeClientPacket.InfoTypeDataDescription): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._description is None:
                    raise SerializationError("description must be provided.")
                writer.add_string(data._description)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "GuildAgreeClientPacket.InfoTypeDataDescription":
            """
            Deserializes an instance of `GuildAgreeClientPacket.InfoTypeDataDescription` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                GuildAgreeClientPacket.InfoTypeDataDescription: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                description = reader.get_string()
                result = GuildAgreeClientPacket.InfoTypeDataDescription(description=description)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"GuildAgreeClientPacket.InfoTypeDataDescription(byte_size={repr(self._byte_size)}, description={repr(self._description)})"

    class InfoTypeDataRanks:
        """
        Data associated with info_type value GuildInfoType.Ranks
        """
        _byte_size: int = 0
        _ranks: tuple[str, ...]

        def __init__(self, *, ranks: Iterable[str]):
            """
            Create a new instance of GuildAgreeClientPacket.InfoTypeDataRanks.

            Args:
                ranks (Iterable[str]): (Length must be `9`.)
            """
            self._ranks = tuple(ranks)

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def ranks(self) -> tuple[str, ...]:
            return self._ranks

        @staticmethod
        def serialize(writer: EoWriter, data: "GuildAgreeClientPacket.InfoTypeDataRanks") -> None:
            """
            Serializes an instance of `GuildAgreeClientPacket.InfoTypeDataRanks` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (GuildAgreeClientPacket.InfoTypeDataRanks): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._ranks is None:
                    raise SerializationError("ranks must be provided.")
                if len(data._ranks) != 9:
                    raise SerializationError(f"Expected length of ranks to be exactly 9, got {len(data._ranks)}.")
                for i in range(9):
                    writer.add_string(data._ranks[i])
                    writer.add_byte(0xFF)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "GuildAgreeClientPacket.InfoTypeDataRanks":
            """
            Deserializes an instance of `GuildAgreeClientPacket.InfoTypeDataRanks` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                GuildAgreeClientPacket.InfoTypeDataRanks: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                ranks = []
                for i in range(9):
                    ranks.append(reader.get_string())
                    reader.next_chunk()
                result = GuildAgreeClientPacket.InfoTypeDataRanks(ranks=ranks)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"GuildAgreeClientPacket.InfoTypeDataRanks(byte_size={repr(self._byte_size)}, ranks={repr(self._ranks)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

info_type: GuildInfoType property

info_type_data: 'GuildAgreeClientPacket.InfoTypeData' property

GuildAgreeClientPacket.InfoTypeData: Data associated with the info_type field.

InfoTypeData = Union['GuildAgreeClientPacket.InfoTypeDataDescription', 'GuildAgreeClientPacket.InfoTypeDataRanks', None] class-attribute instance-attribute

Data associated with different values of the info_type field.

InfoTypeDataDescription

Data associated with info_type value GuildInfoType.Description

Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
class InfoTypeDataDescription:
    """
    Data associated with info_type value GuildInfoType.Description
    """
    _byte_size: int = 0
    _description: str

    def __init__(self, *, description: str):
        """
        Create a new instance of GuildAgreeClientPacket.InfoTypeDataDescription.

        Args:
            description (str): 
        """
        self._description = description

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def description(self) -> str:
        return self._description

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildAgreeClientPacket.InfoTypeDataDescription") -> None:
        """
        Serializes an instance of `GuildAgreeClientPacket.InfoTypeDataDescription` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildAgreeClientPacket.InfoTypeDataDescription): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._description is None:
                raise SerializationError("description must be provided.")
            writer.add_string(data._description)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildAgreeClientPacket.InfoTypeDataDescription":
        """
        Deserializes an instance of `GuildAgreeClientPacket.InfoTypeDataDescription` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildAgreeClientPacket.InfoTypeDataDescription: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            description = reader.get_string()
            result = GuildAgreeClientPacket.InfoTypeDataDescription(description=description)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildAgreeClientPacket.InfoTypeDataDescription(byte_size={repr(self._byte_size)}, description={repr(self._description)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

description: str property

__init__(*, description)

Create a new instance of GuildAgreeClientPacket.InfoTypeDataDescription.

Parameters:

Name Type Description Default
description str
required
Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
167
168
169
170
171
172
173
174
def __init__(self, *, description: str):
    """
    Create a new instance of GuildAgreeClientPacket.InfoTypeDataDescription.

    Args:
        description (str): 
    """
    self._description = description

serialize(writer, data) staticmethod

Serializes an instance of GuildAgreeClientPacket.InfoTypeDataDescription to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data InfoTypeDataDescription

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
@staticmethod
def serialize(writer: EoWriter, data: "GuildAgreeClientPacket.InfoTypeDataDescription") -> None:
    """
    Serializes an instance of `GuildAgreeClientPacket.InfoTypeDataDescription` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildAgreeClientPacket.InfoTypeDataDescription): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._description is None:
            raise SerializationError("description must be provided.")
        writer.add_string(data._description)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildAgreeClientPacket.InfoTypeDataDescription from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'GuildAgreeClientPacket.InfoTypeDataDescription'

GuildAgreeClientPacket.InfoTypeDataDescription: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
@staticmethod
def deserialize(reader: EoReader) -> "GuildAgreeClientPacket.InfoTypeDataDescription":
    """
    Deserializes an instance of `GuildAgreeClientPacket.InfoTypeDataDescription` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildAgreeClientPacket.InfoTypeDataDescription: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        description = reader.get_string()
        result = GuildAgreeClientPacket.InfoTypeDataDescription(description=description)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

InfoTypeDataRanks

Data associated with info_type value GuildInfoType.Ranks

Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
class InfoTypeDataRanks:
    """
    Data associated with info_type value GuildInfoType.Ranks
    """
    _byte_size: int = 0
    _ranks: tuple[str, ...]

    def __init__(self, *, ranks: Iterable[str]):
        """
        Create a new instance of GuildAgreeClientPacket.InfoTypeDataRanks.

        Args:
            ranks (Iterable[str]): (Length must be `9`.)
        """
        self._ranks = tuple(ranks)

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def ranks(self) -> tuple[str, ...]:
        return self._ranks

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildAgreeClientPacket.InfoTypeDataRanks") -> None:
        """
        Serializes an instance of `GuildAgreeClientPacket.InfoTypeDataRanks` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildAgreeClientPacket.InfoTypeDataRanks): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._ranks is None:
                raise SerializationError("ranks must be provided.")
            if len(data._ranks) != 9:
                raise SerializationError(f"Expected length of ranks to be exactly 9, got {len(data._ranks)}.")
            for i in range(9):
                writer.add_string(data._ranks[i])
                writer.add_byte(0xFF)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildAgreeClientPacket.InfoTypeDataRanks":
        """
        Deserializes an instance of `GuildAgreeClientPacket.InfoTypeDataRanks` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildAgreeClientPacket.InfoTypeDataRanks: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            ranks = []
            for i in range(9):
                ranks.append(reader.get_string())
                reader.next_chunk()
            result = GuildAgreeClientPacket.InfoTypeDataRanks(ranks=ranks)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildAgreeClientPacket.InfoTypeDataRanks(byte_size={repr(self._byte_size)}, ranks={repr(self._ranks)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

ranks: tuple[str, ...] property

__init__(*, ranks)

Create a new instance of GuildAgreeClientPacket.InfoTypeDataRanks.

Parameters:

Name Type Description Default
ranks Iterable[str]

(Length must be 9.)

required
Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
238
239
240
241
242
243
244
245
def __init__(self, *, ranks: Iterable[str]):
    """
    Create a new instance of GuildAgreeClientPacket.InfoTypeDataRanks.

    Args:
        ranks (Iterable[str]): (Length must be `9`.)
    """
    self._ranks = tuple(ranks)

serialize(writer, data) staticmethod

Serializes an instance of GuildAgreeClientPacket.InfoTypeDataRanks to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data InfoTypeDataRanks

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
@staticmethod
def serialize(writer: EoWriter, data: "GuildAgreeClientPacket.InfoTypeDataRanks") -> None:
    """
    Serializes an instance of `GuildAgreeClientPacket.InfoTypeDataRanks` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildAgreeClientPacket.InfoTypeDataRanks): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._ranks is None:
            raise SerializationError("ranks must be provided.")
        if len(data._ranks) != 9:
            raise SerializationError(f"Expected length of ranks to be exactly 9, got {len(data._ranks)}.")
        for i in range(9):
            writer.add_string(data._ranks[i])
            writer.add_byte(0xFF)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildAgreeClientPacket.InfoTypeDataRanks from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'GuildAgreeClientPacket.InfoTypeDataRanks'

GuildAgreeClientPacket.InfoTypeDataRanks: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
@staticmethod
def deserialize(reader: EoReader) -> "GuildAgreeClientPacket.InfoTypeDataRanks":
    """
    Deserializes an instance of `GuildAgreeClientPacket.InfoTypeDataRanks` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildAgreeClientPacket.InfoTypeDataRanks: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        ranks = []
        for i in range(9):
            ranks.append(reader.get_string())
            reader.next_chunk()
        result = GuildAgreeClientPacket.InfoTypeDataRanks(ranks=ranks)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

__init__(*, session_id, info_type, info_type_data=None)

Create a new instance of GuildAgreeClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-4097152080.)

required
info_type GuildInfoType
required
info_type_data InfoTypeData

Data associated with the info_type field.

None
Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
26
27
28
29
30
31
32
33
34
35
36
37
def __init__(self, *, session_id: int, info_type: GuildInfoType, info_type_data: 'GuildAgreeClientPacket.InfoTypeData' = None):
    """
    Create a new instance of GuildAgreeClientPacket.

    Args:
        session_id (int): (Value range is 0-4097152080.)
        info_type (GuildInfoType): 
        info_type_data (GuildAgreeClientPacket.InfoTypeData): Data associated with the `info_type` field.
    """
    self._session_id = session_id
    self._info_type = info_type
    self._info_type_data = info_type_data

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
64
65
66
67
68
69
70
71
72
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
74
75
76
77
78
79
80
81
82
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Agree

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
84
85
86
87
88
89
90
91
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildAgreeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildAgreeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildAgreeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
@staticmethod
def serialize(writer: EoWriter, data: "GuildAgreeClientPacket") -> None:
    """
    Serializes an instance of `GuildAgreeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildAgreeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
        if data._info_type is None:
            raise SerializationError("info_type must be provided.")
        writer.add_short(int(data._info_type))
        if data._info_type == GuildInfoType.Description:
            if not isinstance(data._info_type_data, GuildAgreeClientPacket.InfoTypeDataDescription):
                raise SerializationError("Expected info_type_data to be type GuildAgreeClientPacket.InfoTypeDataDescription for info_type " + GuildInfoType(data._info_type).name + ".")
            GuildAgreeClientPacket.InfoTypeDataDescription.serialize(writer, data._info_type_data)
        elif data._info_type == GuildInfoType.Ranks:
            if not isinstance(data._info_type_data, GuildAgreeClientPacket.InfoTypeDataRanks):
                raise SerializationError("Expected info_type_data to be type GuildAgreeClientPacket.InfoTypeDataRanks for info_type " + GuildInfoType(data._info_type).name + ".")
            GuildAgreeClientPacket.InfoTypeDataRanks.serialize(writer, data._info_type_data)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildAgreeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildAgreeClientPacket 'GuildAgreeClientPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_agree_client_packet.py
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
@staticmethod
def deserialize(reader: EoReader) -> "GuildAgreeClientPacket":
    """
    Deserializes an instance of `GuildAgreeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildAgreeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        session_id = reader.get_int()
        info_type = GuildInfoType(reader.get_short())
        info_type_data: GuildAgreeClientPacket.InfoTypeData = None
        if info_type == GuildInfoType.Description:
            info_type_data = GuildAgreeClientPacket.InfoTypeDataDescription.deserialize(reader)
        elif info_type == GuildInfoType.Ranks:
            info_type_data = GuildAgreeClientPacket.InfoTypeDataRanks.deserialize(reader)
        reader.chunked_reading_mode = False
        result = GuildAgreeClientPacket(session_id=session_id, info_type=info_type, info_type_data=info_type_data)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildAcceptClientPacket

Bases: Packet

Accept pending guild creation invite

Source code in src/eolib/protocol/_generated/net/client/guild_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
class GuildAcceptClientPacket(Packet):
    """
    Accept pending guild creation invite
    """
    _byte_size: int = 0
    _inviter_player_id: int

    def __init__(self, *, inviter_player_id: int):
        """
        Create a new instance of GuildAcceptClientPacket.

        Args:
            inviter_player_id (int): (Value range is 0-64008.)
        """
        self._inviter_player_id = inviter_player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def inviter_player_id(self) -> int:
        return self._inviter_player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Guild

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GuildAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildAcceptClientPacket") -> None:
        """
        Serializes an instance of `GuildAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_int(20202)
            if data._inviter_player_id is None:
                raise SerializationError("inviter_player_id must be provided.")
            writer.add_short(data._inviter_player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildAcceptClientPacket":
        """
        Deserializes an instance of `GuildAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_int()
            inviter_player_id = reader.get_short()
            result = GuildAcceptClientPacket(inviter_player_id=inviter_player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GuildAcceptClientPacket(byte_size={repr(self._byte_size)}, inviter_player_id={repr(self._inviter_player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

inviter_player_id: int property

__init__(*, inviter_player_id)

Create a new instance of GuildAcceptClientPacket.

Parameters:

Name Type Description Default
inviter_player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/guild_accept_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, inviter_player_id: int):
    """
    Create a new instance of GuildAcceptClientPacket.

    Args:
        inviter_player_id (int): (Value range is 0-64008.)
    """
    self._inviter_player_id = inviter_player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_accept_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/guild_accept_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/guild_accept_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/guild_accept_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "GuildAcceptClientPacket") -> None:
    """
    Serializes an instance of `GuildAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_int(20202)
        if data._inviter_player_id is None:
            raise SerializationError("inviter_player_id must be provided.")
        writer.add_short(data._inviter_player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GuildAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildAcceptClientPacket GuildAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/guild_accept_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@staticmethod
def deserialize(reader: EoReader) -> "GuildAcceptClientPacket":
    """
    Deserializes an instance of `GuildAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_int()
        inviter_player_id = reader.get_short()
        result = GuildAcceptClientPacket(inviter_player_id=inviter_player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GlobalRemoveClientPacket

Bases: Packet

Enable whispers

Source code in src/eolib/protocol/_generated/net/client/global_remove_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class GlobalRemoveClientPacket(Packet):
    """
    Enable whispers
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of GlobalRemoveClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Global

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GlobalRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GlobalRemoveClientPacket") -> None:
        """
        Serializes an instance of `GlobalRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GlobalRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_string("n")
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GlobalRemoveClientPacket":
        """
        Deserializes an instance of `GlobalRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GlobalRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_string()
            result = GlobalRemoveClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GlobalRemoveClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of GlobalRemoveClientPacket.

Source code in src/eolib/protocol/_generated/net/client/global_remove_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of GlobalRemoveClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/global_remove_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Global

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/global_remove_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/global_remove_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GlobalRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GlobalRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GlobalRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/global_remove_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "GlobalRemoveClientPacket") -> None:
    """
    Serializes an instance of `GlobalRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GlobalRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_string("n")
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GlobalRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GlobalRemoveClientPacket GlobalRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/global_remove_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "GlobalRemoveClientPacket":
    """
    Deserializes an instance of `GlobalRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GlobalRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        result = GlobalRemoveClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GlobalPlayerClientPacket

Bases: Packet

Disable whispers

Source code in src/eolib/protocol/_generated/net/client/global_player_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class GlobalPlayerClientPacket(Packet):
    """
    Disable whispers
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of GlobalPlayerClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Global

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Player

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GlobalPlayerClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GlobalPlayerClientPacket") -> None:
        """
        Serializes an instance of `GlobalPlayerClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GlobalPlayerClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_string("y")
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GlobalPlayerClientPacket":
        """
        Deserializes an instance of `GlobalPlayerClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GlobalPlayerClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_string()
            result = GlobalPlayerClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GlobalPlayerClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of GlobalPlayerClientPacket.

Source code in src/eolib/protocol/_generated/net/client/global_player_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of GlobalPlayerClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/global_player_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Global

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/global_player_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Player

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/global_player_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GlobalPlayerClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GlobalPlayerClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GlobalPlayerClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/global_player_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "GlobalPlayerClientPacket") -> None:
    """
    Serializes an instance of `GlobalPlayerClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GlobalPlayerClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_string("y")
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GlobalPlayerClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GlobalPlayerClientPacket GlobalPlayerClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/global_player_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "GlobalPlayerClientPacket":
    """
    Deserializes an instance of `GlobalPlayerClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GlobalPlayerClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        result = GlobalPlayerClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GlobalOpenClientPacket

Bases: Packet

Opened global tab

Source code in src/eolib/protocol/_generated/net/client/global_open_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class GlobalOpenClientPacket(Packet):
    """
    Opened global tab
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of GlobalOpenClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Global

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GlobalOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GlobalOpenClientPacket") -> None:
        """
        Serializes an instance of `GlobalOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GlobalOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_string("y")
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GlobalOpenClientPacket":
        """
        Deserializes an instance of `GlobalOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GlobalOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_string()
            result = GlobalOpenClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GlobalOpenClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of GlobalOpenClientPacket.

Source code in src/eolib/protocol/_generated/net/client/global_open_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of GlobalOpenClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/global_open_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Global

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/global_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/global_open_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GlobalOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GlobalOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GlobalOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/global_open_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "GlobalOpenClientPacket") -> None:
    """
    Serializes an instance of `GlobalOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GlobalOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_string("y")
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GlobalOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GlobalOpenClientPacket GlobalOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/global_open_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "GlobalOpenClientPacket":
    """
    Deserializes an instance of `GlobalOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GlobalOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        result = GlobalOpenClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GlobalCloseClientPacket

Bases: Packet

Closed global tab

Source code in src/eolib/protocol/_generated/net/client/global_close_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class GlobalCloseClientPacket(Packet):
    """
    Closed global tab
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of GlobalCloseClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Global

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Close

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        GlobalCloseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GlobalCloseClientPacket") -> None:
        """
        Serializes an instance of `GlobalCloseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GlobalCloseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_string("n")
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "GlobalCloseClientPacket":
        """
        Deserializes an instance of `GlobalCloseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GlobalCloseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_string()
            result = GlobalCloseClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"GlobalCloseClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of GlobalCloseClientPacket.

Source code in src/eolib/protocol/_generated/net/client/global_close_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of GlobalCloseClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/global_close_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Global

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/global_close_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Close

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/global_close_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GlobalCloseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GlobalCloseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GlobalCloseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/global_close_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "GlobalCloseClientPacket") -> None:
    """
    Serializes an instance of `GlobalCloseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GlobalCloseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_string("n")
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of GlobalCloseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GlobalCloseClientPacket GlobalCloseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/global_close_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "GlobalCloseClientPacket":
    """
    Deserializes an instance of `GlobalCloseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GlobalCloseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        result = GlobalCloseClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

FacePlayerClientPacket

Bases: Packet

Facing a direction

Source code in src/eolib/protocol/_generated/net/client/face_player_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class FacePlayerClientPacket(Packet):
    """
    Facing a direction
    """
    _byte_size: int = 0
    _direction: Direction

    def __init__(self, *, direction: Direction):
        """
        Create a new instance of FacePlayerClientPacket.

        Args:
            direction (Direction): 
        """
        self._direction = direction

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def direction(self) -> Direction:
        return self._direction

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Face

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Player

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        FacePlayerClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "FacePlayerClientPacket") -> None:
        """
        Serializes an instance of `FacePlayerClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (FacePlayerClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._direction is None:
                raise SerializationError("direction must be provided.")
            writer.add_char(int(data._direction))
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "FacePlayerClientPacket":
        """
        Deserializes an instance of `FacePlayerClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            FacePlayerClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            direction = Direction(reader.get_char())
            result = FacePlayerClientPacket(direction=direction)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"FacePlayerClientPacket(byte_size={repr(self._byte_size)}, direction={repr(self._direction)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

direction: Direction property

__init__(*, direction)

Create a new instance of FacePlayerClientPacket.

Parameters:

Name Type Description Default
direction Direction
required
Source code in src/eolib/protocol/_generated/net/client/face_player_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, direction: Direction):
    """
    Create a new instance of FacePlayerClientPacket.

    Args:
        direction (Direction): 
    """
    self._direction = direction

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/face_player_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Face

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/face_player_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Player

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/face_player_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    FacePlayerClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of FacePlayerClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data FacePlayerClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/face_player_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "FacePlayerClientPacket") -> None:
    """
    Serializes an instance of `FacePlayerClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (FacePlayerClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of FacePlayerClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
FacePlayerClientPacket FacePlayerClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/face_player_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "FacePlayerClientPacket":
    """
    Deserializes an instance of `FacePlayerClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        FacePlayerClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        direction = Direction(reader.get_char())
        result = FacePlayerClientPacket(direction=direction)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

Emote

Bases: IntEnum

Emote that can be played over a player's head

Source code in src/eolib/protocol/_generated/emote.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class Emote(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Emote that can be played over a player's head
    """
    Happy = 1
    Depressed = 2
    Sad = 3
    Angry = 4
    Confused = 5
    Surprised = 6
    Hearts = 7
    Moon = 8
    Suicidal = 9
    Embarrassed = 10
    Drunk = 11
    Trade = 12
    LevelUp = 13
    Playful = 14

Happy = 1 class-attribute instance-attribute

Depressed = 2 class-attribute instance-attribute

Sad = 3 class-attribute instance-attribute

Angry = 4 class-attribute instance-attribute

Confused = 5 class-attribute instance-attribute

Surprised = 6 class-attribute instance-attribute

Hearts = 7 class-attribute instance-attribute

Moon = 8 class-attribute instance-attribute

Suicidal = 9 class-attribute instance-attribute

Embarrassed = 10 class-attribute instance-attribute

Drunk = 11 class-attribute instance-attribute

Trade = 12 class-attribute instance-attribute

LevelUp = 13 class-attribute instance-attribute

Playful = 14 class-attribute instance-attribute

EmoteReportClientPacket

Bases: Packet

Doing an emote

Source code in src/eolib/protocol/_generated/net/client/emote_report_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class EmoteReportClientPacket(Packet):
    """
    Doing an emote
    """
    _byte_size: int = 0
    _emote: Emote

    def __init__(self, *, emote: Emote):
        """
        Create a new instance of EmoteReportClientPacket.

        Args:
            emote (Emote): 
        """
        self._emote = emote

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def emote(self) -> Emote:
        return self._emote

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Emote

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Report

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        EmoteReportClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EmoteReportClientPacket") -> None:
        """
        Serializes an instance of `EmoteReportClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EmoteReportClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._emote is None:
                raise SerializationError("emote must be provided.")
            writer.add_char(int(data._emote))
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "EmoteReportClientPacket":
        """
        Deserializes an instance of `EmoteReportClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EmoteReportClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            emote = Emote(reader.get_char())
            result = EmoteReportClientPacket(emote=emote)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"EmoteReportClientPacket(byte_size={repr(self._byte_size)}, emote={repr(self._emote)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

emote: Emote property

__init__(*, emote)

Create a new instance of EmoteReportClientPacket.

Parameters:

Name Type Description Default
emote Emote
required
Source code in src/eolib/protocol/_generated/net/client/emote_report_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, emote: Emote):
    """
    Create a new instance of EmoteReportClientPacket.

    Args:
        emote (Emote): 
    """
    self._emote = emote

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/emote_report_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Emote

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/emote_report_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Report

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/emote_report_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    EmoteReportClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EmoteReportClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EmoteReportClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/emote_report_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "EmoteReportClientPacket") -> None:
    """
    Serializes an instance of `EmoteReportClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EmoteReportClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._emote is None:
            raise SerializationError("emote must be provided.")
        writer.add_char(int(data._emote))
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of EmoteReportClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EmoteReportClientPacket EmoteReportClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/emote_report_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "EmoteReportClientPacket":
    """
    Deserializes an instance of `EmoteReportClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EmoteReportClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        emote = Emote(reader.get_char())
        result = EmoteReportClientPacket(emote=emote)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

DoorOpenClientPacket

Bases: Packet

Opening a door

Source code in src/eolib/protocol/_generated/net/client/door_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class DoorOpenClientPacket(Packet):
    """
    Opening a door
    """
    _byte_size: int = 0
    _coords: Coords

    def __init__(self, *, coords: Coords):
        """
        Create a new instance of DoorOpenClientPacket.

        Args:
            coords (Coords): 
        """
        self._coords = coords

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def coords(self) -> Coords:
        return self._coords

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Door

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        DoorOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "DoorOpenClientPacket") -> None:
        """
        Serializes an instance of `DoorOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (DoorOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            Coords.serialize(writer, data._coords)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "DoorOpenClientPacket":
        """
        Deserializes an instance of `DoorOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            DoorOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            coords = Coords.deserialize(reader)
            result = DoorOpenClientPacket(coords=coords)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"DoorOpenClientPacket(byte_size={repr(self._byte_size)}, coords={repr(self._coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

coords: Coords property

__init__(*, coords)

Create a new instance of DoorOpenClientPacket.

Parameters:

Name Type Description Default
coords Coords
required
Source code in src/eolib/protocol/_generated/net/client/door_open_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, coords: Coords):
    """
    Create a new instance of DoorOpenClientPacket.

    Args:
        coords (Coords): 
    """
    self._coords = coords

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/door_open_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Door

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/door_open_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/door_open_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    DoorOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of DoorOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data DoorOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/door_open_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "DoorOpenClientPacket") -> None:
    """
    Serializes an instance of `DoorOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (DoorOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of DoorOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
DoorOpenClientPacket DoorOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/door_open_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "DoorOpenClientPacket":
    """
    Deserializes an instance of `DoorOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        DoorOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        coords = Coords.deserialize(reader)
        result = DoorOpenClientPacket(coords=coords)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ConnectionPingClientPacket

Bases: Packet

Ping reply

Source code in src/eolib/protocol/_generated/net/client/connection_ping_client_packet.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class ConnectionPingClientPacket(Packet):
    """
    Ping reply
    """
    _byte_size: int = 0

    def __init__(self):
        """
        Create a new instance of ConnectionPingClientPacket.
        """

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Connection

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Ping

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ConnectionPingClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ConnectionPingClientPacket") -> None:
        """
        Serializes an instance of `ConnectionPingClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ConnectionPingClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.add_string("k")
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ConnectionPingClientPacket":
        """
        Deserializes an instance of `ConnectionPingClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ConnectionPingClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_string()
            result = ConnectionPingClientPacket()
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ConnectionPingClientPacket(byte_size={repr(self._byte_size)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

__init__()

Create a new instance of ConnectionPingClientPacket.

Source code in src/eolib/protocol/_generated/net/client/connection_ping_client_packet.py
18
19
20
21
def __init__(self):
    """
    Create a new instance of ConnectionPingClientPacket.
    """

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/connection_ping_client_packet.py
33
34
35
36
37
38
39
40
41
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Connection

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/connection_ping_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Ping

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/connection_ping_client_packet.py
53
54
55
56
57
58
59
60
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ConnectionPingClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ConnectionPingClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ConnectionPingClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/connection_ping_client_packet.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "ConnectionPingClientPacket") -> None:
    """
    Serializes an instance of `ConnectionPingClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ConnectionPingClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.add_string("k")
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ConnectionPingClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ConnectionPingClientPacket ConnectionPingClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/connection_ping_client_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def deserialize(reader: EoReader) -> "ConnectionPingClientPacket":
    """
    Deserializes an instance of `ConnectionPingClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ConnectionPingClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        result = ConnectionPingClientPacket()
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ConnectionAcceptClientPacket

Bases: Packet

Confirm initialization data

Source code in src/eolib/protocol/_generated/net/client/connection_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
class ConnectionAcceptClientPacket(Packet):
    """
    Confirm initialization data
    """
    _byte_size: int = 0
    _client_encryption_multiple: int
    _server_encryption_multiple: int
    _player_id: int

    def __init__(self, *, client_encryption_multiple: int, server_encryption_multiple: int, player_id: int):
        """
        Create a new instance of ConnectionAcceptClientPacket.

        Args:
            client_encryption_multiple (int): (Value range is 0-64008.)
            server_encryption_multiple (int): (Value range is 0-64008.)
            player_id (int): (Value range is 0-64008.)
        """
        self._client_encryption_multiple = client_encryption_multiple
        self._server_encryption_multiple = server_encryption_multiple
        self._player_id = player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def client_encryption_multiple(self) -> int:
        return self._client_encryption_multiple

    @property
    def server_encryption_multiple(self) -> int:
        return self._server_encryption_multiple

    @property
    def player_id(self) -> int:
        return self._player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Connection

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ConnectionAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ConnectionAcceptClientPacket") -> None:
        """
        Serializes an instance of `ConnectionAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ConnectionAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._client_encryption_multiple is None:
                raise SerializationError("client_encryption_multiple must be provided.")
            writer.add_short(data._client_encryption_multiple)
            if data._server_encryption_multiple is None:
                raise SerializationError("server_encryption_multiple must be provided.")
            writer.add_short(data._server_encryption_multiple)
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ConnectionAcceptClientPacket":
        """
        Deserializes an instance of `ConnectionAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ConnectionAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            client_encryption_multiple = reader.get_short()
            server_encryption_multiple = reader.get_short()
            player_id = reader.get_short()
            result = ConnectionAcceptClientPacket(client_encryption_multiple=client_encryption_multiple, server_encryption_multiple=server_encryption_multiple, player_id=player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ConnectionAcceptClientPacket(byte_size={repr(self._byte_size)}, client_encryption_multiple={repr(self._client_encryption_multiple)}, server_encryption_multiple={repr(self._server_encryption_multiple)}, player_id={repr(self._player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

client_encryption_multiple: int property

server_encryption_multiple: int property

player_id: int property

__init__(*, client_encryption_multiple, server_encryption_multiple, player_id)

Create a new instance of ConnectionAcceptClientPacket.

Parameters:

Name Type Description Default
client_encryption_multiple int

(Value range is 0-64008.)

required
server_encryption_multiple int

(Value range is 0-64008.)

required
player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/connection_accept_client_packet.py
22
23
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, client_encryption_multiple: int, server_encryption_multiple: int, player_id: int):
    """
    Create a new instance of ConnectionAcceptClientPacket.

    Args:
        client_encryption_multiple (int): (Value range is 0-64008.)
        server_encryption_multiple (int): (Value range is 0-64008.)
        player_id (int): (Value range is 0-64008.)
    """
    self._client_encryption_multiple = client_encryption_multiple
    self._server_encryption_multiple = server_encryption_multiple
    self._player_id = player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/connection_accept_client_packet.py
57
58
59
60
61
62
63
64
65
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Connection

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/connection_accept_client_packet.py
67
68
69
70
71
72
73
74
75
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/connection_accept_client_packet.py
77
78
79
80
81
82
83
84
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ConnectionAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ConnectionAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ConnectionAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/connection_accept_client_packet.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@staticmethod
def serialize(writer: EoWriter, data: "ConnectionAcceptClientPacket") -> None:
    """
    Serializes an instance of `ConnectionAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ConnectionAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._client_encryption_multiple is None:
            raise SerializationError("client_encryption_multiple must be provided.")
        writer.add_short(data._client_encryption_multiple)
        if data._server_encryption_multiple is None:
            raise SerializationError("server_encryption_multiple must be provided.")
        writer.add_short(data._server_encryption_multiple)
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ConnectionAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ConnectionAcceptClientPacket ConnectionAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/connection_accept_client_packet.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@staticmethod
def deserialize(reader: EoReader) -> "ConnectionAcceptClientPacket":
    """
    Deserializes an instance of `ConnectionAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ConnectionAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        client_encryption_multiple = reader.get_short()
        server_encryption_multiple = reader.get_short()
        player_id = reader.get_short()
        result = ConnectionAcceptClientPacket(client_encryption_multiple=client_encryption_multiple, server_encryption_multiple=server_encryption_multiple, player_id=player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenRequestClientPacket

Bases: Packet

Request sleeping at an inn

Source code in src/eolib/protocol/_generated/net/client/citizen_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class CitizenRequestClientPacket(Packet):
    """
    Request sleeping at an inn
    """
    _byte_size: int = 0
    _session_id: int
    _behavior_id: int

    def __init__(self, *, session_id: int, behavior_id: int):
        """
        Create a new instance of CitizenRequestClientPacket.

        Args:
            session_id (int): (Value range is 0-64008.)
            behavior_id (int): (Value range is 0-64008.)
        """
        self._session_id = session_id
        self._behavior_id = behavior_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def behavior_id(self) -> int:
        return self._behavior_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Citizen

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CitizenRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenRequestClientPacket") -> None:
        """
        Serializes an instance of `CitizenRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
            if data._behavior_id is None:
                raise SerializationError("behavior_id must be provided.")
            writer.add_short(data._behavior_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenRequestClientPacket":
        """
        Deserializes an instance of `CitizenRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_short()
            behavior_id = reader.get_short()
            result = CitizenRequestClientPacket(session_id=session_id, behavior_id=behavior_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CitizenRequestClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, behavior_id={repr(self._behavior_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

behavior_id: int property

__init__(*, session_id, behavior_id)

Create a new instance of CitizenRequestClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-64008.)

required
behavior_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/citizen_request_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, behavior_id: int):
    """
    Create a new instance of CitizenRequestClientPacket.

    Args:
        session_id (int): (Value range is 0-64008.)
        behavior_id (int): (Value range is 0-64008.)
    """
    self._session_id = session_id
    self._behavior_id = behavior_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_request_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Citizen

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_request_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_request_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CitizenRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_request_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "CitizenRequestClientPacket") -> None:
    """
    Serializes an instance of `CitizenRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
        if data._behavior_id is None:
            raise SerializationError("behavior_id must be provided.")
        writer.add_short(data._behavior_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CitizenRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenRequestClientPacket CitizenRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/citizen_request_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "CitizenRequestClientPacket":
    """
    Deserializes an instance of `CitizenRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_short()
        behavior_id = reader.get_short()
        result = CitizenRequestClientPacket(session_id=session_id, behavior_id=behavior_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenReplyClientPacket

Bases: Packet

Subscribing to a town

Source code in src/eolib/protocol/_generated/net/client/citizen_reply_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
class CitizenReplyClientPacket(Packet):
    """
    Subscribing to a town
    """
    _byte_size: int = 0
    _session_id: int
    _behavior_id: int
    _answers: tuple[str, ...]

    def __init__(self, *, session_id: int, behavior_id: int, answers: Iterable[str]):
        """
        Create a new instance of CitizenReplyClientPacket.

        Args:
            session_id (int): (Value range is 0-64008.)
            behavior_id (int): (Value range is 0-64008.)
            answers (Iterable[str]): (Length must be `3`.)
        """
        self._session_id = session_id
        self._behavior_id = behavior_id
        self._answers = tuple(answers)

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def behavior_id(self) -> int:
        return self._behavior_id

    @property
    def answers(self) -> tuple[str, ...]:
        return self._answers

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Citizen

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Reply

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CitizenReplyClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenReplyClientPacket") -> None:
        """
        Serializes an instance of `CitizenReplyClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenReplyClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
            writer.add_byte(0xFF)
            if data._behavior_id is None:
                raise SerializationError("behavior_id must be provided.")
            writer.add_short(data._behavior_id)
            writer.add_byte(0xFF)
            if data._answers is None:
                raise SerializationError("answers must be provided.")
            if len(data._answers) != 3:
                raise SerializationError(f"Expected length of answers to be exactly 3, got {len(data._answers)}.")
            for i in range(3):
                if i > 0:
                    writer.add_byte(0xFF)
                writer.add_string(data._answers[i])
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenReplyClientPacket":
        """
        Deserializes an instance of `CitizenReplyClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenReplyClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            session_id = reader.get_short()
            reader.next_chunk()
            behavior_id = reader.get_short()
            reader.next_chunk()
            answers = []
            for i in range(3):
                answers.append(reader.get_string())
                if i + 1 < 3:
                    reader.next_chunk()
            reader.chunked_reading_mode = False
            result = CitizenReplyClientPacket(session_id=session_id, behavior_id=behavior_id, answers=answers)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CitizenReplyClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, behavior_id={repr(self._behavior_id)}, answers={repr(self._answers)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

behavior_id: int property

answers: tuple[str, ...] property

__init__(*, session_id, behavior_id, answers)

Create a new instance of CitizenReplyClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-64008.)

required
behavior_id int

(Value range is 0-64008.)

required
answers Iterable[str]

(Length must be 3.)

required
Source code in src/eolib/protocol/_generated/net/client/citizen_reply_client_packet.py
24
25
26
27
28
29
30
31
32
33
34
35
def __init__(self, *, session_id: int, behavior_id: int, answers: Iterable[str]):
    """
    Create a new instance of CitizenReplyClientPacket.

    Args:
        session_id (int): (Value range is 0-64008.)
        behavior_id (int): (Value range is 0-64008.)
        answers (Iterable[str]): (Length must be `3`.)
    """
    self._session_id = session_id
    self._behavior_id = behavior_id
    self._answers = tuple(answers)

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_reply_client_packet.py
59
60
61
62
63
64
65
66
67
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Citizen

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_reply_client_packet.py
69
70
71
72
73
74
75
76
77
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Reply

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_reply_client_packet.py
79
80
81
82
83
84
85
86
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CitizenReplyClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenReplyClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenReplyClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_reply_client_packet.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@staticmethod
def serialize(writer: EoWriter, data: "CitizenReplyClientPacket") -> None:
    """
    Serializes an instance of `CitizenReplyClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenReplyClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
        writer.add_byte(0xFF)
        if data._behavior_id is None:
            raise SerializationError("behavior_id must be provided.")
        writer.add_short(data._behavior_id)
        writer.add_byte(0xFF)
        if data._answers is None:
            raise SerializationError("answers must be provided.")
        if len(data._answers) != 3:
            raise SerializationError(f"Expected length of answers to be exactly 3, got {len(data._answers)}.")
        for i in range(3):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._answers[i])
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CitizenReplyClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenReplyClientPacket 'CitizenReplyClientPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/citizen_reply_client_packet.py
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
@staticmethod
def deserialize(reader: EoReader) -> "CitizenReplyClientPacket":
    """
    Deserializes an instance of `CitizenReplyClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenReplyClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        session_id = reader.get_short()
        reader.next_chunk()
        behavior_id = reader.get_short()
        reader.next_chunk()
        answers = []
        for i in range(3):
            answers.append(reader.get_string())
            if i + 1 < 3:
                reader.next_chunk()
        reader.chunked_reading_mode = False
        result = CitizenReplyClientPacket(session_id=session_id, behavior_id=behavior_id, answers=answers)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenRemoveClientPacket

Bases: Packet

Giving up citizenship of a town

Source code in src/eolib/protocol/_generated/net/client/citizen_remove_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class CitizenRemoveClientPacket(Packet):
    """
    Giving up citizenship of a town
    """
    _byte_size: int = 0
    _behavior_id: int

    def __init__(self, *, behavior_id: int):
        """
        Create a new instance of CitizenRemoveClientPacket.

        Args:
            behavior_id (int): (Value range is 0-64008.)
        """
        self._behavior_id = behavior_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def behavior_id(self) -> int:
        return self._behavior_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Citizen

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CitizenRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenRemoveClientPacket") -> None:
        """
        Serializes an instance of `CitizenRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._behavior_id is None:
                raise SerializationError("behavior_id must be provided.")
            writer.add_short(data._behavior_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenRemoveClientPacket":
        """
        Deserializes an instance of `CitizenRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            behavior_id = reader.get_short()
            result = CitizenRemoveClientPacket(behavior_id=behavior_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CitizenRemoveClientPacket(byte_size={repr(self._byte_size)}, behavior_id={repr(self._behavior_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

behavior_id: int property

__init__(*, behavior_id)

Create a new instance of CitizenRemoveClientPacket.

Parameters:

Name Type Description Default
behavior_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/citizen_remove_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, behavior_id: int):
    """
    Create a new instance of CitizenRemoveClientPacket.

    Args:
        behavior_id (int): (Value range is 0-64008.)
    """
    self._behavior_id = behavior_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_remove_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Citizen

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_remove_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_remove_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CitizenRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_remove_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "CitizenRemoveClientPacket") -> None:
    """
    Serializes an instance of `CitizenRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._behavior_id is None:
            raise SerializationError("behavior_id must be provided.")
        writer.add_short(data._behavior_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CitizenRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenRemoveClientPacket CitizenRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/citizen_remove_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "CitizenRemoveClientPacket":
    """
    Deserializes an instance of `CitizenRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        behavior_id = reader.get_short()
        result = CitizenRemoveClientPacket(behavior_id=behavior_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenOpenClientPacket

Bases: Packet

Talking to a citizenship NPC

Source code in src/eolib/protocol/_generated/net/client/citizen_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class CitizenOpenClientPacket(Packet):
    """
    Talking to a citizenship NPC
    """
    _byte_size: int = 0
    _npc_index: int

    def __init__(self, *, npc_index: int):
        """
        Create a new instance of CitizenOpenClientPacket.

        Args:
            npc_index (int): (Value range is 0-64008.)
        """
        self._npc_index = npc_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Citizen

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CitizenOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenOpenClientPacket") -> None:
        """
        Serializes an instance of `CitizenOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenOpenClientPacket":
        """
        Deserializes an instance of `CitizenOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_short()
            result = CitizenOpenClientPacket(npc_index=npc_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CitizenOpenClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

__init__(*, npc_index)

Create a new instance of CitizenOpenClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/citizen_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, npc_index: int):
    """
    Create a new instance of CitizenOpenClientPacket.

    Args:
        npc_index (int): (Value range is 0-64008.)
    """
    self._npc_index = npc_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Citizen

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CitizenOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "CitizenOpenClientPacket") -> None:
    """
    Serializes an instance of `CitizenOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CitizenOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenOpenClientPacket CitizenOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/citizen_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "CitizenOpenClientPacket":
    """
    Deserializes an instance of `CitizenOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_short()
        result = CitizenOpenClientPacket(npc_index=npc_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenAcceptClientPacket

Bases: Packet

Confirm sleeping at an inn

Source code in src/eolib/protocol/_generated/net/client/citizen_accept_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class CitizenAcceptClientPacket(Packet):
    """
    Confirm sleeping at an inn
    """
    _byte_size: int = 0
    _session_id: int
    _behavior_id: int

    def __init__(self, *, session_id: int, behavior_id: int):
        """
        Create a new instance of CitizenAcceptClientPacket.

        Args:
            session_id (int): (Value range is 0-64008.)
            behavior_id (int): (Value range is 0-64008.)
        """
        self._session_id = session_id
        self._behavior_id = behavior_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def behavior_id(self) -> int:
        return self._behavior_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Citizen

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Accept

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CitizenAcceptClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenAcceptClientPacket") -> None:
        """
        Serializes an instance of `CitizenAcceptClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenAcceptClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
            if data._behavior_id is None:
                raise SerializationError("behavior_id must be provided.")
            writer.add_short(data._behavior_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenAcceptClientPacket":
        """
        Deserializes an instance of `CitizenAcceptClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenAcceptClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_short()
            behavior_id = reader.get_short()
            result = CitizenAcceptClientPacket(session_id=session_id, behavior_id=behavior_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CitizenAcceptClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, behavior_id={repr(self._behavior_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

behavior_id: int property

__init__(*, session_id, behavior_id)

Create a new instance of CitizenAcceptClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-64008.)

required
behavior_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/citizen_accept_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, behavior_id: int):
    """
    Create a new instance of CitizenAcceptClientPacket.

    Args:
        session_id (int): (Value range is 0-64008.)
        behavior_id (int): (Value range is 0-64008.)
    """
    self._session_id = session_id
    self._behavior_id = behavior_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_accept_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Citizen

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/citizen_accept_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Accept

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_accept_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CitizenAcceptClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenAcceptClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenAcceptClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/citizen_accept_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "CitizenAcceptClientPacket") -> None:
    """
    Serializes an instance of `CitizenAcceptClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenAcceptClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
        if data._behavior_id is None:
            raise SerializationError("behavior_id must be provided.")
        writer.add_short(data._behavior_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CitizenAcceptClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenAcceptClientPacket CitizenAcceptClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/citizen_accept_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "CitizenAcceptClientPacket":
    """
    Deserializes an instance of `CitizenAcceptClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenAcceptClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_short()
        behavior_id = reader.get_short()
        result = CitizenAcceptClientPacket(session_id=session_id, behavior_id=behavior_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChestTakeClientPacket

Bases: Packet

Taking an item from a chest

Source code in src/eolib/protocol/_generated/net/client/chest_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
class ChestTakeClientPacket(Packet):
    """
    Taking an item from a chest
    """
    _byte_size: int = 0
    _coords: Coords
    _take_item_id: int

    def __init__(self, *, coords: Coords, take_item_id: int):
        """
        Create a new instance of ChestTakeClientPacket.

        Args:
            coords (Coords): 
            take_item_id (int): (Value range is 0-64008.)
        """
        self._coords = coords
        self._take_item_id = take_item_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def coords(self) -> Coords:
        return self._coords

    @property
    def take_item_id(self) -> int:
        return self._take_item_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Chest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ChestTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestTakeClientPacket") -> None:
        """
        Serializes an instance of `ChestTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            Coords.serialize(writer, data._coords)
            if data._take_item_id is None:
                raise SerializationError("take_item_id must be provided.")
            writer.add_short(data._take_item_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestTakeClientPacket":
        """
        Deserializes an instance of `ChestTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            coords = Coords.deserialize(reader)
            take_item_id = reader.get_short()
            result = ChestTakeClientPacket(coords=coords, take_item_id=take_item_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ChestTakeClientPacket(byte_size={repr(self._byte_size)}, coords={repr(self._coords)}, take_item_id={repr(self._take_item_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

coords: Coords property

take_item_id: int property

__init__(*, coords, take_item_id)

Create a new instance of ChestTakeClientPacket.

Parameters:

Name Type Description Default
coords Coords
required
take_item_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/chest_take_client_packet.py
22
23
24
25
26
27
28
29
30
31
def __init__(self, *, coords: Coords, take_item_id: int):
    """
    Create a new instance of ChestTakeClientPacket.

    Args:
        coords (Coords): 
        take_item_id (int): (Value range is 0-64008.)
    """
    self._coords = coords
    self._take_item_id = take_item_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/chest_take_client_packet.py
51
52
53
54
55
56
57
58
59
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Chest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/chest_take_client_packet.py
61
62
63
64
65
66
67
68
69
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/chest_take_client_packet.py
71
72
73
74
75
76
77
78
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChestTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/chest_take_client_packet.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "ChestTakeClientPacket") -> None:
    """
    Serializes an instance of `ChestTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._take_item_id is None:
            raise SerializationError("take_item_id must be provided.")
        writer.add_short(data._take_item_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ChestTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestTakeClientPacket ChestTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/chest_take_client_packet.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@staticmethod
def deserialize(reader: EoReader) -> "ChestTakeClientPacket":
    """
    Deserializes an instance of `ChestTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        coords = Coords.deserialize(reader)
        take_item_id = reader.get_short()
        result = ChestTakeClientPacket(coords=coords, take_item_id=take_item_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChestOpenClientPacket

Bases: Packet

Opening a chest

Source code in src/eolib/protocol/_generated/net/client/chest_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class ChestOpenClientPacket(Packet):
    """
    Opening a chest
    """
    _byte_size: int = 0
    _coords: Coords

    def __init__(self, *, coords: Coords):
        """
        Create a new instance of ChestOpenClientPacket.

        Args:
            coords (Coords): 
        """
        self._coords = coords

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def coords(self) -> Coords:
        return self._coords

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Chest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ChestOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestOpenClientPacket") -> None:
        """
        Serializes an instance of `ChestOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            Coords.serialize(writer, data._coords)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestOpenClientPacket":
        """
        Deserializes an instance of `ChestOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            coords = Coords.deserialize(reader)
            result = ChestOpenClientPacket(coords=coords)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ChestOpenClientPacket(byte_size={repr(self._byte_size)}, coords={repr(self._coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

coords: Coords property

__init__(*, coords)

Create a new instance of ChestOpenClientPacket.

Parameters:

Name Type Description Default
coords Coords
required
Source code in src/eolib/protocol/_generated/net/client/chest_open_client_packet.py
21
22
23
24
25
26
27
28
def __init__(self, *, coords: Coords):
    """
    Create a new instance of ChestOpenClientPacket.

    Args:
        coords (Coords): 
    """
    self._coords = coords

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/chest_open_client_packet.py
44
45
46
47
48
49
50
51
52
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Chest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/chest_open_client_packet.py
54
55
56
57
58
59
60
61
62
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/chest_open_client_packet.py
64
65
66
67
68
69
70
71
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChestOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/chest_open_client_packet.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@staticmethod
def serialize(writer: EoWriter, data: "ChestOpenClientPacket") -> None:
    """
    Serializes an instance of `ChestOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ChestOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestOpenClientPacket ChestOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/chest_open_client_packet.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "ChestOpenClientPacket":
    """
    Deserializes an instance of `ChestOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        coords = Coords.deserialize(reader)
        result = ChestOpenClientPacket(coords=coords)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChestAddClientPacket

Bases: Packet

Placing an item in to a chest

Source code in src/eolib/protocol/_generated/net/client/chest_add_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
class ChestAddClientPacket(Packet):
    """
    Placing an item in to a chest
    """
    _byte_size: int = 0
    _coords: Coords
    _add_item: ThreeItem

    def __init__(self, *, coords: Coords, add_item: ThreeItem):
        """
        Create a new instance of ChestAddClientPacket.

        Args:
            coords (Coords): 
            add_item (ThreeItem): 
        """
        self._coords = coords
        self._add_item = add_item

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def coords(self) -> Coords:
        return self._coords

    @property
    def add_item(self) -> ThreeItem:
        return self._add_item

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Chest

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Add

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ChestAddClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestAddClientPacket") -> None:
        """
        Serializes an instance of `ChestAddClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestAddClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            Coords.serialize(writer, data._coords)
            if data._add_item is None:
                raise SerializationError("add_item must be provided.")
            ThreeItem.serialize(writer, data._add_item)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestAddClientPacket":
        """
        Deserializes an instance of `ChestAddClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestAddClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            coords = Coords.deserialize(reader)
            add_item = ThreeItem.deserialize(reader)
            result = ChestAddClientPacket(coords=coords, add_item=add_item)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ChestAddClientPacket(byte_size={repr(self._byte_size)}, coords={repr(self._coords)}, add_item={repr(self._add_item)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

coords: Coords property

add_item: ThreeItem property

__init__(*, coords, add_item)

Create a new instance of ChestAddClientPacket.

Parameters:

Name Type Description Default
coords Coords
required
add_item ThreeItem
required
Source code in src/eolib/protocol/_generated/net/client/chest_add_client_packet.py
23
24
25
26
27
28
29
30
31
32
def __init__(self, *, coords: Coords, add_item: ThreeItem):
    """
    Create a new instance of ChestAddClientPacket.

    Args:
        coords (Coords): 
        add_item (ThreeItem): 
    """
    self._coords = coords
    self._add_item = add_item

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/chest_add_client_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Chest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/chest_add_client_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Add

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/chest_add_client_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChestAddClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestAddClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestAddClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/chest_add_client_packet.py
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "ChestAddClientPacket") -> None:
    """
    Serializes an instance of `ChestAddClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestAddClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._add_item is None:
            raise SerializationError("add_item must be provided.")
        ThreeItem.serialize(writer, data._add_item)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ChestAddClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestAddClientPacket ChestAddClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/chest_add_client_packet.py
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
@staticmethod
def deserialize(reader: EoReader) -> "ChestAddClientPacket":
    """
    Deserializes an instance of `ChestAddClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestAddClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        coords = Coords.deserialize(reader)
        add_item = ThreeItem.deserialize(reader)
        result = ChestAddClientPacket(coords=coords, add_item=add_item)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterTakeClientPacket

Bases: Packet

Request to delete a character from an account

Source code in src/eolib/protocol/_generated/net/client/character_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class CharacterTakeClientPacket(Packet):
    """
    Request to delete a character from an account
    """
    _byte_size: int = 0
    _character_id: int

    def __init__(self, *, character_id: int):
        """
        Create a new instance of CharacterTakeClientPacket.

        Args:
            character_id (int): (Value range is 0-4097152080.)
        """
        self._character_id = character_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def character_id(self) -> int:
        return self._character_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Character

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CharacterTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterTakeClientPacket") -> None:
        """
        Serializes an instance of `CharacterTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._character_id is None:
                raise SerializationError("character_id must be provided.")
            writer.add_int(data._character_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterTakeClientPacket":
        """
        Deserializes an instance of `CharacterTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            character_id = reader.get_int()
            result = CharacterTakeClientPacket(character_id=character_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CharacterTakeClientPacket(byte_size={repr(self._byte_size)}, character_id={repr(self._character_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

character_id: int property

__init__(*, character_id)

Create a new instance of CharacterTakeClientPacket.

Parameters:

Name Type Description Default
character_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/character_take_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, character_id: int):
    """
    Create a new instance of CharacterTakeClientPacket.

    Args:
        character_id (int): (Value range is 0-4097152080.)
    """
    self._character_id = character_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/character_take_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Character

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/character_take_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/character_take_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CharacterTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CharacterTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/character_take_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "CharacterTakeClientPacket") -> None:
    """
    Serializes an instance of `CharacterTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._character_id is None:
            raise SerializationError("character_id must be provided.")
        writer.add_int(data._character_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CharacterTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterTakeClientPacket CharacterTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/character_take_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "CharacterTakeClientPacket":
    """
    Deserializes an instance of `CharacterTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        character_id = reader.get_int()
        result = CharacterTakeClientPacket(character_id=character_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterRequestClientPacket

Bases: Packet

Request to create a character

Source code in src/eolib/protocol/_generated/net/client/character_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
class CharacterRequestClientPacket(Packet):
    """
    Request to create a character
    """
    _byte_size: int = 0
    _request_string: str

    def __init__(self, *, request_string: str):
        """
        Create a new instance of CharacterRequestClientPacket.

        Args:
            request_string (str): 
        """
        self._request_string = "NEW"

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def request_string(self) -> str:
        return self._request_string

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Character

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CharacterRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterRequestClientPacket") -> None:
        """
        Serializes an instance of `CharacterRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            writer.add_string(data._request_string)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterRequestClientPacket":
        """
        Deserializes an instance of `CharacterRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            request_string = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = CharacterRequestClientPacket(request_string=request_string)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CharacterRequestClientPacket(byte_size={repr(self._byte_size)}, request_string={repr(self._request_string)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

request_string: str property

__init__(*, request_string)

Create a new instance of CharacterRequestClientPacket.

Parameters:

Name Type Description Default
request_string str
required
Source code in src/eolib/protocol/_generated/net/client/character_request_client_packet.py
19
20
21
22
23
24
25
26
def __init__(self, *, request_string: str):
    """
    Create a new instance of CharacterRequestClientPacket.

    Args:
        request_string (str): 
    """
    self._request_string = "NEW"

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/character_request_client_packet.py
42
43
44
45
46
47
48
49
50
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Character

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/character_request_client_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/character_request_client_packet.py
62
63
64
65
66
67
68
69
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CharacterRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CharacterRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/character_request_client_packet.py
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "CharacterRequestClientPacket") -> None:
    """
    Serializes an instance of `CharacterRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        writer.add_string(data._request_string)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CharacterRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterRequestClientPacket CharacterRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/character_request_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
@staticmethod
def deserialize(reader: EoReader) -> "CharacterRequestClientPacket":
    """
    Deserializes an instance of `CharacterRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        request_string = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = CharacterRequestClientPacket(request_string=request_string)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterRemoveClientPacket

Bases: Packet

Confirm deleting character from an account

Source code in src/eolib/protocol/_generated/net/client/character_remove_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
class CharacterRemoveClientPacket(Packet):
    """
    Confirm deleting character from an account
    """
    _byte_size: int = 0
    _session_id: int
    _character_id: int

    def __init__(self, *, session_id: int, character_id: int):
        """
        Create a new instance of CharacterRemoveClientPacket.

        Args:
            session_id (int): (Value range is 0-64008.)
            character_id (int): The official client sends a short, which gets written as a variable-sized integer (2-4 bytes) due to a quirk of the official encoding routine. However, the official server expects an int. (Value range is 0-4097152080.)
        """
        self._session_id = session_id
        self._character_id = character_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def character_id(self) -> int:
        """
        The official client sends a short, which gets written as a variable-sized integer
        (2-4 bytes) due to a quirk of the official encoding routine.
        However, the official server expects an int.
        """
        return self._character_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Character

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CharacterRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterRemoveClientPacket") -> None:
        """
        Serializes an instance of `CharacterRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
            if data._character_id is None:
                raise SerializationError("character_id must be provided.")
            writer.add_int(data._character_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterRemoveClientPacket":
        """
        Deserializes an instance of `CharacterRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            session_id = reader.get_short()
            character_id = reader.get_int()
            result = CharacterRemoveClientPacket(session_id=session_id, character_id=character_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CharacterRemoveClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, character_id={repr(self._character_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

character_id: int property

The official client sends a short, which gets written as a variable-sized integer (2-4 bytes) due to a quirk of the official encoding routine. However, the official server expects an int.

__init__(*, session_id, character_id)

Create a new instance of CharacterRemoveClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-64008.)

required
character_id int

The official client sends a short, which gets written as a variable-sized integer (2-4 bytes) due to a quirk of the official encoding routine. However, the official server expects an int. (Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/character_remove_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, session_id: int, character_id: int):
    """
    Create a new instance of CharacterRemoveClientPacket.

    Args:
        session_id (int): (Value range is 0-64008.)
        character_id (int): The official client sends a short, which gets written as a variable-sized integer (2-4 bytes) due to a quirk of the official encoding routine. However, the official server expects an int. (Value range is 0-4097152080.)
    """
    self._session_id = session_id
    self._character_id = character_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/character_remove_client_packet.py
55
56
57
58
59
60
61
62
63
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Character

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/character_remove_client_packet.py
65
66
67
68
69
70
71
72
73
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/character_remove_client_packet.py
75
76
77
78
79
80
81
82
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CharacterRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CharacterRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/character_remove_client_packet.py
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
@staticmethod
def serialize(writer: EoWriter, data: "CharacterRemoveClientPacket") -> None:
    """
    Serializes an instance of `CharacterRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
        if data._character_id is None:
            raise SerializationError("character_id must be provided.")
        writer.add_int(data._character_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CharacterRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterRemoveClientPacket CharacterRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/character_remove_client_packet.py
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
@staticmethod
def deserialize(reader: EoReader) -> "CharacterRemoveClientPacket":
    """
    Deserializes an instance of `CharacterRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        session_id = reader.get_short()
        character_id = reader.get_int()
        result = CharacterRemoveClientPacket(session_id=session_id, character_id=character_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

Gender

Bases: IntEnum

The gender of a player

Source code in src/eolib/protocol/_generated/gender.py
 9
10
11
12
13
14
class Gender(IntEnum, metaclass=ProtocolEnumMeta):
    """
    The gender of a player
    """
    Female = 0
    Male = 1

Female = 0 class-attribute instance-attribute

Male = 1 class-attribute instance-attribute

CharacterCreateClientPacket

Bases: Packet

Confirm creating a character

Source code in src/eolib/protocol/_generated/net/client/character_create_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
class CharacterCreateClientPacket(Packet):
    """
    Confirm creating a character
    """
    _byte_size: int = 0
    _session_id: int
    _gender: Gender
    _hair_style: int
    _hair_color: int
    _skin: int
    _name: str

    def __init__(self, *, session_id: int, gender: Gender, hair_style: int, hair_color: int, skin: int, name: str):
        """
        Create a new instance of CharacterCreateClientPacket.

        Args:
            session_id (int): (Value range is 0-64008.)
            gender (Gender): 
            hair_style (int): (Value range is 0-64008.)
            hair_color (int): (Value range is 0-64008.)
            skin (int): (Value range is 0-64008.)
            name (str): 
        """
        self._session_id = session_id
        self._gender = gender
        self._hair_style = hair_style
        self._hair_color = hair_color
        self._skin = skin
        self._name = name

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def gender(self) -> Gender:
        return self._gender

    @property
    def hair_style(self) -> int:
        return self._hair_style

    @property
    def hair_color(self) -> int:
        return self._hair_color

    @property
    def skin(self) -> int:
        return self._skin

    @property
    def name(self) -> str:
        return self._name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Character

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Create

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        CharacterCreateClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterCreateClientPacket") -> None:
        """
        Serializes an instance of `CharacterCreateClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterCreateClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
            if data._gender is None:
                raise SerializationError("gender must be provided.")
            writer.add_short(int(data._gender))
            if data._hair_style is None:
                raise SerializationError("hair_style must be provided.")
            writer.add_short(data._hair_style)
            if data._hair_color is None:
                raise SerializationError("hair_color must be provided.")
            writer.add_short(data._hair_color)
            if data._skin is None:
                raise SerializationError("skin must be provided.")
            writer.add_short(data._skin)
            writer.add_byte(0xFF)
            if data._name is None:
                raise SerializationError("name must be provided.")
            writer.add_string(data._name)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterCreateClientPacket":
        """
        Deserializes an instance of `CharacterCreateClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterCreateClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            session_id = reader.get_short()
            gender = Gender(reader.get_short())
            hair_style = reader.get_short()
            hair_color = reader.get_short()
            skin = reader.get_short()
            reader.next_chunk()
            name = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = CharacterCreateClientPacket(session_id=session_id, gender=gender, hair_style=hair_style, hair_color=hair_color, skin=skin, name=name)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"CharacterCreateClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, gender={repr(self._gender)}, hair_style={repr(self._hair_style)}, hair_color={repr(self._hair_color)}, skin={repr(self._skin)}, name={repr(self._name)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

gender: Gender property

hair_style: int property

hair_color: int property

skin: int property

name: str property

__init__(*, session_id, gender, hair_style, hair_color, skin, name)

Create a new instance of CharacterCreateClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-64008.)

required
gender Gender
required
hair_style int

(Value range is 0-64008.)

required
hair_color int

(Value range is 0-64008.)

required
skin int

(Value range is 0-64008.)

required
name str
required
Source code in src/eolib/protocol/_generated/net/client/character_create_client_packet.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
def __init__(self, *, session_id: int, gender: Gender, hair_style: int, hair_color: int, skin: int, name: str):
    """
    Create a new instance of CharacterCreateClientPacket.

    Args:
        session_id (int): (Value range is 0-64008.)
        gender (Gender): 
        hair_style (int): (Value range is 0-64008.)
        hair_color (int): (Value range is 0-64008.)
        skin (int): (Value range is 0-64008.)
        name (str): 
    """
    self._session_id = session_id
    self._gender = gender
    self._hair_style = hair_style
    self._hair_color = hair_color
    self._skin = skin
    self._name = name

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/character_create_client_packet.py
79
80
81
82
83
84
85
86
87
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Character

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/character_create_client_packet.py
89
90
91
92
93
94
95
96
97
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Create

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/character_create_client_packet.py
 99
100
101
102
103
104
105
106
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CharacterCreateClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CharacterCreateClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterCreateClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/character_create_client_packet.py
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
@staticmethod
def serialize(writer: EoWriter, data: "CharacterCreateClientPacket") -> None:
    """
    Serializes an instance of `CharacterCreateClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterCreateClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
        if data._gender is None:
            raise SerializationError("gender must be provided.")
        writer.add_short(int(data._gender))
        if data._hair_style is None:
            raise SerializationError("hair_style must be provided.")
        writer.add_short(data._hair_style)
        if data._hair_color is None:
            raise SerializationError("hair_color must be provided.")
        writer.add_short(data._hair_color)
        if data._skin is None:
            raise SerializationError("skin must be provided.")
        writer.add_short(data._skin)
        writer.add_byte(0xFF)
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of CharacterCreateClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterCreateClientPacket CharacterCreateClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/character_create_client_packet.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
@staticmethod
def deserialize(reader: EoReader) -> "CharacterCreateClientPacket":
    """
    Deserializes an instance of `CharacterCreateClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterCreateClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        session_id = reader.get_short()
        gender = Gender(reader.get_short())
        hair_style = reader.get_short()
        hair_color = reader.get_short()
        skin = reader.get_short()
        reader.next_chunk()
        name = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = CharacterCreateClientPacket(session_id=session_id, gender=gender, hair_style=hair_style, hair_color=hair_color, skin=skin, name=name)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChairRequestClientPacket

Bases: Packet

Sitting on a chair

Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
class ChairRequestClientPacket(Packet):
    """
    Sitting on a chair
    """
    _byte_size: int = 0
    _sit_action: SitAction
    _sit_action_data: 'ChairRequestClientPacket.SitActionData'

    def __init__(self, *, sit_action: SitAction, sit_action_data: 'ChairRequestClientPacket.SitActionData' = None):
        """
        Create a new instance of ChairRequestClientPacket.

        Args:
            sit_action (SitAction): 
            sit_action_data (ChairRequestClientPacket.SitActionData): Data associated with the `sit_action` field.
        """
        self._sit_action = sit_action
        self._sit_action_data = sit_action_data

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def sit_action(self) -> SitAction:
        return self._sit_action

    @property
    def sit_action_data(self) -> 'ChairRequestClientPacket.SitActionData':
        """
        ChairRequestClientPacket.SitActionData: Data associated with the `sit_action` field.
        """
        return self._sit_action_data

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Chair

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ChairRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChairRequestClientPacket") -> None:
        """
        Serializes an instance of `ChairRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChairRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._sit_action is None:
                raise SerializationError("sit_action must be provided.")
            writer.add_char(int(data._sit_action))
            if data._sit_action == SitAction.Sit:
                if not isinstance(data._sit_action_data, ChairRequestClientPacket.SitActionDataSit):
                    raise SerializationError("Expected sit_action_data to be type ChairRequestClientPacket.SitActionDataSit for sit_action " + SitAction(data._sit_action).name + ".")
                ChairRequestClientPacket.SitActionDataSit.serialize(writer, data._sit_action_data)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ChairRequestClientPacket":
        """
        Deserializes an instance of `ChairRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChairRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            sit_action = SitAction(reader.get_char())
            sit_action_data: ChairRequestClientPacket.SitActionData = None
            if sit_action == SitAction.Sit:
                sit_action_data = ChairRequestClientPacket.SitActionDataSit.deserialize(reader)
            result = ChairRequestClientPacket(sit_action=sit_action, sit_action_data=sit_action_data)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ChairRequestClientPacket(byte_size={repr(self._byte_size)}, sit_action={repr(self._sit_action)}, sit_action_data={repr(self._sit_action_data)})"

    SitActionData = Union['ChairRequestClientPacket.SitActionDataSit', None]
    """
    Data associated with different values of the `sit_action` field.
    """

    class SitActionDataSit:
        """
        Data associated with sit_action value SitAction.Sit
        """
        _byte_size: int = 0
        _coords: Coords

        def __init__(self, *, coords: Coords):
            """
            Create a new instance of ChairRequestClientPacket.SitActionDataSit.

            Args:
                coords (Coords): 
            """
            self._coords = coords

        @property
        def byte_size(self) -> int:
            """
            Returns the size of the data that this was deserialized from.

            Returns:
                int: The size of the data that this was deserialized from.
            """
            return self._byte_size

        @property
        def coords(self) -> Coords:
            return self._coords

        @staticmethod
        def serialize(writer: EoWriter, data: "ChairRequestClientPacket.SitActionDataSit") -> None:
            """
            Serializes an instance of `ChairRequestClientPacket.SitActionDataSit` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (ChairRequestClientPacket.SitActionDataSit): The data to serialize.
            """
            old_string_sanitization_mode: bool = writer.string_sanitization_mode
            try:
                if data._coords is None:
                    raise SerializationError("coords must be provided.")
                Coords.serialize(writer, data._coords)
            finally:
                writer.string_sanitization_mode = old_string_sanitization_mode

        @staticmethod
        def deserialize(reader: EoReader) -> "ChairRequestClientPacket.SitActionDataSit":
            """
            Deserializes an instance of `ChairRequestClientPacket.SitActionDataSit` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                ChairRequestClientPacket.SitActionDataSit: The data to serialize.
            """
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                coords = Coords.deserialize(reader)
                result = ChairRequestClientPacket.SitActionDataSit(coords=coords)
                result._byte_size = reader.position - reader_start_position
                return result
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"ChairRequestClientPacket.SitActionDataSit(byte_size={repr(self._byte_size)}, coords={repr(self._coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

sit_action: SitAction property

sit_action_data: ChairRequestClientPacket.SitActionData property

ChairRequestClientPacket.SitActionData: Data associated with the sit_action field.

SitActionData = Union['ChairRequestClientPacket.SitActionDataSit', None] class-attribute instance-attribute

Data associated with different values of the sit_action field.

SitActionDataSit

Data associated with sit_action value SitAction.Sit

Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
class SitActionDataSit:
    """
    Data associated with sit_action value SitAction.Sit
    """
    _byte_size: int = 0
    _coords: Coords

    def __init__(self, *, coords: Coords):
        """
        Create a new instance of ChairRequestClientPacket.SitActionDataSit.

        Args:
            coords (Coords): 
        """
        self._coords = coords

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def coords(self) -> Coords:
        return self._coords

    @staticmethod
    def serialize(writer: EoWriter, data: "ChairRequestClientPacket.SitActionDataSit") -> None:
        """
        Serializes an instance of `ChairRequestClientPacket.SitActionDataSit` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChairRequestClientPacket.SitActionDataSit): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            Coords.serialize(writer, data._coords)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "ChairRequestClientPacket.SitActionDataSit":
        """
        Deserializes an instance of `ChairRequestClientPacket.SitActionDataSit` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChairRequestClientPacket.SitActionDataSit: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            coords = Coords.deserialize(reader)
            result = ChairRequestClientPacket.SitActionDataSit(coords=coords)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"ChairRequestClientPacket.SitActionDataSit(byte_size={repr(self._byte_size)}, coords={repr(self._coords)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

coords: Coords property

__init__(*, coords)

Create a new instance of ChairRequestClientPacket.SitActionDataSit.

Parameters:

Name Type Description Default
coords Coords
required
Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
145
146
147
148
149
150
151
152
def __init__(self, *, coords: Coords):
    """
    Create a new instance of ChairRequestClientPacket.SitActionDataSit.

    Args:
        coords (Coords): 
    """
    self._coords = coords

serialize(writer, data) staticmethod

Serializes an instance of ChairRequestClientPacket.SitActionDataSit to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SitActionDataSit

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
@staticmethod
def serialize(writer: EoWriter, data: "ChairRequestClientPacket.SitActionDataSit") -> None:
    """
    Serializes an instance of `ChairRequestClientPacket.SitActionDataSit` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChairRequestClientPacket.SitActionDataSit): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ChairRequestClientPacket.SitActionDataSit from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
SitActionDataSit

ChairRequestClientPacket.SitActionDataSit: The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
@staticmethod
def deserialize(reader: EoReader) -> "ChairRequestClientPacket.SitActionDataSit":
    """
    Deserializes an instance of `ChairRequestClientPacket.SitActionDataSit` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChairRequestClientPacket.SitActionDataSit: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        coords = Coords.deserialize(reader)
        result = ChairRequestClientPacket.SitActionDataSit(coords=coords)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

__init__(*, sit_action, sit_action_data=None)

Create a new instance of ChairRequestClientPacket.

Parameters:

Name Type Description Default
sit_action SitAction
required
sit_action_data SitActionData

Data associated with the sit_action field.

None
Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, sit_action: SitAction, sit_action_data: 'ChairRequestClientPacket.SitActionData' = None):
    """
    Create a new instance of ChairRequestClientPacket.

    Args:
        sit_action (SitAction): 
        sit_action_data (ChairRequestClientPacket.SitActionData): Data associated with the `sit_action` field.
    """
    self._sit_action = sit_action
    self._sit_action_data = sit_action_data

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Chair

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
66
67
68
69
70
71
72
73
74
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
76
77
78
79
80
81
82
83
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChairRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChairRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChairRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
@staticmethod
def serialize(writer: EoWriter, data: "ChairRequestClientPacket") -> None:
    """
    Serializes an instance of `ChairRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChairRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._sit_action is None:
            raise SerializationError("sit_action must be provided.")
        writer.add_char(int(data._sit_action))
        if data._sit_action == SitAction.Sit:
            if not isinstance(data._sit_action_data, ChairRequestClientPacket.SitActionDataSit):
                raise SerializationError("Expected sit_action_data to be type ChairRequestClientPacket.SitActionDataSit for sit_action " + SitAction(data._sit_action).name + ".")
            ChairRequestClientPacket.SitActionDataSit.serialize(writer, data._sit_action_data)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of ChairRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChairRequestClientPacket ChairRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/chair_request_client_packet.py
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@staticmethod
def deserialize(reader: EoReader) -> "ChairRequestClientPacket":
    """
    Deserializes an instance of `ChairRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChairRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        sit_action = SitAction(reader.get_char())
        sit_action_data: ChairRequestClientPacket.SitActionData = None
        if sit_action == SitAction.Sit:
            sit_action_data = ChairRequestClientPacket.SitActionDataSit.deserialize(reader)
        result = ChairRequestClientPacket(sit_action=sit_action, sit_action_data=sit_action_data)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BookRequestClientPacket

Bases: Packet

Request for a player's book

Source code in src/eolib/protocol/_generated/net/client/book_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class BookRequestClientPacket(Packet):
    """
    Request for a player's book
    """
    _byte_size: int = 0
    _player_id: int

    def __init__(self, *, player_id: int):
        """
        Create a new instance of BookRequestClientPacket.

        Args:
            player_id (int): (Value range is 0-64008.)
        """
        self._player_id = player_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def player_id(self) -> int:
        return self._player_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Book

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BookRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BookRequestClientPacket") -> None:
        """
        Serializes an instance of `BookRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BookRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BookRequestClientPacket":
        """
        Deserializes an instance of `BookRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BookRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            player_id = reader.get_short()
            result = BookRequestClientPacket(player_id=player_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BookRequestClientPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

player_id: int property

__init__(*, player_id)

Create a new instance of BookRequestClientPacket.

Parameters:

Name Type Description Default
player_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/book_request_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, player_id: int):
    """
    Create a new instance of BookRequestClientPacket.

    Args:
        player_id (int): (Value range is 0-64008.)
    """
    self._player_id = player_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/book_request_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Book

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/book_request_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/book_request_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BookRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BookRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BookRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/book_request_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "BookRequestClientPacket") -> None:
    """
    Serializes an instance of `BookRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BookRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BookRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BookRequestClientPacket BookRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/book_request_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "BookRequestClientPacket":
    """
    Deserializes an instance of `BookRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BookRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        player_id = reader.get_short()
        result = BookRequestClientPacket(player_id=player_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BoardTakeClientPacket

Bases: Packet

Reading a post on a town board

Source code in src/eolib/protocol/_generated/net/client/board_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class BoardTakeClientPacket(Packet):
    """
    Reading a post on a town board
    """
    _byte_size: int = 0
    _board_id: int
    _post_id: int

    def __init__(self, *, board_id: int, post_id: int):
        """
        Create a new instance of BoardTakeClientPacket.

        Args:
            board_id (int): (Value range is 0-64008.)
            post_id (int): (Value range is 0-64008.)
        """
        self._board_id = board_id
        self._post_id = post_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def board_id(self) -> int:
        return self._board_id

    @property
    def post_id(self) -> int:
        return self._post_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Board

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BoardTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BoardTakeClientPacket") -> None:
        """
        Serializes an instance of `BoardTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BoardTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._board_id is None:
                raise SerializationError("board_id must be provided.")
            writer.add_short(data._board_id)
            if data._post_id is None:
                raise SerializationError("post_id must be provided.")
            writer.add_short(data._post_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BoardTakeClientPacket":
        """
        Deserializes an instance of `BoardTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BoardTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            board_id = reader.get_short()
            post_id = reader.get_short()
            result = BoardTakeClientPacket(board_id=board_id, post_id=post_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BoardTakeClientPacket(byte_size={repr(self._byte_size)}, board_id={repr(self._board_id)}, post_id={repr(self._post_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

board_id: int property

post_id: int property

__init__(*, board_id, post_id)

Create a new instance of BoardTakeClientPacket.

Parameters:

Name Type Description Default
board_id int

(Value range is 0-64008.)

required
post_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/board_take_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, board_id: int, post_id: int):
    """
    Create a new instance of BoardTakeClientPacket.

    Args:
        board_id (int): (Value range is 0-64008.)
        post_id (int): (Value range is 0-64008.)
    """
    self._board_id = board_id
    self._post_id = post_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/board_take_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Board

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/board_take_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/board_take_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BoardTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BoardTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BoardTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/board_take_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "BoardTakeClientPacket") -> None:
    """
    Serializes an instance of `BoardTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BoardTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._board_id is None:
            raise SerializationError("board_id must be provided.")
        writer.add_short(data._board_id)
        if data._post_id is None:
            raise SerializationError("post_id must be provided.")
        writer.add_short(data._post_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BoardTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BoardTakeClientPacket BoardTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/board_take_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "BoardTakeClientPacket":
    """
    Deserializes an instance of `BoardTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BoardTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        board_id = reader.get_short()
        post_id = reader.get_short()
        result = BoardTakeClientPacket(board_id=board_id, post_id=post_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BoardRemoveClientPacket

Bases: Packet

Removing a post from a town board

Source code in src/eolib/protocol/_generated/net/client/board_remove_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class BoardRemoveClientPacket(Packet):
    """
    Removing a post from a town board
    """
    _byte_size: int = 0
    _board_id: int
    _post_id: int

    def __init__(self, *, board_id: int, post_id: int):
        """
        Create a new instance of BoardRemoveClientPacket.

        Args:
            board_id (int): (Value range is 0-64008.)
            post_id (int): (Value range is 0-64008.)
        """
        self._board_id = board_id
        self._post_id = post_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def board_id(self) -> int:
        return self._board_id

    @property
    def post_id(self) -> int:
        return self._post_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Board

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Remove

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BoardRemoveClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BoardRemoveClientPacket") -> None:
        """
        Serializes an instance of `BoardRemoveClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BoardRemoveClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._board_id is None:
                raise SerializationError("board_id must be provided.")
            writer.add_short(data._board_id)
            if data._post_id is None:
                raise SerializationError("post_id must be provided.")
            writer.add_short(data._post_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BoardRemoveClientPacket":
        """
        Deserializes an instance of `BoardRemoveClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BoardRemoveClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            board_id = reader.get_short()
            post_id = reader.get_short()
            result = BoardRemoveClientPacket(board_id=board_id, post_id=post_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BoardRemoveClientPacket(byte_size={repr(self._byte_size)}, board_id={repr(self._board_id)}, post_id={repr(self._post_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

board_id: int property

post_id: int property

__init__(*, board_id, post_id)

Create a new instance of BoardRemoveClientPacket.

Parameters:

Name Type Description Default
board_id int

(Value range is 0-64008.)

required
post_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/board_remove_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, board_id: int, post_id: int):
    """
    Create a new instance of BoardRemoveClientPacket.

    Args:
        board_id (int): (Value range is 0-64008.)
        post_id (int): (Value range is 0-64008.)
    """
    self._board_id = board_id
    self._post_id = post_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/board_remove_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Board

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/board_remove_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Remove

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/board_remove_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BoardRemoveClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BoardRemoveClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BoardRemoveClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/board_remove_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "BoardRemoveClientPacket") -> None:
    """
    Serializes an instance of `BoardRemoveClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BoardRemoveClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._board_id is None:
            raise SerializationError("board_id must be provided.")
        writer.add_short(data._board_id)
        if data._post_id is None:
            raise SerializationError("post_id must be provided.")
        writer.add_short(data._post_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BoardRemoveClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BoardRemoveClientPacket BoardRemoveClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/board_remove_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "BoardRemoveClientPacket":
    """
    Deserializes an instance of `BoardRemoveClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BoardRemoveClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        board_id = reader.get_short()
        post_id = reader.get_short()
        result = BoardRemoveClientPacket(board_id=board_id, post_id=post_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BoardOpenClientPacket

Bases: Packet

Opening a town board

Source code in src/eolib/protocol/_generated/net/client/board_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class BoardOpenClientPacket(Packet):
    """
    Opening a town board
    """
    _byte_size: int = 0
    _board_id: int

    def __init__(self, *, board_id: int):
        """
        Create a new instance of BoardOpenClientPacket.

        Args:
            board_id (int): (Value range is 0-64008.)
        """
        self._board_id = board_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def board_id(self) -> int:
        return self._board_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Board

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BoardOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BoardOpenClientPacket") -> None:
        """
        Serializes an instance of `BoardOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BoardOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._board_id is None:
                raise SerializationError("board_id must be provided.")
            writer.add_short(data._board_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BoardOpenClientPacket":
        """
        Deserializes an instance of `BoardOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BoardOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            board_id = reader.get_short()
            result = BoardOpenClientPacket(board_id=board_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BoardOpenClientPacket(byte_size={repr(self._byte_size)}, board_id={repr(self._board_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

board_id: int property

__init__(*, board_id)

Create a new instance of BoardOpenClientPacket.

Parameters:

Name Type Description Default
board_id int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/board_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, board_id: int):
    """
    Create a new instance of BoardOpenClientPacket.

    Args:
        board_id (int): (Value range is 0-64008.)
    """
    self._board_id = board_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/board_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Board

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/board_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/board_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BoardOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BoardOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BoardOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/board_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "BoardOpenClientPacket") -> None:
    """
    Serializes an instance of `BoardOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BoardOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._board_id is None:
            raise SerializationError("board_id must be provided.")
        writer.add_short(data._board_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BoardOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BoardOpenClientPacket BoardOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/board_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "BoardOpenClientPacket":
    """
    Deserializes an instance of `BoardOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BoardOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        board_id = reader.get_short()
        result = BoardOpenClientPacket(board_id=board_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BoardCreateClientPacket

Bases: Packet

Posting a new message to a town board

Source code in src/eolib/protocol/_generated/net/client/board_create_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
class BoardCreateClientPacket(Packet):
    """
    Posting a new message to a town board
    """
    _byte_size: int = 0
    _board_id: int
    _post_subject: str
    _post_body: str

    def __init__(self, *, board_id: int, post_subject: str, post_body: str):
        """
        Create a new instance of BoardCreateClientPacket.

        Args:
            board_id (int): (Value range is 0-64008.)
            post_subject (str): 
            post_body (str): 
        """
        self._board_id = board_id
        self._post_subject = post_subject
        self._post_body = post_body

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def board_id(self) -> int:
        return self._board_id

    @property
    def post_subject(self) -> str:
        return self._post_subject

    @property
    def post_body(self) -> str:
        return self._post_body

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Board

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Create

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BoardCreateClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BoardCreateClientPacket") -> None:
        """
        Serializes an instance of `BoardCreateClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BoardCreateClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._board_id is None:
                raise SerializationError("board_id must be provided.")
            writer.add_short(data._board_id)
            writer.add_byte(0xFF)
            if data._post_subject is None:
                raise SerializationError("post_subject must be provided.")
            writer.add_string(data._post_subject)
            writer.add_byte(0xFF)
            if data._post_body is None:
                raise SerializationError("post_body must be provided.")
            writer.add_string(data._post_body)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BoardCreateClientPacket":
        """
        Deserializes an instance of `BoardCreateClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BoardCreateClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            board_id = reader.get_short()
            reader.next_chunk()
            post_subject = reader.get_string()
            reader.next_chunk()
            post_body = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = BoardCreateClientPacket(board_id=board_id, post_subject=post_subject, post_body=post_body)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BoardCreateClientPacket(byte_size={repr(self._byte_size)}, board_id={repr(self._board_id)}, post_subject={repr(self._post_subject)}, post_body={repr(self._post_body)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

board_id: int property

post_subject: str property

post_body: str property

__init__(*, board_id, post_subject, post_body)

Create a new instance of BoardCreateClientPacket.

Parameters:

Name Type Description Default
board_id int

(Value range is 0-64008.)

required
post_subject str
required
post_body str
required
Source code in src/eolib/protocol/_generated/net/client/board_create_client_packet.py
22
23
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, board_id: int, post_subject: str, post_body: str):
    """
    Create a new instance of BoardCreateClientPacket.

    Args:
        board_id (int): (Value range is 0-64008.)
        post_subject (str): 
        post_body (str): 
    """
    self._board_id = board_id
    self._post_subject = post_subject
    self._post_body = post_body

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/board_create_client_packet.py
57
58
59
60
61
62
63
64
65
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Board

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/board_create_client_packet.py
67
68
69
70
71
72
73
74
75
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Create

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/board_create_client_packet.py
77
78
79
80
81
82
83
84
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BoardCreateClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BoardCreateClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BoardCreateClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/board_create_client_packet.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "BoardCreateClientPacket") -> None:
    """
    Serializes an instance of `BoardCreateClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BoardCreateClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._board_id is None:
            raise SerializationError("board_id must be provided.")
        writer.add_short(data._board_id)
        writer.add_byte(0xFF)
        if data._post_subject is None:
            raise SerializationError("post_subject must be provided.")
        writer.add_string(data._post_subject)
        writer.add_byte(0xFF)
        if data._post_body is None:
            raise SerializationError("post_body must be provided.")
        writer.add_string(data._post_body)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BoardCreateClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BoardCreateClientPacket BoardCreateClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/board_create_client_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
@staticmethod
def deserialize(reader: EoReader) -> "BoardCreateClientPacket":
    """
    Deserializes an instance of `BoardCreateClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BoardCreateClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        board_id = reader.get_short()
        reader.next_chunk()
        post_subject = reader.get_string()
        reader.next_chunk()
        post_body = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = BoardCreateClientPacket(board_id=board_id, post_subject=post_subject, post_body=post_body)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BarberOpenClientPacket

Bases: Packet

Talking to a barber NPC

Source code in src/eolib/protocol/_generated/net/client/barber_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class BarberOpenClientPacket(Packet):
    """
    Talking to a barber NPC
    """
    _byte_size: int = 0
    _npc_index: int

    def __init__(self, *, npc_index: int):
        """
        Create a new instance of BarberOpenClientPacket.

        Args:
            npc_index (int): (Value range is 0-64008.)
        """
        self._npc_index = npc_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Barber

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BarberOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BarberOpenClientPacket") -> None:
        """
        Serializes an instance of `BarberOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BarberOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BarberOpenClientPacket":
        """
        Deserializes an instance of `BarberOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BarberOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_short()
            result = BarberOpenClientPacket(npc_index=npc_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BarberOpenClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

__init__(*, npc_index)

Create a new instance of BarberOpenClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/barber_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, npc_index: int):
    """
    Create a new instance of BarberOpenClientPacket.

    Args:
        npc_index (int): (Value range is 0-64008.)
    """
    self._npc_index = npc_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/barber_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Barber

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/barber_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/barber_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BarberOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BarberOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BarberOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/barber_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "BarberOpenClientPacket") -> None:
    """
    Serializes an instance of `BarberOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BarberOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BarberOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BarberOpenClientPacket BarberOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/barber_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "BarberOpenClientPacket":
    """
    Deserializes an instance of `BarberOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BarberOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_short()
        result = BarberOpenClientPacket(npc_index=npc_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BarberBuyClientPacket

Bases: Packet

Purchasing a hair-style

Source code in src/eolib/protocol/_generated/net/client/barber_buy_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
class BarberBuyClientPacket(Packet):
    """
    Purchasing a hair-style
    """
    _byte_size: int = 0
    _hair_style: int
    _hair_color: int
    _session_id: int

    def __init__(self, *, hair_style: int, hair_color: int, session_id: int):
        """
        Create a new instance of BarberBuyClientPacket.

        Args:
            hair_style (int): (Value range is 0-252.)
            hair_color (int): (Value range is 0-252.)
            session_id (int): (Value range is 0-4097152080.)
        """
        self._hair_style = hair_style
        self._hair_color = hair_color
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def hair_style(self) -> int:
        return self._hair_style

    @property
    def hair_color(self) -> int:
        return self._hair_color

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Barber

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Buy

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BarberBuyClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BarberBuyClientPacket") -> None:
        """
        Serializes an instance of `BarberBuyClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BarberBuyClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._hair_style is None:
                raise SerializationError("hair_style must be provided.")
            writer.add_char(data._hair_style)
            if data._hair_color is None:
                raise SerializationError("hair_color must be provided.")
            writer.add_char(data._hair_color)
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_int(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BarberBuyClientPacket":
        """
        Deserializes an instance of `BarberBuyClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BarberBuyClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            hair_style = reader.get_char()
            hair_color = reader.get_char()
            session_id = reader.get_int()
            result = BarberBuyClientPacket(hair_style=hair_style, hair_color=hair_color, session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BarberBuyClientPacket(byte_size={repr(self._byte_size)}, hair_style={repr(self._hair_style)}, hair_color={repr(self._hair_color)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

hair_style: int property

hair_color: int property

session_id: int property

__init__(*, hair_style, hair_color, session_id)

Create a new instance of BarberBuyClientPacket.

Parameters:

Name Type Description Default
hair_style int

(Value range is 0-252.)

required
hair_color int

(Value range is 0-252.)

required
session_id int

(Value range is 0-4097152080.)

required
Source code in src/eolib/protocol/_generated/net/client/barber_buy_client_packet.py
22
23
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, hair_style: int, hair_color: int, session_id: int):
    """
    Create a new instance of BarberBuyClientPacket.

    Args:
        hair_style (int): (Value range is 0-252.)
        hair_color (int): (Value range is 0-252.)
        session_id (int): (Value range is 0-4097152080.)
    """
    self._hair_style = hair_style
    self._hair_color = hair_color
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/barber_buy_client_packet.py
57
58
59
60
61
62
63
64
65
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Barber

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/barber_buy_client_packet.py
67
68
69
70
71
72
73
74
75
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Buy

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/barber_buy_client_packet.py
77
78
79
80
81
82
83
84
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BarberBuyClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BarberBuyClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BarberBuyClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/barber_buy_client_packet.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@staticmethod
def serialize(writer: EoWriter, data: "BarberBuyClientPacket") -> None:
    """
    Serializes an instance of `BarberBuyClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BarberBuyClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._hair_style is None:
            raise SerializationError("hair_style must be provided.")
        writer.add_char(data._hair_style)
        if data._hair_color is None:
            raise SerializationError("hair_color must be provided.")
        writer.add_char(data._hair_color)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BarberBuyClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BarberBuyClientPacket BarberBuyClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/barber_buy_client_packet.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@staticmethod
def deserialize(reader: EoReader) -> "BarberBuyClientPacket":
    """
    Deserializes an instance of `BarberBuyClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BarberBuyClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        hair_style = reader.get_char()
        hair_color = reader.get_char()
        session_id = reader.get_int()
        result = BarberBuyClientPacket(hair_style=hair_style, hair_color=hair_color, session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BankTakeClientPacket

Bases: Packet

Withdrawing gold

Source code in src/eolib/protocol/_generated/net/client/bank_take_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class BankTakeClientPacket(Packet):
    """
    Withdrawing gold
    """
    _byte_size: int = 0
    _amount: int
    _session_id: int

    def __init__(self, *, amount: int, session_id: int):
        """
        Create a new instance of BankTakeClientPacket.

        Args:
            amount (int): (Value range is 0-4097152080.)
            session_id (int): (Value range is 0-16194276.)
        """
        self._amount = amount
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def amount(self) -> int:
        return self._amount

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Bank

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Take

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BankTakeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BankTakeClientPacket") -> None:
        """
        Serializes an instance of `BankTakeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BankTakeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._amount is None:
                raise SerializationError("amount must be provided.")
            writer.add_int(data._amount)
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_three(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BankTakeClientPacket":
        """
        Deserializes an instance of `BankTakeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BankTakeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            amount = reader.get_int()
            session_id = reader.get_three()
            result = BankTakeClientPacket(amount=amount, session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BankTakeClientPacket(byte_size={repr(self._byte_size)}, amount={repr(self._amount)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

amount: int property

session_id: int property

__init__(*, amount, session_id)

Create a new instance of BankTakeClientPacket.

Parameters:

Name Type Description Default
amount int

(Value range is 0-4097152080.)

required
session_id int

(Value range is 0-16194276.)

required
Source code in src/eolib/protocol/_generated/net/client/bank_take_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, amount: int, session_id: int):
    """
    Create a new instance of BankTakeClientPacket.

    Args:
        amount (int): (Value range is 0-4097152080.)
        session_id (int): (Value range is 0-16194276.)
    """
    self._amount = amount
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/bank_take_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Bank

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/bank_take_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Take

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/bank_take_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BankTakeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BankTakeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BankTakeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/bank_take_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "BankTakeClientPacket") -> None:
    """
    Serializes an instance of `BankTakeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BankTakeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._amount is None:
            raise SerializationError("amount must be provided.")
        writer.add_int(data._amount)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_three(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BankTakeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BankTakeClientPacket BankTakeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/bank_take_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "BankTakeClientPacket":
    """
    Deserializes an instance of `BankTakeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BankTakeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        amount = reader.get_int()
        session_id = reader.get_three()
        result = BankTakeClientPacket(amount=amount, session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BankOpenClientPacket

Bases: Packet

Talked to a banker NPC

Source code in src/eolib/protocol/_generated/net/client/bank_open_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class BankOpenClientPacket(Packet):
    """
    Talked to a banker NPC
    """
    _byte_size: int = 0
    _npc_index: int

    def __init__(self, *, npc_index: int):
        """
        Create a new instance of BankOpenClientPacket.

        Args:
            npc_index (int): (Value range is 0-64008.)
        """
        self._npc_index = npc_index

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def npc_index(self) -> int:
        return self._npc_index

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Bank

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Open

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BankOpenClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BankOpenClientPacket") -> None:
        """
        Serializes an instance of `BankOpenClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BankOpenClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._npc_index is None:
                raise SerializationError("npc_index must be provided.")
            writer.add_short(data._npc_index)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BankOpenClientPacket":
        """
        Deserializes an instance of `BankOpenClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BankOpenClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            npc_index = reader.get_short()
            result = BankOpenClientPacket(npc_index=npc_index)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BankOpenClientPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npc_index: int property

__init__(*, npc_index)

Create a new instance of BankOpenClientPacket.

Parameters:

Name Type Description Default
npc_index int

(Value range is 0-64008.)

required
Source code in src/eolib/protocol/_generated/net/client/bank_open_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, npc_index: int):
    """
    Create a new instance of BankOpenClientPacket.

    Args:
        npc_index (int): (Value range is 0-64008.)
    """
    self._npc_index = npc_index

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/bank_open_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Bank

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/bank_open_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Open

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/bank_open_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BankOpenClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BankOpenClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BankOpenClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/bank_open_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "BankOpenClientPacket") -> None:
    """
    Serializes an instance of `BankOpenClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BankOpenClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BankOpenClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BankOpenClientPacket BankOpenClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/bank_open_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "BankOpenClientPacket":
    """
    Deserializes an instance of `BankOpenClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BankOpenClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        npc_index = reader.get_short()
        result = BankOpenClientPacket(npc_index=npc_index)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BankAddClientPacket

Bases: Packet

Depositing gold

Source code in src/eolib/protocol/_generated/net/client/bank_add_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class BankAddClientPacket(Packet):
    """
    Depositing gold
    """
    _byte_size: int = 0
    _amount: int
    _session_id: int

    def __init__(self, *, amount: int, session_id: int):
        """
        Create a new instance of BankAddClientPacket.

        Args:
            amount (int): (Value range is 0-4097152080.)
            session_id (int): (Value range is 0-16194276.)
        """
        self._amount = amount
        self._session_id = session_id

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def amount(self) -> int:
        return self._amount

    @property
    def session_id(self) -> int:
        return self._session_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Bank

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Add

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        BankAddClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BankAddClientPacket") -> None:
        """
        Serializes an instance of `BankAddClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BankAddClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._amount is None:
                raise SerializationError("amount must be provided.")
            writer.add_int(data._amount)
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_three(data._session_id)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "BankAddClientPacket":
        """
        Deserializes an instance of `BankAddClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BankAddClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            amount = reader.get_int()
            session_id = reader.get_three()
            result = BankAddClientPacket(amount=amount, session_id=session_id)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"BankAddClientPacket(byte_size={repr(self._byte_size)}, amount={repr(self._amount)}, session_id={repr(self._session_id)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

amount: int property

session_id: int property

__init__(*, amount, session_id)

Create a new instance of BankAddClientPacket.

Parameters:

Name Type Description Default
amount int

(Value range is 0-4097152080.)

required
session_id int

(Value range is 0-16194276.)

required
Source code in src/eolib/protocol/_generated/net/client/bank_add_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, amount: int, session_id: int):
    """
    Create a new instance of BankAddClientPacket.

    Args:
        amount (int): (Value range is 0-4097152080.)
        session_id (int): (Value range is 0-16194276.)
    """
    self._amount = amount
    self._session_id = session_id

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/bank_add_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Bank

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/bank_add_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Add

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/bank_add_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BankAddClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BankAddClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BankAddClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/bank_add_client_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@staticmethod
def serialize(writer: EoWriter, data: "BankAddClientPacket") -> None:
    """
    Serializes an instance of `BankAddClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BankAddClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._amount is None:
            raise SerializationError("amount must be provided.")
        writer.add_int(data._amount)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_three(data._session_id)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of BankAddClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BankAddClientPacket BankAddClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/bank_add_client_packet.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "BankAddClientPacket":
    """
    Deserializes an instance of `BankAddClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BankAddClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        amount = reader.get_int()
        session_id = reader.get_three()
        result = BankAddClientPacket(amount=amount, session_id=session_id)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AttackUseClientPacket

Bases: Packet

Attacking

Source code in src/eolib/protocol/_generated/net/client/attack_use_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
class AttackUseClientPacket(Packet):
    """
    Attacking
    """
    _byte_size: int = 0
    _direction: Direction
    _timestamp: int

    def __init__(self, *, direction: Direction, timestamp: int):
        """
        Create a new instance of AttackUseClientPacket.

        Args:
            direction (Direction): 
            timestamp (int): (Value range is 0-16194276.)
        """
        self._direction = direction
        self._timestamp = timestamp

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def direction(self) -> Direction:
        return self._direction

    @property
    def timestamp(self) -> int:
        return self._timestamp

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Attack

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Use

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        AttackUseClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AttackUseClientPacket") -> None:
        """
        Serializes an instance of `AttackUseClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AttackUseClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._direction is None:
                raise SerializationError("direction must be provided.")
            writer.add_char(int(data._direction))
            if data._timestamp is None:
                raise SerializationError("timestamp must be provided.")
            writer.add_three(data._timestamp)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "AttackUseClientPacket":
        """
        Deserializes an instance of `AttackUseClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AttackUseClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            direction = Direction(reader.get_char())
            timestamp = reader.get_three()
            result = AttackUseClientPacket(direction=direction, timestamp=timestamp)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"AttackUseClientPacket(byte_size={repr(self._byte_size)}, direction={repr(self._direction)}, timestamp={repr(self._timestamp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

direction: Direction property

timestamp: int property

__init__(*, direction, timestamp)

Create a new instance of AttackUseClientPacket.

Parameters:

Name Type Description Default
direction Direction
required
timestamp int

(Value range is 0-16194276.)

required
Source code in src/eolib/protocol/_generated/net/client/attack_use_client_packet.py
22
23
24
25
26
27
28
29
30
31
def __init__(self, *, direction: Direction, timestamp: int):
    """
    Create a new instance of AttackUseClientPacket.

    Args:
        direction (Direction): 
        timestamp (int): (Value range is 0-16194276.)
    """
    self._direction = direction
    self._timestamp = timestamp

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/attack_use_client_packet.py
51
52
53
54
55
56
57
58
59
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Attack

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/attack_use_client_packet.py
61
62
63
64
65
66
67
68
69
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Use

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/attack_use_client_packet.py
71
72
73
74
75
76
77
78
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AttackUseClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AttackUseClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AttackUseClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/attack_use_client_packet.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "AttackUseClientPacket") -> None:
    """
    Serializes an instance of `AttackUseClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AttackUseClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        if data._timestamp is None:
            raise SerializationError("timestamp must be provided.")
        writer.add_three(data._timestamp)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of AttackUseClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AttackUseClientPacket AttackUseClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/attack_use_client_packet.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@staticmethod
def deserialize(reader: EoReader) -> "AttackUseClientPacket":
    """
    Deserializes an instance of `AttackUseClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AttackUseClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        direction = Direction(reader.get_char())
        timestamp = reader.get_three()
        result = AttackUseClientPacket(direction=direction, timestamp=timestamp)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AdminInteractTellClientPacket

Bases: Packet

Talk to admin

Source code in src/eolib/protocol/_generated/net/client/admin_interact_tell_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class AdminInteractTellClientPacket(Packet):
    """
    Talk to admin
    """
    _byte_size: int = 0
    _message: str

    def __init__(self, *, message: str):
        """
        Create a new instance of AdminInteractTellClientPacket.

        Args:
            message (str): 
        """
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.AdminInteract

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Tell

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        AdminInteractTellClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractTellClientPacket") -> None:
        """
        Serializes an instance of `AdminInteractTellClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractTellClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "AdminInteractTellClientPacket":
        """
        Deserializes an instance of `AdminInteractTellClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractTellClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            message = reader.get_string()
            result = AdminInteractTellClientPacket(message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"AdminInteractTellClientPacket(byte_size={repr(self._byte_size)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

message: str property

__init__(*, message)

Create a new instance of AdminInteractTellClientPacket.

Parameters:

Name Type Description Default
message str
required
Source code in src/eolib/protocol/_generated/net/client/admin_interact_tell_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, message: str):
    """
    Create a new instance of AdminInteractTellClientPacket.

    Args:
        message (str): 
    """
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/admin_interact_tell_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.AdminInteract

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/admin_interact_tell_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Tell

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/admin_interact_tell_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AdminInteractTellClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractTellClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AdminInteractTellClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/admin_interact_tell_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractTellClientPacket") -> None:
    """
    Serializes an instance of `AdminInteractTellClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractTellClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of AdminInteractTellClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AdminInteractTellClientPacket AdminInteractTellClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/admin_interact_tell_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "AdminInteractTellClientPacket":
    """
    Deserializes an instance of `AdminInteractTellClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractTellClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        message = reader.get_string()
        result = AdminInteractTellClientPacket(message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AdminInteractReportClientPacket

Bases: Packet

Report character

Source code in src/eolib/protocol/_generated/net/client/admin_interact_report_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
class AdminInteractReportClientPacket(Packet):
    """
    Report character
    """
    _byte_size: int = 0
    _reportee: str
    _message: str

    def __init__(self, *, reportee: str, message: str):
        """
        Create a new instance of AdminInteractReportClientPacket.

        Args:
            reportee (str): 
            message (str): 
        """
        self._reportee = reportee
        self._message = message

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def reportee(self) -> str:
        return self._reportee

    @property
    def message(self) -> str:
        return self._message

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.AdminInteract

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Report

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        AdminInteractReportClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractReportClientPacket") -> None:
        """
        Serializes an instance of `AdminInteractReportClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractReportClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._reportee is None:
                raise SerializationError("reportee must be provided.")
            writer.add_string(data._reportee)
            writer.add_byte(0xFF)
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "AdminInteractReportClientPacket":
        """
        Deserializes an instance of `AdminInteractReportClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractReportClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            reportee = reader.get_string()
            reader.next_chunk()
            message = reader.get_string()
            reader.chunked_reading_mode = False
            result = AdminInteractReportClientPacket(reportee=reportee, message=message)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"AdminInteractReportClientPacket(byte_size={repr(self._byte_size)}, reportee={repr(self._reportee)}, message={repr(self._message)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

reportee: str property

message: str property

__init__(*, reportee, message)

Create a new instance of AdminInteractReportClientPacket.

Parameters:

Name Type Description Default
reportee str
required
message str
required
Source code in src/eolib/protocol/_generated/net/client/admin_interact_report_client_packet.py
21
22
23
24
25
26
27
28
29
30
def __init__(self, *, reportee: str, message: str):
    """
    Create a new instance of AdminInteractReportClientPacket.

    Args:
        reportee (str): 
        message (str): 
    """
    self._reportee = reportee
    self._message = message

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/admin_interact_report_client_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.AdminInteract

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/admin_interact_report_client_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Report

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/admin_interact_report_client_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AdminInteractReportClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractReportClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AdminInteractReportClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/admin_interact_report_client_packet.py
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractReportClientPacket") -> None:
    """
    Serializes an instance of `AdminInteractReportClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractReportClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._reportee is None:
            raise SerializationError("reportee must be provided.")
        writer.add_string(data._reportee)
        writer.add_byte(0xFF)
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of AdminInteractReportClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AdminInteractReportClientPacket AdminInteractReportClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/admin_interact_report_client_packet.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@staticmethod
def deserialize(reader: EoReader) -> "AdminInteractReportClientPacket":
    """
    Deserializes an instance of `AdminInteractReportClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractReportClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        reportee = reader.get_string()
        reader.next_chunk()
        message = reader.get_string()
        reader.chunked_reading_mode = False
        result = AdminInteractReportClientPacket(reportee=reportee, message=message)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AccountRequestClientPacket

Bases: Packet

Request creating an account

Source code in src/eolib/protocol/_generated/net/client/account_request_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
class AccountRequestClientPacket(Packet):
    """
    Request creating an account
    """
    _byte_size: int = 0
    _username: str

    def __init__(self, *, username: str):
        """
        Create a new instance of AccountRequestClientPacket.

        Args:
            username (str): 
        """
        self._username = username

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def username(self) -> str:
        return self._username

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Account

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Request

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        AccountRequestClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AccountRequestClientPacket") -> None:
        """
        Serializes an instance of `AccountRequestClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountRequestClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            if data._username is None:
                raise SerializationError("username must be provided.")
            writer.add_string(data._username)
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountRequestClientPacket":
        """
        Deserializes an instance of `AccountRequestClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountRequestClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            username = reader.get_string()
            result = AccountRequestClientPacket(username=username)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"AccountRequestClientPacket(byte_size={repr(self._byte_size)}, username={repr(self._username)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

username: str property

__init__(*, username)

Create a new instance of AccountRequestClientPacket.

Parameters:

Name Type Description Default
username str
required
Source code in src/eolib/protocol/_generated/net/client/account_request_client_packet.py
20
21
22
23
24
25
26
27
def __init__(self, *, username: str):
    """
    Create a new instance of AccountRequestClientPacket.

    Args:
        username (str): 
    """
    self._username = username

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/account_request_client_packet.py
43
44
45
46
47
48
49
50
51
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Account

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/account_request_client_packet.py
53
54
55
56
57
58
59
60
61
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Request

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/account_request_client_packet.py
63
64
65
66
67
68
69
70
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AccountRequestClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AccountRequestClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AccountRequestClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/account_request_client_packet.py
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@staticmethod
def serialize(writer: EoWriter, data: "AccountRequestClientPacket") -> None:
    """
    Serializes an instance of `AccountRequestClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountRequestClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        if data._username is None:
            raise SerializationError("username must be provided.")
        writer.add_string(data._username)
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of AccountRequestClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AccountRequestClientPacket AccountRequestClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/account_request_client_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@staticmethod
def deserialize(reader: EoReader) -> "AccountRequestClientPacket":
    """
    Deserializes an instance of `AccountRequestClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountRequestClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        username = reader.get_string()
        result = AccountRequestClientPacket(username=username)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AccountCreateClientPacket

Bases: Packet

Confirm creating an account

Source code in src/eolib/protocol/_generated/net/client/account_create_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
class AccountCreateClientPacket(Packet):
    """
    Confirm creating an account
    """
    _byte_size: int = 0
    _session_id: int
    _username: str
    _password: str
    _full_name: str
    _location: str
    _email: str
    _computer: str
    _hdid: str

    def __init__(self, *, session_id: int, username: str, password: str, full_name: str, location: str, email: str, computer: str, hdid: str):
        """
        Create a new instance of AccountCreateClientPacket.

        Args:
            session_id (int): (Value range is 0-64008.)
            username (str): 
            password (str): 
            full_name (str): 
            location (str): 
            email (str): 
            computer (str): 
            hdid (str): 
        """
        self._session_id = session_id
        self._username = username
        self._password = password
        self._full_name = full_name
        self._location = location
        self._email = email
        self._computer = computer
        self._hdid = hdid

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def session_id(self) -> int:
        return self._session_id

    @property
    def username(self) -> str:
        return self._username

    @property
    def password(self) -> str:
        return self._password

    @property
    def full_name(self) -> str:
        return self._full_name

    @property
    def location(self) -> str:
        return self._location

    @property
    def email(self) -> str:
        return self._email

    @property
    def computer(self) -> str:
        return self._computer

    @property
    def hdid(self) -> str:
        return self._hdid

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Account

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Create

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        AccountCreateClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AccountCreateClientPacket") -> None:
        """
        Serializes an instance of `AccountCreateClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountCreateClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._session_id is None:
                raise SerializationError("session_id must be provided.")
            writer.add_short(data._session_id)
            writer.add_byte(0xFF)
            if data._username is None:
                raise SerializationError("username must be provided.")
            writer.add_string(data._username)
            writer.add_byte(0xFF)
            if data._password is None:
                raise SerializationError("password must be provided.")
            writer.add_string(data._password)
            writer.add_byte(0xFF)
            if data._full_name is None:
                raise SerializationError("full_name must be provided.")
            writer.add_string(data._full_name)
            writer.add_byte(0xFF)
            if data._location is None:
                raise SerializationError("location must be provided.")
            writer.add_string(data._location)
            writer.add_byte(0xFF)
            if data._email is None:
                raise SerializationError("email must be provided.")
            writer.add_string(data._email)
            writer.add_byte(0xFF)
            if data._computer is None:
                raise SerializationError("computer must be provided.")
            writer.add_string(data._computer)
            writer.add_byte(0xFF)
            if data._hdid is None:
                raise SerializationError("hdid must be provided.")
            writer.add_string(data._hdid)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountCreateClientPacket":
        """
        Deserializes an instance of `AccountCreateClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountCreateClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            session_id = reader.get_short()
            reader.next_chunk()
            username = reader.get_string()
            reader.next_chunk()
            password = reader.get_string()
            reader.next_chunk()
            full_name = reader.get_string()
            reader.next_chunk()
            location = reader.get_string()
            reader.next_chunk()
            email = reader.get_string()
            reader.next_chunk()
            computer = reader.get_string()
            reader.next_chunk()
            hdid = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = AccountCreateClientPacket(session_id=session_id, username=username, password=password, full_name=full_name, location=location, email=email, computer=computer, hdid=hdid)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"AccountCreateClientPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, username={repr(self._username)}, password={repr(self._password)}, full_name={repr(self._full_name)}, location={repr(self._location)}, email={repr(self._email)}, computer={repr(self._computer)}, hdid={repr(self._hdid)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

session_id: int property

username: str property

password: str property

full_name: str property

location: str property

email: str property

computer: str property

hdid: str property

__init__(*, session_id, username, password, full_name, location, email, computer, hdid)

Create a new instance of AccountCreateClientPacket.

Parameters:

Name Type Description Default
session_id int

(Value range is 0-64008.)

required
username str
required
password str
required
full_name str
required
location str
required
email str
required
computer str
required
hdid str
required
Source code in src/eolib/protocol/_generated/net/client/account_create_client_packet.py
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
def __init__(self, *, session_id: int, username: str, password: str, full_name: str, location: str, email: str, computer: str, hdid: str):
    """
    Create a new instance of AccountCreateClientPacket.

    Args:
        session_id (int): (Value range is 0-64008.)
        username (str): 
        password (str): 
        full_name (str): 
        location (str): 
        email (str): 
        computer (str): 
        hdid (str): 
    """
    self._session_id = session_id
    self._username = username
    self._password = password
    self._full_name = full_name
    self._location = location
    self._email = email
    self._computer = computer
    self._hdid = hdid

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/account_create_client_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Account

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/account_create_client_packet.py
102
103
104
105
106
107
108
109
110
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Create

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/account_create_client_packet.py
112
113
114
115
116
117
118
119
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AccountCreateClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AccountCreateClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AccountCreateClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/account_create_client_packet.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
@staticmethod
def serialize(writer: EoWriter, data: "AccountCreateClientPacket") -> None:
    """
    Serializes an instance of `AccountCreateClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountCreateClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)
        writer.add_byte(0xFF)
        if data._username is None:
            raise SerializationError("username must be provided.")
        writer.add_string(data._username)
        writer.add_byte(0xFF)
        if data._password is None:
            raise SerializationError("password must be provided.")
        writer.add_string(data._password)
        writer.add_byte(0xFF)
        if data._full_name is None:
            raise SerializationError("full_name must be provided.")
        writer.add_string(data._full_name)
        writer.add_byte(0xFF)
        if data._location is None:
            raise SerializationError("location must be provided.")
        writer.add_string(data._location)
        writer.add_byte(0xFF)
        if data._email is None:
            raise SerializationError("email must be provided.")
        writer.add_string(data._email)
        writer.add_byte(0xFF)
        if data._computer is None:
            raise SerializationError("computer must be provided.")
        writer.add_string(data._computer)
        writer.add_byte(0xFF)
        if data._hdid is None:
            raise SerializationError("hdid must be provided.")
        writer.add_string(data._hdid)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of AccountCreateClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AccountCreateClientPacket AccountCreateClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/account_create_client_packet.py
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
@staticmethod
def deserialize(reader: EoReader) -> "AccountCreateClientPacket":
    """
    Deserializes an instance of `AccountCreateClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountCreateClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        session_id = reader.get_short()
        reader.next_chunk()
        username = reader.get_string()
        reader.next_chunk()
        password = reader.get_string()
        reader.next_chunk()
        full_name = reader.get_string()
        reader.next_chunk()
        location = reader.get_string()
        reader.next_chunk()
        email = reader.get_string()
        reader.next_chunk()
        computer = reader.get_string()
        reader.next_chunk()
        hdid = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = AccountCreateClientPacket(session_id=session_id, username=username, password=password, full_name=full_name, location=location, email=email, computer=computer, hdid=hdid)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AccountAgreeClientPacket

Bases: Packet

Change password

Source code in src/eolib/protocol/_generated/net/client/account_agree_client_packet.py
 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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
class AccountAgreeClientPacket(Packet):
    """
    Change password
    """
    _byte_size: int = 0
    _username: str
    _old_password: str
    _new_password: str

    def __init__(self, *, username: str, old_password: str, new_password: str):
        """
        Create a new instance of AccountAgreeClientPacket.

        Args:
            username (str): 
            old_password (str): 
            new_password (str): 
        """
        self._username = username
        self._old_password = old_password
        self._new_password = new_password

    @property
    def byte_size(self) -> int:
        """
        Returns the size of the data that this was deserialized from.

        Returns:
            int: The size of the data that this was deserialized from.
        """
        return self._byte_size

    @property
    def username(self) -> str:
        return self._username

    @property
    def old_password(self) -> str:
        return self._old_password

    @property
    def new_password(self) -> str:
        return self._new_password

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Account

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Agree

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        AccountAgreeClientPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AccountAgreeClientPacket") -> None:
        """
        Serializes an instance of `AccountAgreeClientPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountAgreeClientPacket): The data to serialize.
        """
        old_string_sanitization_mode: bool = writer.string_sanitization_mode
        try:
            writer.string_sanitization_mode = True
            if data._username is None:
                raise SerializationError("username must be provided.")
            writer.add_string(data._username)
            writer.add_byte(0xFF)
            if data._old_password is None:
                raise SerializationError("old_password must be provided.")
            writer.add_string(data._old_password)
            writer.add_byte(0xFF)
            if data._new_password is None:
                raise SerializationError("new_password must be provided.")
            writer.add_string(data._new_password)
            writer.add_byte(0xFF)
            writer.string_sanitization_mode = False
        finally:
            writer.string_sanitization_mode = old_string_sanitization_mode

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountAgreeClientPacket":
        """
        Deserializes an instance of `AccountAgreeClientPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountAgreeClientPacket: The data to serialize.
        """
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            username = reader.get_string()
            reader.next_chunk()
            old_password = reader.get_string()
            reader.next_chunk()
            new_password = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            result = AccountAgreeClientPacket(username=username, old_password=old_password, new_password=new_password)
            result._byte_size = reader.position - reader_start_position
            return result
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"AccountAgreeClientPacket(byte_size={repr(self._byte_size)}, username={repr(self._username)}, old_password={repr(self._old_password)}, new_password={repr(self._new_password)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

username: str property

old_password: str property

new_password: str property

__init__(*, username, old_password, new_password)

Create a new instance of AccountAgreeClientPacket.

Parameters:

Name Type Description Default
username str
required
old_password str
required
new_password str
required
Source code in src/eolib/protocol/_generated/net/client/account_agree_client_packet.py
22
23
24
25
26
27
28
29
30
31
32
33
def __init__(self, *, username: str, old_password: str, new_password: str):
    """
    Create a new instance of AccountAgreeClientPacket.

    Args:
        username (str): 
        old_password (str): 
        new_password (str): 
    """
    self._username = username
    self._old_password = old_password
    self._new_password = new_password

family() staticmethod

Returns the packet family associated with this packet.

Returns:

Name Type Description
PacketFamily PacketFamily

The packet family associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/account_agree_client_packet.py
57
58
59
60
61
62
63
64
65
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Account

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/client/account_agree_client_packet.py
67
68
69
70
71
72
73
74
75
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Agree

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/client/account_agree_client_packet.py
77
78
79
80
81
82
83
84
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AccountAgreeClientPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AccountAgreeClientPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AccountAgreeClientPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/client/account_agree_client_packet.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "AccountAgreeClientPacket") -> None:
    """
    Serializes an instance of `AccountAgreeClientPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountAgreeClientPacket): The data to serialize.
    """
    old_string_sanitization_mode: bool = writer.string_sanitization_mode
    try:
        writer.string_sanitization_mode = True
        if data._username is None:
            raise SerializationError("username must be provided.")
        writer.add_string(data._username)
        writer.add_byte(0xFF)
        if data._old_password is None:
            raise SerializationError("old_password must be provided.")
        writer.add_string(data._old_password)
        writer.add_byte(0xFF)
        if data._new_password is None:
            raise SerializationError("new_password must be provided.")
        writer.add_string(data._new_password)
        writer.add_byte(0xFF)
        writer.string_sanitization_mode = False
    finally:
        writer.string_sanitization_mode = old_string_sanitization_mode

deserialize(reader) staticmethod

Deserializes an instance of AccountAgreeClientPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AccountAgreeClientPacket AccountAgreeClientPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/client/account_agree_client_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
@staticmethod
def deserialize(reader: EoReader) -> "AccountAgreeClientPacket":
    """
    Deserializes an instance of `AccountAgreeClientPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountAgreeClientPacket: The data to serialize.
    """
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        username = reader.get_string()
        reader.next_chunk()
        old_password = reader.get_string()
        reader.next_chunk()
        new_password = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        result = AccountAgreeClientPacket(username=username, old_password=old_password, new_password=new_password)
        result._byte_size = reader.position - reader_start_position
        return result
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode