Skip to content

client

Data structures generated from the eo-protocol XML specification.

Warning

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
class WelcomeRequestClientPacket(Packet):
    """
    Selected a character
    """
    _byte_size: int = 0
    _character_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._character_id

    @character_id.setter
    def character_id(self, character_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._character_id = 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.
        """
        if data._character_id is None:
            raise SerializationError("character_id must be provided.")
        writer.add_int(data._character_id)

    @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.
        """
        data: WelcomeRequestClientPacket = WelcomeRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._character_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._character_id is None:
        raise SerializationError("character_id must be provided.")
    writer.add_int(data._character_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: WelcomeRequestClientPacket = WelcomeRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._character_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class WelcomeMsgClientPacket(Packet):
    """
    Entering game
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _character_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._session_id = session_id

    @property
    def character_id(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._character_id

    @character_id.setter
    def character_id(self, character_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._character_id = 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.
        """
        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)

    @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.
        """
        data: WelcomeMsgClientPacket = WelcomeMsgClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_three()
            data._character_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-16194276.

character_id: int property writable

Note
  • Value range is 0-4097152080.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: WelcomeMsgClientPacket = WelcomeMsgClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_three()
        data._character_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
class WelcomeAgreeClientPacket(Packet):
    """
    Requesting a file
    """
    _byte_size: int = 0
    _file_type: FileType = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]
    _file_type_data: 'WelcomeAgreeClientPacket.FileTypeData' = None

    @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

    @file_type.setter
    def file_type(self, file_type: FileType) -> None:
        self._file_type = file_type

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = session_id

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

    @file_type_data.setter
    def file_type_data(self, file_type_data: 'WelcomeAgreeClientPacket.FileTypeData') -> None:
        self._file_type_data = 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.
        """
        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)

    @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.
        """
        data: WelcomeAgreeClientPacket = WelcomeAgreeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._file_type = FileType(reader.get_char())
            data._session_id = reader.get_short()
            if data._file_type == FileType.Emf:
                data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEmf.deserialize(reader)
            elif data._file_type == FileType.Eif:
                data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEif.deserialize(reader)
            elif data._file_type == FileType.Enf:
                data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEnf.deserialize(reader)
            elif data._file_type == FileType.Esf:
                data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEsf.deserialize(reader)
            elif data._file_type == FileType.Ecf:
                data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEcf.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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]
    FileTypeData.__doc__ = \
        """
        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 = None # type: ignore [assignment]

        @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:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._file_id

        @file_id.setter
        def file_id(self, file_id: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._file_id = 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.
            """
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_short(data._file_id)

        @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.
            """
            data: WelcomeAgreeClientPacket.FileTypeDataEmf = WelcomeAgreeClientPacket.FileTypeDataEmf()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._file_id = reader.get_short()
                data._byte_size = reader.position - reader_start_position
                return data
            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 = None # type: ignore [assignment]

        @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:
            """
            Note:
              - Value range is 0-252.
            """
            return self._file_id

        @file_id.setter
        def file_id(self, file_id: int) -> None:
            """
            Note:
              - Value range is 0-252.
            """
            self._file_id = 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.
            """
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_char(data._file_id)

        @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.
            """
            data: WelcomeAgreeClientPacket.FileTypeDataEif = WelcomeAgreeClientPacket.FileTypeDataEif()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._file_id = reader.get_char()
                data._byte_size = reader.position - reader_start_position
                return data
            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 = None # type: ignore [assignment]

        @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:
            """
            Note:
              - Value range is 0-252.
            """
            return self._file_id

        @file_id.setter
        def file_id(self, file_id: int) -> None:
            """
            Note:
              - Value range is 0-252.
            """
            self._file_id = 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.
            """
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_char(data._file_id)

        @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.
            """
            data: WelcomeAgreeClientPacket.FileTypeDataEnf = WelcomeAgreeClientPacket.FileTypeDataEnf()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._file_id = reader.get_char()
                data._byte_size = reader.position - reader_start_position
                return data
            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 = None # type: ignore [assignment]

        @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:
            """
            Note:
              - Value range is 0-252.
            """
            return self._file_id

        @file_id.setter
        def file_id(self, file_id: int) -> None:
            """
            Note:
              - Value range is 0-252.
            """
            self._file_id = 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.
            """
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_char(data._file_id)

        @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.
            """
            data: WelcomeAgreeClientPacket.FileTypeDataEsf = WelcomeAgreeClientPacket.FileTypeDataEsf()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._file_id = reader.get_char()
                data._byte_size = reader.position - reader_start_position
                return data
            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 = None # type: ignore [assignment]

        @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:
            """
            Note:
              - Value range is 0-252.
            """
            return self._file_id

        @file_id.setter
        def file_id(self, file_id: int) -> None:
            """
            Note:
              - Value range is 0-252.
            """
            self._file_id = 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.
            """
            if data._file_id is None:
                raise SerializationError("file_id must be provided.")
            writer.add_char(data._file_id)

        @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.
            """
            data: WelcomeAgreeClientPacket.FileTypeDataEcf = WelcomeAgreeClientPacket.FileTypeDataEcf()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._file_id = reader.get_char()
                data._byte_size = reader.position - reader_start_position
                return data
            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 writable

session_id: int property writable

Note
  • Value range is 0-64008.

file_type_data: WelcomeAgreeClientPacket.FileTypeData property writable

WelcomeAgreeClientPacket.FileTypeData: Gets or sets the data associated with the file_type field.

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

FileTypeDataEmf

Data associated with file_type value FileType.Emf

Source code in src/eolib/protocol/_generated/net/client/welcome_agree_client_packet.py
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
class FileTypeDataEmf:
    """
    Data associated with file_type value FileType.Emf
    """
    _byte_size: int = 0
    _file_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._file_id

    @file_id.setter
    def file_id(self, file_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._file_id = 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.
        """
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_short(data._file_id)

    @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.
        """
        data: WelcomeAgreeClientPacket.FileTypeDataEmf = WelcomeAgreeClientPacket.FileTypeDataEmf()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._file_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
208
209
210
211
212
213
214
215
216
217
218
219
@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.
    """
    if data._file_id is None:
        raise SerializationError("file_id must be provided.")
    writer.add_short(data._file_id)

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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
@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.
    """
    data: WelcomeAgreeClientPacket.FileTypeDataEmf = WelcomeAgreeClientPacket.FileTypeDataEmf()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._file_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
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
class FileTypeDataEif:
    """
    Data associated with file_type value FileType.Eif
    """
    _byte_size: int = 0
    _file_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._file_id

    @file_id.setter
    def file_id(self, file_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._file_id = 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.
        """
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)

    @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.
        """
        data: WelcomeAgreeClientPacket.FileTypeDataEif = WelcomeAgreeClientPacket.FileTypeDataEif()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._file_id = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

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
278
279
280
281
282
283
284
285
286
287
288
289
@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.
    """
    if data._file_id is None:
        raise SerializationError("file_id must be provided.")
    writer.add_char(data._file_id)

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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
@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.
    """
    data: WelcomeAgreeClientPacket.FileTypeDataEif = WelcomeAgreeClientPacket.FileTypeDataEif()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._file_id = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
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 = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._file_id

    @file_id.setter
    def file_id(self, file_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._file_id = 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.
        """
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)

    @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.
        """
        data: WelcomeAgreeClientPacket.FileTypeDataEnf = WelcomeAgreeClientPacket.FileTypeDataEnf()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._file_id = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

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
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.
    """
    if data._file_id is None:
        raise SerializationError("file_id must be provided.")
    writer.add_char(data._file_id)

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.
    """
    data: WelcomeAgreeClientPacket.FileTypeDataEnf = WelcomeAgreeClientPacket.FileTypeDataEnf()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._file_id = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class FileTypeDataEsf:
    """
    Data associated with file_type value FileType.Esf
    """
    _byte_size: int = 0
    _file_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._file_id

    @file_id.setter
    def file_id(self, file_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._file_id = 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.
        """
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)

    @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.
        """
        data: WelcomeAgreeClientPacket.FileTypeDataEsf = WelcomeAgreeClientPacket.FileTypeDataEsf()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._file_id = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

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
418
419
420
421
422
423
424
425
426
427
428
429
@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.
    """
    if data._file_id is None:
        raise SerializationError("file_id must be provided.")
    writer.add_char(data._file_id)

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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
@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.
    """
    data: WelcomeAgreeClientPacket.FileTypeDataEsf = WelcomeAgreeClientPacket.FileTypeDataEsf()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._file_id = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
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
class FileTypeDataEcf:
    """
    Data associated with file_type value FileType.Ecf
    """
    _byte_size: int = 0
    _file_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._file_id

    @file_id.setter
    def file_id(self, file_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._file_id = 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.
        """
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)

    @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.
        """
        data: WelcomeAgreeClientPacket.FileTypeDataEcf = WelcomeAgreeClientPacket.FileTypeDataEcf()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._file_id = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

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
488
489
490
491
492
493
494
495
496
497
498
499
@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.
    """
    if data._file_id is None:
        raise SerializationError("file_id must be provided.")
    writer.add_char(data._file_id)

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
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
@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.
    """
    data: WelcomeAgreeClientPacket.FileTypeDataEcf = WelcomeAgreeClientPacket.FileTypeDataEcf()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._file_id = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
69
70
71
72
73
74
75
76
77
@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
79
80
81
82
83
84
85
86
87
@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
89
90
91
92
93
94
95
96
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
 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
@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.
    """
    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)

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
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
@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.
    """
    data: WelcomeAgreeClientPacket = WelcomeAgreeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._file_type = FileType(reader.get_char())
        data._session_id = reader.get_short()
        if data._file_type == FileType.Emf:
            data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEmf.deserialize(reader)
        elif data._file_type == FileType.Eif:
            data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEif.deserialize(reader)
        elif data._file_type == FileType.Enf:
            data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEnf.deserialize(reader)
        elif data._file_type == FileType.Esf:
            data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEsf.deserialize(reader)
        elif data._file_type == FileType.Ecf:
            data._file_type_data = WelcomeAgreeClientPacket.FileTypeDataEcf.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class WarpTakeClientPacket(Packet):
    """
    Request to download a copy of the map
    """
    _byte_size: int = 0
    _map_id: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._map_id

    @map_id.setter
    def map_id(self, map_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._map_id = map_id

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = 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.
        """
        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)

    @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.
        """
        data: WarpTakeClientPacket = WarpTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_id = reader.get_short()
            data._session_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

session_id: int property writable

Note
  • Value range is 0-64008.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: WarpTakeClientPacket = WarpTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_id = reader.get_short()
        data._session_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class WarpAcceptClientPacket(Packet):
    """
    Accept a warp request from the server
    """
    _byte_size: int = 0
    _map_id: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._map_id

    @map_id.setter
    def map_id(self, map_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._map_id = map_id

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = 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.
        """
        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)

    @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.
        """
        data: WarpAcceptClientPacket = WarpAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_id = reader.get_short()
            data._session_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

session_id: int property writable

Note
  • Value range is 0-64008.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: WarpAcceptClientPacket = WarpAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_id = reader.get_short()
        data._session_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class WalkSpecClientPacket(Packet):
    """
    Walking through a player
    """
    _byte_size: int = 0
    _walk_action: WalkAction = None # type: ignore [assignment]

    @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

    @walk_action.setter
    def walk_action(self, walk_action: WalkAction) -> None:
        self._walk_action = 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.
        """
        if data._walk_action is None:
            raise SerializationError("walk_action must be provided.")
        WalkAction.serialize(writer, data._walk_action)

    @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.
        """
        data: WalkSpecClientPacket = WalkSpecClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._walk_action = WalkAction.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._walk_action is None:
        raise SerializationError("walk_action must be provided.")
    WalkAction.serialize(writer, data._walk_action)

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
 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) -> "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.
    """
    data: WalkSpecClientPacket = WalkSpecClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._walk_action = WalkAction.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class WalkPlayerClientPacket(Packet):
    """
    Walking
    """
    _byte_size: int = 0
    _walk_action: WalkAction = None # type: ignore [assignment]

    @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

    @walk_action.setter
    def walk_action(self, walk_action: WalkAction) -> None:
        self._walk_action = 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.
        """
        if data._walk_action is None:
            raise SerializationError("walk_action must be provided.")
        WalkAction.serialize(writer, data._walk_action)

    @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.
        """
        data: WalkPlayerClientPacket = WalkPlayerClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._walk_action = WalkAction.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._walk_action is None:
        raise SerializationError("walk_action must be provided.")
    WalkAction.serialize(writer, data._walk_action)

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
 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) -> "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.
    """
    data: WalkPlayerClientPacket = WalkPlayerClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._walk_action = WalkAction.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class WalkAdminClientPacket(Packet):
    """
    Walking with #nowall
    """
    _byte_size: int = 0
    _walk_action: WalkAction = None # type: ignore [assignment]

    @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

    @walk_action.setter
    def walk_action(self, walk_action: WalkAction) -> None:
        self._walk_action = 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.
        """
        if data._walk_action is None:
            raise SerializationError("walk_action must be provided.")
        WalkAction.serialize(writer, data._walk_action)

    @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.
        """
        data: WalkAdminClientPacket = WalkAdminClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._walk_action = WalkAction.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._walk_action is None:
        raise SerializationError("walk_action must be provided.")
    WalkAction.serialize(writer, data._walk_action)

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
 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) -> "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.
    """
    data: WalkAdminClientPacket = WalkAdminClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._walk_action = WalkAction.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
104
105
106
class WalkAction:
    """
    Common data between walk packets
    """
    _byte_size: int = 0
    _direction: Direction = None # type: ignore [assignment]
    _timestamp: int = None # type: ignore [assignment]
    _coords: Coords = None # type: ignore [assignment]

    @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

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @property
    def timestamp(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._timestamp = timestamp

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

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = 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.
        """
        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)

    @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.
        """
        data: WalkAction = WalkAction()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._direction = Direction(reader.get_char())
            data._timestamp = reader.get_three()
            data._coords = Coords.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

timestamp: int property writable

Note
  • Value range is 0-16194276.

coords: Coords property writable

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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@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.
    """
    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)

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
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
@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.
    """
    data: WalkAction = WalkAction()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._direction = Direction(reader.get_char())
        data._timestamp = reader.get_three()
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
class TradeRequestClientPacket(Packet):
    """
    Requesting a trade with another player
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._player_id

    @player_id.setter
    def player_id(self, player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._player_id = 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.
        """
        writer.add_char(138)
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)

    @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.
        """
        data: TradeRequestClientPacket = TradeRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            data._player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
87
@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.
    """
    writer.add_char(138)
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)

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
 89
 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) -> "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.
    """
    data: TradeRequestClientPacket = TradeRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        data._player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TradeRemoveClientPacket(Packet):
    """
    Remove an item from the trade screen
    """
    _byte_size: int = 0
    _item_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._item_id

    @item_id.setter
    def item_id(self, item_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._item_id = 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.
        """
        if data._item_id is None:
            raise SerializationError("item_id must be provided.")
        writer.add_short(data._item_id)

    @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.
        """
        data: TradeRemoveClientPacket = TradeRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._item_id is None:
        raise SerializationError("item_id must be provided.")
    writer.add_short(data._item_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: TradeRemoveClientPacket = TradeRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TradeCloseClientPacket(Packet):
    """
    Cancel the trade
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_char(0)

    @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.
        """
        data: TradeCloseClientPacket = TradeCloseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_char(0)

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: TradeCloseClientPacket = TradeCloseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TradeAgreeClientPacket(Packet):
    """
    Mark trade as agreed
    """
    _byte_size: int = 0
    _agree: bool = None # type: ignore [assignment]

    @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

    @agree.setter
    def agree(self, agree: bool) -> None:
        self._agree = 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.
        """
        if data._agree is None:
            raise SerializationError("agree must be provided.")
        writer.add_char(1 if data._agree else 0)

    @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.
        """
        data: TradeAgreeClientPacket = TradeAgreeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._agree = reader.get_char() != 0
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._agree is None:
        raise SerializationError("agree must be provided.")
    writer.add_char(1 if data._agree else 0)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TradeAgreeClientPacket = TradeAgreeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._agree = reader.get_char() != 0
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TradeAddClientPacket(Packet):
    """
    Add an item to the trade screen
    """
    _byte_size: int = 0
    _add_item: Item = None # type: ignore [assignment]

    @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

    @add_item.setter
    def add_item(self, add_item: Item) -> None:
        self._add_item = 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.
        """
        if data._add_item is None:
            raise SerializationError("add_item must be provided.")
        Item.serialize(writer, data._add_item)

    @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.
        """
        data: TradeAddClientPacket = TradeAddClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._add_item = Item.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._add_item is None:
        raise SerializationError("add_item must be provided.")
    Item.serialize(writer, data._add_item)

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
 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) -> "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.
    """
    data: TradeAddClientPacket = TradeAddClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._add_item = Item.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TradeAcceptClientPacket(Packet):
    """
    Accepting a trade request
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._player_id

    @player_id.setter
    def player_id(self, player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._player_id = 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.
        """
        writer.add_char(0)
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)

    @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.
        """
        data: TradeAcceptClientPacket = TradeAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            data._player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
87
@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.
    """
    writer.add_char(0)
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)

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
 89
 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) -> "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.
    """
    data: TradeAcceptClientPacket = TradeAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        data._player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkUseClientPacket(Packet):
    """
    Public chat message - alias of TALK_REPORT (vestigial)
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: TalkUseClientPacket = TalkUseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TalkUseClientPacket = TalkUseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkTellClientPacket(Packet):
    """
    Private chat message
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _message: str = None # type: ignore [assignment]

    @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

    @name.setter
    def name(self, name: str) -> None:
        self._name = name

    @property
    def message(self) -> str:
        return self._message

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        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)

    @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.
        """
        data: TalkTellClientPacket = TalkTellClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._name = reader.get_string()
            reader.next_chunk()
            data._message = reader.get_string()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

message: str property writable

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
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.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
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.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
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.
    """
    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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@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.
    """
    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)

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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
@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.
    """
    data: TalkTellClientPacket = TalkTellClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._name = reader.get_string()
        reader.next_chunk()
        data._message = reader.get_string()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkRequestClientPacket(Packet):
    """
    Guild chat message
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: TalkRequestClientPacket = TalkRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TalkRequestClientPacket = TalkRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkReportClientPacket(Packet):
    """
    Public chat message
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: TalkReportClientPacket = TalkReportClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TalkReportClientPacket = TalkReportClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkPlayerClientPacket(Packet):
    """
    Public chat message - alias of TALK_REPORT (vestigial)
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: TalkPlayerClientPacket = TalkPlayerClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TalkPlayerClientPacket = TalkPlayerClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkOpenClientPacket(Packet):
    """
    Party chat message
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: TalkOpenClientPacket = TalkOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TalkOpenClientPacket = TalkOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkMsgClientPacket(Packet):
    """
    Global chat message
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: TalkMsgClientPacket = TalkMsgClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TalkMsgClientPacket = TalkMsgClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkAnnounceClientPacket(Packet):
    """
    Admin announcement
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: TalkAnnounceClientPacket = TalkAnnounceClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TalkAnnounceClientPacket = TalkAnnounceClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class TalkAdminClientPacket(Packet):
    """
    Admin chat message
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: TalkAdminClientPacket = TalkAdminClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: TalkAdminClientPacket = TalkAdminClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class StatSkillTakeClientPacket(Packet):
    """
    Learning a skill from a skill master NPC
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _spell_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def spell_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._spell_id

    @spell_id.setter
    def spell_id(self, spell_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._spell_id = 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.
        """
        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)

    @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.
        """
        data: StatSkillTakeClientPacket = StatSkillTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._spell_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

spell_id: int property writable

Note
  • Value range is 0-64008.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: StatSkillTakeClientPacket = StatSkillTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._spell_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class StatSkillRemoveClientPacket(Packet):
    """
    Forgetting a skill at a skill master NPC
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _spell_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def spell_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._spell_id

    @spell_id.setter
    def spell_id(self, spell_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._spell_id = 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.
        """
        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)

    @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.
        """
        data: StatSkillRemoveClientPacket = StatSkillRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._spell_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

spell_id: int property writable

Note
  • Value range is 0-64008.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: StatSkillRemoveClientPacket = StatSkillRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._spell_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class StatSkillOpenClientPacket(Packet):
    """
    Talking to a skill master NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = 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.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)

    @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.
        """
        data: StatSkillOpenClientPacket = StatSkillOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: StatSkillOpenClientPacket = StatSkillOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class StatSkillJunkClientPacket(Packet):
    """
    Resetting stats at a skill master
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = 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.
        """
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)

    @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.
        """
        data: StatSkillJunkClientPacket = StatSkillJunkClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._session_id is None:
        raise SerializationError("session_id must be provided.")
    writer.add_int(data._session_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: StatSkillJunkClientPacket = StatSkillJunkClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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

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
class StatSkillAddClientPacket(Packet):
    """
    Spending a stat point on a stat or skill
    """
    _byte_size: int = 0
    _action_type: TrainType = None # type: ignore [assignment]
    _action_type_data: 'StatSkillAddClientPacket.ActionTypeData' = None

    @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

    @action_type.setter
    def action_type(self, action_type: TrainType) -> None:
        self._action_type = action_type

    @property
    def action_type_data(self) -> 'StatSkillAddClientPacket.ActionTypeData':
        """
        StatSkillAddClientPacket.ActionTypeData: Gets or sets the data associated with the `action_type` field.
        """
        return self._action_type_data

    @action_type_data.setter
    def action_type_data(self, action_type_data: 'StatSkillAddClientPacket.ActionTypeData') -> None:
        self._action_type_data = 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.
        """
        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)

    @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.
        """
        data: StatSkillAddClientPacket = StatSkillAddClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._action_type = TrainType(reader.get_char())
            if data._action_type == TrainType.Stat:
                data._action_type_data = StatSkillAddClientPacket.ActionTypeDataStat.deserialize(reader)
            elif data._action_type == TrainType.Skill:
                data._action_type_data = StatSkillAddClientPacket.ActionTypeDataSkill.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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]
    ActionTypeData.__doc__ = \
        """
        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 = None # type: ignore [assignment]

        @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

        @stat_id.setter
        def stat_id(self, stat_id: StatId) -> None:
            self._stat_id = 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.
            """
            if data._stat_id is None:
                raise SerializationError("stat_id must be provided.")
            writer.add_short(int(data._stat_id))

        @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.
            """
            data: StatSkillAddClientPacket.ActionTypeDataStat = StatSkillAddClientPacket.ActionTypeDataStat()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._stat_id = StatId(reader.get_short())
                data._byte_size = reader.position - reader_start_position
                return data
            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 = None # type: ignore [assignment]

        @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:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._spell_id

        @spell_id.setter
        def spell_id(self, spell_id: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._spell_id = 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.
            """
            if data._spell_id is None:
                raise SerializationError("spell_id must be provided.")
            writer.add_short(data._spell_id)

        @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.
            """
            data: StatSkillAddClientPacket.ActionTypeDataSkill = StatSkillAddClientPacket.ActionTypeDataSkill()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._spell_id = reader.get_short()
                data._byte_size = reader.position - reader_start_position
                return data
            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 writable

action_type_data: StatSkillAddClientPacket.ActionTypeData property writable

StatSkillAddClientPacket.ActionTypeData: Gets or sets the data associated with the action_type field.

ActionTypeData = Union['StatSkillAddClientPacket.ActionTypeDataStat', 'StatSkillAddClientPacket.ActionTypeDataSkill', None] class-attribute instance-attribute

ActionTypeDataStat

Data associated with action_type value TrainType.Stat

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
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
class ActionTypeDataStat:
    """
    Data associated with action_type value TrainType.Stat
    """
    _byte_size: int = 0
    _stat_id: StatId = None # type: ignore [assignment]

    @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

    @stat_id.setter
    def stat_id(self, stat_id: StatId) -> None:
        self._stat_id = 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.
        """
        if data._stat_id is None:
            raise SerializationError("stat_id must be provided.")
        writer.add_short(int(data._stat_id))

    @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.
        """
        data: StatSkillAddClientPacket.ActionTypeDataStat = StatSkillAddClientPacket.ActionTypeDataStat()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._stat_id = StatId(reader.get_short())
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
162
163
164
165
166
167
168
169
170
171
172
173
@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.
    """
    if data._stat_id is None:
        raise SerializationError("stat_id must be provided.")
    writer.add_short(int(data._stat_id))

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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
@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.
    """
    data: StatSkillAddClientPacket.ActionTypeDataStat = StatSkillAddClientPacket.ActionTypeDataStat()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._stat_id = StatId(reader.get_short())
        data._byte_size = reader.position - reader_start_position
        return data
    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
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
class ActionTypeDataSkill:
    """
    Data associated with action_type value TrainType.Skill
    """
    _byte_size: int = 0
    _spell_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._spell_id

    @spell_id.setter
    def spell_id(self, spell_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._spell_id = 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.
        """
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)

    @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.
        """
        data: StatSkillAddClientPacket.ActionTypeDataSkill = StatSkillAddClientPacket.ActionTypeDataSkill()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._spell_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
232
233
234
235
236
237
238
239
240
241
242
243
@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.
    """
    if data._spell_id is None:
        raise SerializationError("spell_id must be provided.")
    writer.add_short(data._spell_id)

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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
@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.
    """
    data: StatSkillAddClientPacket.ActionTypeDataSkill = StatSkillAddClientPacket.ActionTypeDataSkill()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._spell_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
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.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
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.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
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.
    """
    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
 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: "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.
    """
    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)

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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
@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.
    """
    data: StatSkillAddClientPacket = StatSkillAddClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._action_type = TrainType(reader.get_char())
        if data._action_type == TrainType.Stat:
            data._action_type_data = StatSkillAddClientPacket.ActionTypeDataStat.deserialize(reader)
        elif data._action_type == TrainType.Skill:
            data._action_type_data = StatSkillAddClientPacket.ActionTypeDataSkill.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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

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
class SpellUseClientPacket(Packet):
    """
    Raise arm to cast a spell (vestigial)
    """
    _byte_size: int = 0
    _direction: Direction = None # type: ignore [assignment]

    @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

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = 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.
        """
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

    @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.
        """
        data: SpellUseClientPacket = SpellUseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._direction = Direction(reader.get_char())
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

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
 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) -> "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.
    """
    data: SpellUseClientPacket = SpellUseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._direction = Direction(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
135
136
137
138
139
140
141
142
143
144
145
class SpellTargetSelfClientPacket(Packet):
    """
    Self-targeted spell cast
    """
    _byte_size: int = 0
    _direction: Direction = None # type: ignore [assignment]
    _spell_id: int = None # type: ignore [assignment]
    _timestamp: int = None # type: ignore [assignment]

    @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

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @property
    def spell_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._spell_id

    @spell_id.setter
    def spell_id(self, spell_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._spell_id = spell_id

    @property
    def timestamp(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._timestamp = 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.
        """
        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)

    @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.
        """
        data: SpellTargetSelfClientPacket = SpellTargetSelfClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._direction = Direction(reader.get_char())
            data._spell_id = reader.get_short()
            data._timestamp = reader.get_three()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

spell_id: int property writable

Note
  • Value range is 0-64008.

timestamp: int property writable

Note
  • Value range is 0-16194276.

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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
91
@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
 93
 94
 95
 96
 97
 98
 99
100
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@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.
    """
    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)

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
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) -> "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.
    """
    data: SpellTargetSelfClientPacket = SpellTargetSelfClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._direction = Direction(reader.get_char())
        data._spell_id = reader.get_short()
        data._timestamp = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    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

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
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
class SpellTargetOtherClientPacket(Packet):
    """
    Targeted spell cast
    """
    _byte_size: int = 0
    _target_type: SpellTargetType = None # type: ignore [assignment]
    _previous_timestamp: int = None # type: ignore [assignment]
    _spell_id: int = None # type: ignore [assignment]
    _victim_id: int = None # type: ignore [assignment]
    _timestamp: int = None # type: ignore [assignment]

    @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

    @target_type.setter
    def target_type(self, target_type: SpellTargetType) -> None:
        self._target_type = target_type

    @property
    def previous_timestamp(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._previous_timestamp

    @previous_timestamp.setter
    def previous_timestamp(self, previous_timestamp: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._previous_timestamp = previous_timestamp

    @property
    def spell_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._spell_id

    @spell_id.setter
    def spell_id(self, spell_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._spell_id = spell_id

    @property
    def victim_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._victim_id

    @victim_id.setter
    def victim_id(self, victim_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._victim_id = victim_id

    @property
    def timestamp(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._timestamp = 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.
        """
        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)

    @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.
        """
        data: SpellTargetOtherClientPacket = SpellTargetOtherClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._target_type = SpellTargetType(reader.get_char())
            data._previous_timestamp = reader.get_three()
            data._spell_id = reader.get_short()
            data._victim_id = reader.get_short()
            data._timestamp = reader.get_three()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

previous_timestamp: int property writable

Note
  • Value range is 0-16194276.

spell_id: int property writable

Note
  • Value range is 0-64008.

victim_id: int property writable

Note
  • Value range is 0-64008.

timestamp: int property writable

Note
  • Value range is 0-16194276.

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
107
108
109
110
111
112
113
114
115
@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
117
118
119
120
121
122
123
124
125
@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
127
128
129
130
131
132
133
134
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
@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.
    """
    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)

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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
@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.
    """
    data: SpellTargetOtherClientPacket = SpellTargetOtherClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._target_type = SpellTargetType(reader.get_char())
        data._previous_timestamp = reader.get_three()
        data._spell_id = reader.get_short()
        data._victim_id = reader.get_short()
        data._timestamp = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class SpellTargetGroupClientPacket(Packet):
    """
    Group spell cast
    """
    _byte_size: int = 0
    _spell_id: int = None # type: ignore [assignment]
    _timestamp: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._spell_id

    @spell_id.setter
    def spell_id(self, spell_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._spell_id = spell_id

    @property
    def timestamp(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._timestamp = 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.
        """
        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)

    @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.
        """
        data: SpellTargetGroupClientPacket = SpellTargetGroupClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._spell_id = reader.get_short()
            data._timestamp = reader.get_three()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

timestamp: int property writable

Note
  • Value range is 0-16194276.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: SpellTargetGroupClientPacket = SpellTargetGroupClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._spell_id = reader.get_short()
        data._timestamp = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class SpellRequestClientPacket(Packet):
    """
    Begin spell chanting
    """
    _byte_size: int = 0
    _spell_id: int = None # type: ignore [assignment]
    _timestamp: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._spell_id

    @spell_id.setter
    def spell_id(self, spell_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._spell_id = spell_id

    @property
    def timestamp(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._timestamp = 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.
        """
        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)

    @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.
        """
        data: SpellRequestClientPacket = SpellRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._spell_id = reader.get_short()
            data._timestamp = reader.get_three()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

timestamp: int property writable

Note
  • Value range is 0-16194276.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: SpellRequestClientPacket = SpellRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._spell_id = reader.get_short()
        data._timestamp = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
class SitRequestClientPacket(Packet):
    """
    Sit/stand request
    """
    _byte_size: int = 0
    _sit_action: SitAction = None # type: ignore [assignment]
    _sit_action_data: 'SitRequestClientPacket.SitActionData' = None

    @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

    @sit_action.setter
    def sit_action(self, sit_action: SitAction) -> None:
        self._sit_action = sit_action

    @property
    def sit_action_data(self) -> 'SitRequestClientPacket.SitActionData':
        """
        SitRequestClientPacket.SitActionData: Gets or sets the data associated with the `sit_action` field.
        """
        return self._sit_action_data

    @sit_action_data.setter
    def sit_action_data(self, sit_action_data: 'SitRequestClientPacket.SitActionData') -> None:
        self._sit_action_data = 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.
        """
        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)

    @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.
        """
        data: SitRequestClientPacket = SitRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._sit_action = SitAction(reader.get_char())
            if data._sit_action == SitAction.Sit:
                data._sit_action_data = SitRequestClientPacket.SitActionDataSit.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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]
    SitActionData.__doc__ = \
        """
        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 = None # type: ignore [assignment]

        @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

        @cursor_coords.setter
        def cursor_coords(self, cursor_coords: Coords) -> None:
            """
            The coordinates of the map cursor
            """
            self._cursor_coords = 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.
            """
            if data._cursor_coords is None:
                raise SerializationError("cursor_coords must be provided.")
            Coords.serialize(writer, data._cursor_coords)

        @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.
            """
            data: SitRequestClientPacket.SitActionDataSit = SitRequestClientPacket.SitActionDataSit()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._cursor_coords = Coords.deserialize(reader)
                data._byte_size = reader.position - reader_start_position
                return data
            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 writable

sit_action_data: SitRequestClientPacket.SitActionData property writable

SitRequestClientPacket.SitActionData: Gets or sets the data associated with the sit_action field.

SitActionData = Union['SitRequestClientPacket.SitActionDataSit', None] class-attribute instance-attribute

SitActionDataSit

Data associated with sit_action value SitAction.Sit

Source code in src/eolib/protocol/_generated/net/client/sit_request_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
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
class SitActionDataSit:
    """
    Data associated with sit_action value SitAction.Sit
    """
    _byte_size: int = 0
    _cursor_coords: Coords = None # type: ignore [assignment]

    @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

    @cursor_coords.setter
    def cursor_coords(self, cursor_coords: Coords) -> None:
        """
        The coordinates of the map cursor
        """
        self._cursor_coords = 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.
        """
        if data._cursor_coords is None:
            raise SerializationError("cursor_coords must be provided.")
        Coords.serialize(writer, data._cursor_coords)

    @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.
        """
        data: SitRequestClientPacket.SitActionDataSit = SitRequestClientPacket.SitActionDataSit()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._cursor_coords = Coords.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

The coordinates of the map cursor

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
162
163
164
165
166
167
168
169
170
171
172
173
@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.
    """
    if data._cursor_coords is None:
        raise SerializationError("cursor_coords must be provided.")
    Coords.serialize(writer, data._cursor_coords)

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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
@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.
    """
    data: SitRequestClientPacket.SitActionDataSit = SitRequestClientPacket.SitActionDataSit()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._cursor_coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
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.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
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.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
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.
    """
    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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@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.
    """
    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)

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
 99
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) -> "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.
    """
    data: SitRequestClientPacket = SitRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._sit_action = SitAction(reader.get_char())
        if data._sit_action == SitAction.Sit:
            data._sit_action_data = SitRequestClientPacket.SitActionDataSit.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
124
class ShopSellClientPacket(Packet):
    """
    Selling an item to a shop
    """
    _byte_size: int = 0
    _sell_item: Item = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]

    @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

    @sell_item.setter
    def sell_item(self, sell_item: Item) -> None:
        self._sell_item = sell_item

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = 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.
        """
        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)

    @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.
        """
        data: ShopSellClientPacket = ShopSellClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._sell_item = Item.deserialize(reader)
            data._session_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

session_id: int property writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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)

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
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) -> "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.
    """
    data: ShopSellClientPacket = ShopSellClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._sell_item = Item.deserialize(reader)
        data._session_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class ShopOpenClientPacket(Packet):
    """
    Talking to a shop NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = 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.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)

    @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.
        """
        data: ShopOpenClientPacket = ShopOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: ShopOpenClientPacket = ShopOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class ShopCreateClientPacket(Packet):
    """
    Crafting an item from a shop
    """
    _byte_size: int = 0
    _craft_item_id: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._craft_item_id

    @craft_item_id.setter
    def craft_item_id(self, craft_item_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._craft_item_id = craft_item_id

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = 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.
        """
        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)

    @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.
        """
        data: ShopCreateClientPacket = ShopCreateClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._craft_item_id = reader.get_short()
            data._session_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

session_id: int property writable

Note
  • Value range is 0-4097152080.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: ShopCreateClientPacket = ShopCreateClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._craft_item_id = reader.get_short()
        data._session_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
124
class ShopBuyClientPacket(Packet):
    """
    Purchasing an item from a shop
    """
    _byte_size: int = 0
    _buy_item: Item = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]

    @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

    @buy_item.setter
    def buy_item(self, buy_item: Item) -> None:
        self._buy_item = buy_item

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = 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.
        """
        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)

    @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.
        """
        data: ShopBuyClientPacket = ShopBuyClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._buy_item = Item.deserialize(reader)
            data._session_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

session_id: int property writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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)

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
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) -> "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.
    """
    data: ShopBuyClientPacket = ShopBuyClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._buy_item = Item.deserialize(reader)
        data._session_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class RefreshRequestClientPacket(Packet):
    """
    Requesting new info about nearby objects
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_byte(255)

    @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.
        """
        data: RefreshRequestClientPacket = RefreshRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_byte()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_byte(255)

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: RefreshRequestClientPacket = RefreshRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_byte()
        data._byte_size = reader.position - reader_start_position
        return data
    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
 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
class RangeRequestClientPacket(Packet):
    """
    Requesting info about nearby players and NPCs
    """
    _byte_size: int = 0
    _player_ids: list[int] = None # type: ignore [assignment]
    _npc_indexes: list[int] = None # type: ignore [assignment]

    @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) -> list[int]:
        """
        Note:
          - Element value range is 0-64008.
        """
        return self._player_ids

    @player_ids.setter
    def player_ids(self, player_ids: list[int]) -> None:
        """
        Note:
          - Element value range is 0-64008.
        """
        self._player_ids = player_ids

    @property
    def npc_indexes(self) -> list[int]:
        """
        Note:
          - Element value range is 0-252.
        """
        return self._npc_indexes

    @npc_indexes.setter
    def npc_indexes(self, npc_indexes: list[int]) -> None:
        """
        Note:
          - Element value range is 0-252.
        """
        self._npc_indexes = 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.
        """
        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])

    @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.
        """
        data: RangeRequestClientPacket = RangeRequestClientPacket()
        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)
            data._player_ids = []
            for i in range(player_ids_length):
                data._player_ids.append(reader.get_short())
            reader.next_chunk()
            npc_indexes_length = int(reader.remaining / 1)
            data._npc_indexes = []
            for i in range(npc_indexes_length):
                data._npc_indexes.append(reader.get_char())
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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: list[int] property writable

Note
  • Element value range is 0-64008.

npc_indexes: list[int] property writable

Note
  • Element value range is 0-252.

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
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.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
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.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
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.
    """
    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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@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.
    """
    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])

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
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
@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.
    """
    data: RangeRequestClientPacket = RangeRequestClientPacket()
    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)
        data._player_ids = []
        for i in range(player_ids_length):
            data._player_ids.append(reader.get_short())
        reader.next_chunk()
        npc_indexes_length = int(reader.remaining / 1)
        data._npc_indexes = []
        for i in range(npc_indexes_length):
            data._npc_indexes.append(reader.get_char())
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
126
127
128
129
130
131
132
133
134
135
class QuestUseClientPacket(Packet):
    """
    Talking to a quest NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]
    _quest_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = npc_index

    @property
    def quest_id(self) -> int:
        """
        Quest ID is 0 unless the player explicitly selects a quest from the quest switcher

        Note:
          - Value range is 0-64008.
        """
        return self._quest_id

    @quest_id.setter
    def quest_id(self, quest_id: int) -> None:
        """
        Quest ID is 0 unless the player explicitly selects a quest from the quest switcher

        Note:
          - Value range is 0-64008.
        """
        self._quest_id = 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.
        """
        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)

    @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.
        """
        data: QuestUseClientPacket = QuestUseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            data._quest_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

quest_id: int property writable

Quest ID is 0 unless the player explicitly selects a quest from the quest switcher

Note
  • Value range is 0-64008.

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
67
68
69
70
71
72
73
74
75
@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
77
78
79
80
81
82
83
84
85
@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
87
88
89
90
91
92
93
94
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
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@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.
    """
    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)

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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@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.
    """
    data: QuestUseClientPacket = QuestUseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._quest_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class QuestListClientPacket(Packet):
    """
    Quest history / progress request
    """
    _byte_size: int = 0
    _page: QuestPage = None # type: ignore [assignment]

    @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

    @page.setter
    def page(self, page: QuestPage) -> None:
        self._page = 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.
        """
        if data._page is None:
            raise SerializationError("page must be provided.")
        writer.add_char(int(data._page))

    @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.
        """
        data: QuestListClientPacket = QuestListClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._page = QuestPage(reader.get_char())
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._page is None:
        raise SerializationError("page must be provided.")
    writer.add_char(int(data._page))

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
 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) -> "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.
    """
    data: QuestListClientPacket = QuestListClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._page = QuestPage(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
class QuestAcceptClientPacket(Packet):
    """
    Response to a quest NPC dialog
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _dialog_id: int = None # type: ignore [assignment]
    _quest_id: int = None # type: ignore [assignment]
    _npc_index: int = None # type: ignore [assignment]
    _reply_type: DialogReply = None # type: ignore [assignment]
    _reply_type_data: 'QuestAcceptClientPacket.ReplyTypeData' = None

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = session_id

    @property
    def dialog_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._dialog_id

    @dialog_id.setter
    def dialog_id(self, dialog_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._dialog_id = dialog_id

    @property
    def quest_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._quest_id

    @quest_id.setter
    def quest_id(self, quest_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._quest_id = quest_id

    @property
    def npc_index(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = npc_index

    @property
    def reply_type(self) -> DialogReply:
        return self._reply_type

    @reply_type.setter
    def reply_type(self, reply_type: DialogReply) -> None:
        self._reply_type = reply_type

    @property
    def reply_type_data(self) -> 'QuestAcceptClientPacket.ReplyTypeData':
        """
        QuestAcceptClientPacket.ReplyTypeData: Gets or sets the data associated with the `reply_type` field.
        """
        return self._reply_type_data

    @reply_type_data.setter
    def reply_type_data(self, reply_type_data: 'QuestAcceptClientPacket.ReplyTypeData') -> None:
        self._reply_type_data = 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.
        """
        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.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)

    @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.
        """
        data: QuestAcceptClientPacket = QuestAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_short()
            data._dialog_id = reader.get_short()
            data._quest_id = reader.get_short()
            data._npc_index = reader.get_short()
            data._reply_type = DialogReply(reader.get_char())
            if data._reply_type == DialogReply.Link:
                data._reply_type_data = QuestAcceptClientPacket.ReplyTypeDataLink.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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.ReplyTypeDataLink', None]
    ReplyTypeData.__doc__ = \
        """
        Data associated with different values of the `reply_type` field.
        """

    class ReplyTypeDataLink:
        """
        Data associated with reply_type value DialogReply.Link
        """
        _byte_size: int = 0
        _action: int = None # type: ignore [assignment]

        @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:
            """
            Note:
              - Value range is 0-252.
            """
            return self._action

        @action.setter
        def action(self, action: int) -> None:
            """
            Note:
              - Value range is 0-252.
            """
            self._action = 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.
            """
            if data._action is None:
                raise SerializationError("action must be provided.")
            writer.add_char(data._action)

        @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.
            """
            data: QuestAcceptClientPacket.ReplyTypeDataLink = QuestAcceptClientPacket.ReplyTypeDataLink()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._action = reader.get_char()
                data._byte_size = reader.position - reader_start_position
                return data
            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 writable

Note
  • Value range is 0-64008.

dialog_id: int property writable

Note
  • Value range is 0-64008.

quest_id: int property writable

Note
  • Value range is 0-64008.

npc_index: int property writable

Note
  • Value range is 0-64008.

reply_type: DialogReply property writable

reply_type_data: QuestAcceptClientPacket.ReplyTypeData property writable

QuestAcceptClientPacket.ReplyTypeData: Gets or sets the data associated with the reply_type field.

ReplyTypeData = Union['QuestAcceptClientPacket.ReplyTypeDataLink', None] class-attribute instance-attribute

Data associated with reply_type value DialogReply.Link

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
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
class ReplyTypeDataLink:
    """
    Data associated with reply_type value DialogReply.Link
    """
    _byte_size: int = 0
    _action: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._action

    @action.setter
    def action(self, action: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._action = 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.
        """
        if data._action is None:
            raise SerializationError("action must be provided.")
        writer.add_char(data._action)

    @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.
        """
        data: QuestAcceptClientPacket.ReplyTypeDataLink = QuestAcceptClientPacket.ReplyTypeDataLink()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._action = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

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
247
248
249
250
251
252
253
254
255
256
257
258
@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.
    """
    if data._action is None:
        raise SerializationError("action must be provided.")
    writer.add_char(data._action)

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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
@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.
    """
    data: QuestAcceptClientPacket.ReplyTypeDataLink = QuestAcceptClientPacket.ReplyTypeDataLink()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._action = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
120
121
122
123
124
125
126
127
128
@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
130
131
132
133
134
135
136
137
138
@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
140
141
142
143
144
145
146
147
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
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
@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.
    """
    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.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)

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
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
@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.
    """
    data: QuestAcceptClientPacket = QuestAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_short()
        data._dialog_id = reader.get_short()
        data._quest_id = reader.get_short()
        data._npc_index = reader.get_short()
        data._reply_type = DialogReply(reader.get_char())
        if data._reply_type == DialogReply.Link:
            data._reply_type_data = QuestAcceptClientPacket.ReplyTypeDataLink.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PriestUseClientPacket(Packet):
    """
    Saying "I do" at a wedding
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = 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.
        """
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)

    @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.
        """
        data: PriestUseClientPacket = PriestUseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._session_id is None:
        raise SerializationError("session_id must be provided.")
    writer.add_int(data._session_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: PriestUseClientPacket = PriestUseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PriestRequestClientPacket(Packet):
    """
    Requesting marriage at a priest
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _name: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def name(self) -> str:
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        self._name = 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.
        """
        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)

    @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.
        """
        data: PriestRequestClientPacket = PriestRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._session_id = reader.get_int()
            reader.next_chunk()
            data._name = reader.get_string()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

name: str property writable

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
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.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
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.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
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.
    """
    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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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)

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
101
102
103
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) -> "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.
    """
    data: PriestRequestClientPacket = PriestRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._session_id = reader.get_int()
        reader.next_chunk()
        data._name = reader.get_string()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PriestOpenClientPacket(Packet):
    """
    Talking to a priest NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._npc_index = 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.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_int(data._npc_index)

    @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.
        """
        data: PriestOpenClientPacket = PriestOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_int(data._npc_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: PriestOpenClientPacket = PriestOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PriestAcceptClientPacket(Packet):
    """
    Accepting a marriage request
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = 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.
        """
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)

    @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.
        """
        data: PriestAcceptClientPacket = PriestAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._session_id is None:
        raise SerializationError("session_id must be provided.")
    writer.add_short(data._session_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: PriestAcceptClientPacket = PriestAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PlayersRequestClientPacket(Packet):
    """
    Requesting a list of online players
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_byte(255)

    @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.
        """
        data: PlayersRequestClientPacket = PlayersRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_byte()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_byte(255)

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: PlayersRequestClientPacket = PlayersRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_byte()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PlayersListClientPacket(Packet):
    """
    Requesting a list of online friends
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_byte(255)

    @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.
        """
        data: PlayersListClientPacket = PlayersListClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_byte()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_byte(255)

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: PlayersListClientPacket = PlayersListClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_byte()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PlayersAcceptClientPacket(Packet):
    """
    #find command request
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]

    @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

    @name.setter
    def name(self, name: str) -> None:
        self._name = 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.
        """
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)

    @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.
        """
        data: PlayersAcceptClientPacket = PlayersAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._name = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._name is None:
        raise SerializationError("name must be provided.")
    writer.add_string(data._name)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: PlayersAcceptClientPacket = PlayersAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
 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
class PlayerRangeRequestClientPacket(Packet):
    """
    Requesting info about nearby players
    """
    _byte_size: int = 0
    _player_ids: list[int] = None # type: ignore [assignment]

    @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) -> list[int]:
        """
        Note:
          - Element value range is 0-64008.
        """
        return self._player_ids

    @player_ids.setter
    def player_ids(self, player_ids: list[int]) -> None:
        """
        Note:
          - Element value range is 0-64008.
        """
        self._player_ids = 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.
        """
        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])

    @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.
        """
        data: PlayerRangeRequestClientPacket = PlayerRangeRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            player_ids_length = int(reader.remaining / 2)
            data._player_ids = []
            for i in range(player_ids_length):
                data._player_ids.append(reader.get_short())
            data._byte_size = reader.position - reader_start_position
            return data
        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: list[int] property writable

Note
  • Element value range is 0-64008.

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
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.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
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/player_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.
    """
    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
76
77
78
79
80
81
82
83
84
85
86
87
88
@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.
    """
    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])

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
 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 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.
    """
    data: PlayerRangeRequestClientPacket = PlayerRangeRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        player_ids_length = int(reader.remaining / 2)
        data._player_ids = []
        for i in range(player_ids_length):
            data._player_ids.append(reader.get_short())
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PartyTakeClientPacket(Packet):
    """
    Request updated party info
    """
    _byte_size: int = 0
    _members_count: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._members_count

    @members_count.setter
    def members_count(self, members_count: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._members_count = 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.
        """
        if data._members_count is None:
            raise SerializationError("members_count must be provided.")
        writer.add_char(data._members_count)

    @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.
        """
        data: PartyTakeClientPacket = PartyTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._members_count = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._members_count is None:
        raise SerializationError("members_count must be provided.")
    writer.add_char(data._members_count)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: PartyTakeClientPacket = PartyTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._members_count = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
124
class PartyRequestClientPacket(Packet):
    """
    Send party invite / join request
    """
    _byte_size: int = 0
    _request_type: PartyRequestType = None # type: ignore [assignment]
    _player_id: int = None # type: ignore [assignment]

    @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

    @request_type.setter
    def request_type(self, request_type: PartyRequestType) -> None:
        self._request_type = request_type

    @property
    def player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._player_id

    @player_id.setter
    def player_id(self, player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._player_id = 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.
        """
        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)

    @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.
        """
        data: PartyRequestClientPacket = PartyRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._request_type = PartyRequestType(reader.get_char())
            data._player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

player_id: int property writable

Note
  • Value range is 0-64008.

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
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.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
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/party_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.
    """
    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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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)

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
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) -> "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.
    """
    data: PartyRequestClientPacket = PartyRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._request_type = PartyRequestType(reader.get_char())
        data._player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PartyRemoveClientPacket(Packet):
    """
    Remove player from a party
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._player_id

    @player_id.setter
    def player_id(self, player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._player_id = 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.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)

    @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.
        """
        data: PartyRemoveClientPacket = PartyRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: PartyRemoveClientPacket = PartyRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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

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
124
class PartyAcceptClientPacket(Packet):
    """
    Accept party invite / join request
    """
    _byte_size: int = 0
    _request_type: PartyRequestType = None # type: ignore [assignment]
    _inviter_player_id: int = None # type: ignore [assignment]

    @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

    @request_type.setter
    def request_type(self, request_type: PartyRequestType) -> None:
        self._request_type = request_type

    @property
    def inviter_player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._inviter_player_id

    @inviter_player_id.setter
    def inviter_player_id(self, inviter_player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._inviter_player_id = 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.
        """
        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)

    @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.
        """
        data: PartyAcceptClientPacket = PartyAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._request_type = PartyRequestType(reader.get_char())
            data._inviter_player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

inviter_player_id: int property writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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)

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
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) -> "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.
    """
    data: PartyAcceptClientPacket = PartyAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._request_type = PartyRequestType(reader.get_char())
        data._inviter_player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class PaperdollRequestClientPacket(Packet):
    """
    Request for a player's paperdoll
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._player_id

    @player_id.setter
    def player_id(self, player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._player_id = 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.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)

    @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.
        """
        data: PaperdollRequestClientPacket = PaperdollRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: PaperdollRequestClientPacket = PaperdollRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class PaperdollRemoveClientPacket(Packet):
    """
    Unequipping an item
    """
    _byte_size: int = 0
    _item_id: int = None # type: ignore [assignment]
    _sub_loc: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._item_id

    @item_id.setter
    def item_id(self, item_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._item_id = item_id

    @property
    def sub_loc(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._sub_loc

    @sub_loc.setter
    def sub_loc(self, sub_loc: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._sub_loc = 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.
        """
        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)

    @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.
        """
        data: PaperdollRemoveClientPacket = PaperdollRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_id = reader.get_short()
            data._sub_loc = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

sub_loc: int property writable

Note
  • Value range is 0-252.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: PaperdollRemoveClientPacket = PaperdollRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_id = reader.get_short()
        data._sub_loc = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class PaperdollAddClientPacket(Packet):
    """
    Equipping an item
    """
    _byte_size: int = 0
    _item_id: int = None # type: ignore [assignment]
    _sub_loc: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._item_id

    @item_id.setter
    def item_id(self, item_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._item_id = item_id

    @property
    def sub_loc(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._sub_loc

    @sub_loc.setter
    def sub_loc(self, sub_loc: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._sub_loc = 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.
        """
        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)

    @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.
        """
        data: PaperdollAddClientPacket = PaperdollAddClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_id = reader.get_short()
            data._sub_loc = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

sub_loc: int property writable

Note
  • Value range is 0-252.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: PaperdollAddClientPacket = PaperdollAddClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_id = reader.get_short()
        data._sub_loc = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
 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
class NpcRangeRequestClientPacket(Packet):
    """
    Requesting info about nearby NPCs
    """
    _byte_size: int = 0
    _npc_indexes_length: int = None # type: ignore [assignment]
    _npc_indexes: list[int] = None # type: ignore [assignment]

    @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) -> list[int]:
        """
        Note:
          - Length must be 252 or less.
          - Element value range is 0-252.
        """
        return self._npc_indexes

    @npc_indexes.setter
    def npc_indexes(self, npc_indexes: list[int]) -> None:
        """
        Note:
          - Length must be 252 or less.
          - Element value range is 0-252.
        """
        self._npc_indexes = npc_indexes
        self._npc_indexes_length = len(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.
        """
        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])

    @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.
        """
        data: NpcRangeRequestClientPacket = NpcRangeRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_indexes_length = reader.get_char()
            reader.get_byte()
            data._npc_indexes = []
            for i in range(data._npc_indexes_length):
                data._npc_indexes.append(reader.get_char())
            data._byte_size = reader.position - reader_start_position
            return data
        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: list[int] property writable

Note
  • Length must be 252 or less.
  • Element value range is 0-252.

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
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.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
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/npc_range_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.
    """
    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
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.
    """
    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])

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.
    """
    data: NpcRangeRequestClientPacket = NpcRangeRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_indexes_length = reader.get_char()
        reader.get_byte()
        data._npc_indexes = []
        for i in range(data._npc_indexes_length):
            data._npc_indexes.append(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    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
class MessagePingClientPacket(Packet):
    """
    #ping command request
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_short(2)

    @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.
        """
        data: MessagePingClientPacket = MessagePingClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_short(2)

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: MessagePingClientPacket = MessagePingClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
141
class MarriageRequestClientPacket(Packet):
    """
    Requesting marriage approval
    """
    _byte_size: int = 0
    _request_type: MarriageRequestType = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]
    _name: str = None # type: ignore [assignment]

    @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

    @request_type.setter
    def request_type(self, request_type: MarriageRequestType) -> None:
        self._request_type = request_type

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def name(self) -> str:
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        self._name = 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.
        """
        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)

    @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.
        """
        data: MarriageRequestClientPacket = MarriageRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._request_type = MarriageRequestType(reader.get_char())
            data._session_id = reader.get_int()
            reader.next_chunk()
            data._name = reader.get_string()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

session_id: int property writable

Note
  • Value range is 0-4097152080.

name: str property writable

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
65
66
67
68
69
70
71
72
73
@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
75
76
77
78
79
80
81
82
83
@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
85
86
87
88
89
90
91
92
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
 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: "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.
    """
    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)

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
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
@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.
    """
    data: MarriageRequestClientPacket = MarriageRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._request_type = MarriageRequestType(reader.get_char())
        data._session_id = reader.get_int()
        reader.next_chunk()
        data._name = reader.get_string()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class MarriageOpenClientPacket(Packet):
    """
    Talking to a law NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = 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.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)

    @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.
        """
        data: MarriageOpenClientPacket = MarriageOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: MarriageOpenClientPacket = MarriageOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class LoginRequestClientPacket(Packet):
    """
    Login request
    """
    _byte_size: int = 0
    _username: str = None # type: ignore [assignment]
    _password: str = None # type: ignore [assignment]

    @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

    @username.setter
    def username(self, username: str) -> None:
        self._username = username

    @property
    def password(self) -> str:
        return self._password

    @password.setter
    def password(self, password: str) -> None:
        self._password = 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.
        """
        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)

    @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.
        """
        data: LoginRequestClientPacket = LoginRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._username = reader.get_string()
            reader.next_chunk()
            data._password = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

password: str property writable

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
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.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
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/login_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.
    """
    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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@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.
    """
    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)

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
 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 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.
    """
    data: LoginRequestClientPacket = LoginRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._username = reader.get_string()
        reader.next_chunk()
        data._password = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
124
class LockerTakeClientPacket(Packet):
    """
    Taking an item from a bank locker
    """
    _byte_size: int = 0
    _locker_coords: Coords = None # type: ignore [assignment]
    _take_item_id: int = None # type: ignore [assignment]

    @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

    @locker_coords.setter
    def locker_coords(self, locker_coords: Coords) -> None:
        self._locker_coords = locker_coords

    @property
    def take_item_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._take_item_id

    @take_item_id.setter
    def take_item_id(self, take_item_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._take_item_id = 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.
        """
        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)

    @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.
        """
        data: LockerTakeClientPacket = LockerTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._locker_coords = Coords.deserialize(reader)
            data._take_item_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

take_item_id: int property writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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)

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
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) -> "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.
    """
    data: LockerTakeClientPacket = LockerTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._locker_coords = Coords.deserialize(reader)
        data._take_item_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class LockerOpenClientPacket(Packet):
    """
    Opening a bank locker
    """
    _byte_size: int = 0
    _locker_coords: Coords = None # type: ignore [assignment]

    @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

    @locker_coords.setter
    def locker_coords(self, locker_coords: Coords) -> None:
        self._locker_coords = 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.
        """
        if data._locker_coords is None:
            raise SerializationError("locker_coords must be provided.")
        Coords.serialize(writer, data._locker_coords)

    @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.
        """
        data: LockerOpenClientPacket = LockerOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._locker_coords = Coords.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._locker_coords is None:
        raise SerializationError("locker_coords must be provided.")
    Coords.serialize(writer, data._locker_coords)

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
 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) -> "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.
    """
    data: LockerOpenClientPacket = LockerOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._locker_coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class LockerBuyClientPacket(Packet):
    """
    Buying a locker space upgrade from a banker NPC
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_char(1)

    @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.
        """
        data: LockerBuyClientPacket = LockerBuyClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_char(1)

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: LockerBuyClientPacket = LockerBuyClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class LockerAddClientPacket(Packet):
    """
    Adding an item to a bank locker
    """
    _byte_size: int = 0
    _locker_coords: Coords = None # type: ignore [assignment]
    _deposit_item: ThreeItem = None # type: ignore [assignment]

    @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

    @locker_coords.setter
    def locker_coords(self, locker_coords: Coords) -> None:
        self._locker_coords = locker_coords

    @property
    def deposit_item(self) -> ThreeItem:
        return self._deposit_item

    @deposit_item.setter
    def deposit_item(self, deposit_item: ThreeItem) -> None:
        self._deposit_item = 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.
        """
        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)

    @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.
        """
        data: LockerAddClientPacket = LockerAddClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._locker_coords = Coords.deserialize(reader)
            data._deposit_item = ThreeItem.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

deposit_item: ThreeItem property writable

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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
67
@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
69
70
71
72
73
74
75
76
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@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.
    """
    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)

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
 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) -> "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.
    """
    data: LockerAddClientPacket = LockerAddClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._locker_coords = Coords.deserialize(reader)
        data._deposit_item = ThreeItem.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class JukeboxUseClientPacket(Packet):
    """
    Playing a note with the bard skill
    """
    _byte_size: int = 0
    _instrument_id: int = None # type: ignore [assignment]
    _note_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._instrument_id

    @instrument_id.setter
    def instrument_id(self, instrument_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._instrument_id = instrument_id

    @property
    def note_id(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._note_id

    @note_id.setter
    def note_id(self, note_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._note_id = 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.
        """
        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)

    @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.
        """
        data: JukeboxUseClientPacket = JukeboxUseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._instrument_id = reader.get_char()
            data._note_id = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

note_id: int property writable

Note
  • Value range is 0-252.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: JukeboxUseClientPacket = JukeboxUseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._instrument_id = reader.get_char()
        data._note_id = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class JukeboxOpenClientPacket(Packet):
    """
    Opening the jukebox listing
    """
    _byte_size: int = 0
    _coords: Coords = None # type: ignore [assignment]

    @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

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = 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.
        """
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

    @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.
        """
        data: JukeboxOpenClientPacket = JukeboxOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

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
 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) -> "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.
    """
    data: JukeboxOpenClientPacket = JukeboxOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class JukeboxMsgClientPacket(Packet):
    """
    Requesting a song on a jukebox
    """
    _byte_size: int = 0
    _track_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._track_id

    @track_id.setter
    def track_id(self, track_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._track_id = 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.
        """
        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)

    @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.
        """
        data: JukeboxMsgClientPacket = JukeboxMsgClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            reader.get_char()
            reader.get_char()
            data._track_id = reader.get_short()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
@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.
    """
    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)

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
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@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.
    """
    data: JukeboxMsgClientPacket = JukeboxMsgClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        reader.get_char()
        reader.get_char()
        data._track_id = reader.get_short()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class ItemUseClientPacket(Packet):
    """
    Using an item
    """
    _byte_size: int = 0
    _item_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._item_id

    @item_id.setter
    def item_id(self, item_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._item_id = 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.
        """
        if data._item_id is None:
            raise SerializationError("item_id must be provided.")
        writer.add_short(data._item_id)

    @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.
        """
        data: ItemUseClientPacket = ItemUseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._item_id is None:
        raise SerializationError("item_id must be provided.")
    writer.add_short(data._item_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: ItemUseClientPacket = ItemUseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
91
92
93
94
95
96
97
98
99
class Item:
    """
    An item reference with a 4-byte amount
    """
    _byte_size: int = 0
    _id: int = None # type: ignore [assignment]
    _amount: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._id

    @id.setter
    def id(self, id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._id = id

    @property
    def amount(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._amount

    @amount.setter
    def amount(self, amount: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._amount = 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.
        """
        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)

    @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.
        """
        data: Item = Item()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._id = reader.get_short()
            data._amount = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

amount: int property writable

Note
  • Value range is 0-4097152080.

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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@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.
    """
    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)

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
76
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) -> "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.
    """
    data: Item = Item()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._id = reader.get_short()
        data._amount = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class ItemJunkClientPacket(Packet):
    """
    Junking items
    """
    _byte_size: int = 0
    _item: Item = None # type: ignore [assignment]

    @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

    @item.setter
    def item(self, item: Item) -> None:
        self._item = 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.
        """
        if data._item is None:
            raise SerializationError("item must be provided.")
        Item.serialize(writer, data._item)

    @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.
        """
        data: ItemJunkClientPacket = ItemJunkClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item = Item.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._item is None:
        raise SerializationError("item must be provided.")
    Item.serialize(writer, data._item)

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
 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) -> "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.
    """
    data: ItemJunkClientPacket = ItemJunkClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item = Item.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class ItemGetClientPacket(Packet):
    """
    Taking items from the ground
    """
    _byte_size: int = 0
    _item_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._item_index

    @item_index.setter
    def item_index(self, item_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._item_index = 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.
        """
        if data._item_index is None:
            raise SerializationError("item_index must be provided.")
        writer.add_short(data._item_index)

    @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.
        """
        data: ItemGetClientPacket = ItemGetClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_index = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._item_index is None:
        raise SerializationError("item_index must be provided.")
    writer.add_short(data._item_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: ItemGetClientPacket = ItemGetClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_index = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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 = None # type: ignore [assignment]
    _coords: ByteCoords = None # type: ignore [assignment]

    @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

    @item.setter
    def item(self, item: ThreeItem) -> None:
        self._item = 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

    @coords.setter
    def coords(self, coords: ByteCoords) -> None:
        """
        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._coords = 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.
        """
        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)

    @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.
        """
        data: ItemDropClientPacket = ItemDropClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item = ThreeItem.deserialize(reader)
            data._coords = ByteCoords.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

coords: ByteCoords property writable

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.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 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.
    """
    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)

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.
    """
    data: ItemDropClientPacket = ItemDropClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item = ThreeItem.deserialize(reader)
        data._coords = ByteCoords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
class Version:
    """
    Client version
    """
    _byte_size: int = 0
    _major: int = None # type: ignore [assignment]
    _minor: int = None # type: ignore [assignment]
    _patch: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._major

    @major.setter
    def major(self, major: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._major = major

    @property
    def minor(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._minor

    @minor.setter
    def minor(self, minor: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._minor = minor

    @property
    def patch(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._patch

    @patch.setter
    def patch(self, patch: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._patch = 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.
        """
        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)

    @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.
        """
        data: Version = Version()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._major = reader.get_char()
            data._minor = reader.get_char()
            data._patch = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

minor: int property writable

Note
  • Value range is 0-252.

patch: int property writable

Note
  • Value range is 0-252.

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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@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.
    """
    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)

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
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
@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.
    """
    data: Version = Version()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._major = reader.get_char()
        data._minor = reader.get_char()
        data._patch = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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
146
147
148
149
150
151
152
153
154
155
156
class InitInitClientPacket(Packet):
    """
    Connection initialization request.
    This packet is unencrypted.
    """
    _byte_size: int = 0
    _challenge: int = None # type: ignore [assignment]
    _version: Version = None # type: ignore [assignment]
    _hdid_length: int = None # type: ignore [assignment]
    _hdid: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._challenge

    @challenge.setter
    def challenge(self, challenge: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._challenge = challenge

    @property
    def version(self) -> Version:
        return self._version

    @version.setter
    def version(self, version: Version) -> None:
        self._version = version

    @property
    def hdid(self) -> str:
        """
        Note:
          - Length must be 252 or less.
        """
        return self._hdid

    @hdid.setter
    def hdid(self, hdid: str) -> None:
        """
        Note:
          - Length must be 252 or less.
        """
        self._hdid = hdid
        self._hdid_length = len(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.
        """
        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)

    @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.
        """
        data: InitInitClientPacket = InitInitClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._challenge = reader.get_three()
            data._version = Version.deserialize(reader)
            reader.get_char()
            data._hdid_length = reader.get_char()
            data._hdid = reader.get_fixed_string(data._hdid_length, False)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-16194276.

version: Version property writable

hdid: str property writable

Note
  • Length must be 252 or less.

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
76
77
78
79
80
81
82
83
84
@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
86
87
88
89
90
91
92
93
94
@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
 96
 97
 98
 99
100
101
102
103
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
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: "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.
    """
    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)

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
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) -> "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.
    """
    data: InitInitClientPacket = InitInitClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._challenge = reader.get_three()
        data._version = Version.deserialize(reader)
        reader.get_char()
        data._hdid_length = reader.get_char()
        data._hdid = reader.get_fixed_string(data._hdid_length, False)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GuildUseClientPacket(Packet):
    """
    Accepted a join request
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._player_id

    @player_id.setter
    def player_id(self, player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._player_id = 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.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)

    @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.
        """
        data: GuildUseClientPacket = GuildUseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: GuildUseClientPacket = GuildUseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
class GuildTellClientPacket(Packet):
    """
    Requested member list of a guild
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _guild_identity: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def guild_identity(self) -> str:
        return self._guild_identity

    @guild_identity.setter
    def guild_identity(self, guild_identity: str) -> None:
        self._guild_identity = 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.
        """
        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)

    @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.
        """
        data: GuildTellClientPacket = GuildTellClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._guild_identity = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

guild_identity: str property writable

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
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.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
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.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
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.
    """
    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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@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.
    """
    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)

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
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) -> "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.
    """
    data: GuildTellClientPacket = GuildTellClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._guild_identity = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
class GuildTakeClientPacket(Packet):
    """
    Request guild description, rank list, or bank balance
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _info_type: GuildInfoType = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def info_type(self) -> GuildInfoType:
        return self._info_type

    @info_type.setter
    def info_type(self, info_type: GuildInfoType) -> None:
        self._info_type = info_type

    @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.
        """
        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))

    @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.
        """
        data: GuildTakeClientPacket = GuildTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._info_type = GuildInfoType(reader.get_short())
            data._byte_size = reader.position - reader_start_position
            return data
        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)})"

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 writable

Note
  • Value range is 0-4097152080.

info_type: GuildInfoType property writable

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
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.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
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.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
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.
    """
    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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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))

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
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) -> "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.
    """
    data: GuildTakeClientPacket = GuildTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._info_type = GuildInfoType(reader.get_short())
        data._byte_size = reader.position - reader_start_position
        return data
    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
144
class GuildRequestClientPacket(Packet):
    """
    Requested to create a guild
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _guild_tag: str = None # type: ignore [assignment]
    _guild_name: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def guild_tag(self) -> str:
        return self._guild_tag

    @guild_tag.setter
    def guild_tag(self, guild_tag: str) -> None:
        self._guild_tag = guild_tag

    @property
    def guild_name(self) -> str:
        return self._guild_name

    @guild_name.setter
    def guild_name(self, guild_name: str) -> None:
        self._guild_name = 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.
        """
        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)

    @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.
        """
        data: GuildRequestClientPacket = GuildRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._session_id = reader.get_int()
            reader.next_chunk()
            data._guild_tag = reader.get_string()
            reader.next_chunk()
            data._guild_name = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

guild_tag: str property writable

guild_name: str property writable

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
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_request_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.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
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.
    """
    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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@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.
    """
    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)

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
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
@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.
    """
    data: GuildRequestClientPacket = GuildRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._session_id = reader.get_int()
        reader.next_chunk()
        data._guild_tag = reader.get_string()
        reader.next_chunk()
        data._guild_name = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
class GuildReportClientPacket(Packet):
    """
    Requested general information of a guild
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _guild_identity: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def guild_identity(self) -> str:
        return self._guild_identity

    @guild_identity.setter
    def guild_identity(self, guild_identity: str) -> None:
        self._guild_identity = 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.
        """
        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)

    @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.
        """
        data: GuildReportClientPacket = GuildReportClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._guild_identity = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

guild_identity: str property writable

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
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.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
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.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
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.
    """
    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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@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.
    """
    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)

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
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) -> "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.
    """
    data: GuildReportClientPacket = GuildReportClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._guild_identity = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GuildRemoveClientPacket(Packet):
    """
    Leave guild
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = 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.
        """
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)

    @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.
        """
        data: GuildRemoveClientPacket = GuildRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._session_id is None:
        raise SerializationError("session_id must be provided.")
    writer.add_int(data._session_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: GuildRemoveClientPacket = GuildRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
134
135
136
137
138
139
140
141
142
143
144
class GuildRankClientPacket(Packet):
    """
    Update a member's rank
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _rank: int = None # type: ignore [assignment]
    _member_name: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def rank(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._rank

    @rank.setter
    def rank(self, rank: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._rank = rank

    @property
    def member_name(self) -> str:
        return self._member_name

    @member_name.setter
    def member_name(self, member_name: str) -> None:
        self._member_name = 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.
        """
        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)

    @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.
        """
        data: GuildRankClientPacket = GuildRankClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._rank = reader.get_char()
            data._member_name = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

rank: int property writable

Note
  • Value range is 0-252.

member_name: str property writable

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
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.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
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.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
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.
    """
    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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@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.
    """
    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)

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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@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.
    """
    data: GuildRankClientPacket = GuildRankClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._rank = reader.get_char()
        data._member_name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
144
class GuildPlayerClientPacket(Packet):
    """
    Request to join a guild
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _guild_tag: str = None # type: ignore [assignment]
    _recruiter_name: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def guild_tag(self) -> str:
        return self._guild_tag

    @guild_tag.setter
    def guild_tag(self, guild_tag: str) -> None:
        self._guild_tag = guild_tag

    @property
    def recruiter_name(self) -> str:
        return self._recruiter_name

    @recruiter_name.setter
    def recruiter_name(self, recruiter_name: str) -> None:
        self._recruiter_name = 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.
        """
        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)

    @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.
        """
        data: GuildPlayerClientPacket = GuildPlayerClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._session_id = reader.get_int()
            reader.next_chunk()
            data._guild_tag = reader.get_string()
            reader.next_chunk()
            data._recruiter_name = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

guild_tag: str property writable

recruiter_name: str property writable

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
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_player_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.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
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.
    """
    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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@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.
    """
    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)

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
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
@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.
    """
    data: GuildPlayerClientPacket = GuildPlayerClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._session_id = reader.get_int()
        reader.next_chunk()
        data._guild_tag = reader.get_string()
        reader.next_chunk()
        data._recruiter_name = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GuildOpenClientPacket(Packet):
    """
    Talking to a guild master NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = 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.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)

    @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.
        """
        data: GuildOpenClientPacket = GuildOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: GuildOpenClientPacket = GuildOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
class GuildKickClientPacket(Packet):
    """
    Kick member from guild
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _member_name: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def member_name(self) -> str:
        return self._member_name

    @member_name.setter
    def member_name(self, member_name: str) -> None:
        self._member_name = 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.
        """
        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)

    @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.
        """
        data: GuildKickClientPacket = GuildKickClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._member_name = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

member_name: str property writable

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
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.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
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.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
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.
    """
    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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@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.
    """
    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)

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
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) -> "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.
    """
    data: GuildKickClientPacket = GuildKickClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._member_name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GuildJunkClientPacket(Packet):
    """
    Disband guild
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = 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.
        """
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_int(data._session_id)

    @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.
        """
        data: GuildJunkClientPacket = GuildJunkClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._session_id is None:
        raise SerializationError("session_id must be provided.")
    writer.add_int(data._session_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: GuildJunkClientPacket = GuildJunkClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
157
158
159
class GuildCreateClientPacket(Packet):
    """
    Final confirm creating a guild
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _guild_tag: str = None # type: ignore [assignment]
    _guild_name: str = None # type: ignore [assignment]
    _description: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def guild_tag(self) -> str:
        return self._guild_tag

    @guild_tag.setter
    def guild_tag(self, guild_tag: str) -> None:
        self._guild_tag = guild_tag

    @property
    def guild_name(self) -> str:
        return self._guild_name

    @guild_name.setter
    def guild_name(self, guild_name: str) -> None:
        self._guild_name = guild_name

    @property
    def description(self) -> str:
        return self._description

    @description.setter
    def description(self, description: str) -> None:
        self._description = 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.
        """
        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)

    @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.
        """
        data: GuildCreateClientPacket = GuildCreateClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._session_id = reader.get_int()
            reader.next_chunk()
            data._guild_tag = reader.get_string()
            reader.next_chunk()
            data._guild_name = reader.get_string()
            reader.next_chunk()
            data._description = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

guild_tag: str property writable

guild_name: str property writable

description: str property writable

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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
91
@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
 93
 94
 95
 96
 97
 98
 99
100
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
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
@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.
    """
    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)

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
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
@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.
    """
    data: GuildCreateClientPacket = GuildCreateClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._session_id = reader.get_int()
        reader.next_chunk()
        data._guild_tag = reader.get_string()
        reader.next_chunk()
        data._guild_name = reader.get_string()
        reader.next_chunk()
        data._description = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class GuildBuyClientPacket(Packet):
    """
    Deposit gold in to the guild bank
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _gold_amount: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def gold_amount(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._gold_amount

    @gold_amount.setter
    def gold_amount(self, gold_amount: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._gold_amount = 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.
        """
        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)

    @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.
        """
        data: GuildBuyClientPacket = GuildBuyClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_int()
            data._gold_amount = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

gold_amount: int property writable

Note
  • Value range is 0-4097152080.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: GuildBuyClientPacket = GuildBuyClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_int()
        data._gold_amount = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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

GuildAgreeClientPacket

Bases: Packet

Update the guild description or rank list

Source code in src/eolib/protocol/_generated/net/client/guild_agree_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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
class GuildAgreeClientPacket(Packet):
    """
    Update the guild description or rank list
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _info_type: GuildInfoType = None # type: ignore [assignment]
    _info_type_data: 'GuildAgreeClientPacket.InfoTypeData' = None

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = session_id

    @property
    def info_type(self) -> GuildInfoType:
        return self._info_type

    @info_type.setter
    def info_type(self, info_type: GuildInfoType) -> None:
        self._info_type = info_type

    @property
    def info_type_data(self) -> 'GuildAgreeClientPacket.InfoTypeData':
        """
        GuildAgreeClientPacket.InfoTypeData: Gets or sets the data associated with the `info_type` field.
        """
        return self._info_type_data

    @info_type_data.setter
    def info_type_data(self, info_type_data: 'GuildAgreeClientPacket.InfoTypeData') -> None:
        self._info_type_data = 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.
        """
        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)

    @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.
        """
        data: GuildAgreeClientPacket = GuildAgreeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._session_id = reader.get_int()
            data._info_type = GuildInfoType(reader.get_short())
            if data._info_type == GuildInfoType.Description:
                data._info_type_data = GuildAgreeClientPacket.InfoTypeDataDescription.deserialize(reader)
            elif data._info_type == GuildInfoType.Ranks:
                data._info_type_data = GuildAgreeClientPacket.InfoTypeDataRanks.deserialize(reader)
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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]
    InfoTypeData.__doc__ = \
        """
        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 = None # type: ignore [assignment]

        @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

        @description.setter
        def description(self, description: str) -> None:
            self._description = 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.
            """
            if data._description is None:
                raise SerializationError("description must be provided.")
            writer.add_string(data._description)

        @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.
            """
            data: GuildAgreeClientPacket.InfoTypeDataDescription = GuildAgreeClientPacket.InfoTypeDataDescription()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._description = reader.get_string()
                data._byte_size = reader.position - reader_start_position
                return data
            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: list[str] = None # type: ignore [assignment]

        @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) -> list[str]:
            """
            Note:
              - Length must be `9`.
            """
            return self._ranks

        @ranks.setter
        def ranks(self, ranks: list[str]) -> None:
            """
            Note:
              - Length must be `9`.
            """
            self._ranks = 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.
            """
            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):
                if i > 0:
                    writer.add_byte(0xFF)
                writer.add_string(data._ranks[i])

        @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.
            """
            data: GuildAgreeClientPacket.InfoTypeDataRanks = GuildAgreeClientPacket.InfoTypeDataRanks()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._ranks = []
                for i in range(9):
                    data._ranks.append(reader.get_string())
                    if i + 1 < 9:
                        reader.next_chunk()
                data._byte_size = reader.position - reader_start_position
                return data
            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 writable

Note
  • Value range is 0-4097152080.

info_type: GuildInfoType property writable

info_type_data: 'GuildAgreeClientPacket.InfoTypeData' property writable

GuildAgreeClientPacket.InfoTypeData: Gets or sets the data associated with the info_type field.

InfoTypeData = Union['GuildAgreeClientPacket.InfoTypeDataDescription', 'GuildAgreeClientPacket.InfoTypeDataRanks', None] class-attribute instance-attribute

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
class InfoTypeDataDescription:
    """
    Data associated with info_type value GuildInfoType.Description
    """
    _byte_size: int = 0
    _description: str = None # type: ignore [assignment]

    @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

    @description.setter
    def description(self, description: str) -> None:
        self._description = 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.
        """
        if data._description is None:
            raise SerializationError("description must be provided.")
        writer.add_string(data._description)

    @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.
        """
        data: GuildAgreeClientPacket.InfoTypeDataDescription = GuildAgreeClientPacket.InfoTypeDataDescription()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._description = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
185
186
187
188
189
190
191
192
193
194
195
196
@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.
    """
    if data._description is None:
        raise SerializationError("description must be provided.")
    writer.add_string(data._description)

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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
@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.
    """
    data: GuildAgreeClientPacket.InfoTypeDataDescription = GuildAgreeClientPacket.InfoTypeDataDescription()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._description = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
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
class InfoTypeDataRanks:
    """
    Data associated with info_type value GuildInfoType.Ranks
    """
    _byte_size: int = 0
    _ranks: list[str] = None # type: ignore [assignment]

    @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) -> list[str]:
        """
        Note:
          - Length must be `9`.
        """
        return self._ranks

    @ranks.setter
    def ranks(self, ranks: list[str]) -> None:
        """
        Note:
          - Length must be `9`.
        """
        self._ranks = 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.
        """
        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):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._ranks[i])

    @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.
        """
        data: GuildAgreeClientPacket.InfoTypeDataRanks = GuildAgreeClientPacket.InfoTypeDataRanks()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._ranks = []
            for i in range(9):
                data._ranks.append(reader.get_string())
                if i + 1 < 9:
                    reader.next_chunk()
            data._byte_size = reader.position - reader_start_position
            return data
        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: list[str] property writable

Note
  • Length must be 9.

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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
@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.
    """
    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):
        if i > 0:
            writer.add_byte(0xFF)
        writer.add_string(data._ranks[i])

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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
@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.
    """
    data: GuildAgreeClientPacket.InfoTypeDataRanks = GuildAgreeClientPacket.InfoTypeDataRanks()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._ranks = []
        for i in range(9):
            data._ranks.append(reader.get_string())
            if i + 1 < 9:
                reader.next_chunk()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
70
71
72
73
74
75
76
77
78
@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
80
81
82
83
84
85
86
87
88
@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
90
91
92
93
94
95
96
97
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
 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.
    """
    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)

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
@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.
    """
    data: GuildAgreeClientPacket = GuildAgreeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._session_id = reader.get_int()
        data._info_type = GuildInfoType(reader.get_short())
        if data._info_type == GuildInfoType.Description:
            data._info_type_data = GuildAgreeClientPacket.InfoTypeDataDescription.deserialize(reader)
        elif data._info_type == GuildInfoType.Ranks:
            data._info_type_data = GuildAgreeClientPacket.InfoTypeDataRanks.deserialize(reader)
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GuildAcceptClientPacket(Packet):
    """
    Accept pending guild creation invite
    """
    _byte_size: int = 0
    _inviter_player_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._inviter_player_id

    @inviter_player_id.setter
    def inviter_player_id(self, inviter_player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._inviter_player_id = 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.
        """
        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)

    @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.
        """
        data: GuildAcceptClientPacket = GuildAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_int()
            data._inviter_player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
87
@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.
    """
    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)

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
 89
 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) -> "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.
    """
    data: GuildAcceptClientPacket = GuildAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_int()
        data._inviter_player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GlobalRemoveClientPacket(Packet):
    """
    Enable whispers
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("n")

    @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.
        """
        data: GlobalRemoveClientPacket = GlobalRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("n")

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: GlobalRemoveClientPacket = GlobalRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GlobalPlayerClientPacket(Packet):
    """
    Disable whispers
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("y")

    @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.
        """
        data: GlobalPlayerClientPacket = GlobalPlayerClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("y")

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: GlobalPlayerClientPacket = GlobalPlayerClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GlobalOpenClientPacket(Packet):
    """
    Opened global tab
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("y")

    @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.
        """
        data: GlobalOpenClientPacket = GlobalOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("y")

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: GlobalOpenClientPacket = GlobalOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class GlobalCloseClientPacket(Packet):
    """
    Closed global tab
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("n")

    @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.
        """
        data: GlobalCloseClientPacket = GlobalCloseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("n")

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: GlobalCloseClientPacket = GlobalCloseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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

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
class FacePlayerClientPacket(Packet):
    """
    Facing a direction
    """
    _byte_size: int = 0
    _direction: Direction = None # type: ignore [assignment]

    @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

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = 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.
        """
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

    @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.
        """
        data: FacePlayerClientPacket = FacePlayerClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._direction = Direction(reader.get_char())
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

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
 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) -> "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.
    """
    data: FacePlayerClientPacket = FacePlayerClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._direction = Direction(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    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&#x27;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
class EmoteReportClientPacket(Packet):
    """
    Doing an emote
    """
    _byte_size: int = 0
    _emote: Emote = None # type: ignore [assignment]

    @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

    @emote.setter
    def emote(self, emote: Emote) -> None:
        self._emote = 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.
        """
        if data._emote is None:
            raise SerializationError("emote must be provided.")
        writer.add_char(int(data._emote))

    @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.
        """
        data: EmoteReportClientPacket = EmoteReportClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._emote = Emote(reader.get_char())
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._emote is None:
        raise SerializationError("emote must be provided.")
    writer.add_char(int(data._emote))

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
 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) -> "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.
    """
    data: EmoteReportClientPacket = EmoteReportClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._emote = Emote(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    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
class DoorOpenClientPacket(Packet):
    """
    Opening a door
    """
    _byte_size: int = 0
    _coords: Coords = None # type: ignore [assignment]

    @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

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = 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.
        """
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

    @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.
        """
        data: DoorOpenClientPacket = DoorOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

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
 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) -> "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.
    """
    data: DoorOpenClientPacket = DoorOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
17
18
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, names=names, 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
17
18
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, names=names, 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

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

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
class ConnectionPingClientPacket(Packet):
    """
    Ping reply
    """
    _byte_size: int = 0

    @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_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("k")

    @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.
        """
        data: ConnectionPingClientPacket = ConnectionPingClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.position == reader_start_position:
                reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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.

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
28
29
30
31
32
33
34
35
36
@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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
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
57
58
59
60
61
62
63
64
65
66
67
68
@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_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("k")

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@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.
    """
    data: ConnectionPingClientPacket = ConnectionPingClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.position == reader_start_position:
            reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
class ConnectionAcceptClientPacket(Packet):
    """
    Confirm initialization data
    """
    _byte_size: int = 0
    _client_encryption_multiple: int = None # type: ignore [assignment]
    _server_encryption_multiple: int = None # type: ignore [assignment]
    _player_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._client_encryption_multiple

    @client_encryption_multiple.setter
    def client_encryption_multiple(self, client_encryption_multiple: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._client_encryption_multiple = client_encryption_multiple

    @property
    def server_encryption_multiple(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._server_encryption_multiple

    @server_encryption_multiple.setter
    def server_encryption_multiple(self, server_encryption_multiple: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._server_encryption_multiple = server_encryption_multiple

    @property
    def player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._player_id

    @player_id.setter
    def player_id(self, player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._player_id = 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.
        """
        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)

    @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.
        """
        data: ConnectionAcceptClientPacket = ConnectionAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._client_encryption_multiple = reader.get_short()
            data._server_encryption_multiple = reader.get_short()
            data._player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

server_encryption_multiple: int property writable

Note
  • Value range is 0-64008.

player_id: int property writable

Note
  • Value range is 0-64008.

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
80
81
82
83
84
85
86
87
88
@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
90
91
92
93
94
95
96
97
98
@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
100
101
102
103
104
105
106
107
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
@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.
    """
    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)

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
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) -> "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.
    """
    data: ConnectionAcceptClientPacket = ConnectionAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._client_encryption_multiple = reader.get_short()
        data._server_encryption_multiple = reader.get_short()
        data._player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class CitizenRequestClientPacket(Packet):
    """
    Request sleeping at an inn
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _behavior_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = session_id

    @property
    def behavior_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._behavior_id

    @behavior_id.setter
    def behavior_id(self, behavior_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._behavior_id = 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.
        """
        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)

    @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.
        """
        data: CitizenRequestClientPacket = CitizenRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_short()
            data._behavior_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

behavior_id: int property writable

Note
  • Value range is 0-64008.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: CitizenRequestClientPacket = CitizenRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_short()
        data._behavior_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
 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
class CitizenReplyClientPacket(Packet):
    """
    Subscribing to a town
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _behavior_id: int = None # type: ignore [assignment]
    _answers: list[str] = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = session_id

    @property
    def behavior_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._behavior_id

    @behavior_id.setter
    def behavior_id(self, behavior_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._behavior_id = behavior_id

    @property
    def answers(self) -> list[str]:
        """
        Note:
          - Length must be `3`.
        """
        return self._answers

    @answers.setter
    def answers(self, answers: list[str]) -> None:
        """
        Note:
          - Length must be `3`.
        """
        self._answers = 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.
        """
        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])

    @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.
        """
        data: CitizenReplyClientPacket = CitizenReplyClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._session_id = reader.get_short()
            reader.next_chunk()
            data._behavior_id = reader.get_short()
            reader.next_chunk()
            data._answers = []
            for i in range(3):
                data._answers.append(reader.get_string())
                if i + 1 < 3:
                    reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

behavior_id: int property writable

Note
  • Value range is 0-64008.

answers: list[str] property writable

Note
  • Length must be 3.

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
81
82
83
84
85
86
87
88
89
@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
91
92
93
94
95
96
97
98
99
@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
101
102
103
104
105
106
107
108
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
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 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.
    """
    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])

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
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
@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.
    """
    data: CitizenReplyClientPacket = CitizenReplyClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._session_id = reader.get_short()
        reader.next_chunk()
        data._behavior_id = reader.get_short()
        reader.next_chunk()
        data._answers = []
        for i in range(3):
            data._answers.append(reader.get_string())
            if i + 1 < 3:
                reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class CitizenRemoveClientPacket(Packet):
    """
    Giving up citizenship of a town
    """
    _byte_size: int = 0
    _behavior_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._behavior_id

    @behavior_id.setter
    def behavior_id(self, behavior_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._behavior_id = 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.
        """
        if data._behavior_id is None:
            raise SerializationError("behavior_id must be provided.")
        writer.add_short(data._behavior_id)

    @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.
        """
        data: CitizenRemoveClientPacket = CitizenRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._behavior_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._behavior_id is None:
        raise SerializationError("behavior_id must be provided.")
    writer.add_short(data._behavior_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: CitizenRemoveClientPacket = CitizenRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._behavior_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class CitizenOpenClientPacket(Packet):
    """
    Talking to a citizenship NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = 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.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)

    @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.
        """
        data: CitizenOpenClientPacket = CitizenOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: CitizenOpenClientPacket = CitizenOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class CitizenAcceptClientPacket(Packet):
    """
    Confirm sleeping at an inn
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _behavior_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = session_id

    @property
    def behavior_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._behavior_id

    @behavior_id.setter
    def behavior_id(self, behavior_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._behavior_id = 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.
        """
        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)

    @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.
        """
        data: CitizenAcceptClientPacket = CitizenAcceptClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_short()
            data._behavior_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

behavior_id: int property writable

Note
  • Value range is 0-64008.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: CitizenAcceptClientPacket = CitizenAcceptClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_short()
        data._behavior_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
124
class ChestTakeClientPacket(Packet):
    """
    Taking an item from a chest
    """
    _byte_size: int = 0
    _coords: Coords = None # type: ignore [assignment]
    _take_item_id: int = None # type: ignore [assignment]

    @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

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = coords

    @property
    def take_item_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._take_item_id

    @take_item_id.setter
    def take_item_id(self, take_item_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._take_item_id = 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.
        """
        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)

    @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.
        """
        data: ChestTakeClientPacket = ChestTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            data._take_item_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

take_item_id: int property writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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)

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
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) -> "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.
    """
    data: ChestTakeClientPacket = ChestTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        data._take_item_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class ChestOpenClientPacket(Packet):
    """
    Opening a chest
    """
    _byte_size: int = 0
    _coords: Coords = None # type: ignore [assignment]

    @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

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = 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.
        """
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

    @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.
        """
        data: ChestOpenClientPacket = ChestOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
39
40
41
42
43
44
45
46
47
@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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
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
68
69
70
71
72
73
74
75
76
77
78
79
@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.
    """
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

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
 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) -> "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.
    """
    data: ChestOpenClientPacket = ChestOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
 92
 93
 94
 95
 96
 97
 98
 99
100
class ThreeItem:
    """
    An item reference with a 3-byte amount.
    Used for shops, lockers, and various item transfers.
    """
    _byte_size: int = 0
    _id: int = None # type: ignore [assignment]
    _amount: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._id

    @id.setter
    def id(self, id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._id = id

    @property
    def amount(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._amount

    @amount.setter
    def amount(self, amount: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._amount = 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.
        """
        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)

    @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.
        """
        data: ThreeItem = ThreeItem()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._id = reader.get_short()
            data._amount = reader.get_three()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

amount: int property writable

Note
  • Value range is 0-16194276.

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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@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.
    """
    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)

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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@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.
    """
    data: ThreeItem = ThreeItem()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._id = reader.get_short()
        data._amount = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class ChestAddClientPacket(Packet):
    """
    Placing an item in to a chest
    """
    _byte_size: int = 0
    _coords: Coords = None # type: ignore [assignment]
    _add_item: ThreeItem = None # type: ignore [assignment]

    @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

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = coords

    @property
    def add_item(self) -> ThreeItem:
        return self._add_item

    @add_item.setter
    def add_item(self, add_item: ThreeItem) -> None:
        self._add_item = 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.
        """
        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)

    @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.
        """
        data: ChestAddClientPacket = ChestAddClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            data._add_item = ThreeItem.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

add_item: ThreeItem property writable

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
49
50
51
52
53
54
55
56
57
@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
59
60
61
62
63
64
65
66
67
@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
69
70
71
72
73
74
75
76
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@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.
    """
    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)

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
 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) -> "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.
    """
    data: ChestAddClientPacket = ChestAddClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        data._add_item = ThreeItem.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
class CharacterTakeClientPacket(Packet):
    """
    Request to delete a character from an account
    """
    _byte_size: int = 0
    _character_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._character_id

    @character_id.setter
    def character_id(self, character_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._character_id = 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.
        """
        if data._character_id is None:
            raise SerializationError("character_id must be provided.")
        writer.add_int(data._character_id)

    @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.
        """
        data: CharacterTakeClientPacket = CharacterTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._character_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._character_id is None:
        raise SerializationError("character_id must be provided.")
    writer.add_int(data._character_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: CharacterTakeClientPacket = CharacterTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._character_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class CharacterRequestClientPacket(Packet):
    """
    Request to create a character
    """
    _byte_size: int = 0
    _request_string: str = "NEW" # type: ignore [assignment]

    @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.
        """
        writer.add_string(data._request_string)
        writer.add_byte(0xFF)

    @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.
        """
        data: CharacterRequestClientPacket = CharacterRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._request_string = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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

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
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.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
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/character_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.
    """
    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
62
63
64
65
66
67
68
69
70
71
72
@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.
    """
    writer.add_string(data._request_string)
    writer.add_byte(0xFF)

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
74
75
76
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) -> "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.
    """
    data: CharacterRequestClientPacket = CharacterRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._request_string = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
128
129
130
131
class CharacterRemoveClientPacket(Packet):
    """
    Confirm deleting character from an account
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _character_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = session_id

    @property
    def character_id(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._character_id

    @character_id.setter
    def character_id(self, character_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._character_id = 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.
        """
        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)

    @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.
        """
        data: CharacterRemoveClientPacket = CharacterRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_short()
            data._character_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

character_id: int property writable

Note
  • Value range is 0-4097152080.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: CharacterRemoveClientPacket = CharacterRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_short()
        data._character_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
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
class CharacterCreateClientPacket(Packet):
    """
    Confirm creating a character
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _gender: Gender = None # type: ignore [assignment]
    _hair_style: int = None # type: ignore [assignment]
    _hair_color: int = None # type: ignore [assignment]
    _skin: int = None # type: ignore [assignment]
    _name: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = session_id

    @property
    def gender(self) -> Gender:
        return self._gender

    @gender.setter
    def gender(self, gender: Gender) -> None:
        self._gender = gender

    @property
    def hair_style(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hair_style

    @hair_style.setter
    def hair_style(self, hair_style: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hair_style = hair_style

    @property
    def hair_color(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hair_color

    @hair_color.setter
    def hair_color(self, hair_color: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hair_color = hair_color

    @property
    def skin(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._skin

    @skin.setter
    def skin(self, skin: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._skin = skin

    @property
    def name(self) -> str:
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        self._name = 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.
        """
        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)

    @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.
        """
        data: CharacterCreateClientPacket = CharacterCreateClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._session_id = reader.get_short()
            data._gender = Gender(reader.get_short())
            data._hair_style = reader.get_short()
            data._hair_color = reader.get_short()
            data._skin = reader.get_short()
            reader.next_chunk()
            data._name = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

gender: Gender property writable

hair_style: int property writable

Note
  • Value range is 0-64008.

hair_color: int property writable

Note
  • Value range is 0-64008.

skin: int property writable

Note
  • Value range is 0-64008.

name: str property writable

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
116
117
118
119
120
121
122
123
124
@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
126
127
128
129
130
131
132
133
134
@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
136
137
138
139
140
141
142
143
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
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
@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.
    """
    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)

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
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
@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.
    """
    data: CharacterCreateClientPacket = CharacterCreateClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._session_id = reader.get_short()
        data._gender = Gender(reader.get_short())
        data._hair_style = reader.get_short()
        data._hair_color = reader.get_short()
        data._skin = reader.get_short()
        reader.next_chunk()
        data._name = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
91
92
93
94
95
96
97
98
99
class Coords:
    """
    Map coordinates
    """
    _byte_size: int = 0
    _x: int = None # type: ignore [assignment]
    _y: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._x

    @x.setter
    def x(self, x: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._x = x

    @property
    def y(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._y

    @y.setter
    def y(self, y: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._y = 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.
        """
        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)

    @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.
        """
        data: Coords = Coords()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._x = reader.get_char()
            data._y = reader.get_char()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

y: int property writable

Note
  • Value range is 0-252.

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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@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.
    """
    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)

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
76
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) -> "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.
    """
    data: Coords = Coords()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._x = reader.get_char()
        data._y = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    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

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
class ChairRequestClientPacket(Packet):
    """
    Sitting on a chair
    """
    _byte_size: int = 0
    _sit_action: SitAction = None # type: ignore [assignment]
    _sit_action_data: 'ChairRequestClientPacket.SitActionData' = None

    @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

    @sit_action.setter
    def sit_action(self, sit_action: SitAction) -> None:
        self._sit_action = sit_action

    @property
    def sit_action_data(self) -> 'ChairRequestClientPacket.SitActionData':
        """
        ChairRequestClientPacket.SitActionData: Gets or sets the data associated with the `sit_action` field.
        """
        return self._sit_action_data

    @sit_action_data.setter
    def sit_action_data(self, sit_action_data: 'ChairRequestClientPacket.SitActionData') -> None:
        self._sit_action_data = 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.
        """
        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)

    @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.
        """
        data: ChairRequestClientPacket = ChairRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._sit_action = SitAction(reader.get_char())
            if data._sit_action == SitAction.Sit:
                data._sit_action_data = ChairRequestClientPacket.SitActionDataSit.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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]
    SitActionData.__doc__ = \
        """
        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 = None # type: ignore [assignment]

        @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

        @coords.setter
        def coords(self, coords: Coords) -> None:
            self._coords = 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.
            """
            if data._coords is None:
                raise SerializationError("coords must be provided.")
            Coords.serialize(writer, data._coords)

        @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.
            """
            data: ChairRequestClientPacket.SitActionDataSit = ChairRequestClientPacket.SitActionDataSit()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._coords = Coords.deserialize(reader)
                data._byte_size = reader.position - reader_start_position
                return data
            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 writable

sit_action_data: ChairRequestClientPacket.SitActionData property writable

ChairRequestClientPacket.SitActionData: Gets or sets the data associated with the sit_action field.

SitActionData = Union['ChairRequestClientPacket.SitActionDataSit', None] class-attribute instance-attribute

SitActionDataSit

Data associated with sit_action value SitAction.Sit

Source code in src/eolib/protocol/_generated/net/client/chair_request_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
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
class SitActionDataSit:
    """
    Data associated with sit_action value SitAction.Sit
    """
    _byte_size: int = 0
    _coords: Coords = None # type: ignore [assignment]

    @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

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = 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.
        """
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

    @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.
        """
        data: ChairRequestClientPacket.SitActionDataSit = ChairRequestClientPacket.SitActionDataSit()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
156
157
158
159
160
161
162
163
164
165
166
167
@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.
    """
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
@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.
    """
    data: ChairRequestClientPacket.SitActionDataSit = ChairRequestClientPacket.SitActionDataSit()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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
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.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
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.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
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.
    """
    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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@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.
    """
    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)

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
 99
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) -> "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.
    """
    data: ChairRequestClientPacket = ChairRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._sit_action = SitAction(reader.get_char())
        if data._sit_action == SitAction.Sit:
            data._sit_action_data = ChairRequestClientPacket.SitActionDataSit.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    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
91
92
93
94
95
96
97
98
99
class ByteCoords:
    """
    Map coordinates with raw 1-byte values
    """
    _byte_size: int = 0
    _x: int = None # type: ignore [assignment]
    _y: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-255.
        """
        return self._x

    @x.setter
    def x(self, x: int) -> None:
        """
        Note:
          - Value range is 0-255.
        """
        self._x = x

    @property
    def y(self) -> int:
        """
        Note:
          - Value range is 0-255.
        """
        return self._y

    @y.setter
    def y(self, y: int) -> None:
        """
        Note:
          - Value range is 0-255.
        """
        self._y = 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.
        """
        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)

    @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.
        """
        data: ByteCoords = ByteCoords()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._x = reader.get_byte()
            data._y = reader.get_byte()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-255.

y: int property writable

Note
  • Value range is 0-255.

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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@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.
    """
    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)

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
76
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) -> "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.
    """
    data: ByteCoords = ByteCoords()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._x = reader.get_byte()
        data._y = reader.get_byte()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class BookRequestClientPacket(Packet):
    """
    Request for a player&#x27;s book
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._player_id

    @player_id.setter
    def player_id(self, player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._player_id = 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.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)

    @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.
        """
        data: BookRequestClientPacket = BookRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: BookRequestClientPacket = BookRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class BoardTakeClientPacket(Packet):
    """
    Reading a post on a town board
    """
    _byte_size: int = 0
    _board_id: int = None # type: ignore [assignment]
    _post_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._board_id

    @board_id.setter
    def board_id(self, board_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._board_id = board_id

    @property
    def post_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._post_id

    @post_id.setter
    def post_id(self, post_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._post_id = 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.
        """
        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)

    @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.
        """
        data: BoardTakeClientPacket = BoardTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._board_id = reader.get_short()
            data._post_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

post_id: int property writable

Note
  • Value range is 0-64008.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: BoardTakeClientPacket = BoardTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._board_id = reader.get_short()
        data._post_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class BoardRemoveClientPacket(Packet):
    """
    Removing a post from a town board
    """
    _byte_size: int = 0
    _board_id: int = None # type: ignore [assignment]
    _post_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._board_id

    @board_id.setter
    def board_id(self, board_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._board_id = board_id

    @property
    def post_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._post_id

    @post_id.setter
    def post_id(self, post_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._post_id = 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.
        """
        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)

    @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.
        """
        data: BoardRemoveClientPacket = BoardRemoveClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._board_id = reader.get_short()
            data._post_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

post_id: int property writable

Note
  • Value range is 0-64008.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: BoardRemoveClientPacket = BoardRemoveClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._board_id = reader.get_short()
        data._post_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class BoardOpenClientPacket(Packet):
    """
    Opening a town board
    """
    _byte_size: int = 0
    _board_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._board_id

    @board_id.setter
    def board_id(self, board_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._board_id = 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.
        """
        if data._board_id is None:
            raise SerializationError("board_id must be provided.")
        writer.add_short(data._board_id)

    @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.
        """
        data: BoardOpenClientPacket = BoardOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._board_id = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._board_id is None:
        raise SerializationError("board_id must be provided.")
    writer.add_short(data._board_id)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: BoardOpenClientPacket = BoardOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._board_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
144
class BoardCreateClientPacket(Packet):
    """
    Posting a new message to a town board
    """
    _byte_size: int = 0
    _board_id: int = None # type: ignore [assignment]
    _post_subject: str = None # type: ignore [assignment]
    _post_body: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._board_id

    @board_id.setter
    def board_id(self, board_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._board_id = board_id

    @property
    def post_subject(self) -> str:
        return self._post_subject

    @post_subject.setter
    def post_subject(self, post_subject: str) -> None:
        self._post_subject = post_subject

    @property
    def post_body(self) -> str:
        return self._post_body

    @post_body.setter
    def post_body(self, post_body: str) -> None:
        self._post_body = 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.
        """
        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)

    @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.
        """
        data: BoardCreateClientPacket = BoardCreateClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._board_id = reader.get_short()
            reader.next_chunk()
            data._post_subject = reader.get_string()
            reader.next_chunk()
            data._post_body = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

post_subject: str property writable

post_body: str property writable

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
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.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
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/board_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.
    """
    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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@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.
    """
    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)

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
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
@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.
    """
    data: BoardCreateClientPacket = BoardCreateClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._board_id = reader.get_short()
        reader.next_chunk()
        data._post_subject = reader.get_string()
        reader.next_chunk()
        data._post_body = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class BarberOpenClientPacket(Packet):
    """
    Talking to a barber NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = 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.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)

    @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.
        """
        data: BarberOpenClientPacket = BarberOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: BarberOpenClientPacket = BarberOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
class BarberBuyClientPacket(Packet):
    """
    Purchasing a hair-style
    """
    _byte_size: int = 0
    _hair_style: int = None # type: ignore [assignment]
    _hair_color: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hair_style

    @hair_style.setter
    def hair_style(self, hair_style: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hair_style = hair_style

    @property
    def hair_color(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hair_color

    @hair_color.setter
    def hair_color(self, hair_color: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hair_color = hair_color

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._session_id = 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.
        """
        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)

    @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.
        """
        data: BarberBuyClientPacket = BarberBuyClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._hair_style = reader.get_char()
            data._hair_color = reader.get_char()
            data._session_id = reader.get_int()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-252.

hair_color: int property writable

Note
  • Value range is 0-252.

session_id: int property writable

Note
  • Value range is 0-4097152080.

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
80
81
82
83
84
85
86
87
88
@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
90
91
92
93
94
95
96
97
98
@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
100
101
102
103
104
105
106
107
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
@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.
    """
    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)

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
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) -> "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.
    """
    data: BarberBuyClientPacket = BarberBuyClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._hair_style = reader.get_char()
        data._hair_color = reader.get_char()
        data._session_id = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class BankTakeClientPacket(Packet):
    """
    Withdrawing gold
    """
    _byte_size: int = 0
    _amount: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._amount

    @amount.setter
    def amount(self, amount: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._amount = amount

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._session_id = 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.
        """
        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)

    @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.
        """
        data: BankTakeClientPacket = BankTakeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._amount = reader.get_int()
            data._session_id = reader.get_three()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

session_id: int property writable

Note
  • Value range is 0-16194276.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: BankTakeClientPacket = BankTakeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._amount = reader.get_int()
        data._session_id = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class BankOpenClientPacket(Packet):
    """
    Talked to a banker NPC
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_index = 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.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)

    @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.
        """
        data: BankOpenClientPacket = BankOpenClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

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
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.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
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.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
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.
    """
    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
75
76
77
78
79
80
81
82
83
84
85
86
@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.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@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.
    """
    data: BankOpenClientPacket = BankOpenClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    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
123
124
125
126
127
128
129
130
131
class BankAddClientPacket(Packet):
    """
    Depositing gold
    """
    _byte_size: int = 0
    _amount: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._amount

    @amount.setter
    def amount(self, amount: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._amount = amount

    @property
    def session_id(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._session_id = 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.
        """
        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)

    @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.
        """
        data: BankAddClientPacket = BankAddClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._amount = reader.get_int()
            data._session_id = reader.get_three()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-4097152080.

session_id: int property writable

Note
  • Value range is 0-16194276.

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
63
64
65
66
67
68
69
70
71
@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
73
74
75
76
77
78
79
80
81
@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
83
84
85
86
87
88
89
90
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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@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.
    """
    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)

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
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) -> "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.
    """
    data: BankAddClientPacket = BankAddClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._amount = reader.get_int()
        data._session_id = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    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

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
124
class AttackUseClientPacket(Packet):
    """
    Attacking
    """
    _byte_size: int = 0
    _direction: Direction = None # type: ignore [assignment]
    _timestamp: int = None # type: ignore [assignment]

    @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

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @property
    def timestamp(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._timestamp = 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.
        """
        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)

    @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.
        """
        data: AttackUseClientPacket = AttackUseClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._direction = Direction(reader.get_char())
            data._timestamp = reader.get_three()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

timestamp: int property writable

Note
  • Value range is 0-16194276.

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
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.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
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.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
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.
    """
    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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    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)

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
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) -> "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.
    """
    data: AttackUseClientPacket = AttackUseClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._direction = Direction(reader.get_char())
        data._timestamp = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class AdminInteractTellClientPacket(Packet):
    """
    Talk to admin
    """
    _byte_size: int = 0
    _message: str = None # type: ignore [assignment]

    @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

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @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.
        """
        data: AdminInteractTellClientPacket = AdminInteractTellClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._message = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: AdminInteractTellClientPacket = AdminInteractTellClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
class AdminInteractReportClientPacket(Packet):
    """
    Report character
    """
    _byte_size: int = 0
    _reportee: str = None # type: ignore [assignment]
    _message: str = None # type: ignore [assignment]

    @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

    @reportee.setter
    def reportee(self, reportee: str) -> None:
        self._reportee = reportee

    @property
    def message(self) -> str:
        return self._message

    @message.setter
    def message(self, message: str) -> None:
        self._message = 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.
        """
        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)

    @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.
        """
        data: AdminInteractReportClientPacket = AdminInteractReportClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._reportee = reader.get_string()
            reader.next_chunk()
            data._message = reader.get_string()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

message: str property writable

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
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.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
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.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
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.
    """
    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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@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.
    """
    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)

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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
@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.
    """
    data: AdminInteractReportClientPacket = AdminInteractReportClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._reportee = reader.get_string()
        reader.next_chunk()
        data._message = reader.get_string()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    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
class AccountRequestClientPacket(Packet):
    """
    Request creating an account
    """
    _byte_size: int = 0
    _username: str = None # type: ignore [assignment]

    @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

    @username.setter
    def username(self, username: str) -> None:
        self._username = 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.
        """
        if data._username is None:
            raise SerializationError("username must be provided.")
        writer.add_string(data._username)

    @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.
        """
        data: AccountRequestClientPacket = AccountRequestClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._username = reader.get_string()
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

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
38
39
40
41
42
43
44
45
46
@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
48
49
50
51
52
53
54
55
56
@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
58
59
60
61
62
63
64
65
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
67
68
69
70
71
72
73
74
75
76
77
78
@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.
    """
    if data._username is None:
        raise SerializationError("username must be provided.")
    writer.add_string(data._username)

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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@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.
    """
    data: AccountRequestClientPacket = AccountRequestClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._username = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    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
209
210
211
212
213
214
215
216
217
218
219
class AccountCreateClientPacket(Packet):
    """
    Confirm creating an account
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _username: str = None # type: ignore [assignment]
    _password: str = None # type: ignore [assignment]
    _full_name: str = None # type: ignore [assignment]
    _location: str = None # type: ignore [assignment]
    _email: str = None # type: ignore [assignment]
    _computer: str = None # type: ignore [assignment]
    _hdid: str = None # type: ignore [assignment]

    @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:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._session_id = session_id

    @property
    def username(self) -> str:
        return self._username

    @username.setter
    def username(self, username: str) -> None:
        self._username = username

    @property
    def password(self) -> str:
        return self._password

    @password.setter
    def password(self, password: str) -> None:
        self._password = password

    @property
    def full_name(self) -> str:
        return self._full_name

    @full_name.setter
    def full_name(self, full_name: str) -> None:
        self._full_name = full_name

    @property
    def location(self) -> str:
        return self._location

    @location.setter
    def location(self, location: str) -> None:
        self._location = location

    @property
    def email(self) -> str:
        return self._email

    @email.setter
    def email(self, email: str) -> None:
        self._email = email

    @property
    def computer(self) -> str:
        return self._computer

    @computer.setter
    def computer(self, computer: str) -> None:
        self._computer = computer

    @property
    def hdid(self) -> str:
        return self._hdid

    @hdid.setter
    def hdid(self, hdid: str) -> None:
        self._hdid = 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.
        """
        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)

    @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.
        """
        data: AccountCreateClientPacket = AccountCreateClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._session_id = reader.get_short()
            reader.next_chunk()
            data._username = reader.get_string()
            reader.next_chunk()
            data._password = reader.get_string()
            reader.next_chunk()
            data._full_name = reader.get_string()
            reader.next_chunk()
            data._location = reader.get_string()
            reader.next_chunk()
            data._email = reader.get_string()
            reader.next_chunk()
            data._computer = reader.get_string()
            reader.next_chunk()
            data._hdid = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

Note
  • Value range is 0-64008.

username: str property writable

password: str property writable

full_name: str property writable

location: str property writable

email: str property writable

computer: str property writable

hdid: str property writable

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
109
110
111
112
113
114
115
116
117
@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
119
120
121
122
123
124
125
126
127
@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
129
130
131
132
133
134
135
136
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
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
@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.
    """
    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)

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
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
@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.
    """
    data: AccountCreateClientPacket = AccountCreateClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._session_id = reader.get_short()
        reader.next_chunk()
        data._username = reader.get_string()
        reader.next_chunk()
        data._password = reader.get_string()
        reader.next_chunk()
        data._full_name = reader.get_string()
        reader.next_chunk()
        data._location = reader.get_string()
        reader.next_chunk()
        data._email = reader.get_string()
        reader.next_chunk()
        data._computer = reader.get_string()
        reader.next_chunk()
        data._hdid = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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()

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
class AccountAgreeClientPacket(Packet):
    """
    Change password
    """
    _byte_size: int = 0
    _username: str = None # type: ignore [assignment]
    _old_password: str = None # type: ignore [assignment]
    _new_password: str = None # type: ignore [assignment]

    @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

    @username.setter
    def username(self, username: str) -> None:
        self._username = username

    @property
    def old_password(self) -> str:
        return self._old_password

    @old_password.setter
    def old_password(self, old_password: str) -> None:
        self._old_password = old_password

    @property
    def new_password(self) -> str:
        return self._new_password

    @new_password.setter
    def new_password(self, new_password: str) -> None:
        self._new_password = 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.
        """
        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)

    @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.
        """
        data: AccountAgreeClientPacket = AccountAgreeClientPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._username = reader.get_string()
            reader.next_chunk()
            data._old_password = reader.get_string()
            reader.next_chunk()
            data._new_password = reader.get_string()
            reader.next_chunk()
            reader.chunked_reading_mode = False
            data._byte_size = reader.position - reader_start_position
            return data
        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 writable

old_password: str property writable

new_password: str property writable

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
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.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
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.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
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.
    """
    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
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
@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.
    """
    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)

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
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
@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.
    """
    data: AccountAgreeClientPacket = AccountAgreeClientPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._username = reader.get_string()
        reader.next_chunk()
        data._old_password = reader.get_string()
        reader.next_chunk()
        data._new_password = reader.get_string()
        reader.next_chunk()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode