Skip to content

net

EO network protocol data structures.

See Also

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

FileType

Bases: IntEnum

Data file type

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

Emf = 1 class-attribute instance-attribute

Eif = 2 class-attribute instance-attribute

Enf = 3 class-attribute instance-attribute

Esf = 4 class-attribute instance-attribute

Ecf = 5 class-attribute instance-attribute

WelcomeAgreeClientPacket

Bases: Packet

Requesting a file

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

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

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

TrainType

Bases: IntEnum

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

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

Stat = 1 class-attribute instance-attribute

Skill = 2 class-attribute instance-attribute

TradeRequestClientPacket

Bases: Packet

Requesting a trade with another player

Source code in src/eolib/protocol/_generated/net/client/trade_request_client_packet.py
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
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

StatId

Bases: IntEnum

Base character stat

Source code in src/eolib/protocol/_generated/net/client/stat_id.py
 9
10
11
12
13
14
15
16
17
18
class StatId(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Base character stat
    """
    Str = 1
    Int = 2
    Wis = 3
    Agi = 4
    Con = 5
    Cha = 6

Str = 1 class-attribute instance-attribute

Int = 2 class-attribute instance-attribute

Wis = 3 class-attribute instance-attribute

Agi = 4 class-attribute instance-attribute

Con = 5 class-attribute instance-attribute

Cha = 6 class-attribute instance-attribute

StatSkillAddClientPacket

Bases: Packet

Spending a stat point on a stat or skill

Source code in src/eolib/protocol/_generated/net/client/stat_skill_add_client_packet.py
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
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

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

SpellTargetType

Bases: IntEnum

Target type of a spell cast

Source code in src/eolib/protocol/_generated/net/client/spell_target_type.py
 9
10
11
12
13
14
class SpellTargetType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Target type of a spell cast
    """
    Player = 1
    Npc = 2

Player = 1 class-attribute instance-attribute

Npc = 2 class-attribute instance-attribute

SpellTargetSelfClientPacket

Bases: Packet

Self-targeted spell cast

Source code in src/eolib/protocol/_generated/net/client/spell_target_self_client_packet.py
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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

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

SitAction

Bases: IntEnum

Whether the player wants to sit or stand

Source code in src/eolib/protocol/_generated/net/client/sit_action.py
 9
10
11
12
13
14
class SitAction(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Whether the player wants to sit or stand
    """
    Sit = 1
    Stand = 2

Sit = 1 class-attribute instance-attribute

Stand = 2 class-attribute instance-attribute

SitRequestClientPacket

Bases: Packet

Sit/stand request

Source code in src/eolib/protocol/_generated/net/client/sit_request_client_packet.py
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
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

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

DialogReply

Bases: IntEnum

Whether the player has clicked the OK button or a link in a quest dialog

Source code in src/eolib/protocol/_generated/net/client/dialog_reply.py
 9
10
11
12
13
14
class DialogReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Whether the player has clicked the OK button or a link in a quest dialog
    """
    Ok = 1
    Link = 2

Ok = 1 class-attribute instance-attribute

QuestAcceptClientPacket

Bases: Packet

Response to a quest NPC dialog

Source code in src/eolib/protocol/_generated/net/client/quest_accept_client_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
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

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

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

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

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

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

GuildInfoType

Bases: IntEnum

The type of guild info being interacted with

Source code in src/eolib/protocol/_generated/net/client/guild_info_type.py
 9
10
11
12
13
14
15
class GuildInfoType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    The type of guild info being interacted with
    """
    Description = 1
    Ranks = 2
    Bank = 3

Description = 1 class-attribute instance-attribute

Ranks = 2 class-attribute instance-attribute

Bank = 3 class-attribute instance-attribute

GuildTakeClientPacket

Bases: Packet

Request guild description, rank list, or bank balance

Source code in src/eolib/protocol/_generated/net/client/guild_take_client_packet.py
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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

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

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

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

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

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

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

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

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

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

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

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()

Direction

Bases: IntEnum

The direction a player or NPC is facing

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

Down = 0 class-attribute instance-attribute

Left = 1 class-attribute instance-attribute

Up = 2 class-attribute instance-attribute

Right = 3 class-attribute instance-attribute

Coords

Map coordinates

Source code in src/eolib/protocol/_generated/coords.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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

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

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

WelcomeCode

Bases: IntEnum

Reply code sent with WELCOME_REPLY packet

Source code in src/eolib/protocol/_generated/net/server/welcome_code.py
 9
10
11
12
13
14
15
16
class WelcomeCode(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with WELCOME_REPLY packet
    """
    SelectCharacter = 1
    EnterGame = 2
    ServerBusy = 3
    LoggedIn = 4

SelectCharacter = 1 class-attribute instance-attribute

EnterGame = 2 class-attribute instance-attribute

ServerBusy = 3 class-attribute instance-attribute

LoggedIn = 4 class-attribute instance-attribute

ServerSettings

Settings sent with WELCOME_REPLY packet

Source code in src/eolib/protocol/_generated/net/server/server_settings.py
 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
class ServerSettings:
    """
    Settings sent with WELCOME_REPLY packet
    """
    _byte_size: int = 0
    _jail_map: int = None # type: ignore [assignment]
    _rescue_map: int = None # type: ignore [assignment]
    _rescue_coords: Coords = None # type: ignore [assignment]
    _spy_and_light_guide_flood_rate: int = None # type: ignore [assignment]
    _guardian_flood_rate: int = None # type: ignore [assignment]
    _game_master_flood_rate: int = None # type: ignore [assignment]
    _high_game_master_flood_rate: 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 jail_map(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._jail_map

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

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

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

    @property
    def rescue_coords(self) -> Coords:
        return self._rescue_coords

    @rescue_coords.setter
    def rescue_coords(self, rescue_coords: Coords) -> None:
        self._rescue_coords = rescue_coords

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

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

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

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

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

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

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ServerSettings): The data to serialize.
        """
        if data._jail_map is None:
            raise SerializationError("jail_map must be provided.")
        writer.add_short(data._jail_map)
        if data._rescue_map is None:
            raise SerializationError("rescue_map must be provided.")
        writer.add_short(data._rescue_map)
        if data._rescue_coords is None:
            raise SerializationError("rescue_coords must be provided.")
        Coords.serialize(writer, data._rescue_coords)
        if data._spy_and_light_guide_flood_rate is None:
            raise SerializationError("spy_and_light_guide_flood_rate must be provided.")
        writer.add_short(data._spy_and_light_guide_flood_rate)
        if data._guardian_flood_rate is None:
            raise SerializationError("guardian_flood_rate must be provided.")
        writer.add_short(data._guardian_flood_rate)
        if data._game_master_flood_rate is None:
            raise SerializationError("game_master_flood_rate must be provided.")
        writer.add_short(data._game_master_flood_rate)
        if data._high_game_master_flood_rate is None:
            raise SerializationError("high_game_master_flood_rate must be provided.")
        writer.add_short(data._high_game_master_flood_rate)

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

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

        Returns:
            ServerSettings: The data to serialize.
        """
        data: ServerSettings = ServerSettings()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._jail_map = reader.get_short()
            data._rescue_map = reader.get_short()
            data._rescue_coords = Coords.deserialize(reader)
            data._spy_and_light_guide_flood_rate = reader.get_short()
            data._guardian_flood_rate = reader.get_short()
            data._game_master_flood_rate = reader.get_short()
            data._high_game_master_flood_rate = 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"ServerSettings(byte_size={repr(self._byte_size)}, jail_map={repr(self._jail_map)}, rescue_map={repr(self._rescue_map)}, rescue_coords={repr(self._rescue_coords)}, spy_and_light_guide_flood_rate={repr(self._spy_and_light_guide_flood_rate)}, guardian_flood_rate={repr(self._guardian_flood_rate)}, game_master_flood_rate={repr(self._game_master_flood_rate)}, high_game_master_flood_rate={repr(self._high_game_master_flood_rate)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

jail_map: int property writable

Note
  • Value range is 0-64008.

rescue_map: int property writable

Note
  • Value range is 0-64008.

rescue_coords: Coords property writable

spy_and_light_guide_flood_rate: int property writable

Note
  • Value range is 0-64008.

guardian_flood_rate: int property writable

Note
  • Value range is 0-64008.

game_master_flood_rate: int property writable

Note
  • Value range is 0-64008.

high_game_master_flood_rate: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of ServerSettings to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ServerSettings

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/server_settings.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
@staticmethod
def serialize(writer: EoWriter, data: "ServerSettings") -> None:
    """
    Serializes an instance of `ServerSettings` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ServerSettings): The data to serialize.
    """
    if data._jail_map is None:
        raise SerializationError("jail_map must be provided.")
    writer.add_short(data._jail_map)
    if data._rescue_map is None:
        raise SerializationError("rescue_map must be provided.")
    writer.add_short(data._rescue_map)
    if data._rescue_coords is None:
        raise SerializationError("rescue_coords must be provided.")
    Coords.serialize(writer, data._rescue_coords)
    if data._spy_and_light_guide_flood_rate is None:
        raise SerializationError("spy_and_light_guide_flood_rate must be provided.")
    writer.add_short(data._spy_and_light_guide_flood_rate)
    if data._guardian_flood_rate is None:
        raise SerializationError("guardian_flood_rate must be provided.")
    writer.add_short(data._guardian_flood_rate)
    if data._game_master_flood_rate is None:
        raise SerializationError("game_master_flood_rate must be provided.")
    writer.add_short(data._game_master_flood_rate)
    if data._high_game_master_flood_rate is None:
        raise SerializationError("high_game_master_flood_rate must be provided.")
    writer.add_short(data._high_game_master_flood_rate)

deserialize(reader) staticmethod

Deserializes an instance of ServerSettings from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ServerSettings ServerSettings

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/server_settings.py
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
@staticmethod
def deserialize(reader: EoReader) -> "ServerSettings":
    """
    Deserializes an instance of `ServerSettings` from the provided `EoReader`.

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

    Returns:
        ServerSettings: The data to serialize.
    """
    data: ServerSettings = ServerSettings()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._jail_map = reader.get_short()
        data._rescue_map = reader.get_short()
        data._rescue_coords = Coords.deserialize(reader)
        data._spy_and_light_guide_flood_rate = reader.get_short()
        data._guardian_flood_rate = reader.get_short()
        data._game_master_flood_rate = reader.get_short()
        data._high_game_master_flood_rate = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NearbyInfo

Information about nearby entities

Source code in src/eolib/protocol/_generated/net/server/nearby_info.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
class NearbyInfo:
    """
    Information about nearby entities
    """
    _byte_size: int = 0
    _characters_count: int = None # type: ignore [assignment]
    _characters: list[CharacterMapInfo] = None # type: ignore [assignment]
    _npcs: list[NpcMapInfo] = None # type: ignore [assignment]
    _items: list[ItemMapInfo] = 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 characters(self) -> list[CharacterMapInfo]:
        """
        Note:
          - Length must be 252 or less.
        """
        return self._characters

    @characters.setter
    def characters(self, characters: list[CharacterMapInfo]) -> None:
        """
        Note:
          - Length must be 252 or less.
        """
        self._characters = characters
        self._characters_count = len(self._characters)

    @property
    def npcs(self) -> list[NpcMapInfo]:
        return self._npcs

    @npcs.setter
    def npcs(self, npcs: list[NpcMapInfo]) -> None:
        self._npcs = npcs

    @property
    def items(self) -> list[ItemMapInfo]:
        return self._items

    @items.setter
    def items(self, items: list[ItemMapInfo]) -> None:
        self._items = items

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NearbyInfo): The data to serialize.
        """
        if data._characters_count is None:
            raise SerializationError("characters_count must be provided.")
        writer.add_char(data._characters_count)
        writer.add_byte(0xFF)
        if data._characters is None:
            raise SerializationError("characters must be provided.")
        if len(data._characters) > 252:
            raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
        for i in range(data._characters_count):
            if i > 0:
                writer.add_byte(0xFF)
            CharacterMapInfo.serialize(writer, data._characters[i])
        if data._npcs is None:
            raise SerializationError("npcs must be provided.")
        for i in range(len(data._npcs)):
            NpcMapInfo.serialize(writer, data._npcs[i])
        writer.add_byte(0xFF)
        if data._items is None:
            raise SerializationError("items must be provided.")
        for i in range(len(data._items)):
            ItemMapInfo.serialize(writer, data._items[i])

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

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

        Returns:
            NearbyInfo: The data to serialize.
        """
        data: NearbyInfo = NearbyInfo()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._characters_count = reader.get_char()
            reader.chunked_reading_mode = True
            reader.next_chunk()
            data._characters = []
            for i in range(data._characters_count):
                data._characters.append(CharacterMapInfo.deserialize(reader))
                if i + 1 < data._characters_count:
                    reader.next_chunk()
            npcs_length = int(reader.remaining / 6)
            data._npcs = []
            for i in range(npcs_length):
                data._npcs.append(NpcMapInfo.deserialize(reader))
            reader.next_chunk()
            items_length = int(reader.remaining / 9)
            data._items = []
            for i in range(items_length):
                data._items.append(ItemMapInfo.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"NearbyInfo(byte_size={repr(self._byte_size)}, characters={repr(self._characters)}, npcs={repr(self._npcs)}, items={repr(self._items)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

characters: list[CharacterMapInfo] property writable

Note
  • Length must be 252 or less.

npcs: list[NpcMapInfo] property writable

items: list[ItemMapInfo] property writable

serialize(writer, data) staticmethod

Serializes an instance of NearbyInfo to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NearbyInfo

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/nearby_info.py
67
68
69
70
71
72
73
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 serialize(writer: EoWriter, data: "NearbyInfo") -> None:
    """
    Serializes an instance of `NearbyInfo` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NearbyInfo): The data to serialize.
    """
    if data._characters_count is None:
        raise SerializationError("characters_count must be provided.")
    writer.add_char(data._characters_count)
    writer.add_byte(0xFF)
    if data._characters is None:
        raise SerializationError("characters must be provided.")
    if len(data._characters) > 252:
        raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
    for i in range(data._characters_count):
        if i > 0:
            writer.add_byte(0xFF)
        CharacterMapInfo.serialize(writer, data._characters[i])
    if data._npcs is None:
        raise SerializationError("npcs must be provided.")
    for i in range(len(data._npcs)):
        NpcMapInfo.serialize(writer, data._npcs[i])
    writer.add_byte(0xFF)
    if data._items is None:
        raise SerializationError("items must be provided.")
    for i in range(len(data._items)):
        ItemMapInfo.serialize(writer, data._items[i])

deserialize(reader) staticmethod

Deserializes an instance of NearbyInfo from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NearbyInfo 'NearbyInfo'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/nearby_info.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
133
134
@staticmethod
def deserialize(reader: EoReader) -> "NearbyInfo":
    """
    Deserializes an instance of `NearbyInfo` from the provided `EoReader`.

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

    Returns:
        NearbyInfo: The data to serialize.
    """
    data: NearbyInfo = NearbyInfo()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._characters_count = reader.get_char()
        reader.chunked_reading_mode = True
        reader.next_chunk()
        data._characters = []
        for i in range(data._characters_count):
            data._characters.append(CharacterMapInfo.deserialize(reader))
            if i + 1 < data._characters_count:
                reader.next_chunk()
        npcs_length = int(reader.remaining / 6)
        data._npcs = []
        for i in range(npcs_length):
            data._npcs.append(NpcMapInfo.deserialize(reader))
        reader.next_chunk()
        items_length = int(reader.remaining / 9)
        data._items = []
        for i in range(items_length):
            data._items.append(ItemMapInfo.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

LoginMessageCode

Bases: IntEnum

Whether a warning message should be displayed upon entering the game

Source code in src/eolib/protocol/_generated/net/server/login_message_code.py
 9
10
11
12
13
14
class LoginMessageCode(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Whether a warning message should be displayed upon entering the game
    """
    No = 0
    Yes = 2

No = 0 class-attribute instance-attribute

Yes = 2 class-attribute instance-attribute

EquipmentWelcome

Player equipment data. Sent upon selecting a character and entering the game. Note that these values are item IDs.

Source code in src/eolib/protocol/_generated/net/server/equipment_welcome.py
 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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
class EquipmentWelcome:
    """
    Player equipment data.
    Sent upon selecting a character and entering the game.
    Note that these values are item IDs.
    """
    _byte_size: int = 0
    _boots: int = None # type: ignore [assignment]
    _gloves: int = None # type: ignore [assignment]
    _accessory: int = None # type: ignore [assignment]
    _armor: int = None # type: ignore [assignment]
    _belt: int = None # type: ignore [assignment]
    _necklace: int = None # type: ignore [assignment]
    _hat: int = None # type: ignore [assignment]
    _shield: int = None # type: ignore [assignment]
    _weapon: int = None # type: ignore [assignment]
    _ring: list[int] = None # type: ignore [assignment]
    _armlet: list[int] = None # type: ignore [assignment]
    _bracer: 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 boots(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._boots

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @property
    def ring(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._ring

    @ring.setter
    def ring(self, ring: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._ring = ring

    @property
    def armlet(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._armlet

    @armlet.setter
    def armlet(self, armlet: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._armlet = armlet

    @property
    def bracer(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._bracer

    @bracer.setter
    def bracer(self, bracer: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._bracer = bracer

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EquipmentWelcome): The data to serialize.
        """
        if data._boots is None:
            raise SerializationError("boots must be provided.")
        writer.add_short(data._boots)
        if data._gloves is None:
            raise SerializationError("gloves must be provided.")
        writer.add_short(data._gloves)
        if data._accessory is None:
            raise SerializationError("accessory must be provided.")
        writer.add_short(data._accessory)
        if data._armor is None:
            raise SerializationError("armor must be provided.")
        writer.add_short(data._armor)
        if data._belt is None:
            raise SerializationError("belt must be provided.")
        writer.add_short(data._belt)
        if data._necklace is None:
            raise SerializationError("necklace must be provided.")
        writer.add_short(data._necklace)
        if data._hat is None:
            raise SerializationError("hat must be provided.")
        writer.add_short(data._hat)
        if data._shield is None:
            raise SerializationError("shield must be provided.")
        writer.add_short(data._shield)
        if data._weapon is None:
            raise SerializationError("weapon must be provided.")
        writer.add_short(data._weapon)
        if data._ring is None:
            raise SerializationError("ring must be provided.")
        if len(data._ring) != 2:
            raise SerializationError(f"Expected length of ring to be exactly 2, got {len(data._ring)}.")
        for i in range(2):
            writer.add_short(data._ring[i])
        if data._armlet is None:
            raise SerializationError("armlet must be provided.")
        if len(data._armlet) != 2:
            raise SerializationError(f"Expected length of armlet to be exactly 2, got {len(data._armlet)}.")
        for i in range(2):
            writer.add_short(data._armlet[i])
        if data._bracer is None:
            raise SerializationError("bracer must be provided.")
        if len(data._bracer) != 2:
            raise SerializationError(f"Expected length of bracer to be exactly 2, got {len(data._bracer)}.")
        for i in range(2):
            writer.add_short(data._bracer[i])

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

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

        Returns:
            EquipmentWelcome: The data to serialize.
        """
        data: EquipmentWelcome = EquipmentWelcome()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._boots = reader.get_short()
            data._gloves = reader.get_short()
            data._accessory = reader.get_short()
            data._armor = reader.get_short()
            data._belt = reader.get_short()
            data._necklace = reader.get_short()
            data._hat = reader.get_short()
            data._shield = reader.get_short()
            data._weapon = reader.get_short()
            data._ring = []
            for i in range(2):
                data._ring.append(reader.get_short())
            data._armlet = []
            for i in range(2):
                data._armlet.append(reader.get_short())
            data._bracer = []
            for i in range(2):
                data._bracer.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"EquipmentWelcome(byte_size={repr(self._byte_size)}, boots={repr(self._boots)}, gloves={repr(self._gloves)}, accessory={repr(self._accessory)}, armor={repr(self._armor)}, belt={repr(self._belt)}, necklace={repr(self._necklace)}, hat={repr(self._hat)}, shield={repr(self._shield)}, weapon={repr(self._weapon)}, ring={repr(self._ring)}, armlet={repr(self._armlet)}, bracer={repr(self._bracer)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

boots: int property writable

Note
  • Value range is 0-64008.

gloves: int property writable

Note
  • Value range is 0-64008.

accessory: int property writable

Note
  • Value range is 0-64008.

armor: int property writable

Note
  • Value range is 0-64008.

belt: int property writable

Note
  • Value range is 0-64008.

necklace: int property writable

Note
  • Value range is 0-64008.

hat: int property writable

Note
  • Value range is 0-64008.

shield: int property writable

Note
  • Value range is 0-64008.

weapon: int property writable

Note
  • Value range is 0-64008.

ring: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

armlet: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

bracer: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of EquipmentWelcome to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EquipmentWelcome

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/equipment_welcome.py
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
@staticmethod
def serialize(writer: EoWriter, data: "EquipmentWelcome") -> None:
    """
    Serializes an instance of `EquipmentWelcome` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EquipmentWelcome): The data to serialize.
    """
    if data._boots is None:
        raise SerializationError("boots must be provided.")
    writer.add_short(data._boots)
    if data._gloves is None:
        raise SerializationError("gloves must be provided.")
    writer.add_short(data._gloves)
    if data._accessory is None:
        raise SerializationError("accessory must be provided.")
    writer.add_short(data._accessory)
    if data._armor is None:
        raise SerializationError("armor must be provided.")
    writer.add_short(data._armor)
    if data._belt is None:
        raise SerializationError("belt must be provided.")
    writer.add_short(data._belt)
    if data._necklace is None:
        raise SerializationError("necklace must be provided.")
    writer.add_short(data._necklace)
    if data._hat is None:
        raise SerializationError("hat must be provided.")
    writer.add_short(data._hat)
    if data._shield is None:
        raise SerializationError("shield must be provided.")
    writer.add_short(data._shield)
    if data._weapon is None:
        raise SerializationError("weapon must be provided.")
    writer.add_short(data._weapon)
    if data._ring is None:
        raise SerializationError("ring must be provided.")
    if len(data._ring) != 2:
        raise SerializationError(f"Expected length of ring to be exactly 2, got {len(data._ring)}.")
    for i in range(2):
        writer.add_short(data._ring[i])
    if data._armlet is None:
        raise SerializationError("armlet must be provided.")
    if len(data._armlet) != 2:
        raise SerializationError(f"Expected length of armlet to be exactly 2, got {len(data._armlet)}.")
    for i in range(2):
        writer.add_short(data._armlet[i])
    if data._bracer is None:
        raise SerializationError("bracer must be provided.")
    if len(data._bracer) != 2:
        raise SerializationError(f"Expected length of bracer to be exactly 2, got {len(data._bracer)}.")
    for i in range(2):
        writer.add_short(data._bracer[i])

deserialize(reader) staticmethod

Deserializes an instance of EquipmentWelcome from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EquipmentWelcome 'EquipmentWelcome'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/equipment_welcome.py
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
@staticmethod
def deserialize(reader: EoReader) -> "EquipmentWelcome":
    """
    Deserializes an instance of `EquipmentWelcome` from the provided `EoReader`.

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

    Returns:
        EquipmentWelcome: The data to serialize.
    """
    data: EquipmentWelcome = EquipmentWelcome()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._boots = reader.get_short()
        data._gloves = reader.get_short()
        data._accessory = reader.get_short()
        data._armor = reader.get_short()
        data._belt = reader.get_short()
        data._necklace = reader.get_short()
        data._hat = reader.get_short()
        data._shield = reader.get_short()
        data._weapon = reader.get_short()
        data._ring = []
        for i in range(2):
            data._ring.append(reader.get_short())
        data._armlet = []
        for i in range(2):
            data._armlet.append(reader.get_short())
        data._bracer = []
        for i in range(2):
            data._bracer.append(reader.get_short())
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterStatsWelcome

Character stats data. Sent upon selecting a character and entering the game.

Source code in src/eolib/protocol/_generated/net/server/character_stats_welcome.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
class CharacterStatsWelcome:
    """
    Character stats data.
    Sent upon selecting a character and entering the game.
    """
    _byte_size: int = 0
    _hp: int = None # type: ignore [assignment]
    _max_hp: int = None # type: ignore [assignment]
    _tp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _max_sp: int = None # type: ignore [assignment]
    _stat_points: int = None # type: ignore [assignment]
    _skill_points: int = None # type: ignore [assignment]
    _karma: int = None # type: ignore [assignment]
    _secondary: CharacterSecondaryStats = None # type: ignore [assignment]
    _base: CharacterBaseStatsWelcome = 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 hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @property
    def secondary(self) -> CharacterSecondaryStats:
        return self._secondary

    @secondary.setter
    def secondary(self, secondary: CharacterSecondaryStats) -> None:
        self._secondary = secondary

    @property
    def base(self) -> CharacterBaseStatsWelcome:
        return self._base

    @base.setter
    def base(self, base: CharacterBaseStatsWelcome) -> None:
        self._base = base

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterStatsWelcome): The data to serialize.
        """
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._tp is None:
            raise SerializationError("tp must be provided.")
        writer.add_short(data._tp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._max_sp is None:
            raise SerializationError("max_sp must be provided.")
        writer.add_short(data._max_sp)
        if data._stat_points is None:
            raise SerializationError("stat_points must be provided.")
        writer.add_short(data._stat_points)
        if data._skill_points is None:
            raise SerializationError("skill_points must be provided.")
        writer.add_short(data._skill_points)
        if data._karma is None:
            raise SerializationError("karma must be provided.")
        writer.add_short(data._karma)
        if data._secondary is None:
            raise SerializationError("secondary must be provided.")
        CharacterSecondaryStats.serialize(writer, data._secondary)
        if data._base is None:
            raise SerializationError("base must be provided.")
        CharacterBaseStatsWelcome.serialize(writer, data._base)

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

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

        Returns:
            CharacterStatsWelcome: The data to serialize.
        """
        data: CharacterStatsWelcome = CharacterStatsWelcome()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._hp = reader.get_short()
            data._max_hp = reader.get_short()
            data._tp = reader.get_short()
            data._max_tp = reader.get_short()
            data._max_sp = reader.get_short()
            data._stat_points = reader.get_short()
            data._skill_points = reader.get_short()
            data._karma = reader.get_short()
            data._secondary = CharacterSecondaryStats.deserialize(reader)
            data._base = CharacterBaseStatsWelcome.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"CharacterStatsWelcome(byte_size={repr(self._byte_size)}, hp={repr(self._hp)}, max_hp={repr(self._max_hp)}, tp={repr(self._tp)}, max_tp={repr(self._max_tp)}, max_sp={repr(self._max_sp)}, stat_points={repr(self._stat_points)}, skill_points={repr(self._skill_points)}, karma={repr(self._karma)}, secondary={repr(self._secondary)}, base={repr(self._base)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

hp: int property writable

Note
  • Value range is 0-64008.

max_hp: int property writable

Note
  • Value range is 0-64008.

tp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

max_sp: int property writable

Note
  • Value range is 0-64008.

stat_points: int property writable

Note
  • Value range is 0-64008.

skill_points: int property writable

Note
  • Value range is 0-64008.

karma: int property writable

Note
  • Value range is 0-64008.

secondary: CharacterSecondaryStats property writable

base: CharacterBaseStatsWelcome property writable

serialize(writer, data) staticmethod

Serializes an instance of CharacterStatsWelcome to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterStatsWelcome

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_stats_welcome.py
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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterStatsWelcome") -> None:
    """
    Serializes an instance of `CharacterStatsWelcome` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterStatsWelcome): The data to serialize.
    """
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._tp is None:
        raise SerializationError("tp must be provided.")
    writer.add_short(data._tp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._max_sp is None:
        raise SerializationError("max_sp must be provided.")
    writer.add_short(data._max_sp)
    if data._stat_points is None:
        raise SerializationError("stat_points must be provided.")
    writer.add_short(data._stat_points)
    if data._skill_points is None:
        raise SerializationError("skill_points must be provided.")
    writer.add_short(data._skill_points)
    if data._karma is None:
        raise SerializationError("karma must be provided.")
    writer.add_short(data._karma)
    if data._secondary is None:
        raise SerializationError("secondary must be provided.")
    CharacterSecondaryStats.serialize(writer, data._secondary)
    if data._base is None:
        raise SerializationError("base must be provided.")
    CharacterBaseStatsWelcome.serialize(writer, data._base)

deserialize(reader) staticmethod

Deserializes an instance of CharacterStatsWelcome from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterStatsWelcome CharacterStatsWelcome

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_stats_welcome.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterStatsWelcome":
    """
    Deserializes an instance of `CharacterStatsWelcome` from the provided `EoReader`.

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

    Returns:
        CharacterStatsWelcome: The data to serialize.
    """
    data: CharacterStatsWelcome = CharacterStatsWelcome()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._hp = reader.get_short()
        data._max_hp = reader.get_short()
        data._tp = reader.get_short()
        data._max_tp = reader.get_short()
        data._max_sp = reader.get_short()
        data._stat_points = reader.get_short()
        data._skill_points = reader.get_short()
        data._karma = reader.get_short()
        data._secondary = CharacterSecondaryStats.deserialize(reader)
        data._base = CharacterBaseStatsWelcome.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AdminLevel

Bases: IntEnum

The admin level of a player

Source code in src/eolib/protocol/_generated/admin_level.py
 9
10
11
12
13
14
15
16
17
18
class AdminLevel(IntEnum, metaclass=ProtocolEnumMeta):
    """
    The admin level of a player
    """
    Player = 0
    Spy = 1
    LightGuide = 2
    Guardian = 3
    GameMaster = 4
    HighGameMaster = 5

Player = 0 class-attribute instance-attribute

Spy = 1 class-attribute instance-attribute

LightGuide = 2 class-attribute instance-attribute

Guardian = 3 class-attribute instance-attribute

GameMaster = 4 class-attribute instance-attribute

HighGameMaster = 5 class-attribute instance-attribute

WelcomeReplyServerPacket

Bases: Packet

Reply to selecting a character / entering game

Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_packet.py
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
class WelcomeReplyServerPacket(Packet):
    """
    Reply to selecting a character / entering game
    """
    _byte_size: int = 0
    _welcome_code: WelcomeCode = None # type: ignore [assignment]
    _welcome_code_data: 'WelcomeReplyServerPacket.WelcomeCodeData' = 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 welcome_code(self) -> WelcomeCode:
        return self._welcome_code

    @welcome_code.setter
    def welcome_code(self, welcome_code: WelcomeCode) -> None:
        self._welcome_code = welcome_code

    @property
    def welcome_code_data(self) -> 'WelcomeReplyServerPacket.WelcomeCodeData':
        """
        WelcomeReplyServerPacket.WelcomeCodeData: Gets or sets the data associated with the `welcome_code` field.
        """
        return self._welcome_code_data

    @welcome_code_data.setter
    def welcome_code_data(self, welcome_code_data: 'WelcomeReplyServerPacket.WelcomeCodeData') -> None:
        self._welcome_code_data = welcome_code_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.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.
        """
        WelcomeReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeReplyServerPacket): The data to serialize.
        """
        if data._welcome_code is None:
            raise SerializationError("welcome_code must be provided.")
        writer.add_short(int(data._welcome_code))
        if data._welcome_code == WelcomeCode.SelectCharacter:
            if not isinstance(data._welcome_code_data, WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter):
                raise SerializationError("Expected welcome_code_data to be type WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter for welcome_code " + WelcomeCode(data._welcome_code).name + ".")
            WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter.serialize(writer, data._welcome_code_data)
        elif data._welcome_code == WelcomeCode.EnterGame:
            if not isinstance(data._welcome_code_data, WelcomeReplyServerPacket.WelcomeCodeDataEnterGame):
                raise SerializationError("Expected welcome_code_data to be type WelcomeReplyServerPacket.WelcomeCodeDataEnterGame for welcome_code " + WelcomeCode(data._welcome_code).name + ".")
            WelcomeReplyServerPacket.WelcomeCodeDataEnterGame.serialize(writer, data._welcome_code_data)

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

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

        Returns:
            WelcomeReplyServerPacket: The data to serialize.
        """
        data: WelcomeReplyServerPacket = WelcomeReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._welcome_code = WelcomeCode(reader.get_short())
            reader.chunked_reading_mode = True
            if data._welcome_code == WelcomeCode.SelectCharacter:
                data._welcome_code_data = WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter.deserialize(reader)
            elif data._welcome_code == WelcomeCode.EnterGame:
                data._welcome_code_data = WelcomeReplyServerPacket.WelcomeCodeDataEnterGame.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"WelcomeReplyServerPacket(byte_size={repr(self._byte_size)}, welcome_code={repr(self._welcome_code)}, welcome_code_data={repr(self._welcome_code_data)})"

    WelcomeCodeData = Union['WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter', 'WelcomeReplyServerPacket.WelcomeCodeDataEnterGame', None]
    WelcomeCodeData.__doc__ = \
        """
        Data associated with different values of the `welcome_code` field.
        """

    class WelcomeCodeDataSelectCharacter:
        """
        Data associated with welcome_code value WelcomeCode.SelectCharacter
        """
        _byte_size: int = 0
        _session_id: int = None # type: ignore [assignment]
        _character_id: int = None # type: ignore [assignment]
        _map_id: int = None # type: ignore [assignment]
        _map_rid: list[int] = None # type: ignore [assignment]
        _map_file_size: int = None # type: ignore [assignment]
        _eif_rid: list[int] = None # type: ignore [assignment]
        _eif_length: int = None # type: ignore [assignment]
        _enf_rid: list[int] = None # type: ignore [assignment]
        _enf_length: int = None # type: ignore [assignment]
        _esf_rid: list[int] = None # type: ignore [assignment]
        _esf_length: int = None # type: ignore [assignment]
        _ecf_rid: list[int] = None # type: ignore [assignment]
        _ecf_length: int = None # type: ignore [assignment]
        _name: str = None # type: ignore [assignment]
        _title: str = None # type: ignore [assignment]
        _guild_name: str = None # type: ignore [assignment]
        _guild_rank_name: str = None # type: ignore [assignment]
        _class_id: int = None # type: ignore [assignment]
        _guild_tag: str = None # type: ignore [assignment]
        _admin: AdminLevel = None # type: ignore [assignment]
        _level: int = None # type: ignore [assignment]
        _experience: int = None # type: ignore [assignment]
        _usage: int = None # type: ignore [assignment]
        _stats: CharacterStatsWelcome = None # type: ignore [assignment]
        _equipment: EquipmentWelcome = None # type: ignore [assignment]
        _guild_rank: int = None # type: ignore [assignment]
        _settings: ServerSettings = None # type: ignore [assignment]
        _login_message_code: LoginMessageCode = 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

        @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 map_rid(self) -> list[int]:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            return self._map_rid

        @map_rid.setter
        def map_rid(self, map_rid: list[int]) -> None:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            self._map_rid = map_rid

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

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

        @property
        def eif_rid(self) -> list[int]:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            return self._eif_rid

        @eif_rid.setter
        def eif_rid(self, eif_rid: list[int]) -> None:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            self._eif_rid = eif_rid

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

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

        @property
        def enf_rid(self) -> list[int]:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            return self._enf_rid

        @enf_rid.setter
        def enf_rid(self, enf_rid: list[int]) -> None:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            self._enf_rid = enf_rid

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

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

        @property
        def esf_rid(self) -> list[int]:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            return self._esf_rid

        @esf_rid.setter
        def esf_rid(self, esf_rid: list[int]) -> None:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            self._esf_rid = esf_rid

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

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

        @property
        def ecf_rid(self) -> list[int]:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            return self._ecf_rid

        @ecf_rid.setter
        def ecf_rid(self, ecf_rid: list[int]) -> None:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            self._ecf_rid = ecf_rid

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

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

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

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

        @property
        def title(self) -> str:
            return self._title

        @title.setter
        def title(self, title: str) -> None:
            self._title = title

        @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 guild_rank_name(self) -> str:
            return self._guild_rank_name

        @guild_rank_name.setter
        def guild_rank_name(self, guild_rank_name: str) -> None:
            self._guild_rank_name = guild_rank_name

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

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

        @property
        def guild_tag(self) -> str:
            """
            Note:
              - Length must be `3`.
            """
            return self._guild_tag

        @guild_tag.setter
        def guild_tag(self, guild_tag: str) -> None:
            """
            Note:
              - Length must be `3`.
            """
            self._guild_tag = guild_tag

        @property
        def admin(self) -> AdminLevel:
            return self._admin

        @admin.setter
        def admin(self, admin: AdminLevel) -> None:
            self._admin = admin

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

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

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

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

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

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

        @property
        def stats(self) -> CharacterStatsWelcome:
            return self._stats

        @stats.setter
        def stats(self, stats: CharacterStatsWelcome) -> None:
            self._stats = stats

        @property
        def equipment(self) -> EquipmentWelcome:
            return self._equipment

        @equipment.setter
        def equipment(self, equipment: EquipmentWelcome) -> None:
            self._equipment = equipment

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

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

        @property
        def settings(self) -> ServerSettings:
            return self._settings

        @settings.setter
        def settings(self, settings: ServerSettings) -> None:
            self._settings = settings

        @property
        def login_message_code(self) -> LoginMessageCode:
            return self._login_message_code

        @login_message_code.setter
        def login_message_code(self, login_message_code: LoginMessageCode) -> None:
            self._login_message_code = login_message_code

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter): 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)
            if data._map_id is None:
                raise SerializationError("map_id must be provided.")
            writer.add_short(data._map_id)
            if data._map_rid is None:
                raise SerializationError("map_rid must be provided.")
            if len(data._map_rid) != 2:
                raise SerializationError(f"Expected length of map_rid to be exactly 2, got {len(data._map_rid)}.")
            for i in range(2):
                writer.add_short(data._map_rid[i])
            if data._map_file_size is None:
                raise SerializationError("map_file_size must be provided.")
            writer.add_three(data._map_file_size)
            if data._eif_rid is None:
                raise SerializationError("eif_rid must be provided.")
            if len(data._eif_rid) != 2:
                raise SerializationError(f"Expected length of eif_rid to be exactly 2, got {len(data._eif_rid)}.")
            for i in range(2):
                writer.add_short(data._eif_rid[i])
            if data._eif_length is None:
                raise SerializationError("eif_length must be provided.")
            writer.add_short(data._eif_length)
            if data._enf_rid is None:
                raise SerializationError("enf_rid must be provided.")
            if len(data._enf_rid) != 2:
                raise SerializationError(f"Expected length of enf_rid to be exactly 2, got {len(data._enf_rid)}.")
            for i in range(2):
                writer.add_short(data._enf_rid[i])
            if data._enf_length is None:
                raise SerializationError("enf_length must be provided.")
            writer.add_short(data._enf_length)
            if data._esf_rid is None:
                raise SerializationError("esf_rid must be provided.")
            if len(data._esf_rid) != 2:
                raise SerializationError(f"Expected length of esf_rid to be exactly 2, got {len(data._esf_rid)}.")
            for i in range(2):
                writer.add_short(data._esf_rid[i])
            if data._esf_length is None:
                raise SerializationError("esf_length must be provided.")
            writer.add_short(data._esf_length)
            if data._ecf_rid is None:
                raise SerializationError("ecf_rid must be provided.")
            if len(data._ecf_rid) != 2:
                raise SerializationError(f"Expected length of ecf_rid to be exactly 2, got {len(data._ecf_rid)}.")
            for i in range(2):
                writer.add_short(data._ecf_rid[i])
            if data._ecf_length is None:
                raise SerializationError("ecf_length must be provided.")
            writer.add_short(data._ecf_length)
            if data._name is None:
                raise SerializationError("name must be provided.")
            writer.add_string(data._name)
            writer.add_byte(0xFF)
            if data._title is None:
                raise SerializationError("title must be provided.")
            writer.add_string(data._title)
            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._guild_rank_name is None:
                raise SerializationError("guild_rank_name must be provided.")
            writer.add_string(data._guild_rank_name)
            writer.add_byte(0xFF)
            if data._class_id is None:
                raise SerializationError("class_id must be provided.")
            writer.add_char(data._class_id)
            if data._guild_tag is None:
                raise SerializationError("guild_tag must be provided.")
            if len(data._guild_tag) != 3:
                raise SerializationError(f"Expected length of guild_tag to be exactly 3, got {len(data._guild_tag)}.")
            writer.add_fixed_string(data._guild_tag, 3, False)
            if data._admin is None:
                raise SerializationError("admin must be provided.")
            writer.add_char(int(data._admin))
            if data._level is None:
                raise SerializationError("level must be provided.")
            writer.add_char(data._level)
            if data._experience is None:
                raise SerializationError("experience must be provided.")
            writer.add_int(data._experience)
            if data._usage is None:
                raise SerializationError("usage must be provided.")
            writer.add_int(data._usage)
            if data._stats is None:
                raise SerializationError("stats must be provided.")
            CharacterStatsWelcome.serialize(writer, data._stats)
            if data._equipment is None:
                raise SerializationError("equipment must be provided.")
            EquipmentWelcome.serialize(writer, data._equipment)
            if data._guild_rank is None:
                raise SerializationError("guild_rank must be provided.")
            writer.add_char(data._guild_rank)
            if data._settings is None:
                raise SerializationError("settings must be provided.")
            ServerSettings.serialize(writer, data._settings)
            if data._login_message_code is None:
                raise SerializationError("login_message_code must be provided.")
            writer.add_char(int(data._login_message_code))
            writer.add_byte(0xFF)

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

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

            Returns:
                WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter: The data to serialize.
            """
            data: WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter = WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter()
            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._map_id = reader.get_short()
                data._map_rid = []
                for i in range(2):
                    data._map_rid.append(reader.get_short())
                data._map_file_size = reader.get_three()
                data._eif_rid = []
                for i in range(2):
                    data._eif_rid.append(reader.get_short())
                data._eif_length = reader.get_short()
                data._enf_rid = []
                for i in range(2):
                    data._enf_rid.append(reader.get_short())
                data._enf_length = reader.get_short()
                data._esf_rid = []
                for i in range(2):
                    data._esf_rid.append(reader.get_short())
                data._esf_length = reader.get_short()
                data._ecf_rid = []
                for i in range(2):
                    data._ecf_rid.append(reader.get_short())
                data._ecf_length = reader.get_short()
                data._name = reader.get_string()
                reader.next_chunk()
                data._title = reader.get_string()
                reader.next_chunk()
                data._guild_name = reader.get_string()
                reader.next_chunk()
                data._guild_rank_name = reader.get_string()
                reader.next_chunk()
                data._class_id = reader.get_char()
                data._guild_tag = reader.get_fixed_string(3, False)
                data._admin = AdminLevel(reader.get_char())
                data._level = reader.get_char()
                data._experience = reader.get_int()
                data._usage = reader.get_int()
                data._stats = CharacterStatsWelcome.deserialize(reader)
                data._equipment = EquipmentWelcome.deserialize(reader)
                data._guild_rank = reader.get_char()
                data._settings = ServerSettings.deserialize(reader)
                data._login_message_code = LoginMessageCode(reader.get_char())
                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"WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, character_id={repr(self._character_id)}, map_id={repr(self._map_id)}, map_rid={repr(self._map_rid)}, map_file_size={repr(self._map_file_size)}, eif_rid={repr(self._eif_rid)}, eif_length={repr(self._eif_length)}, enf_rid={repr(self._enf_rid)}, enf_length={repr(self._enf_length)}, esf_rid={repr(self._esf_rid)}, esf_length={repr(self._esf_length)}, ecf_rid={repr(self._ecf_rid)}, ecf_length={repr(self._ecf_length)}, name={repr(self._name)}, title={repr(self._title)}, guild_name={repr(self._guild_name)}, guild_rank_name={repr(self._guild_rank_name)}, class_id={repr(self._class_id)}, guild_tag={repr(self._guild_tag)}, admin={repr(self._admin)}, level={repr(self._level)}, experience={repr(self._experience)}, usage={repr(self._usage)}, stats={repr(self._stats)}, equipment={repr(self._equipment)}, guild_rank={repr(self._guild_rank)}, settings={repr(self._settings)}, login_message_code={repr(self._login_message_code)})"

    class WelcomeCodeDataEnterGame:
        """
        Data associated with welcome_code value WelcomeCode.EnterGame
        """
        _byte_size: int = 0
        _news: list[str] = None # type: ignore [assignment]
        _weight: Weight = None # type: ignore [assignment]
        _items: list[Item] = None # type: ignore [assignment]
        _spells: list[Spell] = None # type: ignore [assignment]
        _nearby: NearbyInfo = 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 news(self) -> list[str]:
            """
            Note:
              - Length must be `9`.
            """
            return self._news

        @news.setter
        def news(self, news: list[str]) -> None:
            """
            Note:
              - Length must be `9`.
            """
            self._news = news

        @property
        def weight(self) -> Weight:
            return self._weight

        @weight.setter
        def weight(self, weight: Weight) -> None:
            self._weight = weight

        @property
        def items(self) -> list[Item]:
            return self._items

        @items.setter
        def items(self, items: list[Item]) -> None:
            self._items = items

        @property
        def spells(self) -> list[Spell]:
            return self._spells

        @spells.setter
        def spells(self, spells: list[Spell]) -> None:
            self._spells = spells

        @property
        def nearby(self) -> NearbyInfo:
            return self._nearby

        @nearby.setter
        def nearby(self, nearby: NearbyInfo) -> None:
            self._nearby = nearby

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WelcomeReplyServerPacket.WelcomeCodeDataEnterGame): The data to serialize.
            """
            writer.add_byte(0xFF)
            if data._news is None:
                raise SerializationError("news must be provided.")
            if len(data._news) != 9:
                raise SerializationError(f"Expected length of news to be exactly 9, got {len(data._news)}.")
            for i in range(9):
                if i > 0:
                    writer.add_byte(0xFF)
                writer.add_string(data._news[i])
            if data._weight is None:
                raise SerializationError("weight must be provided.")
            Weight.serialize(writer, data._weight)
            if data._items is None:
                raise SerializationError("items must be provided.")
            for i in range(len(data._items)):
                Item.serialize(writer, data._items[i])
            writer.add_byte(0xFF)
            if data._spells is None:
                raise SerializationError("spells must be provided.")
            for i in range(len(data._spells)):
                Spell.serialize(writer, data._spells[i])
            writer.add_byte(0xFF)
            if data._nearby is None:
                raise SerializationError("nearby must be provided.")
            NearbyInfo.serialize(writer, data._nearby)

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

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

            Returns:
                WelcomeReplyServerPacket.WelcomeCodeDataEnterGame: The data to serialize.
            """
            data: WelcomeReplyServerPacket.WelcomeCodeDataEnterGame = WelcomeReplyServerPacket.WelcomeCodeDataEnterGame()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                reader.next_chunk()
                data._news = []
                for i in range(9):
                    data._news.append(reader.get_string())
                    if i + 1 < 9:
                        reader.next_chunk()
                data._weight = Weight.deserialize(reader)
                items_length = int(reader.remaining / 6)
                data._items = []
                for i in range(items_length):
                    data._items.append(Item.deserialize(reader))
                reader.next_chunk()
                spells_length = int(reader.remaining / 4)
                data._spells = []
                for i in range(spells_length):
                    data._spells.append(Spell.deserialize(reader))
                reader.next_chunk()
                data._nearby = NearbyInfo.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"WelcomeReplyServerPacket.WelcomeCodeDataEnterGame(byte_size={repr(self._byte_size)}, news={repr(self._news)}, weight={repr(self._weight)}, items={repr(self._items)}, spells={repr(self._spells)}, nearby={repr(self._nearby)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

welcome_code: WelcomeCode property writable

welcome_code_data: 'WelcomeReplyServerPacket.WelcomeCodeData' property writable

WelcomeReplyServerPacket.WelcomeCodeData: Gets or sets the data associated with the welcome_code field.

WelcomeCodeData = Union['WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter', 'WelcomeReplyServerPacket.WelcomeCodeDataEnterGame', None] class-attribute instance-attribute

WelcomeCodeDataSelectCharacter

Data associated with welcome_code value WelcomeCode.SelectCharacter

Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_packet.py
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
class WelcomeCodeDataSelectCharacter:
    """
    Data associated with welcome_code value WelcomeCode.SelectCharacter
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _character_id: int = None # type: ignore [assignment]
    _map_id: int = None # type: ignore [assignment]
    _map_rid: list[int] = None # type: ignore [assignment]
    _map_file_size: int = None # type: ignore [assignment]
    _eif_rid: list[int] = None # type: ignore [assignment]
    _eif_length: int = None # type: ignore [assignment]
    _enf_rid: list[int] = None # type: ignore [assignment]
    _enf_length: int = None # type: ignore [assignment]
    _esf_rid: list[int] = None # type: ignore [assignment]
    _esf_length: int = None # type: ignore [assignment]
    _ecf_rid: list[int] = None # type: ignore [assignment]
    _ecf_length: int = None # type: ignore [assignment]
    _name: str = None # type: ignore [assignment]
    _title: str = None # type: ignore [assignment]
    _guild_name: str = None # type: ignore [assignment]
    _guild_rank_name: str = None # type: ignore [assignment]
    _class_id: int = None # type: ignore [assignment]
    _guild_tag: str = None # type: ignore [assignment]
    _admin: AdminLevel = None # type: ignore [assignment]
    _level: int = None # type: ignore [assignment]
    _experience: int = None # type: ignore [assignment]
    _usage: int = None # type: ignore [assignment]
    _stats: CharacterStatsWelcome = None # type: ignore [assignment]
    _equipment: EquipmentWelcome = None # type: ignore [assignment]
    _guild_rank: int = None # type: ignore [assignment]
    _settings: ServerSettings = None # type: ignore [assignment]
    _login_message_code: LoginMessageCode = 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

    @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 map_rid(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._map_rid

    @map_rid.setter
    def map_rid(self, map_rid: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._map_rid = map_rid

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

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

    @property
    def eif_rid(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._eif_rid

    @eif_rid.setter
    def eif_rid(self, eif_rid: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._eif_rid = eif_rid

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

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

    @property
    def enf_rid(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._enf_rid

    @enf_rid.setter
    def enf_rid(self, enf_rid: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._enf_rid = enf_rid

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

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

    @property
    def esf_rid(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._esf_rid

    @esf_rid.setter
    def esf_rid(self, esf_rid: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._esf_rid = esf_rid

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

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

    @property
    def ecf_rid(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._ecf_rid

    @ecf_rid.setter
    def ecf_rid(self, ecf_rid: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._ecf_rid = ecf_rid

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

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

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

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

    @property
    def title(self) -> str:
        return self._title

    @title.setter
    def title(self, title: str) -> None:
        self._title = title

    @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 guild_rank_name(self) -> str:
        return self._guild_rank_name

    @guild_rank_name.setter
    def guild_rank_name(self, guild_rank_name: str) -> None:
        self._guild_rank_name = guild_rank_name

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

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

    @property
    def guild_tag(self) -> str:
        """
        Note:
          - Length must be `3`.
        """
        return self._guild_tag

    @guild_tag.setter
    def guild_tag(self, guild_tag: str) -> None:
        """
        Note:
          - Length must be `3`.
        """
        self._guild_tag = guild_tag

    @property
    def admin(self) -> AdminLevel:
        return self._admin

    @admin.setter
    def admin(self, admin: AdminLevel) -> None:
        self._admin = admin

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

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

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

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

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

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

    @property
    def stats(self) -> CharacterStatsWelcome:
        return self._stats

    @stats.setter
    def stats(self, stats: CharacterStatsWelcome) -> None:
        self._stats = stats

    @property
    def equipment(self) -> EquipmentWelcome:
        return self._equipment

    @equipment.setter
    def equipment(self, equipment: EquipmentWelcome) -> None:
        self._equipment = equipment

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

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

    @property
    def settings(self) -> ServerSettings:
        return self._settings

    @settings.setter
    def settings(self, settings: ServerSettings) -> None:
        self._settings = settings

    @property
    def login_message_code(self) -> LoginMessageCode:
        return self._login_message_code

    @login_message_code.setter
    def login_message_code(self, login_message_code: LoginMessageCode) -> None:
        self._login_message_code = login_message_code

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter): 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)
        if data._map_id is None:
            raise SerializationError("map_id must be provided.")
        writer.add_short(data._map_id)
        if data._map_rid is None:
            raise SerializationError("map_rid must be provided.")
        if len(data._map_rid) != 2:
            raise SerializationError(f"Expected length of map_rid to be exactly 2, got {len(data._map_rid)}.")
        for i in range(2):
            writer.add_short(data._map_rid[i])
        if data._map_file_size is None:
            raise SerializationError("map_file_size must be provided.")
        writer.add_three(data._map_file_size)
        if data._eif_rid is None:
            raise SerializationError("eif_rid must be provided.")
        if len(data._eif_rid) != 2:
            raise SerializationError(f"Expected length of eif_rid to be exactly 2, got {len(data._eif_rid)}.")
        for i in range(2):
            writer.add_short(data._eif_rid[i])
        if data._eif_length is None:
            raise SerializationError("eif_length must be provided.")
        writer.add_short(data._eif_length)
        if data._enf_rid is None:
            raise SerializationError("enf_rid must be provided.")
        if len(data._enf_rid) != 2:
            raise SerializationError(f"Expected length of enf_rid to be exactly 2, got {len(data._enf_rid)}.")
        for i in range(2):
            writer.add_short(data._enf_rid[i])
        if data._enf_length is None:
            raise SerializationError("enf_length must be provided.")
        writer.add_short(data._enf_length)
        if data._esf_rid is None:
            raise SerializationError("esf_rid must be provided.")
        if len(data._esf_rid) != 2:
            raise SerializationError(f"Expected length of esf_rid to be exactly 2, got {len(data._esf_rid)}.")
        for i in range(2):
            writer.add_short(data._esf_rid[i])
        if data._esf_length is None:
            raise SerializationError("esf_length must be provided.")
        writer.add_short(data._esf_length)
        if data._ecf_rid is None:
            raise SerializationError("ecf_rid must be provided.")
        if len(data._ecf_rid) != 2:
            raise SerializationError(f"Expected length of ecf_rid to be exactly 2, got {len(data._ecf_rid)}.")
        for i in range(2):
            writer.add_short(data._ecf_rid[i])
        if data._ecf_length is None:
            raise SerializationError("ecf_length must be provided.")
        writer.add_short(data._ecf_length)
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)
        writer.add_byte(0xFF)
        if data._title is None:
            raise SerializationError("title must be provided.")
        writer.add_string(data._title)
        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._guild_rank_name is None:
            raise SerializationError("guild_rank_name must be provided.")
        writer.add_string(data._guild_rank_name)
        writer.add_byte(0xFF)
        if data._class_id is None:
            raise SerializationError("class_id must be provided.")
        writer.add_char(data._class_id)
        if data._guild_tag is None:
            raise SerializationError("guild_tag must be provided.")
        if len(data._guild_tag) != 3:
            raise SerializationError(f"Expected length of guild_tag to be exactly 3, got {len(data._guild_tag)}.")
        writer.add_fixed_string(data._guild_tag, 3, False)
        if data._admin is None:
            raise SerializationError("admin must be provided.")
        writer.add_char(int(data._admin))
        if data._level is None:
            raise SerializationError("level must be provided.")
        writer.add_char(data._level)
        if data._experience is None:
            raise SerializationError("experience must be provided.")
        writer.add_int(data._experience)
        if data._usage is None:
            raise SerializationError("usage must be provided.")
        writer.add_int(data._usage)
        if data._stats is None:
            raise SerializationError("stats must be provided.")
        CharacterStatsWelcome.serialize(writer, data._stats)
        if data._equipment is None:
            raise SerializationError("equipment must be provided.")
        EquipmentWelcome.serialize(writer, data._equipment)
        if data._guild_rank is None:
            raise SerializationError("guild_rank must be provided.")
        writer.add_char(data._guild_rank)
        if data._settings is None:
            raise SerializationError("settings must be provided.")
        ServerSettings.serialize(writer, data._settings)
        if data._login_message_code is None:
            raise SerializationError("login_message_code must be provided.")
        writer.add_char(int(data._login_message_code))
        writer.add_byte(0xFF)

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

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

        Returns:
            WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter: The data to serialize.
        """
        data: WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter = WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter()
        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._map_id = reader.get_short()
            data._map_rid = []
            for i in range(2):
                data._map_rid.append(reader.get_short())
            data._map_file_size = reader.get_three()
            data._eif_rid = []
            for i in range(2):
                data._eif_rid.append(reader.get_short())
            data._eif_length = reader.get_short()
            data._enf_rid = []
            for i in range(2):
                data._enf_rid.append(reader.get_short())
            data._enf_length = reader.get_short()
            data._esf_rid = []
            for i in range(2):
                data._esf_rid.append(reader.get_short())
            data._esf_length = reader.get_short()
            data._ecf_rid = []
            for i in range(2):
                data._ecf_rid.append(reader.get_short())
            data._ecf_length = reader.get_short()
            data._name = reader.get_string()
            reader.next_chunk()
            data._title = reader.get_string()
            reader.next_chunk()
            data._guild_name = reader.get_string()
            reader.next_chunk()
            data._guild_rank_name = reader.get_string()
            reader.next_chunk()
            data._class_id = reader.get_char()
            data._guild_tag = reader.get_fixed_string(3, False)
            data._admin = AdminLevel(reader.get_char())
            data._level = reader.get_char()
            data._experience = reader.get_int()
            data._usage = reader.get_int()
            data._stats = CharacterStatsWelcome.deserialize(reader)
            data._equipment = EquipmentWelcome.deserialize(reader)
            data._guild_rank = reader.get_char()
            data._settings = ServerSettings.deserialize(reader)
            data._login_message_code = LoginMessageCode(reader.get_char())
            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"WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, character_id={repr(self._character_id)}, map_id={repr(self._map_id)}, map_rid={repr(self._map_rid)}, map_file_size={repr(self._map_file_size)}, eif_rid={repr(self._eif_rid)}, eif_length={repr(self._eif_length)}, enf_rid={repr(self._enf_rid)}, enf_length={repr(self._enf_length)}, esf_rid={repr(self._esf_rid)}, esf_length={repr(self._esf_length)}, ecf_rid={repr(self._ecf_rid)}, ecf_length={repr(self._ecf_length)}, name={repr(self._name)}, title={repr(self._title)}, guild_name={repr(self._guild_name)}, guild_rank_name={repr(self._guild_rank_name)}, class_id={repr(self._class_id)}, guild_tag={repr(self._guild_tag)}, admin={repr(self._admin)}, level={repr(self._level)}, experience={repr(self._experience)}, usage={repr(self._usage)}, stats={repr(self._stats)}, equipment={repr(self._equipment)}, guild_rank={repr(self._guild_rank)}, settings={repr(self._settings)}, login_message_code={repr(self._login_message_code)})"

byte_size: int property

Returns the size 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.

map_id: int property writable

Note
  • Value range is 0-64008.

map_rid: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

map_file_size: int property writable

Note
  • Value range is 0-16194276.

eif_rid: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

eif_length: int property writable

Note
  • Value range is 0-64008.

enf_rid: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

enf_length: int property writable

Note
  • Value range is 0-64008.

esf_rid: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

esf_length: int property writable

Note
  • Value range is 0-64008.

ecf_rid: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

ecf_length: int property writable

Note
  • Value range is 0-64008.

name: str property writable

title: str property writable

guild_name: str property writable

guild_rank_name: str property writable

class_id: int property writable

Note
  • Value range is 0-252.

guild_tag: str property writable

Note
  • Length must be 3.

admin: AdminLevel property writable

level: int property writable

Note
  • Value range is 0-252.

experience: int property writable

Note
  • Value range is 0-4097152080.

usage: int property writable

Note
  • Value range is 0-4097152080.

stats: CharacterStatsWelcome property writable

equipment: EquipmentWelcome property writable

guild_rank: int property writable

Note
  • Value range is 0-252.

settings: ServerSettings property writable

login_message_code: LoginMessageCode property writable

serialize(writer, data) staticmethod

Serializes an instance of WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeCodeDataSelectCharacter

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_packet.py
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter") -> None:
    """
    Serializes an instance of `WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter): 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)
    if data._map_id is None:
        raise SerializationError("map_id must be provided.")
    writer.add_short(data._map_id)
    if data._map_rid is None:
        raise SerializationError("map_rid must be provided.")
    if len(data._map_rid) != 2:
        raise SerializationError(f"Expected length of map_rid to be exactly 2, got {len(data._map_rid)}.")
    for i in range(2):
        writer.add_short(data._map_rid[i])
    if data._map_file_size is None:
        raise SerializationError("map_file_size must be provided.")
    writer.add_three(data._map_file_size)
    if data._eif_rid is None:
        raise SerializationError("eif_rid must be provided.")
    if len(data._eif_rid) != 2:
        raise SerializationError(f"Expected length of eif_rid to be exactly 2, got {len(data._eif_rid)}.")
    for i in range(2):
        writer.add_short(data._eif_rid[i])
    if data._eif_length is None:
        raise SerializationError("eif_length must be provided.")
    writer.add_short(data._eif_length)
    if data._enf_rid is None:
        raise SerializationError("enf_rid must be provided.")
    if len(data._enf_rid) != 2:
        raise SerializationError(f"Expected length of enf_rid to be exactly 2, got {len(data._enf_rid)}.")
    for i in range(2):
        writer.add_short(data._enf_rid[i])
    if data._enf_length is None:
        raise SerializationError("enf_length must be provided.")
    writer.add_short(data._enf_length)
    if data._esf_rid is None:
        raise SerializationError("esf_rid must be provided.")
    if len(data._esf_rid) != 2:
        raise SerializationError(f"Expected length of esf_rid to be exactly 2, got {len(data._esf_rid)}.")
    for i in range(2):
        writer.add_short(data._esf_rid[i])
    if data._esf_length is None:
        raise SerializationError("esf_length must be provided.")
    writer.add_short(data._esf_length)
    if data._ecf_rid is None:
        raise SerializationError("ecf_rid must be provided.")
    if len(data._ecf_rid) != 2:
        raise SerializationError(f"Expected length of ecf_rid to be exactly 2, got {len(data._ecf_rid)}.")
    for i in range(2):
        writer.add_short(data._ecf_rid[i])
    if data._ecf_length is None:
        raise SerializationError("ecf_length must be provided.")
    writer.add_short(data._ecf_length)
    if data._name is None:
        raise SerializationError("name must be provided.")
    writer.add_string(data._name)
    writer.add_byte(0xFF)
    if data._title is None:
        raise SerializationError("title must be provided.")
    writer.add_string(data._title)
    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._guild_rank_name is None:
        raise SerializationError("guild_rank_name must be provided.")
    writer.add_string(data._guild_rank_name)
    writer.add_byte(0xFF)
    if data._class_id is None:
        raise SerializationError("class_id must be provided.")
    writer.add_char(data._class_id)
    if data._guild_tag is None:
        raise SerializationError("guild_tag must be provided.")
    if len(data._guild_tag) != 3:
        raise SerializationError(f"Expected length of guild_tag to be exactly 3, got {len(data._guild_tag)}.")
    writer.add_fixed_string(data._guild_tag, 3, False)
    if data._admin is None:
        raise SerializationError("admin must be provided.")
    writer.add_char(int(data._admin))
    if data._level is None:
        raise SerializationError("level must be provided.")
    writer.add_char(data._level)
    if data._experience is None:
        raise SerializationError("experience must be provided.")
    writer.add_int(data._experience)
    if data._usage is None:
        raise SerializationError("usage must be provided.")
    writer.add_int(data._usage)
    if data._stats is None:
        raise SerializationError("stats must be provided.")
    CharacterStatsWelcome.serialize(writer, data._stats)
    if data._equipment is None:
        raise SerializationError("equipment must be provided.")
    EquipmentWelcome.serialize(writer, data._equipment)
    if data._guild_rank is None:
        raise SerializationError("guild_rank must be provided.")
    writer.add_char(data._guild_rank)
    if data._settings is None:
        raise SerializationError("settings must be provided.")
    ServerSettings.serialize(writer, data._settings)
    if data._login_message_code is None:
        raise SerializationError("login_message_code must be provided.")
    writer.add_char(int(data._login_message_code))
    writer.add_byte(0xFF)

deserialize(reader) staticmethod

Deserializes an instance of WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter'

WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_packet.py
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter":
    """
    Deserializes an instance of `WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter` from the provided `EoReader`.

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

    Returns:
        WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter: The data to serialize.
    """
    data: WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter = WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter()
    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._map_id = reader.get_short()
        data._map_rid = []
        for i in range(2):
            data._map_rid.append(reader.get_short())
        data._map_file_size = reader.get_three()
        data._eif_rid = []
        for i in range(2):
            data._eif_rid.append(reader.get_short())
        data._eif_length = reader.get_short()
        data._enf_rid = []
        for i in range(2):
            data._enf_rid.append(reader.get_short())
        data._enf_length = reader.get_short()
        data._esf_rid = []
        for i in range(2):
            data._esf_rid.append(reader.get_short())
        data._esf_length = reader.get_short()
        data._ecf_rid = []
        for i in range(2):
            data._ecf_rid.append(reader.get_short())
        data._ecf_length = reader.get_short()
        data._name = reader.get_string()
        reader.next_chunk()
        data._title = reader.get_string()
        reader.next_chunk()
        data._guild_name = reader.get_string()
        reader.next_chunk()
        data._guild_rank_name = reader.get_string()
        reader.next_chunk()
        data._class_id = reader.get_char()
        data._guild_tag = reader.get_fixed_string(3, False)
        data._admin = AdminLevel(reader.get_char())
        data._level = reader.get_char()
        data._experience = reader.get_int()
        data._usage = reader.get_int()
        data._stats = CharacterStatsWelcome.deserialize(reader)
        data._equipment = EquipmentWelcome.deserialize(reader)
        data._guild_rank = reader.get_char()
        data._settings = ServerSettings.deserialize(reader)
        data._login_message_code = LoginMessageCode(reader.get_char())
        reader.next_chunk()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WelcomeCodeDataEnterGame

Data associated with welcome_code value WelcomeCode.EnterGame

Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_packet.py
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
class WelcomeCodeDataEnterGame:
    """
    Data associated with welcome_code value WelcomeCode.EnterGame
    """
    _byte_size: int = 0
    _news: list[str] = None # type: ignore [assignment]
    _weight: Weight = None # type: ignore [assignment]
    _items: list[Item] = None # type: ignore [assignment]
    _spells: list[Spell] = None # type: ignore [assignment]
    _nearby: NearbyInfo = 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 news(self) -> list[str]:
        """
        Note:
          - Length must be `9`.
        """
        return self._news

    @news.setter
    def news(self, news: list[str]) -> None:
        """
        Note:
          - Length must be `9`.
        """
        self._news = news

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @property
    def items(self) -> list[Item]:
        return self._items

    @items.setter
    def items(self, items: list[Item]) -> None:
        self._items = items

    @property
    def spells(self) -> list[Spell]:
        return self._spells

    @spells.setter
    def spells(self, spells: list[Spell]) -> None:
        self._spells = spells

    @property
    def nearby(self) -> NearbyInfo:
        return self._nearby

    @nearby.setter
    def nearby(self, nearby: NearbyInfo) -> None:
        self._nearby = nearby

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeReplyServerPacket.WelcomeCodeDataEnterGame): The data to serialize.
        """
        writer.add_byte(0xFF)
        if data._news is None:
            raise SerializationError("news must be provided.")
        if len(data._news) != 9:
            raise SerializationError(f"Expected length of news to be exactly 9, got {len(data._news)}.")
        for i in range(9):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._news[i])
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)
        if data._items is None:
            raise SerializationError("items must be provided.")
        for i in range(len(data._items)):
            Item.serialize(writer, data._items[i])
        writer.add_byte(0xFF)
        if data._spells is None:
            raise SerializationError("spells must be provided.")
        for i in range(len(data._spells)):
            Spell.serialize(writer, data._spells[i])
        writer.add_byte(0xFF)
        if data._nearby is None:
            raise SerializationError("nearby must be provided.")
        NearbyInfo.serialize(writer, data._nearby)

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

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

        Returns:
            WelcomeReplyServerPacket.WelcomeCodeDataEnterGame: The data to serialize.
        """
        data: WelcomeReplyServerPacket.WelcomeCodeDataEnterGame = WelcomeReplyServerPacket.WelcomeCodeDataEnterGame()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.next_chunk()
            data._news = []
            for i in range(9):
                data._news.append(reader.get_string())
                if i + 1 < 9:
                    reader.next_chunk()
            data._weight = Weight.deserialize(reader)
            items_length = int(reader.remaining / 6)
            data._items = []
            for i in range(items_length):
                data._items.append(Item.deserialize(reader))
            reader.next_chunk()
            spells_length = int(reader.remaining / 4)
            data._spells = []
            for i in range(spells_length):
                data._spells.append(Spell.deserialize(reader))
            reader.next_chunk()
            data._nearby = NearbyInfo.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"WelcomeReplyServerPacket.WelcomeCodeDataEnterGame(byte_size={repr(self._byte_size)}, news={repr(self._news)}, weight={repr(self._weight)}, items={repr(self._items)}, spells={repr(self._spells)}, nearby={repr(self._nearby)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

news: list[str] property writable

Note
  • Length must be 9.

weight: Weight property writable

items: list[Item] property writable

spells: list[Spell] property writable

nearby: NearbyInfo property writable

serialize(writer, data) staticmethod

Serializes an instance of WelcomeReplyServerPacket.WelcomeCodeDataEnterGame to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeCodeDataEnterGame

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_packet.py
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeReplyServerPacket.WelcomeCodeDataEnterGame") -> None:
    """
    Serializes an instance of `WelcomeReplyServerPacket.WelcomeCodeDataEnterGame` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeReplyServerPacket.WelcomeCodeDataEnterGame): The data to serialize.
    """
    writer.add_byte(0xFF)
    if data._news is None:
        raise SerializationError("news must be provided.")
    if len(data._news) != 9:
        raise SerializationError(f"Expected length of news to be exactly 9, got {len(data._news)}.")
    for i in range(9):
        if i > 0:
            writer.add_byte(0xFF)
        writer.add_string(data._news[i])
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)
    if data._items is None:
        raise SerializationError("items must be provided.")
    for i in range(len(data._items)):
        Item.serialize(writer, data._items[i])
    writer.add_byte(0xFF)
    if data._spells is None:
        raise SerializationError("spells must be provided.")
    for i in range(len(data._spells)):
        Spell.serialize(writer, data._spells[i])
    writer.add_byte(0xFF)
    if data._nearby is None:
        raise SerializationError("nearby must be provided.")
    NearbyInfo.serialize(writer, data._nearby)

deserialize(reader) staticmethod

Deserializes an instance of WelcomeReplyServerPacket.WelcomeCodeDataEnterGame from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'WelcomeReplyServerPacket.WelcomeCodeDataEnterGame'

WelcomeReplyServerPacket.WelcomeCodeDataEnterGame: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_packet.py
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeReplyServerPacket.WelcomeCodeDataEnterGame":
    """
    Deserializes an instance of `WelcomeReplyServerPacket.WelcomeCodeDataEnterGame` from the provided `EoReader`.

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

    Returns:
        WelcomeReplyServerPacket.WelcomeCodeDataEnterGame: The data to serialize.
    """
    data: WelcomeReplyServerPacket.WelcomeCodeDataEnterGame = WelcomeReplyServerPacket.WelcomeCodeDataEnterGame()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.next_chunk()
        data._news = []
        for i in range(9):
            data._news.append(reader.get_string())
            if i + 1 < 9:
                reader.next_chunk()
        data._weight = Weight.deserialize(reader)
        items_length = int(reader.remaining / 6)
        data._items = []
        for i in range(items_length):
            data._items.append(Item.deserialize(reader))
        reader.next_chunk()
        spells_length = int(reader.remaining / 4)
        data._spells = []
        for i in range(spells_length):
            data._spells.append(Spell.deserialize(reader))
        reader.next_chunk()
        data._nearby = NearbyInfo.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/server/welcome_reply_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

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

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

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

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/welcome_reply_server_packet.py
82
83
84
85
86
87
88
89
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of WelcomeReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_packet.py
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeReplyServerPacket") -> None:
    """
    Serializes an instance of `WelcomeReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeReplyServerPacket): The data to serialize.
    """
    if data._welcome_code is None:
        raise SerializationError("welcome_code must be provided.")
    writer.add_short(int(data._welcome_code))
    if data._welcome_code == WelcomeCode.SelectCharacter:
        if not isinstance(data._welcome_code_data, WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter):
            raise SerializationError("Expected welcome_code_data to be type WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter for welcome_code " + WelcomeCode(data._welcome_code).name + ".")
        WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter.serialize(writer, data._welcome_code_data)
    elif data._welcome_code == WelcomeCode.EnterGame:
        if not isinstance(data._welcome_code_data, WelcomeReplyServerPacket.WelcomeCodeDataEnterGame):
            raise SerializationError("Expected welcome_code_data to be type WelcomeReplyServerPacket.WelcomeCodeDataEnterGame for welcome_code " + WelcomeCode(data._welcome_code).name + ".")
        WelcomeReplyServerPacket.WelcomeCodeDataEnterGame.serialize(writer, data._welcome_code_data)

deserialize(reader) staticmethod

Deserializes an instance of WelcomeReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomeReplyServerPacket 'WelcomeReplyServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/welcome_reply_server_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
@staticmethod
def deserialize(reader: EoReader) -> "WelcomeReplyServerPacket":
    """
    Deserializes an instance of `WelcomeReplyServerPacket` from the provided `EoReader`.

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

    Returns:
        WelcomeReplyServerPacket: The data to serialize.
    """
    data: WelcomeReplyServerPacket = WelcomeReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._welcome_code = WelcomeCode(reader.get_short())
        reader.chunked_reading_mode = True
        if data._welcome_code == WelcomeCode.SelectCharacter:
            data._welcome_code_data = WelcomeReplyServerPacket.WelcomeCodeDataSelectCharacter.deserialize(reader)
        elif data._welcome_code == WelcomeCode.EnterGame:
            data._welcome_code_data = WelcomeReplyServerPacket.WelcomeCodeDataEnterGame.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

PubFile

A pub file (EIF, ENF, ECF, ESF)

Source code in src/eolib/protocol/_generated/net/server/pub_file.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
class PubFile:
    """
    A pub file (EIF, ENF, ECF, ESF)
    """
    _byte_size: int = 0
    _file_id: int = None # type: ignore [assignment]
    _content: bytes = 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

    @property
    def content(self) -> bytes:
        return self._content

    @content.setter
    def content(self, content: bytes) -> None:
        self._content = content

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PubFile): The data to serialize.
        """
        if data._file_id is None:
            raise SerializationError("file_id must be provided.")
        writer.add_char(data._file_id)
        if data._content is None:
            raise SerializationError("content must be provided.")
        writer.add_bytes(data._content)

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

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

        Returns:
            PubFile: The data to serialize.
        """
        data: PubFile = PubFile()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._file_id = reader.get_char()
            data._content = reader.get_bytes(reader.remaining)
            data._byte_size = reader.position - reader_start_position
            return data
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"PubFile(byte_size={repr(self._byte_size)}, file_id={repr(self._file_id)}, content={repr(self._content)})"

byte_size: int property

Returns the size 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.

content: bytes property writable

serialize(writer, data) staticmethod

Serializes an instance of PubFile to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PubFile

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PubFile): The data to serialize.
    """
    if data._file_id is None:
        raise SerializationError("file_id must be provided.")
    writer.add_char(data._file_id)
    if data._content is None:
        raise SerializationError("content must be provided.")
    writer.add_bytes(data._content)

deserialize(reader) staticmethod

Deserializes an instance of PubFile from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PubFile PubFile

The data to serialize.

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

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

    Returns:
        PubFile: The data to serialize.
    """
    data: PubFile = PubFile()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._file_id = reader.get_char()
        data._content = reader.get_bytes(reader.remaining)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WelcomePongServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.FileEif

Source code in src/eolib/protocol/_generated/net/server/welcome_pong_server_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 WelcomePongServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.FileEif
    """
    _byte_size: int = 0
    _pub_file: PubFile = 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 pub_file(self) -> PubFile:
        return self._pub_file

    @pub_file.setter
    def pub_file(self, pub_file: PubFile) -> None:
        self._pub_file = pub_file

    @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.Pong

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomePongServerPacket): The data to serialize.
        """
        if data._pub_file is None:
            raise SerializationError("pub_file must be provided.")
        PubFile.serialize(writer, data._pub_file)

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

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

        Returns:
            WelcomePongServerPacket: The data to serialize.
        """
        data: WelcomePongServerPacket = WelcomePongServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._pub_file = PubFile.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"WelcomePongServerPacket(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

pub_file: PubFile 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/server/welcome_pong_server_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.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/server/welcome_pong_server_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.Pong

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/server/welcome_pong_server_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.
    """
    WelcomePongServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WelcomePongServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomePongServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/welcome_pong_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "WelcomePongServerPacket") -> None:
    """
    Serializes an instance of `WelcomePongServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomePongServerPacket): The data to serialize.
    """
    if data._pub_file is None:
        raise SerializationError("pub_file must be provided.")
    PubFile.serialize(writer, data._pub_file)

deserialize(reader) staticmethod

Deserializes an instance of WelcomePongServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomePongServerPacket WelcomePongServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/welcome_pong_server_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) -> "WelcomePongServerPacket":
    """
    Deserializes an instance of `WelcomePongServerPacket` from the provided `EoReader`.

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

    Returns:
        WelcomePongServerPacket: The data to serialize.
    """
    data: WelcomePongServerPacket = WelcomePongServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._pub_file = PubFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MapFile

A map file (EMF)

Source code in src/eolib/protocol/_generated/net/server/map_file.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
class MapFile:
    """
    A map file (EMF)
    """
    _byte_size: int = 0
    _content: bytes = 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 content(self) -> bytes:
        return self._content

    @content.setter
    def content(self, content: bytes) -> None:
        self._content = content

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MapFile): The data to serialize.
        """
        if data._content is None:
            raise SerializationError("content must be provided.")
        writer.add_bytes(data._content)

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

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

        Returns:
            MapFile: The data to serialize.
        """
        data: MapFile = MapFile()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._content = reader.get_bytes(reader.remaining)
            data._byte_size = reader.position - reader_start_position
            return data
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"MapFile(byte_size={repr(self._byte_size)}, content={repr(self._content)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

content: bytes property writable

serialize(writer, data) staticmethod

Serializes an instance of MapFile to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MapFile

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/map_file.py
35
36
37
38
39
40
41
42
43
44
45
46
@staticmethod
def serialize(writer: EoWriter, data: "MapFile") -> None:
    """
    Serializes an instance of `MapFile` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MapFile): The data to serialize.
    """
    if data._content is None:
        raise SerializationError("content must be provided.")
    writer.add_bytes(data._content)

deserialize(reader) staticmethod

Deserializes an instance of MapFile from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MapFile MapFile

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/map_file.py
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@staticmethod
def deserialize(reader: EoReader) -> "MapFile":
    """
    Deserializes an instance of `MapFile` from the provided `EoReader`.

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

    Returns:
        MapFile: The data to serialize.
    """
    data: MapFile = MapFile()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._content = reader.get_bytes(reader.remaining)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WelcomePingServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.FileMap

Source code in src/eolib/protocol/_generated/net/server/welcome_ping_server_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 WelcomePingServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.FileMap
    """
    _byte_size: int = 0
    _map_file: MapFile = 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_file(self) -> MapFile:
        return self._map_file

    @map_file.setter
    def map_file(self, map_file: MapFile) -> None:
        self._map_file = map_file

    @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.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.
        """
        WelcomePingServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomePingServerPacket): The data to serialize.
        """
        if data._map_file is None:
            raise SerializationError("map_file must be provided.")
        MapFile.serialize(writer, data._map_file)

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

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

        Returns:
            WelcomePingServerPacket: The data to serialize.
        """
        data: WelcomePingServerPacket = WelcomePingServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_file = MapFile.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"WelcomePingServerPacket(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

byte_size: int property

Returns the size 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_file: MapFile 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/server/welcome_ping_server_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.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/server/welcome_ping_server_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.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/server/welcome_ping_server_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.
    """
    WelcomePingServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WelcomePingServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomePingServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/welcome_ping_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "WelcomePingServerPacket") -> None:
    """
    Serializes an instance of `WelcomePingServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomePingServerPacket): The data to serialize.
    """
    if data._map_file is None:
        raise SerializationError("map_file must be provided.")
    MapFile.serialize(writer, data._map_file)

deserialize(reader) staticmethod

Deserializes an instance of WelcomePingServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomePingServerPacket WelcomePingServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/welcome_ping_server_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) -> "WelcomePingServerPacket":
    """
    Deserializes an instance of `WelcomePingServerPacket` from the provided `EoReader`.

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

    Returns:
        WelcomePingServerPacket: The data to serialize.
    """
    data: WelcomePingServerPacket = WelcomePingServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_file = MapFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WelcomeNet244ServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.FileEcf

Source code in src/eolib/protocol/_generated/net/server/welcome_net244_server_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 WelcomeNet244ServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.FileEcf
    """
    _byte_size: int = 0
    _pub_file: PubFile = 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 pub_file(self) -> PubFile:
        return self._pub_file

    @pub_file.setter
    def pub_file(self, pub_file: PubFile) -> None:
        self._pub_file = pub_file

    @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.Net244

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeNet244ServerPacket): The data to serialize.
        """
        if data._pub_file is None:
            raise SerializationError("pub_file must be provided.")
        PubFile.serialize(writer, data._pub_file)

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

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

        Returns:
            WelcomeNet244ServerPacket: The data to serialize.
        """
        data: WelcomeNet244ServerPacket = WelcomeNet244ServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._pub_file = PubFile.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"WelcomeNet244ServerPacket(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

pub_file: PubFile 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/server/welcome_net244_server_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.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/server/welcome_net244_server_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.Net244

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/server/welcome_net244_server_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.
    """
    WelcomeNet244ServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WelcomeNet244ServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeNet244ServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/welcome_net244_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeNet244ServerPacket") -> None:
    """
    Serializes an instance of `WelcomeNet244ServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeNet244ServerPacket): The data to serialize.
    """
    if data._pub_file is None:
        raise SerializationError("pub_file must be provided.")
    PubFile.serialize(writer, data._pub_file)

deserialize(reader) staticmethod

Deserializes an instance of WelcomeNet244ServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomeNet244ServerPacket WelcomeNet244ServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/welcome_net244_server_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) -> "WelcomeNet244ServerPacket":
    """
    Deserializes an instance of `WelcomeNet244ServerPacket` from the provided `EoReader`.

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

    Returns:
        WelcomeNet244ServerPacket: The data to serialize.
    """
    data: WelcomeNet244ServerPacket = WelcomeNet244ServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._pub_file = PubFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WelcomeNet243ServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.FileEsf

Source code in src/eolib/protocol/_generated/net/server/welcome_net243_server_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 WelcomeNet243ServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.FileEsf
    """
    _byte_size: int = 0
    _pub_file: PubFile = 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 pub_file(self) -> PubFile:
        return self._pub_file

    @pub_file.setter
    def pub_file(self, pub_file: PubFile) -> None:
        self._pub_file = pub_file

    @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.Net243

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeNet243ServerPacket): The data to serialize.
        """
        if data._pub_file is None:
            raise SerializationError("pub_file must be provided.")
        PubFile.serialize(writer, data._pub_file)

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

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

        Returns:
            WelcomeNet243ServerPacket: The data to serialize.
        """
        data: WelcomeNet243ServerPacket = WelcomeNet243ServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._pub_file = PubFile.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"WelcomeNet243ServerPacket(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

pub_file: PubFile 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/server/welcome_net243_server_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.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/server/welcome_net243_server_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.Net243

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/server/welcome_net243_server_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.
    """
    WelcomeNet243ServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WelcomeNet243ServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeNet243ServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/welcome_net243_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeNet243ServerPacket") -> None:
    """
    Serializes an instance of `WelcomeNet243ServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeNet243ServerPacket): The data to serialize.
    """
    if data._pub_file is None:
        raise SerializationError("pub_file must be provided.")
    PubFile.serialize(writer, data._pub_file)

deserialize(reader) staticmethod

Deserializes an instance of WelcomeNet243ServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomeNet243ServerPacket WelcomeNet243ServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/welcome_net243_server_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) -> "WelcomeNet243ServerPacket":
    """
    Deserializes an instance of `WelcomeNet243ServerPacket` from the provided `EoReader`.

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

    Returns:
        WelcomeNet243ServerPacket: The data to serialize.
    """
    data: WelcomeNet243ServerPacket = WelcomeNet243ServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._pub_file = PubFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WelcomeNet242ServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.FileEnf

Source code in src/eolib/protocol/_generated/net/server/welcome_net242_server_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 WelcomeNet242ServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.FileEnf
    """
    _byte_size: int = 0
    _pub_file: PubFile = 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 pub_file(self) -> PubFile:
        return self._pub_file

    @pub_file.setter
    def pub_file(self, pub_file: PubFile) -> None:
        self._pub_file = pub_file

    @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.Net242

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WelcomeNet242ServerPacket): The data to serialize.
        """
        if data._pub_file is None:
            raise SerializationError("pub_file must be provided.")
        PubFile.serialize(writer, data._pub_file)

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

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

        Returns:
            WelcomeNet242ServerPacket: The data to serialize.
        """
        data: WelcomeNet242ServerPacket = WelcomeNet242ServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._pub_file = PubFile.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"WelcomeNet242ServerPacket(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

pub_file: PubFile 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/server/welcome_net242_server_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.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/server/welcome_net242_server_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.Net242

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/server/welcome_net242_server_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.
    """
    WelcomeNet242ServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WelcomeNet242ServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WelcomeNet242ServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/welcome_net242_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "WelcomeNet242ServerPacket") -> None:
    """
    Serializes an instance of `WelcomeNet242ServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WelcomeNet242ServerPacket): The data to serialize.
    """
    if data._pub_file is None:
        raise SerializationError("pub_file must be provided.")
    PubFile.serialize(writer, data._pub_file)

deserialize(reader) staticmethod

Deserializes an instance of WelcomeNet242ServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WelcomeNet242ServerPacket WelcomeNet242ServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/welcome_net242_server_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) -> "WelcomeNet242ServerPacket":
    """
    Deserializes an instance of `WelcomeNet242ServerPacket` from the provided `EoReader`.

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

    Returns:
        WelcomeNet242ServerPacket: The data to serialize.
    """
    data: WelcomeNet242ServerPacket = WelcomeNet242ServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._pub_file = PubFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WarpType

Bases: IntEnum

Indicates whether a warp is within the current map, or switching to another map

Source code in src/eolib/protocol/_generated/net/server/warp_type.py
 9
10
11
12
13
14
class WarpType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Indicates whether a warp is within the current map, or switching to another map
    """
    Local = 1
    MapSwitch = 2

Local = 1 class-attribute instance-attribute

MapSwitch = 2 class-attribute instance-attribute

WarpRequestServerPacket

Bases: Packet

Warp request from server

Source code in src/eolib/protocol/_generated/net/server/warp_request_server_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
class WarpRequestServerPacket(Packet):
    """
    Warp request from server
    """
    _byte_size: int = 0
    _warp_type: WarpType = None # type: ignore [assignment]
    _map_id: int = None # type: ignore [assignment]
    _warp_type_data: 'WarpRequestServerPacket.WarpTypeData' = None
    _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 warp_type(self) -> WarpType:
        return self._warp_type

    @warp_type.setter
    def warp_type(self, warp_type: WarpType) -> None:
        self._warp_type = warp_type

    @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 warp_type_data(self) -> 'WarpRequestServerPacket.WarpTypeData':
        """
        WarpRequestServerPacket.WarpTypeData: Gets or sets the data associated with the `warp_type` field.
        """
        return self._warp_type_data

    @warp_type_data.setter
    def warp_type_data(self, warp_type_data: 'WarpRequestServerPacket.WarpTypeData') -> None:
        self._warp_type_data = warp_type_data

    @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.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.
        """
        WarpRequestServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WarpRequestServerPacket): The data to serialize.
        """
        if data._warp_type is None:
            raise SerializationError("warp_type must be provided.")
        writer.add_char(int(data._warp_type))
        if data._map_id is None:
            raise SerializationError("map_id must be provided.")
        writer.add_short(data._map_id)
        if data._warp_type == WarpType.MapSwitch:
            if not isinstance(data._warp_type_data, WarpRequestServerPacket.WarpTypeDataMapSwitch):
                raise SerializationError("Expected warp_type_data to be type WarpRequestServerPacket.WarpTypeDataMapSwitch for warp_type " + WarpType(data._warp_type).name + ".")
            WarpRequestServerPacket.WarpTypeDataMapSwitch.serialize(writer, data._warp_type_data)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_short(data._session_id)

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

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

        Returns:
            WarpRequestServerPacket: The data to serialize.
        """
        data: WarpRequestServerPacket = WarpRequestServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._warp_type = WarpType(reader.get_char())
            data._map_id = reader.get_short()
            if data._warp_type == WarpType.MapSwitch:
                data._warp_type_data = WarpRequestServerPacket.WarpTypeDataMapSwitch.deserialize(reader)
            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"WarpRequestServerPacket(byte_size={repr(self._byte_size)}, warp_type={repr(self._warp_type)}, map_id={repr(self._map_id)}, warp_type_data={repr(self._warp_type_data)}, session_id={repr(self._session_id)})"

    WarpTypeData = Union['WarpRequestServerPacket.WarpTypeDataMapSwitch', None]
    WarpTypeData.__doc__ = \
        """
        Data associated with different values of the `warp_type` field.
        """

    class WarpTypeDataMapSwitch:
        """
        Data associated with warp_type value WarpType.MapSwitch
        """
        _byte_size: int = 0
        _map_rid: list[int] = None # type: ignore [assignment]
        _map_file_size: 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_rid(self) -> list[int]:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            return self._map_rid

        @map_rid.setter
        def map_rid(self, map_rid: list[int]) -> None:
            """
            Note:
              - Length must be `2`.
              - Element value range is 0-64008.
            """
            self._map_rid = map_rid

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

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

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WarpRequestServerPacket.WarpTypeDataMapSwitch): The data to serialize.
            """
            if data._map_rid is None:
                raise SerializationError("map_rid must be provided.")
            if len(data._map_rid) != 2:
                raise SerializationError(f"Expected length of map_rid to be exactly 2, got {len(data._map_rid)}.")
            for i in range(2):
                writer.add_short(data._map_rid[i])
            if data._map_file_size is None:
                raise SerializationError("map_file_size must be provided.")
            writer.add_three(data._map_file_size)

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

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

            Returns:
                WarpRequestServerPacket.WarpTypeDataMapSwitch: The data to serialize.
            """
            data: WarpRequestServerPacket.WarpTypeDataMapSwitch = WarpRequestServerPacket.WarpTypeDataMapSwitch()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._map_rid = []
                for i in range(2):
                    data._map_rid.append(reader.get_short())
                data._map_file_size = 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"WarpRequestServerPacket.WarpTypeDataMapSwitch(byte_size={repr(self._byte_size)}, map_rid={repr(self._map_rid)}, map_file_size={repr(self._map_file_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.

warp_type: WarpType property writable

map_id: int property writable

Note
  • Value range is 0-64008.

warp_type_data: 'WarpRequestServerPacket.WarpTypeData' property writable

WarpRequestServerPacket.WarpTypeData: Gets or sets the data associated with the warp_type field.

session_id: int property writable

Note
  • Value range is 0-64008.

WarpTypeData = Union['WarpRequestServerPacket.WarpTypeDataMapSwitch', None] class-attribute instance-attribute

WarpTypeDataMapSwitch

Data associated with warp_type value WarpType.MapSwitch

Source code in src/eolib/protocol/_generated/net/server/warp_request_server_packet.py
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
class WarpTypeDataMapSwitch:
    """
    Data associated with warp_type value WarpType.MapSwitch
    """
    _byte_size: int = 0
    _map_rid: list[int] = None # type: ignore [assignment]
    _map_file_size: 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_rid(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._map_rid

    @map_rid.setter
    def map_rid(self, map_rid: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._map_rid = map_rid

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WarpRequestServerPacket.WarpTypeDataMapSwitch): The data to serialize.
        """
        if data._map_rid is None:
            raise SerializationError("map_rid must be provided.")
        if len(data._map_rid) != 2:
            raise SerializationError(f"Expected length of map_rid to be exactly 2, got {len(data._map_rid)}.")
        for i in range(2):
            writer.add_short(data._map_rid[i])
        if data._map_file_size is None:
            raise SerializationError("map_file_size must be provided.")
        writer.add_three(data._map_file_size)

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

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

        Returns:
            WarpRequestServerPacket.WarpTypeDataMapSwitch: The data to serialize.
        """
        data: WarpRequestServerPacket.WarpTypeDataMapSwitch = WarpRequestServerPacket.WarpTypeDataMapSwitch()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_rid = []
            for i in range(2):
                data._map_rid.append(reader.get_short())
            data._map_file_size = 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"WarpRequestServerPacket.WarpTypeDataMapSwitch(byte_size={repr(self._byte_size)}, map_rid={repr(self._map_rid)}, map_file_size={repr(self._map_file_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.

map_rid: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

map_file_size: int property writable

Note
  • Value range is 0-16194276.

serialize(writer, data) staticmethod

Serializes an instance of WarpRequestServerPacket.WarpTypeDataMapSwitch to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WarpTypeDataMapSwitch

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/warp_request_server_packet.py
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
@staticmethod
def serialize(writer: EoWriter, data: "WarpRequestServerPacket.WarpTypeDataMapSwitch") -> None:
    """
    Serializes an instance of `WarpRequestServerPacket.WarpTypeDataMapSwitch` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WarpRequestServerPacket.WarpTypeDataMapSwitch): The data to serialize.
    """
    if data._map_rid is None:
        raise SerializationError("map_rid must be provided.")
    if len(data._map_rid) != 2:
        raise SerializationError(f"Expected length of map_rid to be exactly 2, got {len(data._map_rid)}.")
    for i in range(2):
        writer.add_short(data._map_rid[i])
    if data._map_file_size is None:
        raise SerializationError("map_file_size must be provided.")
    writer.add_three(data._map_file_size)

deserialize(reader) staticmethod

Deserializes an instance of WarpRequestServerPacket.WarpTypeDataMapSwitch from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'WarpRequestServerPacket.WarpTypeDataMapSwitch'

WarpRequestServerPacket.WarpTypeDataMapSwitch: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/warp_request_server_packet.py
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
@staticmethod
def deserialize(reader: EoReader) -> "WarpRequestServerPacket.WarpTypeDataMapSwitch":
    """
    Deserializes an instance of `WarpRequestServerPacket.WarpTypeDataMapSwitch` from the provided `EoReader`.

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

    Returns:
        WarpRequestServerPacket.WarpTypeDataMapSwitch: The data to serialize.
    """
    data: WarpRequestServerPacket.WarpTypeDataMapSwitch = WarpRequestServerPacket.WarpTypeDataMapSwitch()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_rid = []
        for i in range(2):
            data._map_rid.append(reader.get_short())
        data._map_file_size = reader.get_three()
        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/server/warp_request_server_packet.py
87
88
89
90
91
92
93
94
95
@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/server/warp_request_server_packet.py
 97
 98
 99
100
101
102
103
104
105
@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/server/warp_request_server_packet.py
107
108
109
110
111
112
113
114
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of WarpRequestServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WarpRequestServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/warp_request_server_packet.py
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
@staticmethod
def serialize(writer: EoWriter, data: "WarpRequestServerPacket") -> None:
    """
    Serializes an instance of `WarpRequestServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WarpRequestServerPacket): The data to serialize.
    """
    if data._warp_type is None:
        raise SerializationError("warp_type must be provided.")
    writer.add_char(int(data._warp_type))
    if data._map_id is None:
        raise SerializationError("map_id must be provided.")
    writer.add_short(data._map_id)
    if data._warp_type == WarpType.MapSwitch:
        if not isinstance(data._warp_type_data, WarpRequestServerPacket.WarpTypeDataMapSwitch):
            raise SerializationError("Expected warp_type_data to be type WarpRequestServerPacket.WarpTypeDataMapSwitch for warp_type " + WarpType(data._warp_type).name + ".")
        WarpRequestServerPacket.WarpTypeDataMapSwitch.serialize(writer, data._warp_type_data)
    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 WarpRequestServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WarpRequestServerPacket 'WarpRequestServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/warp_request_server_packet.py
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
@staticmethod
def deserialize(reader: EoReader) -> "WarpRequestServerPacket":
    """
    Deserializes an instance of `WarpRequestServerPacket` from the provided `EoReader`.

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

    Returns:
        WarpRequestServerPacket: The data to serialize.
    """
    data: WarpRequestServerPacket = WarpRequestServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._warp_type = WarpType(reader.get_char())
        data._map_id = reader.get_short()
        if data._warp_type == WarpType.MapSwitch:
            data._warp_type_data = WarpRequestServerPacket.WarpTypeDataMapSwitch.deserialize(reader)
        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

WarpPlayerServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.WarpMap

Source code in src/eolib/protocol/_generated/net/server/warp_player_server_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 WarpPlayerServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.WarpMap
    """
    _byte_size: int = 0
    _map_file: MapFile = 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_file(self) -> MapFile:
        return self._map_file

    @map_file.setter
    def map_file(self, map_file: MapFile) -> None:
        self._map_file = map_file

    @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.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.
        """
        WarpPlayerServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WarpPlayerServerPacket): The data to serialize.
        """
        if data._map_file is None:
            raise SerializationError("map_file must be provided.")
        MapFile.serialize(writer, data._map_file)

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

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

        Returns:
            WarpPlayerServerPacket: The data to serialize.
        """
        data: WarpPlayerServerPacket = WarpPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_file = MapFile.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"WarpPlayerServerPacket(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

byte_size: int property

Returns the size 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_file: MapFile 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/server/warp_player_server_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.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/server/warp_player_server_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/server/warp_player_server_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.
    """
    WarpPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WarpPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WarpPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/warp_player_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "WarpPlayerServerPacket") -> None:
    """
    Serializes an instance of `WarpPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WarpPlayerServerPacket): The data to serialize.
    """
    if data._map_file is None:
        raise SerializationError("map_file must be provided.")
    MapFile.serialize(writer, data._map_file)

deserialize(reader) staticmethod

Deserializes an instance of WarpPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WarpPlayerServerPacket WarpPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/warp_player_server_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) -> "WarpPlayerServerPacket":
    """
    Deserializes an instance of `WarpPlayerServerPacket` from the provided `EoReader`.

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

    Returns:
        WarpPlayerServerPacket: The data to serialize.
    """
    data: WarpPlayerServerPacket = WarpPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_file = MapFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WarpEffect

Bases: IntEnum

An effect that accompanies a player warp

Source code in src/eolib/protocol/_generated/net/server/warp_effect.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class WarpEffect(IntEnum, metaclass=ProtocolEnumMeta):
    """
    An effect that accompanies a player warp
    """
    None_ = 0
    """
    Does nothing
    """
    Scroll = 1
    """
    Plays the scroll sound effect
    """
    Admin = 2
    """
    Plays the admin warp sound effect and animation
    """

None_ = 0 class-attribute instance-attribute

Does nothing

Scroll = 1 class-attribute instance-attribute

Plays the scroll sound effect

Admin = 2 class-attribute instance-attribute

Plays the admin warp sound effect and animation

WarpCreateServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.MapMutation

Source code in src/eolib/protocol/_generated/net/server/warp_create_server_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 WarpCreateServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.MapMutation
    """
    _byte_size: int = 0
    _map_file: MapFile = 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_file(self) -> MapFile:
        return self._map_file

    @map_file.setter
    def map_file(self, map_file: MapFile) -> None:
        self._map_file = map_file

    @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.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.
        """
        WarpCreateServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WarpCreateServerPacket): The data to serialize.
        """
        if data._map_file is None:
            raise SerializationError("map_file must be provided.")
        MapFile.serialize(writer, data._map_file)

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

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

        Returns:
            WarpCreateServerPacket: The data to serialize.
        """
        data: WarpCreateServerPacket = WarpCreateServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_file = MapFile.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"WarpCreateServerPacket(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

byte_size: int property

Returns the size 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_file: MapFile 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/server/warp_create_server_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.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/server/warp_create_server_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.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/server/warp_create_server_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.
    """
    WarpCreateServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WarpCreateServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WarpCreateServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/warp_create_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "WarpCreateServerPacket") -> None:
    """
    Serializes an instance of `WarpCreateServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WarpCreateServerPacket): The data to serialize.
    """
    if data._map_file is None:
        raise SerializationError("map_file must be provided.")
    MapFile.serialize(writer, data._map_file)

deserialize(reader) staticmethod

Deserializes an instance of WarpCreateServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WarpCreateServerPacket WarpCreateServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/warp_create_server_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) -> "WarpCreateServerPacket":
    """
    Deserializes an instance of `WarpCreateServerPacket` from the provided `EoReader`.

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

    Returns:
        WarpCreateServerPacket: The data to serialize.
    """
    data: WarpCreateServerPacket = WarpCreateServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_file = MapFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WarpAgreeServerPacket

Bases: Packet

Reply after accepting a warp

Source code in src/eolib/protocol/_generated/net/server/warp_agree_server_packet.py
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
class WarpAgreeServerPacket(Packet):
    """
    Reply after accepting a warp
    """
    _byte_size: int = 0
    _warp_type: WarpType = None # type: ignore [assignment]
    _warp_type_data: 'WarpAgreeServerPacket.WarpTypeData' = None
    _nearby: NearbyInfo = 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 warp_type(self) -> WarpType:
        return self._warp_type

    @warp_type.setter
    def warp_type(self, warp_type: WarpType) -> None:
        self._warp_type = warp_type

    @property
    def warp_type_data(self) -> 'WarpAgreeServerPacket.WarpTypeData':
        """
        WarpAgreeServerPacket.WarpTypeData: Gets or sets the data associated with the `warp_type` field.
        """
        return self._warp_type_data

    @warp_type_data.setter
    def warp_type_data(self, warp_type_data: 'WarpAgreeServerPacket.WarpTypeData') -> None:
        self._warp_type_data = warp_type_data

    @property
    def nearby(self) -> NearbyInfo:
        return self._nearby

    @nearby.setter
    def nearby(self, nearby: NearbyInfo) -> None:
        self._nearby = nearby

    @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.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.
        """
        WarpAgreeServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WarpAgreeServerPacket): The data to serialize.
        """
        if data._warp_type is None:
            raise SerializationError("warp_type must be provided.")
        writer.add_char(int(data._warp_type))
        if data._warp_type == WarpType.MapSwitch:
            if not isinstance(data._warp_type_data, WarpAgreeServerPacket.WarpTypeDataMapSwitch):
                raise SerializationError("Expected warp_type_data to be type WarpAgreeServerPacket.WarpTypeDataMapSwitch for warp_type " + WarpType(data._warp_type).name + ".")
            WarpAgreeServerPacket.WarpTypeDataMapSwitch.serialize(writer, data._warp_type_data)
        if data._nearby is None:
            raise SerializationError("nearby must be provided.")
        NearbyInfo.serialize(writer, data._nearby)

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

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

        Returns:
            WarpAgreeServerPacket: The data to serialize.
        """
        data: WarpAgreeServerPacket = WarpAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._warp_type = WarpType(reader.get_char())
            if data._warp_type == WarpType.MapSwitch:
                data._warp_type_data = WarpAgreeServerPacket.WarpTypeDataMapSwitch.deserialize(reader)
            data._nearby = NearbyInfo.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"WarpAgreeServerPacket(byte_size={repr(self._byte_size)}, warp_type={repr(self._warp_type)}, warp_type_data={repr(self._warp_type_data)}, nearby={repr(self._nearby)})"

    WarpTypeData = Union['WarpAgreeServerPacket.WarpTypeDataMapSwitch', None]
    WarpTypeData.__doc__ = \
        """
        Data associated with different values of the `warp_type` field.
        """

    class WarpTypeDataMapSwitch:
        """
        Data associated with warp_type value WarpType.MapSwitch
        """
        _byte_size: int = 0
        _map_id: int = None # type: ignore [assignment]
        _warp_effect: WarpEffect = 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 warp_effect(self) -> WarpEffect:
            return self._warp_effect

        @warp_effect.setter
        def warp_effect(self, warp_effect: WarpEffect) -> None:
            self._warp_effect = warp_effect

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (WarpAgreeServerPacket.WarpTypeDataMapSwitch): 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._warp_effect is None:
                raise SerializationError("warp_effect must be provided.")
            writer.add_char(int(data._warp_effect))

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

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

            Returns:
                WarpAgreeServerPacket.WarpTypeDataMapSwitch: The data to serialize.
            """
            data: WarpAgreeServerPacket.WarpTypeDataMapSwitch = WarpAgreeServerPacket.WarpTypeDataMapSwitch()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._map_id = reader.get_short()
                data._warp_effect = WarpEffect(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"WarpAgreeServerPacket.WarpTypeDataMapSwitch(byte_size={repr(self._byte_size)}, map_id={repr(self._map_id)}, warp_effect={repr(self._warp_effect)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

warp_type: WarpType property writable

warp_type_data: WarpAgreeServerPacket.WarpTypeData property writable

WarpAgreeServerPacket.WarpTypeData: Gets or sets the data associated with the warp_type field.

nearby: NearbyInfo property writable

WarpTypeData = Union['WarpAgreeServerPacket.WarpTypeDataMapSwitch', None] class-attribute instance-attribute

WarpTypeDataMapSwitch

Data associated with warp_type value WarpType.MapSwitch

Source code in src/eolib/protocol/_generated/net/server/warp_agree_server_packet.py
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
class WarpTypeDataMapSwitch:
    """
    Data associated with warp_type value WarpType.MapSwitch
    """
    _byte_size: int = 0
    _map_id: int = None # type: ignore [assignment]
    _warp_effect: WarpEffect = 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 warp_effect(self) -> WarpEffect:
        return self._warp_effect

    @warp_effect.setter
    def warp_effect(self, warp_effect: WarpEffect) -> None:
        self._warp_effect = warp_effect

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WarpAgreeServerPacket.WarpTypeDataMapSwitch): 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._warp_effect is None:
            raise SerializationError("warp_effect must be provided.")
        writer.add_char(int(data._warp_effect))

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

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

        Returns:
            WarpAgreeServerPacket.WarpTypeDataMapSwitch: The data to serialize.
        """
        data: WarpAgreeServerPacket.WarpTypeDataMapSwitch = WarpAgreeServerPacket.WarpTypeDataMapSwitch()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_id = reader.get_short()
            data._warp_effect = WarpEffect(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"WarpAgreeServerPacket.WarpTypeDataMapSwitch(byte_size={repr(self._byte_size)}, map_id={repr(self._map_id)}, warp_effect={repr(self._warp_effect)})"

byte_size: int property

Returns the size 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.

warp_effect: WarpEffect property writable

serialize(writer, data) staticmethod

Serializes an instance of WarpAgreeServerPacket.WarpTypeDataMapSwitch to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WarpTypeDataMapSwitch

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/warp_agree_server_packet.py
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
@staticmethod
def serialize(writer: EoWriter, data: "WarpAgreeServerPacket.WarpTypeDataMapSwitch") -> None:
    """
    Serializes an instance of `WarpAgreeServerPacket.WarpTypeDataMapSwitch` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WarpAgreeServerPacket.WarpTypeDataMapSwitch): 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._warp_effect is None:
        raise SerializationError("warp_effect must be provided.")
    writer.add_char(int(data._warp_effect))

deserialize(reader) staticmethod

Deserializes an instance of WarpAgreeServerPacket.WarpTypeDataMapSwitch from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
WarpTypeDataMapSwitch

WarpAgreeServerPacket.WarpTypeDataMapSwitch: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/warp_agree_server_packet.py
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
@staticmethod
def deserialize(reader: EoReader) -> "WarpAgreeServerPacket.WarpTypeDataMapSwitch":
    """
    Deserializes an instance of `WarpAgreeServerPacket.WarpTypeDataMapSwitch` from the provided `EoReader`.

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

    Returns:
        WarpAgreeServerPacket.WarpTypeDataMapSwitch: The data to serialize.
    """
    data: WarpAgreeServerPacket.WarpTypeDataMapSwitch = WarpAgreeServerPacket.WarpTypeDataMapSwitch()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_id = reader.get_short()
        data._warp_effect = WarpEffect(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/server/warp_agree_server_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/server/warp_agree_server_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.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/server/warp_agree_server_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.
    """
    WarpAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WarpAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WarpAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/warp_agree_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@staticmethod
def serialize(writer: EoWriter, data: "WarpAgreeServerPacket") -> None:
    """
    Serializes an instance of `WarpAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WarpAgreeServerPacket): The data to serialize.
    """
    if data._warp_type is None:
        raise SerializationError("warp_type must be provided.")
    writer.add_char(int(data._warp_type))
    if data._warp_type == WarpType.MapSwitch:
        if not isinstance(data._warp_type_data, WarpAgreeServerPacket.WarpTypeDataMapSwitch):
            raise SerializationError("Expected warp_type_data to be type WarpAgreeServerPacket.WarpTypeDataMapSwitch for warp_type " + WarpType(data._warp_type).name + ".")
        WarpAgreeServerPacket.WarpTypeDataMapSwitch.serialize(writer, data._warp_type_data)
    if data._nearby is None:
        raise SerializationError("nearby must be provided.")
    NearbyInfo.serialize(writer, data._nearby)

deserialize(reader) staticmethod

Deserializes an instance of WarpAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WarpAgreeServerPacket WarpAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/warp_agree_server_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
@staticmethod
def deserialize(reader: EoReader) -> "WarpAgreeServerPacket":
    """
    Deserializes an instance of `WarpAgreeServerPacket` from the provided `EoReader`.

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

    Returns:
        WarpAgreeServerPacket: The data to serialize.
    """
    data: WarpAgreeServerPacket = WarpAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._warp_type = WarpType(reader.get_char())
        if data._warp_type == WarpType.MapSwitch:
            data._warp_type_data = WarpAgreeServerPacket.WarpTypeDataMapSwitch.deserialize(reader)
        data._nearby = NearbyInfo.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

ItemMapInfo

Information about a nearby item on the ground

Source code in src/eolib/protocol/_generated/net/server/item_map_info.py
 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
class ItemMapInfo:
    """
    Information about a nearby item on the ground
    """
    _byte_size: int = 0
    _uid: int = None # type: ignore [assignment]
    _id: int = None # type: ignore [assignment]
    _coords: Coords = 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 uid(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._uid

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

    @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 coords(self) -> Coords:
        return self._coords

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

    @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: "ItemMapInfo") -> None:
        """
        Serializes an instance of `ItemMapInfo` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemMapInfo): The data to serialize.
        """
        if data._uid is None:
            raise SerializationError("uid must be provided.")
        writer.add_short(data._uid)
        if data._id is None:
            raise SerializationError("id must be provided.")
        writer.add_short(data._id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._amount is None:
            raise SerializationError("amount must be provided.")
        writer.add_three(data._amount)

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

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

        Returns:
            ItemMapInfo: The data to serialize.
        """
        data: ItemMapInfo = ItemMapInfo()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._uid = reader.get_short()
            data._id = reader.get_short()
            data._coords = Coords.deserialize(reader)
            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"ItemMapInfo(byte_size={repr(self._byte_size)}, uid={repr(self._uid)}, id={repr(self._id)}, coords={repr(self._coords)}, 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.

uid: int property writable

Note
  • Value range is 0-64008.

id: int property writable

Note
  • Value range is 0-64008.

coords: Coords property writable

amount: int property writable

Note
  • Value range is 0-16194276.

serialize(writer, data) staticmethod

Serializes an instance of ItemMapInfo to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemMapInfo

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_map_info.py
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@staticmethod
def serialize(writer: EoWriter, data: "ItemMapInfo") -> None:
    """
    Serializes an instance of `ItemMapInfo` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemMapInfo): The data to serialize.
    """
    if data._uid is None:
        raise SerializationError("uid must be provided.")
    writer.add_short(data._uid)
    if data._id is None:
        raise SerializationError("id must be provided.")
    writer.add_short(data._id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._amount is None:
        raise SerializationError("amount must be provided.")
    writer.add_three(data._amount)

deserialize(reader) staticmethod

Deserializes an instance of ItemMapInfo from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemMapInfo ItemMapInfo

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_map_info.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
@staticmethod
def deserialize(reader: EoReader) -> "ItemMapInfo":
    """
    Deserializes an instance of `ItemMapInfo` from the provided `EoReader`.

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

    Returns:
        ItemMapInfo: The data to serialize.
    """
    data: ItemMapInfo = ItemMapInfo()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._uid = reader.get_short()
        data._id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        data._amount = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WalkReplyServerPacket

Bases: Packet

Players, NPCs, and Items appearing in nearby view

Source code in src/eolib/protocol/_generated/net/server/walk_reply_server_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
class WalkReplyServerPacket(Packet):
    """
    Players, NPCs, and Items appearing in nearby view
    """
    _byte_size: int = 0
    _player_ids: list[int] = None # type: ignore [assignment]
    _npc_indexes: list[int] = None # type: ignore [assignment]
    _items: list[ItemMapInfo] = 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

    @property
    def items(self) -> list[ItemMapInfo]:
        return self._items

    @items.setter
    def items(self, items: list[ItemMapInfo]) -> None:
        self._items = items

    @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.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.
        """
        WalkReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WalkReplyServerPacket): 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])
        writer.add_byte(0xFF)
        if data._items is None:
            raise SerializationError("items must be provided.")
        for i in range(len(data._items)):
            ItemMapInfo.serialize(writer, data._items[i])

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

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

        Returns:
            WalkReplyServerPacket: The data to serialize.
        """
        data: WalkReplyServerPacket = WalkReplyServerPacket()
        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.next_chunk()
            items_length = int(reader.remaining / 9)
            data._items = []
            for i in range(items_length):
                data._items.append(ItemMapInfo.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"WalkReplyServerPacket(byte_size={repr(self._byte_size)}, player_ids={repr(self._player_ids)}, npc_indexes={repr(self._npc_indexes)}, items={repr(self._items)})"

byte_size: int property

Returns the size 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.

items: list[ItemMapInfo] 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/server/walk_reply_server_packet.py
74
75
76
77
78
79
80
81
82
@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/server/walk_reply_server_packet.py
84
85
86
87
88
89
90
91
92
@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/server/walk_reply_server_packet.py
 94
 95
 96
 97
 98
 99
100
101
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of WalkReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WalkReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/walk_reply_server_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
@staticmethod
def serialize(writer: EoWriter, data: "WalkReplyServerPacket") -> None:
    """
    Serializes an instance of `WalkReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WalkReplyServerPacket): 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])
    writer.add_byte(0xFF)
    if data._items is None:
        raise SerializationError("items must be provided.")
    for i in range(len(data._items)):
        ItemMapInfo.serialize(writer, data._items[i])

deserialize(reader) staticmethod

Deserializes an instance of WalkReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WalkReplyServerPacket 'WalkReplyServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/walk_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "WalkReplyServerPacket":
    """
    Deserializes an instance of `WalkReplyServerPacket` from the provided `EoReader`.

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

    Returns:
        WalkReplyServerPacket: The data to serialize.
    """
    data: WalkReplyServerPacket = WalkReplyServerPacket()
    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.next_chunk()
        items_length = int(reader.remaining / 9)
        data._items = []
        for i in range(items_length):
            data._items.append(ItemMapInfo.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

WalkPlayerServerPacket

Bases: Packet

Nearby player has walked

Source code in src/eolib/protocol/_generated/net/server/walk_player_server_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
class WalkPlayerServerPacket(Packet):
    """
    Nearby player has walked
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _direction: Direction = 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 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

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

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

    @property
    def Direction(self) -> Direction:
        """
        !!! warning "Deprecated"

            Use `direction` instead. (Deprecated since v1.1.0)
        """
        warn("'WalkPlayerServerPacket.Direction' is deprecated as of 1.1.0, use 'direction' instead.", DeprecationWarning, stacklevel=2)
        return self.direction

    @Direction.setter
    def Direction(self, direction: Direction) -> None:
        """
        !!! warning "Deprecated"

            Use `direction` instead. (Deprecated since v1.1.0)
        """
        self.direction = direction

    @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.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.
        """
        WalkPlayerServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WalkPlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

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

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

        Returns:
            WalkPlayerServerPacket: The data to serialize.
        """
        data: WalkPlayerServerPacket = WalkPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._direction = Direction(reader.get_char())
            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"WalkPlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, direction={repr(self._direction)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

direction: Direction property writable

Direction: Direction property writable

Deprecated

Use direction instead. (Deprecated since v1.1.0)

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/server/walk_player_server_packet.py
86
87
88
89
90
91
92
93
94
@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/server/walk_player_server_packet.py
 96
 97
 98
 99
100
101
102
103
104
@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/server/walk_player_server_packet.py
106
107
108
109
110
111
112
113
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of WalkPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WalkPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/walk_player_server_packet.py
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@staticmethod
def serialize(writer: EoWriter, data: "WalkPlayerServerPacket") -> None:
    """
    Serializes an instance of `WalkPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WalkPlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

deserialize(reader) staticmethod

Deserializes an instance of WalkPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WalkPlayerServerPacket WalkPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/walk_player_server_packet.py
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
@staticmethod
def deserialize(reader: EoReader) -> "WalkPlayerServerPacket":
    """
    Deserializes an instance of `WalkPlayerServerPacket` from the provided `EoReader`.

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

    Returns:
        WalkPlayerServerPacket: The data to serialize.
    """
    data: WalkPlayerServerPacket = WalkPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._direction = Direction(reader.get_char())
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

WalkOpenServerPacket

Bases: Packet

Your character has been unfrozen

Source code in src/eolib/protocol/_generated/net/server/walk_open_server_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 WalkOpenServerPacket(Packet):
    """
    Your character has been unfrozen
    """
    _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.Walk

    @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.
        """
        WalkOpenServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WalkOpenServerPacket): The data to serialize.
        """
        old_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("S")

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

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

        Returns:
            WalkOpenServerPacket: The data to serialize.
        """
        data: WalkOpenServerPacket = WalkOpenServerPacket()
        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"WalkOpenServerPacket(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/server/walk_open_server_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.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/server/walk_open_server_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/server/walk_open_server_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.
    """
    WalkOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WalkOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WalkOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/walk_open_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "WalkOpenServerPacket") -> None:
    """
    Serializes an instance of `WalkOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WalkOpenServerPacket): The data to serialize.
    """
    old_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("S")

deserialize(reader) staticmethod

Deserializes an instance of WalkOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WalkOpenServerPacket WalkOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/walk_open_server_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) -> "WalkOpenServerPacket":
    """
    Deserializes an instance of `WalkOpenServerPacket` from the provided `EoReader`.

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

    Returns:
        WalkOpenServerPacket: The data to serialize.
    """
    data: WalkOpenServerPacket = WalkOpenServerPacket()
    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

WalkCloseServerPacket

Bases: Packet

Your character has been frozen

Source code in src/eolib/protocol/_generated/net/server/walk_close_server_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 WalkCloseServerPacket(Packet):
    """
    Your character has been frozen
    """
    _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.Walk

    @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.
        """
        WalkCloseServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (WalkCloseServerPacket): The data to serialize.
        """
        old_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("S")

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

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

        Returns:
            WalkCloseServerPacket: The data to serialize.
        """
        data: WalkCloseServerPacket = WalkCloseServerPacket()
        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"WalkCloseServerPacket(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/server/walk_close_server_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.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/server/walk_close_server_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/server/walk_close_server_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.
    """
    WalkCloseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of WalkCloseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data WalkCloseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/walk_close_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "WalkCloseServerPacket") -> None:
    """
    Serializes an instance of `WalkCloseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (WalkCloseServerPacket): The data to serialize.
    """
    old_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("S")

deserialize(reader) staticmethod

Deserializes an instance of WalkCloseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
WalkCloseServerPacket WalkCloseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/walk_close_server_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) -> "WalkCloseServerPacket":
    """
    Deserializes an instance of `WalkCloseServerPacket` from the provided `EoReader`.

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

    Returns:
        WalkCloseServerPacket: The data to serialize.
    """
    data: WalkCloseServerPacket = WalkCloseServerPacket()
    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

TradeItemData

Trade window item data

Source code in src/eolib/protocol/_generated/net/server/trade_item_data.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 TradeItemData:
    """
    Trade window item data
    """
    _byte_size: int = 0
    _partner_player_id: int = None # type: ignore [assignment]
    _partner_items: list[Item] = None # type: ignore [assignment]
    _your_player_id: int = None # type: ignore [assignment]
    _your_items: list[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 partner_player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._partner_player_id

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

    @property
    def partner_items(self) -> list[Item]:
        return self._partner_items

    @partner_items.setter
    def partner_items(self, partner_items: list[Item]) -> None:
        self._partner_items = partner_items

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

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

    @property
    def your_items(self) -> list[Item]:
        return self._your_items

    @your_items.setter
    def your_items(self, your_items: list[Item]) -> None:
        self._your_items = your_items

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeItemData): The data to serialize.
        """
        if data._partner_player_id is None:
            raise SerializationError("partner_player_id must be provided.")
        writer.add_short(data._partner_player_id)
        if data._partner_items is None:
            raise SerializationError("partner_items must be provided.")
        for i in range(len(data._partner_items)):
            Item.serialize(writer, data._partner_items[i])
        writer.add_byte(0xFF)
        if data._your_player_id is None:
            raise SerializationError("your_player_id must be provided.")
        writer.add_short(data._your_player_id)
        if data._your_items is None:
            raise SerializationError("your_items must be provided.")
        for i in range(len(data._your_items)):
            Item.serialize(writer, data._your_items[i])
        writer.add_byte(0xFF)

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

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

        Returns:
            TradeItemData: The data to serialize.
        """
        data: TradeItemData = TradeItemData()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._partner_player_id = reader.get_short()
            partner_items_length = int(reader.remaining / 6)
            data._partner_items = []
            for i in range(partner_items_length):
                data._partner_items.append(Item.deserialize(reader))
            reader.next_chunk()
            data._your_player_id = reader.get_short()
            your_items_length = int(reader.remaining / 6)
            data._your_items = []
            for i in range(your_items_length):
                data._your_items.append(Item.deserialize(reader))
            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"TradeItemData(byte_size={repr(self._byte_size)}, partner_player_id={repr(self._partner_player_id)}, partner_items={repr(self._partner_items)}, your_player_id={repr(self._your_player_id)}, your_items={repr(self._your_items)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

partner_player_id: int property writable

Note
  • Value range is 0-64008.

partner_items: list[Item] property writable

your_player_id: int property writable

Note
  • Value range is 0-64008.

your_items: list[Item] property writable

serialize(writer, data) staticmethod

Serializes an instance of TradeItemData to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeItemData

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/trade_item_data.py
 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
@staticmethod
def serialize(writer: EoWriter, data: "TradeItemData") -> None:
    """
    Serializes an instance of `TradeItemData` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeItemData): The data to serialize.
    """
    if data._partner_player_id is None:
        raise SerializationError("partner_player_id must be provided.")
    writer.add_short(data._partner_player_id)
    if data._partner_items is None:
        raise SerializationError("partner_items must be provided.")
    for i in range(len(data._partner_items)):
        Item.serialize(writer, data._partner_items[i])
    writer.add_byte(0xFF)
    if data._your_player_id is None:
        raise SerializationError("your_player_id must be provided.")
    writer.add_short(data._your_player_id)
    if data._your_items is None:
        raise SerializationError("your_items must be provided.")
    for i in range(len(data._your_items)):
        Item.serialize(writer, data._your_items[i])
    writer.add_byte(0xFF)

deserialize(reader) staticmethod

Deserializes an instance of TradeItemData from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeItemData 'TradeItemData'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/trade_item_data.py
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
@staticmethod
def deserialize(reader: EoReader) -> "TradeItemData":
    """
    Deserializes an instance of `TradeItemData` from the provided `EoReader`.

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

    Returns:
        TradeItemData: The data to serialize.
    """
    data: TradeItemData = TradeItemData()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._partner_player_id = reader.get_short()
        partner_items_length = int(reader.remaining / 6)
        data._partner_items = []
        for i in range(partner_items_length):
            data._partner_items.append(Item.deserialize(reader))
        reader.next_chunk()
        data._your_player_id = reader.get_short()
        your_items_length = int(reader.remaining / 6)
        data._your_items = []
        for i in range(your_items_length):
            data._your_items.append(Item.deserialize(reader))
        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

TradeUseServerPacket

Bases: Packet

Trade completed

Source code in src/eolib/protocol/_generated/net/server/trade_use_server_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 TradeUseServerPacket(Packet):
    """
    Trade completed
    """
    _byte_size: int = 0
    _trade_data: TradeItemData = 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 trade_data(self) -> TradeItemData:
        return self._trade_data

    @trade_data.setter
    def trade_data(self, trade_data: TradeItemData) -> None:
        self._trade_data = trade_data

    @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.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.
        """
        TradeUseServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeUseServerPacket): The data to serialize.
        """
        if data._trade_data is None:
            raise SerializationError("trade_data must be provided.")
        TradeItemData.serialize(writer, data._trade_data)

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

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

        Returns:
            TradeUseServerPacket: The data to serialize.
        """
        data: TradeUseServerPacket = TradeUseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._trade_data = TradeItemData.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"TradeUseServerPacket(byte_size={repr(self._byte_size)}, trade_data={repr(self._trade_data)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

trade_data: TradeItemData 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/server/trade_use_server_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/server/trade_use_server_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/server/trade_use_server_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.
    """
    TradeUseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeUseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeUseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/trade_use_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "TradeUseServerPacket") -> None:
    """
    Serializes an instance of `TradeUseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeUseServerPacket): The data to serialize.
    """
    if data._trade_data is None:
        raise SerializationError("trade_data must be provided.")
    TradeItemData.serialize(writer, data._trade_data)

deserialize(reader) staticmethod

Deserializes an instance of TradeUseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeUseServerPacket TradeUseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/trade_use_server_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) -> "TradeUseServerPacket":
    """
    Deserializes an instance of `TradeUseServerPacket` from the provided `EoReader`.

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

    Returns:
        TradeUseServerPacket: The data to serialize.
    """
    data: TradeUseServerPacket = TradeUseServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._trade_data = TradeItemData.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TradeSpecServerPacket

Bases: Packet

Own agree state updated

Source code in src/eolib/protocol/_generated/net/server/trade_spec_server_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 TradeSpecServerPacket(Packet):
    """
    Own agree state updated
    """
    _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.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.
        """
        TradeSpecServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeSpecServerPacket): 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) -> "TradeSpecServerPacket":
        """
        Deserializes an instance of `TradeSpecServerPacket` from the provided `EoReader`.

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

        Returns:
            TradeSpecServerPacket: The data to serialize.
        """
        data: TradeSpecServerPacket = TradeSpecServerPacket()
        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"TradeSpecServerPacket(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/server/trade_spec_server_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/server/trade_spec_server_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.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/server/trade_spec_server_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.
    """
    TradeSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/trade_spec_server_packet.py
67
68
69
70
71
72
73
74
75
76
77
78
@staticmethod
def serialize(writer: EoWriter, data: "TradeSpecServerPacket") -> None:
    """
    Serializes an instance of `TradeSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeSpecServerPacket): 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 TradeSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeSpecServerPacket TradeSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/trade_spec_server_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) -> "TradeSpecServerPacket":
    """
    Deserializes an instance of `TradeSpecServerPacket` from the provided `EoReader`.

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

    Returns:
        TradeSpecServerPacket: The data to serialize.
    """
    data: TradeSpecServerPacket = TradeSpecServerPacket()
    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

TradeRequestServerPacket

Bases: Packet

Trade request from another player

Source code in src/eolib/protocol/_generated/net/server/trade_request_server_packet.py
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
class TradeRequestServerPacket(Packet):
    """
    Trade request from another player
    """
    _byte_size: int = 0
    _partner_player_id: int = None # type: ignore [assignment]
    _partner_player_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 partner_player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._partner_player_id

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

    @property
    def partner_player_name(self) -> str:
        return self._partner_player_name

    @partner_player_name.setter
    def partner_player_name(self, partner_player_name: str) -> None:
        self._partner_player_name = partner_player_name

    @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.
        """
        TradeRequestServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeRequestServerPacket): The data to serialize.
        """
        writer.add_char(138)
        if data._partner_player_id is None:
            raise SerializationError("partner_player_id must be provided.")
        writer.add_short(data._partner_player_id)
        if data._partner_player_name is None:
            raise SerializationError("partner_player_name must be provided.")
        writer.add_string(data._partner_player_name)

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

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

        Returns:
            TradeRequestServerPacket: The data to serialize.
        """
        data: TradeRequestServerPacket = TradeRequestServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.get_char()
            data._partner_player_id = reader.get_short()
            data._partner_player_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"TradeRequestServerPacket(byte_size={repr(self._byte_size)}, partner_player_id={repr(self._partner_player_id)}, partner_player_name={repr(self._partner_player_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.

partner_player_id: int property writable

Note
  • Value range is 0-64008.

partner_player_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/server/trade_request_server_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.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/server/trade_request_server_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/server/trade_request_server_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.
    """
    TradeRequestServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeRequestServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeRequestServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/trade_request_server_packet.py
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "TradeRequestServerPacket") -> None:
    """
    Serializes an instance of `TradeRequestServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeRequestServerPacket): The data to serialize.
    """
    writer.add_char(138)
    if data._partner_player_id is None:
        raise SerializationError("partner_player_id must be provided.")
    writer.add_short(data._partner_player_id)
    if data._partner_player_name is None:
        raise SerializationError("partner_player_name must be provided.")
    writer.add_string(data._partner_player_name)

deserialize(reader) staticmethod

Deserializes an instance of TradeRequestServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeRequestServerPacket TradeRequestServerPacket

The data to serialize.

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

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

    Returns:
        TradeRequestServerPacket: The data to serialize.
    """
    data: TradeRequestServerPacket = TradeRequestServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_char()
        data._partner_player_id = reader.get_short()
        data._partner_player_name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TradeReplyServerPacket

Bases: Packet

Trade updated (items changed)

Source code in src/eolib/protocol/_generated/net/server/trade_reply_server_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 TradeReplyServerPacket(Packet):
    """
    Trade updated (items changed)
    """
    _byte_size: int = 0
    _trade_data: TradeItemData = 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 trade_data(self) -> TradeItemData:
        return self._trade_data

    @trade_data.setter
    def trade_data(self, trade_data: TradeItemData) -> None:
        self._trade_data = trade_data

    @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.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.
        """
        TradeReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeReplyServerPacket): The data to serialize.
        """
        if data._trade_data is None:
            raise SerializationError("trade_data must be provided.")
        TradeItemData.serialize(writer, data._trade_data)

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

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

        Returns:
            TradeReplyServerPacket: The data to serialize.
        """
        data: TradeReplyServerPacket = TradeReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._trade_data = TradeItemData.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"TradeReplyServerPacket(byte_size={repr(self._byte_size)}, trade_data={repr(self._trade_data)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

trade_data: TradeItemData 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/server/trade_reply_server_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/server/trade_reply_server_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.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/server/trade_reply_server_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.
    """
    TradeReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/trade_reply_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "TradeReplyServerPacket") -> None:
    """
    Serializes an instance of `TradeReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeReplyServerPacket): The data to serialize.
    """
    if data._trade_data is None:
        raise SerializationError("trade_data must be provided.")
    TradeItemData.serialize(writer, data._trade_data)

deserialize(reader) staticmethod

Deserializes an instance of TradeReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeReplyServerPacket TradeReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/trade_reply_server_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) -> "TradeReplyServerPacket":
    """
    Deserializes an instance of `TradeReplyServerPacket` from the provided `EoReader`.

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

    Returns:
        TradeReplyServerPacket: The data to serialize.
    """
    data: TradeReplyServerPacket = TradeReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._trade_data = TradeItemData.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TradeOpenServerPacket

Bases: Packet

Trade window opens

Source code in src/eolib/protocol/_generated/net/server/trade_open_server_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
class TradeOpenServerPacket(Packet):
    """
    Trade window opens
    """
    _byte_size: int = 0
    _partner_player_id: int = None # type: ignore [assignment]
    _partner_player_name: str = None # type: ignore [assignment]
    _your_player_id: int = None # type: ignore [assignment]
    _your_player_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 partner_player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._partner_player_id

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

    @property
    def partner_player_name(self) -> str:
        return self._partner_player_name

    @partner_player_name.setter
    def partner_player_name(self, partner_player_name: str) -> None:
        self._partner_player_name = partner_player_name

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

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

    @property
    def your_player_name(self) -> str:
        return self._your_player_name

    @your_player_name.setter
    def your_player_name(self, your_player_name: str) -> None:
        self._your_player_name = your_player_name

    @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.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.
        """
        TradeOpenServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeOpenServerPacket): The data to serialize.
        """
        if data._partner_player_id is None:
            raise SerializationError("partner_player_id must be provided.")
        writer.add_short(data._partner_player_id)
        if data._partner_player_name is None:
            raise SerializationError("partner_player_name must be provided.")
        writer.add_string(data._partner_player_name)
        writer.add_byte(0xFF)
        if data._your_player_id is None:
            raise SerializationError("your_player_id must be provided.")
        writer.add_short(data._your_player_id)
        if data._your_player_name is None:
            raise SerializationError("your_player_name must be provided.")
        writer.add_string(data._your_player_name)
        writer.add_byte(0xFF)

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

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

        Returns:
            TradeOpenServerPacket: The data to serialize.
        """
        data: TradeOpenServerPacket = TradeOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._partner_player_id = reader.get_short()
            data._partner_player_name = reader.get_string()
            reader.next_chunk()
            data._your_player_id = reader.get_short()
            data._your_player_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"TradeOpenServerPacket(byte_size={repr(self._byte_size)}, partner_player_id={repr(self._partner_player_id)}, partner_player_name={repr(self._partner_player_name)}, your_player_id={repr(self._your_player_id)}, your_player_name={repr(self._your_player_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.

partner_player_id: int property writable

Note
  • Value range is 0-64008.

partner_player_name: str property writable

your_player_id: int property writable

Note
  • Value range is 0-64008.

your_player_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/server/trade_open_server_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.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/server/trade_open_server_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.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/server/trade_open_server_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.
    """
    TradeOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/trade_open_server_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
@staticmethod
def serialize(writer: EoWriter, data: "TradeOpenServerPacket") -> None:
    """
    Serializes an instance of `TradeOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeOpenServerPacket): The data to serialize.
    """
    if data._partner_player_id is None:
        raise SerializationError("partner_player_id must be provided.")
    writer.add_short(data._partner_player_id)
    if data._partner_player_name is None:
        raise SerializationError("partner_player_name must be provided.")
    writer.add_string(data._partner_player_name)
    writer.add_byte(0xFF)
    if data._your_player_id is None:
        raise SerializationError("your_player_id must be provided.")
    writer.add_short(data._your_player_id)
    if data._your_player_name is None:
        raise SerializationError("your_player_name must be provided.")
    writer.add_string(data._your_player_name)
    writer.add_byte(0xFF)

deserialize(reader) staticmethod

Deserializes an instance of TradeOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeOpenServerPacket TradeOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/trade_open_server_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
@staticmethod
def deserialize(reader: EoReader) -> "TradeOpenServerPacket":
    """
    Deserializes an instance of `TradeOpenServerPacket` from the provided `EoReader`.

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

    Returns:
        TradeOpenServerPacket: The data to serialize.
    """
    data: TradeOpenServerPacket = TradeOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._partner_player_id = reader.get_short()
        data._partner_player_name = reader.get_string()
        reader.next_chunk()
        data._your_player_id = reader.get_short()
        data._your_player_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

TradeCloseServerPacket

Bases: Packet

Partner closed trade window

Source code in src/eolib/protocol/_generated/net/server/trade_close_server_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 TradeCloseServerPacket(Packet):
    """
    Partner closed trade window
    """
    _byte_size: int = 0
    _partner_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 partner_player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._partner_player_id

    @partner_player_id.setter
    def partner_player_id(self, partner_player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._partner_player_id = partner_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.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.
        """
        TradeCloseServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeCloseServerPacket): The data to serialize.
        """
        if data._partner_player_id is None:
            raise SerializationError("partner_player_id must be provided.")
        writer.add_short(data._partner_player_id)

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

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

        Returns:
            TradeCloseServerPacket: The data to serialize.
        """
        data: TradeCloseServerPacket = TradeCloseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._partner_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"TradeCloseServerPacket(byte_size={repr(self._byte_size)}, partner_player_id={repr(self._partner_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.

partner_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/server/trade_close_server_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/server/trade_close_server_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.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/server/trade_close_server_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.
    """
    TradeCloseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeCloseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeCloseServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeCloseServerPacket): The data to serialize.
    """
    if data._partner_player_id is None:
        raise SerializationError("partner_player_id must be provided.")
    writer.add_short(data._partner_player_id)

deserialize(reader) staticmethod

Deserializes an instance of TradeCloseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeCloseServerPacket TradeCloseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/trade_close_server_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) -> "TradeCloseServerPacket":
    """
    Deserializes an instance of `TradeCloseServerPacket` from the provided `EoReader`.

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

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

TradeAgreeServerPacket

Bases: Packet

Partner agree state updated

Source code in src/eolib/protocol/_generated/net/server/trade_agree_server_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 TradeAgreeServerPacket(Packet):
    """
    Partner agree state updated
    """
    _byte_size: int = 0
    _partner_player_id: int = None # type: ignore [assignment]
    _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 partner_player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._partner_player_id

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

    @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.
        """
        TradeAgreeServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeAgreeServerPacket): The data to serialize.
        """
        if data._partner_player_id is None:
            raise SerializationError("partner_player_id must be provided.")
        writer.add_short(data._partner_player_id)
        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) -> "TradeAgreeServerPacket":
        """
        Deserializes an instance of `TradeAgreeServerPacket` from the provided `EoReader`.

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

        Returns:
            TradeAgreeServerPacket: The data to serialize.
        """
        data: TradeAgreeServerPacket = TradeAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._partner_player_id = reader.get_short()
            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"TradeAgreeServerPacket(byte_size={repr(self._byte_size)}, partner_player_id={repr(self._partner_player_id)}, 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.

partner_player_id: int property writable

Note
  • Value range is 0-64008.

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/server/trade_agree_server_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.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/server/trade_agree_server_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.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/server/trade_agree_server_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.
    """
    TradeAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeAgreeServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeAgreeServerPacket): The data to serialize.
    """
    if data._partner_player_id is None:
        raise SerializationError("partner_player_id must be provided.")
    writer.add_short(data._partner_player_id)
    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 TradeAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeAgreeServerPacket TradeAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/trade_agree_server_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) -> "TradeAgreeServerPacket":
    """
    Deserializes an instance of `TradeAgreeServerPacket` from the provided `EoReader`.

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

    Returns:
        TradeAgreeServerPacket: The data to serialize.
    """
    data: TradeAgreeServerPacket = TradeAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._partner_player_id = reader.get_short()
        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

TradeAdminServerPacket

Bases: Packet

Trade updated (items changed while trade was accepted)

Source code in src/eolib/protocol/_generated/net/server/trade_admin_server_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 TradeAdminServerPacket(Packet):
    """
    Trade updated (items changed while trade was accepted)
    """
    _byte_size: int = 0
    _trade_data: TradeItemData = 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 trade_data(self) -> TradeItemData:
        return self._trade_data

    @trade_data.setter
    def trade_data(self, trade_data: TradeItemData) -> None:
        self._trade_data = trade_data

    @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.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.
        """
        TradeAdminServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TradeAdminServerPacket): The data to serialize.
        """
        if data._trade_data is None:
            raise SerializationError("trade_data must be provided.")
        TradeItemData.serialize(writer, data._trade_data)

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

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

        Returns:
            TradeAdminServerPacket: The data to serialize.
        """
        data: TradeAdminServerPacket = TradeAdminServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._trade_data = TradeItemData.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"TradeAdminServerPacket(byte_size={repr(self._byte_size)}, trade_data={repr(self._trade_data)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

trade_data: TradeItemData 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/server/trade_admin_server_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/server/trade_admin_server_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/server/trade_admin_server_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.
    """
    TradeAdminServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TradeAdminServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TradeAdminServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/trade_admin_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "TradeAdminServerPacket") -> None:
    """
    Serializes an instance of `TradeAdminServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TradeAdminServerPacket): The data to serialize.
    """
    if data._trade_data is None:
        raise SerializationError("trade_data must be provided.")
    TradeItemData.serialize(writer, data._trade_data)

deserialize(reader) staticmethod

Deserializes an instance of TradeAdminServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TradeAdminServerPacket TradeAdminServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/trade_admin_server_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) -> "TradeAdminServerPacket":
    """
    Deserializes an instance of `TradeAdminServerPacket` from the provided `EoReader`.

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

    Returns:
        TradeAdminServerPacket: The data to serialize.
    """
    data: TradeAdminServerPacket = TradeAdminServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._trade_data = TradeItemData.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkTellServerPacket

Bases: Packet

Private chat message

Source code in src/eolib/protocol/_generated/net/server/talk_tell_server_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 TalkTellServerPacket(Packet):
    """
    Private chat message
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_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.
        """
        TalkTellServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkTellServerPacket): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_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) -> "TalkTellServerPacket":
        """
        Deserializes an instance of `TalkTellServerPacket` from the provided `EoReader`.

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

        Returns:
            TalkTellServerPacket: The data to serialize.
        """
        data: TalkTellServerPacket = TalkTellServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._player_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"TalkTellServerPacket(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_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/server/talk_tell_server_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/server/talk_tell_server_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/server/talk_tell_server_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.
    """
    TalkTellServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkTellServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkTellServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkTellServerPacket): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_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 TalkTellServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkTellServerPacket TalkTellServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_tell_server_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) -> "TalkTellServerPacket":
    """
    Deserializes an instance of `TalkTellServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkTellServerPacket: The data to serialize.
    """
    data: TalkTellServerPacket = TalkTellServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._player_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

TalkSpecServerPacket

Bases: Packet

Temporary mute applied

Source code in src/eolib/protocol/_generated/net/server/talk_spec_server_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 TalkSpecServerPacket(Packet):
    """
    Temporary mute applied
    """
    _byte_size: int = 0
    _admin_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 admin_name(self) -> str:
        return self._admin_name

    @admin_name.setter
    def admin_name(self, admin_name: str) -> None:
        self._admin_name = admin_name

    @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.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.
        """
        TalkSpecServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkSpecServerPacket): The data to serialize.
        """
        if data._admin_name is None:
            raise SerializationError("admin_name must be provided.")
        writer.add_string(data._admin_name)

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

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

        Returns:
            TalkSpecServerPacket: The data to serialize.
        """
        data: TalkSpecServerPacket = TalkSpecServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._admin_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"TalkSpecServerPacket(byte_size={repr(self._byte_size)}, admin_name={repr(self._admin_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.

admin_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/server/talk_spec_server_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/server/talk_spec_server_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.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/server/talk_spec_server_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.
    """
    TalkSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/talk_spec_server_packet.py
67
68
69
70
71
72
73
74
75
76
77
78
@staticmethod
def serialize(writer: EoWriter, data: "TalkSpecServerPacket") -> None:
    """
    Serializes an instance of `TalkSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkSpecServerPacket): The data to serialize.
    """
    if data._admin_name is None:
        raise SerializationError("admin_name must be provided.")
    writer.add_string(data._admin_name)

deserialize(reader) staticmethod

Deserializes an instance of TalkSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkSpecServerPacket TalkSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_spec_server_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) -> "TalkSpecServerPacket":
    """
    Deserializes an instance of `TalkSpecServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkSpecServerPacket: The data to serialize.
    """
    data: TalkSpecServerPacket = TalkSpecServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._admin_name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkServerServerPacket

Bases: Packet

Server message

Source code in src/eolib/protocol/_generated/net/server/talk_server_server_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 TalkServerServerPacket(Packet):
    """
    Server 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.Server

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkServerServerPacket): 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) -> "TalkServerServerPacket":
        """
        Deserializes an instance of `TalkServerServerPacket` from the provided `EoReader`.

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

        Returns:
            TalkServerServerPacket: The data to serialize.
        """
        data: TalkServerServerPacket = TalkServerServerPacket()
        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"TalkServerServerPacket(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/server/talk_server_server_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/server/talk_server_server_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.Server

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/server/talk_server_server_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.
    """
    TalkServerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkServerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkServerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/talk_server_server_packet.py
67
68
69
70
71
72
73
74
75
76
77
78
@staticmethod
def serialize(writer: EoWriter, data: "TalkServerServerPacket") -> None:
    """
    Serializes an instance of `TalkServerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkServerServerPacket): 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 TalkServerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkServerServerPacket TalkServerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_server_server_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) -> "TalkServerServerPacket":
    """
    Deserializes an instance of `TalkServerServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkServerServerPacket: The data to serialize.
    """
    data: TalkServerServerPacket = TalkServerServerPacket()
    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

TalkRequestServerPacket

Bases: Packet

Guild chat message

Source code in src/eolib/protocol/_generated/net/server/talk_request_server_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 TalkRequestServerPacket(Packet):
    """
    Guild chat message
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_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.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.
        """
        TalkRequestServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkRequestServerPacket): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_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) -> "TalkRequestServerPacket":
        """
        Deserializes an instance of `TalkRequestServerPacket` from the provided `EoReader`.

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

        Returns:
            TalkRequestServerPacket: The data to serialize.
        """
        data: TalkRequestServerPacket = TalkRequestServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._player_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"TalkRequestServerPacket(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_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/server/talk_request_server_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/server/talk_request_server_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/server/talk_request_server_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.
    """
    TalkRequestServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkRequestServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkRequestServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkRequestServerPacket): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_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 TalkRequestServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkRequestServerPacket TalkRequestServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_request_server_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) -> "TalkRequestServerPacket":
    """
    Deserializes an instance of `TalkRequestServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkRequestServerPacket: The data to serialize.
    """
    data: TalkRequestServerPacket = TalkRequestServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._player_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

TalkReply

Bases: IntEnum

Reply code sent with TALK_REPLY packet

Source code in src/eolib/protocol/_generated/net/server/talk_reply.py
 9
10
11
12
13
class TalkReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with TALK_REPLY packet
    """
    NotFound = 1

NotFound = 1 class-attribute instance-attribute

TalkReplyServerPacket

Bases: Packet

Reply to trying to send a private message

Source code in src/eolib/protocol/_generated/net/server/talk_reply_server_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
class TalkReplyServerPacket(Packet):
    """
    Reply to trying to send a private message
    """
    _byte_size: int = 0
    _reply_code: TalkReply = 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 reply_code(self) -> TalkReply:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: TalkReply) -> None:
        self._reply_code = reply_code

    @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.Talk

    @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.
        """
        TalkReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_short(int(data._reply_code))
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)

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

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

        Returns:
            TalkReplyServerPacket: The data to serialize.
        """
        data: TalkReplyServerPacket = TalkReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = TalkReply(reader.get_short())
            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"TalkReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, 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.

reply_code: TalkReply property writable

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/server/talk_reply_server_packet.py
48
49
50
51
52
53
54
55
56
@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/server/talk_reply_server_packet.py
58
59
60
61
62
63
64
65
66
@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/server/talk_reply_server_packet.py
68
69
70
71
72
73
74
75
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of TalkReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/talk_reply_server_packet.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@staticmethod
def serialize(writer: EoWriter, data: "TalkReplyServerPacket") -> None:
    """
    Serializes an instance of `TalkReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_short(int(data._reply_code))
    if data._name is None:
        raise SerializationError("name must be provided.")
    writer.add_string(data._name)

deserialize(reader) staticmethod

Deserializes an instance of TalkReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkReplyServerPacket TalkReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_reply_server_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 deserialize(reader: EoReader) -> "TalkReplyServerPacket":
    """
    Deserializes an instance of `TalkReplyServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkReplyServerPacket: The data to serialize.
    """
    data: TalkReplyServerPacket = TalkReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._reply_code = TalkReply(reader.get_short())
        data._name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkPlayerServerPacket

Bases: Packet

Public chat message

Source code in src/eolib/protocol/_generated/net/server/talk_player_server_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 TalkPlayerServerPacket(Packet):
    """
    Public chat message
    """
    _byte_size: int = 0
    _player_id: int = 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 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

    @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.
        """
        TalkPlayerServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkPlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

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

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

        Returns:
            TalkPlayerServerPacket: The data to serialize.
        """
        data: TalkPlayerServerPacket = TalkPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"TalkPlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/talk_player_server_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.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/server/talk_player_server_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.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/server/talk_player_server_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.
    """
    TalkPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkPlayerServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkPlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

deserialize(reader) staticmethod

Deserializes an instance of TalkPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkPlayerServerPacket TalkPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_player_server_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) -> "TalkPlayerServerPacket":
    """
    Deserializes an instance of `TalkPlayerServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkPlayerServerPacket: The data to serialize.
    """
    data: TalkPlayerServerPacket = TalkPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkOpenServerPacket

Bases: Packet

Party chat message

Source code in src/eolib/protocol/_generated/net/server/talk_open_server_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 TalkOpenServerPacket(Packet):
    """
    Party chat message
    """
    _byte_size: int = 0
    _player_id: int = 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 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

    @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.
        """
        TalkOpenServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkOpenServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

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

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

        Returns:
            TalkOpenServerPacket: The data to serialize.
        """
        data: TalkOpenServerPacket = TalkOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"TalkOpenServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/talk_open_server_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.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/server/talk_open_server_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.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/server/talk_open_server_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.
    """
    TalkOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkOpenServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkOpenServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

deserialize(reader) staticmethod

Deserializes an instance of TalkOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkOpenServerPacket TalkOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_open_server_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) -> "TalkOpenServerPacket":
    """
    Deserializes an instance of `TalkOpenServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkOpenServerPacket: The data to serialize.
    """
    data: TalkOpenServerPacket = TalkOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

TalkMsgServerPacket

Bases: Packet

Global chat message

Source code in src/eolib/protocol/_generated/net/server/talk_msg_server_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 TalkMsgServerPacket(Packet):
    """
    Global chat message
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_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.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.
        """
        TalkMsgServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkMsgServerPacket): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_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) -> "TalkMsgServerPacket":
        """
        Deserializes an instance of `TalkMsgServerPacket` from the provided `EoReader`.

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

        Returns:
            TalkMsgServerPacket: The data to serialize.
        """
        data: TalkMsgServerPacket = TalkMsgServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._player_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"TalkMsgServerPacket(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_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/server/talk_msg_server_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/server/talk_msg_server_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.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/server/talk_msg_server_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.
    """
    TalkMsgServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkMsgServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkMsgServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkMsgServerPacket): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_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 TalkMsgServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkMsgServerPacket TalkMsgServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_msg_server_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) -> "TalkMsgServerPacket":
    """
    Deserializes an instance of `TalkMsgServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkMsgServerPacket: The data to serialize.
    """
    data: TalkMsgServerPacket = TalkMsgServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._player_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

GlobalBackfillMessage

A backfilled global chat message

Source code in src/eolib/protocol/_generated/net/server/global_backfill_message.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
class GlobalBackfillMessage:
    """
    A backfilled global chat message
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_name

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

    @message.setter
    def message(self, message: str) -> None:
        self._message = message

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GlobalBackfillMessage): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_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) -> "GlobalBackfillMessage":
        """
        Deserializes an instance of `GlobalBackfillMessage` from the provided `EoReader`.

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

        Returns:
            GlobalBackfillMessage: The data to serialize.
        """
        data: GlobalBackfillMessage = GlobalBackfillMessage()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._player_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"GlobalBackfillMessage(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_name: str property writable

message: str property writable

serialize(writer, data) staticmethod

Serializes an instance of GlobalBackfillMessage to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GlobalBackfillMessage

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/global_backfill_message.py
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@staticmethod
def serialize(writer: EoWriter, data: "GlobalBackfillMessage") -> None:
    """
    Serializes an instance of `GlobalBackfillMessage` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GlobalBackfillMessage): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_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 GlobalBackfillMessage from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GlobalBackfillMessage GlobalBackfillMessage

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/global_backfill_message.py
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@staticmethod
def deserialize(reader: EoReader) -> "GlobalBackfillMessage":
    """
    Deserializes an instance of `GlobalBackfillMessage` from the provided `EoReader`.

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

    Returns:
        GlobalBackfillMessage: The data to serialize.
    """
    data: GlobalBackfillMessage = GlobalBackfillMessage()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._player_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

TalkListServerPacket

Bases: Packet

Global chat backfill. Sent by the official game server when a player opens the global chat tab.

Source code in src/eolib/protocol/_generated/net/server/talk_list_server_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
class TalkListServerPacket(Packet):
    """
    Global chat backfill.
    Sent by the official game server when a player opens the global chat tab.
    """
    _byte_size: int = 0
    _messages: list[GlobalBackfillMessage] = 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 messages(self) -> list[GlobalBackfillMessage]:
        return self._messages

    @messages.setter
    def messages(self, messages: list[GlobalBackfillMessage]) -> None:
        self._messages = messages

    @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.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.
        """
        TalkListServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkListServerPacket): The data to serialize.
        """
        if data._messages is None:
            raise SerializationError("messages must be provided.")
        for i in range(len(data._messages)):
            if i > 0:
                writer.add_byte(0xFF)
            GlobalBackfillMessage.serialize(writer, data._messages[i])

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

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

        Returns:
            TalkListServerPacket: The data to serialize.
        """
        data: TalkListServerPacket = TalkListServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._messages = []
            while reader.remaining > 0:
                data._messages.append(GlobalBackfillMessage.deserialize(reader))
                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"TalkListServerPacket(byte_size={repr(self._byte_size)}, messages={repr(self._messages)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

messages: list[GlobalBackfillMessage] 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/server/talk_list_server_packet.py
41
42
43
44
45
46
47
48
49
@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/server/talk_list_server_packet.py
51
52
53
54
55
56
57
58
59
@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/server/talk_list_server_packet.py
61
62
63
64
65
66
67
68
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of TalkListServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkListServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkListServerPacket): The data to serialize.
    """
    if data._messages is None:
        raise SerializationError("messages must be provided.")
    for i in range(len(data._messages)):
        if i > 0:
            writer.add_byte(0xFF)
        GlobalBackfillMessage.serialize(writer, data._messages[i])

deserialize(reader) staticmethod

Deserializes an instance of TalkListServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkListServerPacket 'TalkListServerPacket'

The data to serialize.

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

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

    Returns:
        TalkListServerPacket: The data to serialize.
    """
    data: TalkListServerPacket = TalkListServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._messages = []
        while reader.remaining > 0:
            data._messages.append(GlobalBackfillMessage.deserialize(reader))
            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

TalkAnnounceServerPacket

Bases: Packet

Admin announcement

Source code in src/eolib/protocol/_generated/net/server/talk_announce_server_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 TalkAnnounceServerPacket(Packet):
    """
    Admin announcement
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_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.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.
        """
        TalkAnnounceServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkAnnounceServerPacket): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_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) -> "TalkAnnounceServerPacket":
        """
        Deserializes an instance of `TalkAnnounceServerPacket` from the provided `EoReader`.

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

        Returns:
            TalkAnnounceServerPacket: The data to serialize.
        """
        data: TalkAnnounceServerPacket = TalkAnnounceServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._player_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"TalkAnnounceServerPacket(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_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/server/talk_announce_server_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/server/talk_announce_server_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.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/server/talk_announce_server_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.
    """
    TalkAnnounceServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkAnnounceServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkAnnounceServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkAnnounceServerPacket): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_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 TalkAnnounceServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkAnnounceServerPacket TalkAnnounceServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_announce_server_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) -> "TalkAnnounceServerPacket":
    """
    Deserializes an instance of `TalkAnnounceServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkAnnounceServerPacket: The data to serialize.
    """
    data: TalkAnnounceServerPacket = TalkAnnounceServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._player_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

TalkAdminServerPacket

Bases: Packet

Admin chat message

Source code in src/eolib/protocol/_generated/net/server/talk_admin_server_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 TalkAdminServerPacket(Packet):
    """
    Admin chat message
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_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.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.
        """
        TalkAdminServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (TalkAdminServerPacket): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_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) -> "TalkAdminServerPacket":
        """
        Deserializes an instance of `TalkAdminServerPacket` from the provided `EoReader`.

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

        Returns:
            TalkAdminServerPacket: The data to serialize.
        """
        data: TalkAdminServerPacket = TalkAdminServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._player_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"TalkAdminServerPacket(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_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/server/talk_admin_server_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/server/talk_admin_server_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.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/server/talk_admin_server_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.
    """
    TalkAdminServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of TalkAdminServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data TalkAdminServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (TalkAdminServerPacket): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_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 TalkAdminServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
TalkAdminServerPacket TalkAdminServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/talk_admin_server_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) -> "TalkAdminServerPacket":
    """
    Deserializes an instance of `TalkAdminServerPacket` from the provided `EoReader`.

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

    Returns:
        TalkAdminServerPacket: The data to serialize.
    """
    data: TalkAdminServerPacket = TalkAdminServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._player_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

StatSkillTakeServerPacket

Bases: Packet

Response from learning a skill from a skill master

Source code in src/eolib/protocol/_generated/net/server/stat_skill_take_server_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 StatSkillTakeServerPacket(Packet):
    """
    Response from learning a skill from a skill master
    """
    _byte_size: int = 0
    _spell_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 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 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.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.
        """
        StatSkillTakeServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillTakeServerPacket): 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._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)

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

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

        Returns:
            StatSkillTakeServerPacket: The data to serialize.
        """
        data: StatSkillTakeServerPacket = StatSkillTakeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._spell_id = reader.get_short()
            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"StatSkillTakeServerPacket(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_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.

spell_id: int property writable

Note
  • Value range is 0-64008.

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/server/stat_skill_take_server_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/server/stat_skill_take_server_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/server/stat_skill_take_server_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.
    """
    StatSkillTakeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillTakeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillTakeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/stat_skill_take_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillTakeServerPacket") -> None:
    """
    Serializes an instance of `StatSkillTakeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillTakeServerPacket): 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._gold_amount is None:
        raise SerializationError("gold_amount must be provided.")
    writer.add_int(data._gold_amount)

deserialize(reader) staticmethod

Deserializes an instance of StatSkillTakeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillTakeServerPacket StatSkillTakeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_take_server_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) -> "StatSkillTakeServerPacket":
    """
    Deserializes an instance of `StatSkillTakeServerPacket` from the provided `EoReader`.

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

    Returns:
        StatSkillTakeServerPacket: The data to serialize.
    """
    data: StatSkillTakeServerPacket = StatSkillTakeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._spell_id = reader.get_short()
        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

SkillMasterReply

Bases: IntEnum

Reply code sent with STATSKILL_REPLY packet. Indicates why an action was unsuccessful.

Source code in src/eolib/protocol/_generated/net/server/skill_master_reply.py
 9
10
11
12
13
14
15
class SkillMasterReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with STATSKILL_REPLY packet.
    Indicates why an action was unsuccessful.
    """
    RemoveItems = 1
    WrongClass = 2

RemoveItems = 1 class-attribute instance-attribute

WrongClass = 2 class-attribute instance-attribute

StatSkillReplyServerPacket

Bases: Packet

Response from unsuccessful action at a skill master

Source code in src/eolib/protocol/_generated/net/server/stat_skill_reply_server_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
class StatSkillReplyServerPacket(Packet):
    """
    Response from unsuccessful action at a skill master
    """
    _byte_size: int = 0
    _reply_code: SkillMasterReply = None # type: ignore [assignment]
    _reply_code_data: 'StatSkillReplyServerPacket.ReplyCodeData' = 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 reply_code(self) -> SkillMasterReply:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: SkillMasterReply) -> None:
        self._reply_code = reply_code

    @property
    def reply_code_data(self) -> 'StatSkillReplyServerPacket.ReplyCodeData':
        """
        StatSkillReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the `reply_code` field.
        """
        return self._reply_code_data

    @reply_code_data.setter
    def reply_code_data(self, reply_code_data: 'StatSkillReplyServerPacket.ReplyCodeData') -> None:
        self._reply_code_data = reply_code_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.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.
        """
        StatSkillReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_short(int(data._reply_code))
        if data._reply_code == SkillMasterReply.WrongClass:
            if not isinstance(data._reply_code_data, StatSkillReplyServerPacket.ReplyCodeDataWrongClass):
                raise SerializationError("Expected reply_code_data to be type StatSkillReplyServerPacket.ReplyCodeDataWrongClass for reply_code " + SkillMasterReply(data._reply_code).name + ".")
            StatSkillReplyServerPacket.ReplyCodeDataWrongClass.serialize(writer, data._reply_code_data)

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

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

        Returns:
            StatSkillReplyServerPacket: The data to serialize.
        """
        data: StatSkillReplyServerPacket = StatSkillReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = SkillMasterReply(reader.get_short())
            if data._reply_code == SkillMasterReply.WrongClass:
                data._reply_code_data = StatSkillReplyServerPacket.ReplyCodeDataWrongClass.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"StatSkillReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, reply_code_data={repr(self._reply_code_data)})"

    ReplyCodeData = Union['StatSkillReplyServerPacket.ReplyCodeDataWrongClass', None]
    ReplyCodeData.__doc__ = \
        """
        Data associated with different values of the `reply_code` field.
        """

    class ReplyCodeDataWrongClass:
        """
        Data associated with reply_code value SkillMasterReply.WrongClass
        """
        _byte_size: int = 0
        _class_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 class_id(self) -> int:
            """
            Note:
              - Value range is 0-252.
            """
            return self._class_id

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

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (StatSkillReplyServerPacket.ReplyCodeDataWrongClass): The data to serialize.
            """
            if data._class_id is None:
                raise SerializationError("class_id must be provided.")
            writer.add_char(data._class_id)

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

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

            Returns:
                StatSkillReplyServerPacket.ReplyCodeDataWrongClass: The data to serialize.
            """
            data: StatSkillReplyServerPacket.ReplyCodeDataWrongClass = StatSkillReplyServerPacket.ReplyCodeDataWrongClass()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._class_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"StatSkillReplyServerPacket.ReplyCodeDataWrongClass(byte_size={repr(self._byte_size)}, class_id={repr(self._class_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.

reply_code: SkillMasterReply property writable

reply_code_data: StatSkillReplyServerPacket.ReplyCodeData property writable

StatSkillReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the reply_code field.

ReplyCodeData = Union['StatSkillReplyServerPacket.ReplyCodeDataWrongClass', None] class-attribute instance-attribute

ReplyCodeDataWrongClass

Data associated with reply_code value SkillMasterReply.WrongClass

Source code in src/eolib/protocol/_generated/net/server/stat_skill_reply_server_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
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
class ReplyCodeDataWrongClass:
    """
    Data associated with reply_code value SkillMasterReply.WrongClass
    """
    _byte_size: int = 0
    _class_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 class_id(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._class_id

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillReplyServerPacket.ReplyCodeDataWrongClass): The data to serialize.
        """
        if data._class_id is None:
            raise SerializationError("class_id must be provided.")
        writer.add_char(data._class_id)

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

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

        Returns:
            StatSkillReplyServerPacket.ReplyCodeDataWrongClass: The data to serialize.
        """
        data: StatSkillReplyServerPacket.ReplyCodeDataWrongClass = StatSkillReplyServerPacket.ReplyCodeDataWrongClass()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._class_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"StatSkillReplyServerPacket.ReplyCodeDataWrongClass(byte_size={repr(self._byte_size)}, class_id={repr(self._class_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.

class_id: int property writable

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of StatSkillReplyServerPacket.ReplyCodeDataWrongClass to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataWrongClass

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/stat_skill_reply_server_packet.py
163
164
165
166
167
168
169
170
171
172
173
174
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillReplyServerPacket.ReplyCodeDataWrongClass") -> None:
    """
    Serializes an instance of `StatSkillReplyServerPacket.ReplyCodeDataWrongClass` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillReplyServerPacket.ReplyCodeDataWrongClass): The data to serialize.
    """
    if data._class_id is None:
        raise SerializationError("class_id must be provided.")
    writer.add_char(data._class_id)

deserialize(reader) staticmethod

Deserializes an instance of StatSkillReplyServerPacket.ReplyCodeDataWrongClass from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataWrongClass

StatSkillReplyServerPacket.ReplyCodeDataWrongClass: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_reply_server_packet.py
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillReplyServerPacket.ReplyCodeDataWrongClass":
    """
    Deserializes an instance of `StatSkillReplyServerPacket.ReplyCodeDataWrongClass` from the provided `EoReader`.

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

    Returns:
        StatSkillReplyServerPacket.ReplyCodeDataWrongClass: The data to serialize.
    """
    data: StatSkillReplyServerPacket.ReplyCodeDataWrongClass = StatSkillReplyServerPacket.ReplyCodeDataWrongClass()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._class_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/server/stat_skill_reply_server_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/stat_skill_reply_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/stat_skill_reply_server_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of StatSkillReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillReplyServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_short(int(data._reply_code))
    if data._reply_code == SkillMasterReply.WrongClass:
        if not isinstance(data._reply_code_data, StatSkillReplyServerPacket.ReplyCodeDataWrongClass):
            raise SerializationError("Expected reply_code_data to be type StatSkillReplyServerPacket.ReplyCodeDataWrongClass for reply_code " + SkillMasterReply(data._reply_code).name + ".")
        StatSkillReplyServerPacket.ReplyCodeDataWrongClass.serialize(writer, data._reply_code_data)

deserialize(reader) staticmethod

Deserializes an instance of StatSkillReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillReplyServerPacket StatSkillReplyServerPacket

The data to serialize.

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

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

    Returns:
        StatSkillReplyServerPacket: The data to serialize.
    """
    data: StatSkillReplyServerPacket = StatSkillReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._reply_code = SkillMasterReply(reader.get_short())
        if data._reply_code == SkillMasterReply.WrongClass:
            data._reply_code_data = StatSkillReplyServerPacket.ReplyCodeDataWrongClass.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillRemoveServerPacket

Bases: Packet

Response to forgetting a skill at a skill master

Source code in src/eolib/protocol/_generated/net/server/stat_skill_remove_server_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 StatSkillRemoveServerPacket(Packet):
    """
    Response to forgetting a skill at a skill master
    """
    _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 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.
        """
        StatSkillRemoveServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillRemoveServerPacket): 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) -> "StatSkillRemoveServerPacket":
        """
        Deserializes an instance of `StatSkillRemoveServerPacket` from the provided `EoReader`.

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

        Returns:
            StatSkillRemoveServerPacket: The data to serialize.
        """
        data: StatSkillRemoveServerPacket = StatSkillRemoveServerPacket()
        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"StatSkillRemoveServerPacket(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.

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/server/stat_skill_remove_server_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/server/stat_skill_remove_server_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/server/stat_skill_remove_server_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.
    """
    StatSkillRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillRemoveServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillRemoveServerPacket): 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 StatSkillRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillRemoveServerPacket StatSkillRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_remove_server_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) -> "StatSkillRemoveServerPacket":
    """
    Deserializes an instance of `StatSkillRemoveServerPacket` from the provided `EoReader`.

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

    Returns:
        StatSkillRemoveServerPacket: The data to serialize.
    """
    data: StatSkillRemoveServerPacket = StatSkillRemoveServerPacket()
    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

CharacterStatsUpdate

Character stats data. Sent when stats are updated.

Source code in src/eolib/protocol/_generated/net/server/character_stats_update.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
class CharacterStatsUpdate:
    """
    Character stats data.
    Sent when stats are updated.
    """
    _byte_size: int = 0
    _base_stats: CharacterBaseStats = None # type: ignore [assignment]
    _max_hp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _max_sp: int = None # type: ignore [assignment]
    _max_weight: int = None # type: ignore [assignment]
    _secondary_stats: CharacterSecondaryStats = 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 base_stats(self) -> CharacterBaseStats:
        return self._base_stats

    @base_stats.setter
    def base_stats(self, base_stats: CharacterBaseStats) -> None:
        self._base_stats = base_stats

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

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

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

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

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

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

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

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

    @property
    def secondary_stats(self) -> CharacterSecondaryStats:
        return self._secondary_stats

    @secondary_stats.setter
    def secondary_stats(self, secondary_stats: CharacterSecondaryStats) -> None:
        self._secondary_stats = secondary_stats

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterStatsUpdate): The data to serialize.
        """
        if data._base_stats is None:
            raise SerializationError("base_stats must be provided.")
        CharacterBaseStats.serialize(writer, data._base_stats)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._max_sp is None:
            raise SerializationError("max_sp must be provided.")
        writer.add_short(data._max_sp)
        if data._max_weight is None:
            raise SerializationError("max_weight must be provided.")
        writer.add_short(data._max_weight)
        if data._secondary_stats is None:
            raise SerializationError("secondary_stats must be provided.")
        CharacterSecondaryStats.serialize(writer, data._secondary_stats)

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

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

        Returns:
            CharacterStatsUpdate: The data to serialize.
        """
        data: CharacterStatsUpdate = CharacterStatsUpdate()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._base_stats = CharacterBaseStats.deserialize(reader)
            data._max_hp = reader.get_short()
            data._max_tp = reader.get_short()
            data._max_sp = reader.get_short()
            data._max_weight = reader.get_short()
            data._secondary_stats = CharacterSecondaryStats.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"CharacterStatsUpdate(byte_size={repr(self._byte_size)}, base_stats={repr(self._base_stats)}, max_hp={repr(self._max_hp)}, max_tp={repr(self._max_tp)}, max_sp={repr(self._max_sp)}, max_weight={repr(self._max_weight)}, secondary_stats={repr(self._secondary_stats)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

base_stats: CharacterBaseStats property writable

max_hp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

max_sp: int property writable

Note
  • Value range is 0-64008.

max_weight: int property writable

Note
  • Value range is 0-64008.

secondary_stats: CharacterSecondaryStats property writable

serialize(writer, data) staticmethod

Serializes an instance of CharacterStatsUpdate to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterStatsUpdate

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_stats_update.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 serialize(writer: EoWriter, data: "CharacterStatsUpdate") -> None:
    """
    Serializes an instance of `CharacterStatsUpdate` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterStatsUpdate): The data to serialize.
    """
    if data._base_stats is None:
        raise SerializationError("base_stats must be provided.")
    CharacterBaseStats.serialize(writer, data._base_stats)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._max_sp is None:
        raise SerializationError("max_sp must be provided.")
    writer.add_short(data._max_sp)
    if data._max_weight is None:
        raise SerializationError("max_weight must be provided.")
    writer.add_short(data._max_weight)
    if data._secondary_stats is None:
        raise SerializationError("secondary_stats must be provided.")
    CharacterSecondaryStats.serialize(writer, data._secondary_stats)

deserialize(reader) staticmethod

Deserializes an instance of CharacterStatsUpdate from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterStatsUpdate CharacterStatsUpdate

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_stats_update.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
@staticmethod
def deserialize(reader: EoReader) -> "CharacterStatsUpdate":
    """
    Deserializes an instance of `CharacterStatsUpdate` from the provided `EoReader`.

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

    Returns:
        CharacterStatsUpdate: The data to serialize.
    """
    data: CharacterStatsUpdate = CharacterStatsUpdate()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._base_stats = CharacterBaseStats.deserialize(reader)
        data._max_hp = reader.get_short()
        data._max_tp = reader.get_short()
        data._max_sp = reader.get_short()
        data._max_weight = reader.get_short()
        data._secondary_stats = CharacterSecondaryStats.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillPlayerServerPacket

Bases: Packet

Response to spending stat points

Source code in src/eolib/protocol/_generated/net/server/stat_skill_player_server_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 StatSkillPlayerServerPacket(Packet):
    """
    Response to spending stat points
    """
    _byte_size: int = 0
    _stat_points: int = None # type: ignore [assignment]
    _stats: CharacterStatsUpdate = 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_points(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._stat_points

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

    @property
    def stats(self) -> CharacterStatsUpdate:
        return self._stats

    @stats.setter
    def stats(self, stats: CharacterStatsUpdate) -> None:
        self._stats = stats

    @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.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.
        """
        StatSkillPlayerServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillPlayerServerPacket): The data to serialize.
        """
        if data._stat_points is None:
            raise SerializationError("stat_points must be provided.")
        writer.add_short(data._stat_points)
        if data._stats is None:
            raise SerializationError("stats must be provided.")
        CharacterStatsUpdate.serialize(writer, data._stats)

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

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

        Returns:
            StatSkillPlayerServerPacket: The data to serialize.
        """
        data: StatSkillPlayerServerPacket = StatSkillPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._stat_points = reader.get_short()
            data._stats = CharacterStatsUpdate.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"StatSkillPlayerServerPacket(byte_size={repr(self._byte_size)}, stat_points={repr(self._stat_points)}, stats={repr(self._stats)})"

byte_size: int property

Returns the size 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_points: int property writable

Note
  • Value range is 0-64008.

stats: CharacterStatsUpdate 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/server/stat_skill_player_server_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

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

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_player_server_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.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/server/stat_skill_player_server_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.
    """
    StatSkillPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/stat_skill_player_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillPlayerServerPacket") -> None:
    """
    Serializes an instance of `StatSkillPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillPlayerServerPacket): The data to serialize.
    """
    if data._stat_points is None:
        raise SerializationError("stat_points must be provided.")
    writer.add_short(data._stat_points)
    if data._stats is None:
        raise SerializationError("stats must be provided.")
    CharacterStatsUpdate.serialize(writer, data._stats)

deserialize(reader) staticmethod

Deserializes an instance of StatSkillPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillPlayerServerPacket StatSkillPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_player_server_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) -> "StatSkillPlayerServerPacket":
    """
    Deserializes an instance of `StatSkillPlayerServerPacket` from the provided `EoReader`.

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

    Returns:
        StatSkillPlayerServerPacket: The data to serialize.
    """
    data: StatSkillPlayerServerPacket = StatSkillPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._stat_points = reader.get_short()
        data._stats = CharacterStatsUpdate.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SkillLearn

A skill that can be learned from a skill master NPC

Source code in src/eolib/protocol/_generated/net/server/skill_learn.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
class SkillLearn:
    """
    A skill that can be learned from a skill master NPC
    """
    _byte_size: int = 0
    _id: int = None # type: ignore [assignment]
    _level_requirement: int = None # type: ignore [assignment]
    _class_requirement: int = None # type: ignore [assignment]
    _cost: int = None # type: ignore [assignment]
    _skill_requirements: list[int] = None # type: ignore [assignment]
    _stat_requirements: CharacterBaseStats = 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 level_requirement(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._level_requirement

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

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

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

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

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

    @property
    def skill_requirements(self) -> list[int]:
        """
        Note:
          - Length must be `4`.
          - Element value range is 0-64008.
        """
        return self._skill_requirements

    @skill_requirements.setter
    def skill_requirements(self, skill_requirements: list[int]) -> None:
        """
        Note:
          - Length must be `4`.
          - Element value range is 0-64008.
        """
        self._skill_requirements = skill_requirements

    @property
    def stat_requirements(self) -> CharacterBaseStats:
        return self._stat_requirements

    @stat_requirements.setter
    def stat_requirements(self, stat_requirements: CharacterBaseStats) -> None:
        self._stat_requirements = stat_requirements

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SkillLearn): The data to serialize.
        """
        if data._id is None:
            raise SerializationError("id must be provided.")
        writer.add_short(data._id)
        if data._level_requirement is None:
            raise SerializationError("level_requirement must be provided.")
        writer.add_char(data._level_requirement)
        if data._class_requirement is None:
            raise SerializationError("class_requirement must be provided.")
        writer.add_char(data._class_requirement)
        if data._cost is None:
            raise SerializationError("cost must be provided.")
        writer.add_int(data._cost)
        if data._skill_requirements is None:
            raise SerializationError("skill_requirements must be provided.")
        if len(data._skill_requirements) != 4:
            raise SerializationError(f"Expected length of skill_requirements to be exactly 4, got {len(data._skill_requirements)}.")
        for i in range(4):
            writer.add_short(data._skill_requirements[i])
        if data._stat_requirements is None:
            raise SerializationError("stat_requirements must be provided.")
        CharacterBaseStats.serialize(writer, data._stat_requirements)

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

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

        Returns:
            SkillLearn: The data to serialize.
        """
        data: SkillLearn = SkillLearn()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._id = reader.get_short()
            data._level_requirement = reader.get_char()
            data._class_requirement = reader.get_char()
            data._cost = reader.get_int()
            data._skill_requirements = []
            for i in range(4):
                data._skill_requirements.append(reader.get_short())
            data._stat_requirements = CharacterBaseStats.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"SkillLearn(byte_size={repr(self._byte_size)}, id={repr(self._id)}, level_requirement={repr(self._level_requirement)}, class_requirement={repr(self._class_requirement)}, cost={repr(self._cost)}, skill_requirements={repr(self._skill_requirements)}, stat_requirements={repr(self._stat_requirements)})"

byte_size: int property

Returns the size 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.

level_requirement: int property writable

Note
  • Value range is 0-252.

class_requirement: int property writable

Note
  • Value range is 0-252.

cost: int property writable

Note
  • Value range is 0-4097152080.

skill_requirements: list[int] property writable

Note
  • Length must be 4.
  • Element value range is 0-64008.

stat_requirements: CharacterBaseStats property writable

serialize(writer, data) staticmethod

Serializes an instance of SkillLearn to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SkillLearn

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/skill_learn.py
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
@staticmethod
def serialize(writer: EoWriter, data: "SkillLearn") -> None:
    """
    Serializes an instance of `SkillLearn` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SkillLearn): The data to serialize.
    """
    if data._id is None:
        raise SerializationError("id must be provided.")
    writer.add_short(data._id)
    if data._level_requirement is None:
        raise SerializationError("level_requirement must be provided.")
    writer.add_char(data._level_requirement)
    if data._class_requirement is None:
        raise SerializationError("class_requirement must be provided.")
    writer.add_char(data._class_requirement)
    if data._cost is None:
        raise SerializationError("cost must be provided.")
    writer.add_int(data._cost)
    if data._skill_requirements is None:
        raise SerializationError("skill_requirements must be provided.")
    if len(data._skill_requirements) != 4:
        raise SerializationError(f"Expected length of skill_requirements to be exactly 4, got {len(data._skill_requirements)}.")
    for i in range(4):
        writer.add_short(data._skill_requirements[i])
    if data._stat_requirements is None:
        raise SerializationError("stat_requirements must be provided.")
    CharacterBaseStats.serialize(writer, data._stat_requirements)

deserialize(reader) staticmethod

Deserializes an instance of SkillLearn from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SkillLearn 'SkillLearn'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/skill_learn.py
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
@staticmethod
def deserialize(reader: EoReader) -> "SkillLearn":
    """
    Deserializes an instance of `SkillLearn` from the provided `EoReader`.

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

    Returns:
        SkillLearn: The data to serialize.
    """
    data: SkillLearn = SkillLearn()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._id = reader.get_short()
        data._level_requirement = reader.get_char()
        data._class_requirement = reader.get_char()
        data._cost = reader.get_int()
        data._skill_requirements = []
        for i in range(4):
            data._skill_requirements.append(reader.get_short())
        data._stat_requirements = CharacterBaseStats.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillOpenServerPacket

Bases: Packet

Response from talking to a skill master NPC

Source code in src/eolib/protocol/_generated/net/server/stat_skill_open_server_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
class StatSkillOpenServerPacket(Packet):
    """
    Response from talking to a skill master NPC
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _shop_name: str = None # type: ignore [assignment]
    _skills: list[SkillLearn] = 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 shop_name(self) -> str:
        return self._shop_name

    @shop_name.setter
    def shop_name(self, shop_name: str) -> None:
        self._shop_name = shop_name

    @property
    def skills(self) -> list[SkillLearn]:
        return self._skills

    @skills.setter
    def skills(self, skills: list[SkillLearn]) -> None:
        self._skills = skills

    @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.
        """
        StatSkillOpenServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillOpenServerPacket): 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._shop_name is None:
            raise SerializationError("shop_name must be provided.")
        writer.add_string(data._shop_name)
        writer.add_byte(0xFF)
        if data._skills is None:
            raise SerializationError("skills must be provided.")
        for i in range(len(data._skills)):
            SkillLearn.serialize(writer, data._skills[i])

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

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

        Returns:
            StatSkillOpenServerPacket: The data to serialize.
        """
        data: StatSkillOpenServerPacket = StatSkillOpenServerPacket()
        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._shop_name = reader.get_string()
            reader.next_chunk()
            skills_length = int(reader.remaining / 28)
            data._skills = []
            for i in range(skills_length):
                data._skills.append(SkillLearn.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"StatSkillOpenServerPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, shop_name={repr(self._shop_name)}, skills={repr(self._skills)})"

byte_size: int property

Returns the size 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.

shop_name: str property writable

skills: list[SkillLearn] 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/server/stat_skill_open_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/stat_skill_open_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/stat_skill_open_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of StatSkillOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/stat_skill_open_server_packet.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillOpenServerPacket") -> None:
    """
    Serializes an instance of `StatSkillOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillOpenServerPacket): 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._shop_name is None:
        raise SerializationError("shop_name must be provided.")
    writer.add_string(data._shop_name)
    writer.add_byte(0xFF)
    if data._skills is None:
        raise SerializationError("skills must be provided.")
    for i in range(len(data._skills)):
        SkillLearn.serialize(writer, data._skills[i])

deserialize(reader) staticmethod

Deserializes an instance of StatSkillOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillOpenServerPacket 'StatSkillOpenServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_open_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "StatSkillOpenServerPacket":
    """
    Deserializes an instance of `StatSkillOpenServerPacket` from the provided `EoReader`.

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

    Returns:
        StatSkillOpenServerPacket: The data to serialize.
    """
    data: StatSkillOpenServerPacket = StatSkillOpenServerPacket()
    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._shop_name = reader.get_string()
        reader.next_chunk()
        skills_length = int(reader.remaining / 28)
        data._skills = []
        for i in range(skills_length):
            data._skills.append(SkillLearn.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

CharacterStatsReset

Character stats data. Sent when resetting stats and skills at a skill master NPC.

Source code in src/eolib/protocol/_generated/net/server/character_stats_reset.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
class CharacterStatsReset:
    """
    Character stats data.
    Sent when resetting stats and skills at a skill master NPC.
    """
    _byte_size: int = 0
    _stat_points: int = None # type: ignore [assignment]
    _skill_points: int = None # type: ignore [assignment]
    _hp: int = None # type: ignore [assignment]
    _max_hp: int = None # type: ignore [assignment]
    _tp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _max_sp: int = None # type: ignore [assignment]
    _base: CharacterBaseStats = None # type: ignore [assignment]
    _secondary: CharacterSecondaryStats = 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_points(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._stat_points

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

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

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

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

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

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

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

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

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

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

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

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

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

    @property
    def base(self) -> CharacterBaseStats:
        return self._base

    @base.setter
    def base(self, base: CharacterBaseStats) -> None:
        self._base = base

    @property
    def secondary(self) -> CharacterSecondaryStats:
        return self._secondary

    @secondary.setter
    def secondary(self, secondary: CharacterSecondaryStats) -> None:
        self._secondary = secondary

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterStatsReset): The data to serialize.
        """
        if data._stat_points is None:
            raise SerializationError("stat_points must be provided.")
        writer.add_short(data._stat_points)
        if data._skill_points is None:
            raise SerializationError("skill_points must be provided.")
        writer.add_short(data._skill_points)
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._tp is None:
            raise SerializationError("tp must be provided.")
        writer.add_short(data._tp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._max_sp is None:
            raise SerializationError("max_sp must be provided.")
        writer.add_short(data._max_sp)
        if data._base is None:
            raise SerializationError("base must be provided.")
        CharacterBaseStats.serialize(writer, data._base)
        if data._secondary is None:
            raise SerializationError("secondary must be provided.")
        CharacterSecondaryStats.serialize(writer, data._secondary)

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

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

        Returns:
            CharacterStatsReset: The data to serialize.
        """
        data: CharacterStatsReset = CharacterStatsReset()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._stat_points = reader.get_short()
            data._skill_points = reader.get_short()
            data._hp = reader.get_short()
            data._max_hp = reader.get_short()
            data._tp = reader.get_short()
            data._max_tp = reader.get_short()
            data._max_sp = reader.get_short()
            data._base = CharacterBaseStats.deserialize(reader)
            data._secondary = CharacterSecondaryStats.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"CharacterStatsReset(byte_size={repr(self._byte_size)}, stat_points={repr(self._stat_points)}, skill_points={repr(self._skill_points)}, hp={repr(self._hp)}, max_hp={repr(self._max_hp)}, tp={repr(self._tp)}, max_tp={repr(self._max_tp)}, max_sp={repr(self._max_sp)}, base={repr(self._base)}, secondary={repr(self._secondary)})"

byte_size: int property

Returns the size 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_points: int property writable

Note
  • Value range is 0-64008.

skill_points: int property writable

Note
  • Value range is 0-64008.

hp: int property writable

Note
  • Value range is 0-64008.

max_hp: int property writable

Note
  • Value range is 0-64008.

tp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

max_sp: int property writable

Note
  • Value range is 0-64008.

base: CharacterBaseStats property writable

secondary: CharacterSecondaryStats property writable

serialize(writer, data) staticmethod

Serializes an instance of CharacterStatsReset to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterStatsReset

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_stats_reset.py
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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterStatsReset") -> None:
    """
    Serializes an instance of `CharacterStatsReset` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterStatsReset): The data to serialize.
    """
    if data._stat_points is None:
        raise SerializationError("stat_points must be provided.")
    writer.add_short(data._stat_points)
    if data._skill_points is None:
        raise SerializationError("skill_points must be provided.")
    writer.add_short(data._skill_points)
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._tp is None:
        raise SerializationError("tp must be provided.")
    writer.add_short(data._tp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._max_sp is None:
        raise SerializationError("max_sp must be provided.")
    writer.add_short(data._max_sp)
    if data._base is None:
        raise SerializationError("base must be provided.")
    CharacterBaseStats.serialize(writer, data._base)
    if data._secondary is None:
        raise SerializationError("secondary must be provided.")
    CharacterSecondaryStats.serialize(writer, data._secondary)

deserialize(reader) staticmethod

Deserializes an instance of CharacterStatsReset from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterStatsReset CharacterStatsReset

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_stats_reset.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterStatsReset":
    """
    Deserializes an instance of `CharacterStatsReset` from the provided `EoReader`.

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

    Returns:
        CharacterStatsReset: The data to serialize.
    """
    data: CharacterStatsReset = CharacterStatsReset()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._stat_points = reader.get_short()
        data._skill_points = reader.get_short()
        data._hp = reader.get_short()
        data._max_hp = reader.get_short()
        data._tp = reader.get_short()
        data._max_tp = reader.get_short()
        data._max_sp = reader.get_short()
        data._base = CharacterBaseStats.deserialize(reader)
        data._secondary = CharacterSecondaryStats.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillJunkServerPacket

Bases: Packet

Response to resetting stats and skills at a skill master

Source code in src/eolib/protocol/_generated/net/server/stat_skill_junk_server_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 StatSkillJunkServerPacket(Packet):
    """
    Response to resetting stats and skills at a skill master
    """
    _byte_size: int = 0
    _stats: CharacterStatsReset = 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 stats(self) -> CharacterStatsReset:
        return self._stats

    @stats.setter
    def stats(self, stats: CharacterStatsReset) -> None:
        self._stats = stats

    @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.
        """
        StatSkillJunkServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillJunkServerPacket): The data to serialize.
        """
        if data._stats is None:
            raise SerializationError("stats must be provided.")
        CharacterStatsReset.serialize(writer, data._stats)

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

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

        Returns:
            StatSkillJunkServerPacket: The data to serialize.
        """
        data: StatSkillJunkServerPacket = StatSkillJunkServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._stats = CharacterStatsReset.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"StatSkillJunkServerPacket(byte_size={repr(self._byte_size)}, stats={repr(self._stats)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

stats: CharacterStatsReset 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/server/stat_skill_junk_server_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.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/server/stat_skill_junk_server_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/server/stat_skill_junk_server_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.
    """
    StatSkillJunkServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillJunkServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillJunkServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/stat_skill_junk_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillJunkServerPacket") -> None:
    """
    Serializes an instance of `StatSkillJunkServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillJunkServerPacket): The data to serialize.
    """
    if data._stats is None:
        raise SerializationError("stats must be provided.")
    CharacterStatsReset.serialize(writer, data._stats)

deserialize(reader) staticmethod

Deserializes an instance of StatSkillJunkServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillJunkServerPacket StatSkillJunkServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_junk_server_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) -> "StatSkillJunkServerPacket":
    """
    Deserializes an instance of `StatSkillJunkServerPacket` from the provided `EoReader`.

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

    Returns:
        StatSkillJunkServerPacket: The data to serialize.
    """
    data: StatSkillJunkServerPacket = StatSkillJunkServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._stats = CharacterStatsReset.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

StatSkillAcceptServerPacket

Bases: Packet

Response to spending skill points

Source code in src/eolib/protocol/_generated/net/server/stat_skill_accept_server_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 StatSkillAcceptServerPacket(Packet):
    """
    Response to spending skill points
    """
    _byte_size: int = 0
    _skill_points: int = None # type: ignore [assignment]
    _spell: Spell = 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 skill_points(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._skill_points

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

    @property
    def spell(self) -> Spell:
        return self._spell

    @spell.setter
    def spell(self, spell: Spell) -> None:
        self._spell = spell

    @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.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.
        """
        StatSkillAcceptServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (StatSkillAcceptServerPacket): The data to serialize.
        """
        if data._skill_points is None:
            raise SerializationError("skill_points must be provided.")
        writer.add_short(data._skill_points)
        if data._spell is None:
            raise SerializationError("spell must be provided.")
        Spell.serialize(writer, data._spell)

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

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

        Returns:
            StatSkillAcceptServerPacket: The data to serialize.
        """
        data: StatSkillAcceptServerPacket = StatSkillAcceptServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._skill_points = reader.get_short()
            data._spell = Spell.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"StatSkillAcceptServerPacket(byte_size={repr(self._byte_size)}, skill_points={repr(self._skill_points)}, spell={repr(self._spell)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

skill_points: int property writable

Note
  • Value range is 0-64008.

spell: Spell 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/server/stat_skill_accept_server_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

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

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_accept_server_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/server/stat_skill_accept_server_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.
    """
    StatSkillAcceptServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of StatSkillAcceptServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data StatSkillAcceptServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/stat_skill_accept_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "StatSkillAcceptServerPacket") -> None:
    """
    Serializes an instance of `StatSkillAcceptServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (StatSkillAcceptServerPacket): The data to serialize.
    """
    if data._skill_points is None:
        raise SerializationError("skill_points must be provided.")
    writer.add_short(data._skill_points)
    if data._spell is None:
        raise SerializationError("spell must be provided.")
    Spell.serialize(writer, data._spell)

deserialize(reader) staticmethod

Deserializes an instance of StatSkillAcceptServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
StatSkillAcceptServerPacket StatSkillAcceptServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/stat_skill_accept_server_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) -> "StatSkillAcceptServerPacket":
    """
    Deserializes an instance of `StatSkillAcceptServerPacket` from the provided `EoReader`.

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

    Returns:
        StatSkillAcceptServerPacket: The data to serialize.
    """
    data: StatSkillAcceptServerPacket = StatSkillAcceptServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._skill_points = reader.get_short()
        data._spell = Spell.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellTargetSelfServerPacket

Bases: Packet

Nearby player self-casted a spell

Source code in src/eolib/protocol/_generated/net/server/spell_target_self_server_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
class SpellTargetSelfServerPacket(Packet):
    """
    Nearby player self-casted a spell
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _spell_id: int = None # type: ignore [assignment]
    _spell_heal_hp: int = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _hp: Optional[int] = None # type: ignore [assignment]
    _tp: Optional[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

    @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 spell_heal_hp(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._spell_heal_hp

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

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

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

    @property
    def hp(self) -> Optional[int]:
        """
        The official client reads this if the packet is larger than 12 bytes

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

    @hp.setter
    def hp(self, hp: Optional[int]) -> None:
        """
        The official client reads this if the packet is larger than 12 bytes

        Note:
          - Value range is 0-64008.
        """
        self._hp = hp

    @property
    def tp(self) -> Optional[int]:
        """
        The official client reads this if the packet is larger than 12 bytes

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

    @tp.setter
    def tp(self, tp: Optional[int]) -> None:
        """
        The official client reads this if the packet is larger than 12 bytes

        Note:
          - Value range is 0-64008.
        """
        self._tp = tp

    @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.
        """
        SpellTargetSelfServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellTargetSelfServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
        if data._spell_heal_hp is None:
            raise SerializationError("spell_heal_hp must be provided.")
        writer.add_int(data._spell_heal_hp)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)
        reached_missing_optional = data._hp is None
        if not reached_missing_optional:
            writer.add_short(cast(int, data._hp))
        reached_missing_optional = reached_missing_optional or data._tp is None
        if not reached_missing_optional:
            writer.add_short(cast(int, data._tp))

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

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

        Returns:
            SpellTargetSelfServerPacket: The data to serialize.
        """
        data: SpellTargetSelfServerPacket = SpellTargetSelfServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._spell_id = reader.get_short()
            data._spell_heal_hp = reader.get_int()
            data._hp_percentage = reader.get_char()
            if reader.remaining > 0:
                data._hp = reader.get_short()
            if reader.remaining > 0:
                data._tp = 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"SpellTargetSelfServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, spell_id={repr(self._spell_id)}, spell_heal_hp={repr(self._spell_heal_hp)}, hp_percentage={repr(self._hp_percentage)}, hp={repr(self._hp)}, tp={repr(self._tp)})"

byte_size: int property

Returns the size 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.

spell_id: int property writable

Note
  • Value range is 0-64008.

spell_heal_hp: int property writable

Note
  • Value range is 0-4097152080.

hp_percentage: int property writable

Note
  • Value range is 0-252.

hp: Optional[int] property writable

The official client reads this if the packet is larger than 12 bytes

Note
  • Value range is 0-64008.

tp: Optional[int] property writable

The official client reads this if the packet is larger than 12 bytes

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/server/spell_target_self_server_packet.py
141
142
143
144
145
146
147
148
149
@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/server/spell_target_self_server_packet.py
151
152
153
154
155
156
157
158
159
@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/server/spell_target_self_server_packet.py
161
162
163
164
165
166
167
168
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of SpellTargetSelfServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellTargetSelfServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/spell_target_self_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "SpellTargetSelfServerPacket") -> None:
    """
    Serializes an instance of `SpellTargetSelfServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellTargetSelfServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._spell_id is None:
        raise SerializationError("spell_id must be provided.")
    writer.add_short(data._spell_id)
    if data._spell_heal_hp is None:
        raise SerializationError("spell_heal_hp must be provided.")
    writer.add_int(data._spell_heal_hp)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)
    reached_missing_optional = data._hp is None
    if not reached_missing_optional:
        writer.add_short(cast(int, data._hp))
    reached_missing_optional = reached_missing_optional or data._tp is None
    if not reached_missing_optional:
        writer.add_short(cast(int, data._tp))

deserialize(reader) staticmethod

Deserializes an instance of SpellTargetSelfServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellTargetSelfServerPacket SpellTargetSelfServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/spell_target_self_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "SpellTargetSelfServerPacket":
    """
    Deserializes an instance of `SpellTargetSelfServerPacket` from the provided `EoReader`.

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

    Returns:
        SpellTargetSelfServerPacket: The data to serialize.
    """
    data: SpellTargetSelfServerPacket = SpellTargetSelfServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._spell_id = reader.get_short()
        data._spell_heal_hp = reader.get_int()
        data._hp_percentage = reader.get_char()
        if reader.remaining > 0:
            data._hp = reader.get_short()
        if reader.remaining > 0:
            data._tp = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellTargetOtherServerPacket

Bases: Packet

Nearby player hit by a heal spell from a player

Source code in src/eolib/protocol/_generated/net/server/spell_target_other_server_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
class SpellTargetOtherServerPacket(Packet):
    """
    Nearby player hit by a heal spell from a player
    """
    _byte_size: int = 0
    _victim_id: int = None # type: ignore [assignment]
    _caster_id: int = None # type: ignore [assignment]
    _caster_direction: Direction = None # type: ignore [assignment]
    _spell_id: int = None # type: ignore [assignment]
    _spell_heal_hp: int = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _hp: Optional[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 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 caster_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._caster_id

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

    @property
    def caster_direction(self) -> Direction:
        return self._caster_direction

    @caster_direction.setter
    def caster_direction(self, caster_direction: Direction) -> None:
        self._caster_direction = caster_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 spell_heal_hp(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._spell_heal_hp

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

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

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

    @property
    def hp(self) -> Optional[int]:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

    @hp.setter
    def hp(self, hp: Optional[int]) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp = hp

    @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.
        """
        SpellTargetOtherServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellTargetOtherServerPacket): The data to serialize.
        """
        if data._victim_id is None:
            raise SerializationError("victim_id must be provided.")
        writer.add_short(data._victim_id)
        if data._caster_id is None:
            raise SerializationError("caster_id must be provided.")
        writer.add_short(data._caster_id)
        if data._caster_direction is None:
            raise SerializationError("caster_direction must be provided.")
        writer.add_char(int(data._caster_direction))
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)
        if data._spell_heal_hp is None:
            raise SerializationError("spell_heal_hp must be provided.")
        writer.add_int(data._spell_heal_hp)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)
        reached_missing_optional = data._hp is None
        if not reached_missing_optional:
            writer.add_short(cast(int, data._hp))

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

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

        Returns:
            SpellTargetOtherServerPacket: The data to serialize.
        """
        data: SpellTargetOtherServerPacket = SpellTargetOtherServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._victim_id = reader.get_short()
            data._caster_id = reader.get_short()
            data._caster_direction = Direction(reader.get_char())
            data._spell_id = reader.get_short()
            data._spell_heal_hp = reader.get_int()
            data._hp_percentage = reader.get_char()
            if reader.remaining > 0:
                data._hp = 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"SpellTargetOtherServerPacket(byte_size={repr(self._byte_size)}, victim_id={repr(self._victim_id)}, caster_id={repr(self._caster_id)}, caster_direction={repr(self._caster_direction)}, spell_id={repr(self._spell_id)}, spell_heal_hp={repr(self._spell_heal_hp)}, hp_percentage={repr(self._hp_percentage)}, hp={repr(self._hp)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

victim_id: int property writable

Note
  • Value range is 0-64008.

caster_id: int property writable

Note
  • Value range is 0-64008.

caster_direction: Direction property writable

spell_id: int property writable

Note
  • Value range is 0-64008.

spell_heal_hp: int property writable

Note
  • Value range is 0-4097152080.

hp_percentage: int property writable

Note
  • Value range is 0-252.

hp: Optional[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/server/spell_target_other_server_packet.py
143
144
145
146
147
148
149
150
151
@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/server/spell_target_other_server_packet.py
153
154
155
156
157
158
159
160
161
@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/server/spell_target_other_server_packet.py
163
164
165
166
167
168
169
170
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of SpellTargetOtherServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellTargetOtherServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/spell_target_other_server_packet.py
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
@staticmethod
def serialize(writer: EoWriter, data: "SpellTargetOtherServerPacket") -> None:
    """
    Serializes an instance of `SpellTargetOtherServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellTargetOtherServerPacket): The data to serialize.
    """
    if data._victim_id is None:
        raise SerializationError("victim_id must be provided.")
    writer.add_short(data._victim_id)
    if data._caster_id is None:
        raise SerializationError("caster_id must be provided.")
    writer.add_short(data._caster_id)
    if data._caster_direction is None:
        raise SerializationError("caster_direction must be provided.")
    writer.add_char(int(data._caster_direction))
    if data._spell_id is None:
        raise SerializationError("spell_id must be provided.")
    writer.add_short(data._spell_id)
    if data._spell_heal_hp is None:
        raise SerializationError("spell_heal_hp must be provided.")
    writer.add_int(data._spell_heal_hp)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)
    reached_missing_optional = data._hp is None
    if not reached_missing_optional:
        writer.add_short(cast(int, data._hp))

deserialize(reader) staticmethod

Deserializes an instance of SpellTargetOtherServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellTargetOtherServerPacket SpellTargetOtherServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/spell_target_other_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "SpellTargetOtherServerPacket":
    """
    Deserializes an instance of `SpellTargetOtherServerPacket` from the provided `EoReader`.

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

    Returns:
        SpellTargetOtherServerPacket: The data to serialize.
    """
    data: SpellTargetOtherServerPacket = SpellTargetOtherServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._victim_id = reader.get_short()
        data._caster_id = reader.get_short()
        data._caster_direction = Direction(reader.get_char())
        data._spell_id = reader.get_short()
        data._spell_heal_hp = reader.get_int()
        data._hp_percentage = reader.get_char()
        if reader.remaining > 0:
            data._hp = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GroupHealTargetPlayer

Nearby player hit by a group heal spell

Source code in src/eolib/protocol/_generated/net/server/group_heal_target_player.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 GroupHealTargetPlayer:
    """
    Nearby player hit by a group heal spell
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _hp: 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

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

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

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GroupHealTargetPlayer): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)

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

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

        Returns:
            GroupHealTargetPlayer: The data to serialize.
        """
        data: GroupHealTargetPlayer = GroupHealTargetPlayer()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._hp_percentage = reader.get_char()
            data._hp = 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"GroupHealTargetPlayer(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, hp_percentage={repr(self._hp_percentage)}, hp={repr(self._hp)})"

byte_size: int property

Returns the size 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.

hp_percentage: int property writable

Note
  • Value range is 0-252.

hp: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of GroupHealTargetPlayer to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GroupHealTargetPlayer

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/group_heal_target_player.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: "GroupHealTargetPlayer") -> None:
    """
    Serializes an instance of `GroupHealTargetPlayer` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GroupHealTargetPlayer): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)

deserialize(reader) staticmethod

Deserializes an instance of GroupHealTargetPlayer from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GroupHealTargetPlayer GroupHealTargetPlayer

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/group_heal_target_player.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) -> "GroupHealTargetPlayer":
    """
    Deserializes an instance of `GroupHealTargetPlayer` from the provided `EoReader`.

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

    Returns:
        GroupHealTargetPlayer: The data to serialize.
    """
    data: GroupHealTargetPlayer = GroupHealTargetPlayer()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._hp_percentage = reader.get_char()
        data._hp = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellTargetGroupServerPacket

Bases: Packet

Nearby player(s) hit by a group heal spell from a player

Source code in src/eolib/protocol/_generated/net/server/spell_target_group_server_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
class SpellTargetGroupServerPacket(Packet):
    """
    Nearby player(s) hit by a group heal spell from a player
    """
    _byte_size: int = 0
    _spell_id: int = None # type: ignore [assignment]
    _caster_id: int = None # type: ignore [assignment]
    _caster_tp: int = None # type: ignore [assignment]
    _spell_heal_hp: int = None # type: ignore [assignment]
    _players: list[GroupHealTargetPlayer] = 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 caster_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._caster_id

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

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

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

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

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

    @property
    def players(self) -> list[GroupHealTargetPlayer]:
        return self._players

    @players.setter
    def players(self, players: list[GroupHealTargetPlayer]) -> None:
        self._players = players

    @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.
        """
        SpellTargetGroupServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellTargetGroupServerPacket): 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._caster_id is None:
            raise SerializationError("caster_id must be provided.")
        writer.add_short(data._caster_id)
        if data._caster_tp is None:
            raise SerializationError("caster_tp must be provided.")
        writer.add_short(data._caster_tp)
        if data._spell_heal_hp is None:
            raise SerializationError("spell_heal_hp must be provided.")
        writer.add_short(data._spell_heal_hp)
        if data._players is None:
            raise SerializationError("players must be provided.")
        for i in range(len(data._players)):
            GroupHealTargetPlayer.serialize(writer, data._players[i])

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

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

        Returns:
            SpellTargetGroupServerPacket: The data to serialize.
        """
        data: SpellTargetGroupServerPacket = SpellTargetGroupServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._spell_id = reader.get_short()
            data._caster_id = reader.get_short()
            data._caster_tp = reader.get_short()
            data._spell_heal_hp = reader.get_short()
            players_length = int(reader.remaining / 5)
            data._players = []
            for i in range(players_length):
                data._players.append(GroupHealTargetPlayer.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"SpellTargetGroupServerPacket(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_id)}, caster_id={repr(self._caster_id)}, caster_tp={repr(self._caster_tp)}, spell_heal_hp={repr(self._spell_heal_hp)}, players={repr(self._players)})"

byte_size: int property

Returns the size 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.

caster_id: int property writable

Note
  • Value range is 0-64008.

caster_tp: int property writable

Note
  • Value range is 0-64008.

spell_heal_hp: int property writable

Note
  • Value range is 0-64008.

players: list[GroupHealTargetPlayer] 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/server/spell_target_group_server_packet.py
108
109
110
111
112
113
114
115
116
@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/server/spell_target_group_server_packet.py
118
119
120
121
122
123
124
125
126
@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/server/spell_target_group_server_packet.py
128
129
130
131
132
133
134
135
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of SpellTargetGroupServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellTargetGroupServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/spell_target_group_server_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
@staticmethod
def serialize(writer: EoWriter, data: "SpellTargetGroupServerPacket") -> None:
    """
    Serializes an instance of `SpellTargetGroupServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellTargetGroupServerPacket): 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._caster_id is None:
        raise SerializationError("caster_id must be provided.")
    writer.add_short(data._caster_id)
    if data._caster_tp is None:
        raise SerializationError("caster_tp must be provided.")
    writer.add_short(data._caster_tp)
    if data._spell_heal_hp is None:
        raise SerializationError("spell_heal_hp must be provided.")
    writer.add_short(data._spell_heal_hp)
    if data._players is None:
        raise SerializationError("players must be provided.")
    for i in range(len(data._players)):
        GroupHealTargetPlayer.serialize(writer, data._players[i])

deserialize(reader) staticmethod

Deserializes an instance of SpellTargetGroupServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellTargetGroupServerPacket 'SpellTargetGroupServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/spell_target_group_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "SpellTargetGroupServerPacket":
    """
    Deserializes an instance of `SpellTargetGroupServerPacket` from the provided `EoReader`.

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

    Returns:
        SpellTargetGroupServerPacket: The data to serialize.
    """
    data: SpellTargetGroupServerPacket = SpellTargetGroupServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._spell_id = reader.get_short()
        data._caster_id = reader.get_short()
        data._caster_tp = reader.get_short()
        data._spell_heal_hp = reader.get_short()
        players_length = int(reader.remaining / 5)
        data._players = []
        for i in range(players_length):
            data._players.append(GroupHealTargetPlayer.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SpellRequestServerPacket

Bases: Packet

Nearby player chanting a spell

Source code in src/eolib/protocol/_generated/net/server/spell_request_server_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 SpellRequestServerPacket(Packet):
    """
    Nearby player chanting a spell
    """
    _byte_size: int = 0
    _player_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 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

    @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.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.
        """
        SpellRequestServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellRequestServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_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) -> "SpellRequestServerPacket":
        """
        Deserializes an instance of `SpellRequestServerPacket` from the provided `EoReader`.

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

        Returns:
            SpellRequestServerPacket: The data to serialize.
        """
        data: SpellRequestServerPacket = SpellRequestServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"SpellRequestServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/spell_request_server_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/server/spell_request_server_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/server/spell_request_server_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.
    """
    SpellRequestServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SpellRequestServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellRequestServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/spell_request_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "SpellRequestServerPacket") -> None:
    """
    Serializes an instance of `SpellRequestServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellRequestServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_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 SpellRequestServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellRequestServerPacket SpellRequestServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/spell_request_server_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) -> "SpellRequestServerPacket":
    """
    Deserializes an instance of `SpellRequestServerPacket` from the provided `EoReader`.

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

    Returns:
        SpellRequestServerPacket: The data to serialize.
    """
    data: SpellRequestServerPacket = SpellRequestServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        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

SpellPlayerServerPacket

Bases: Packet

Nearby player raising their arm to cast a spell (vestigial)

Source code in src/eolib/protocol/_generated/net/server/spell_player_server_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 SpellPlayerServerPacket(Packet):
    """
    Nearby player raising their arm to cast a spell (vestigial)
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _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 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

    @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.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.
        """
        SpellPlayerServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellPlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

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

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

        Returns:
            SpellPlayerServerPacket: The data to serialize.
        """
        data: SpellPlayerServerPacket = SpellPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"SpellPlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/spell_player_server_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.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/server/spell_player_server_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.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/server/spell_player_server_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.
    """
    SpellPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SpellPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/spell_player_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "SpellPlayerServerPacket") -> None:
    """
    Serializes an instance of `SpellPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellPlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

deserialize(reader) staticmethod

Deserializes an instance of SpellPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellPlayerServerPacket SpellPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/spell_player_server_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) -> "SpellPlayerServerPacket":
    """
    Deserializes an instance of `SpellPlayerServerPacket` from the provided `EoReader`.

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

    Returns:
        SpellPlayerServerPacket: The data to serialize.
    """
    data: SpellPlayerServerPacket = SpellPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        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

SpellErrorServerPacket

Bases: Packet

Show flood protection message (vestigial)

Source code in src/eolib/protocol/_generated/net/server/spell_error_server_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 SpellErrorServerPacket(Packet):
    """
    Show flood protection message (vestigial)
    """
    _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.Spell

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

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

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SpellErrorServerPacket): 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) -> "SpellErrorServerPacket":
        """
        Deserializes an instance of `SpellErrorServerPacket` from the provided `EoReader`.

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

        Returns:
            SpellErrorServerPacket: The data to serialize.
        """
        data: SpellErrorServerPacket = SpellErrorServerPacket()
        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"SpellErrorServerPacket(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/server/spell_error_server_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.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/server/spell_error_server_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.Error

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/server/spell_error_server_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.
    """
    SpellErrorServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SpellErrorServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SpellErrorServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/spell_error_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "SpellErrorServerPacket") -> None:
    """
    Serializes an instance of `SpellErrorServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SpellErrorServerPacket): 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 SpellErrorServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SpellErrorServerPacket SpellErrorServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/spell_error_server_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) -> "SpellErrorServerPacket":
    """
    Deserializes an instance of `SpellErrorServerPacket` from the provided `EoReader`.

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

    Returns:
        SpellErrorServerPacket: The data to serialize.
    """
    data: SpellErrorServerPacket = SpellErrorServerPacket()
    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

CharacterBaseStats

The 6 base character stats

Source code in src/eolib/protocol/_generated/net/server/character_base_stats.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
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
class CharacterBaseStats:
    """
    The 6 base character stats
    """
    _byte_size: int = 0
    _str: int = None # type: ignore [assignment]
    _intl: int = None # type: ignore [assignment]
    _wis: int = None # type: ignore [assignment]
    _agi: int = None # type: ignore [assignment]
    _con: int = None # type: ignore [assignment]
    _cha: 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 str(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._str

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

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

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

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

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

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

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

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

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

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterBaseStats): The data to serialize.
        """
        if data._str is None:
            raise SerializationError("str must be provided.")
        writer.add_short(data._str)
        if data._intl is None:
            raise SerializationError("intl must be provided.")
        writer.add_short(data._intl)
        if data._wis is None:
            raise SerializationError("wis must be provided.")
        writer.add_short(data._wis)
        if data._agi is None:
            raise SerializationError("agi must be provided.")
        writer.add_short(data._agi)
        if data._con is None:
            raise SerializationError("con must be provided.")
        writer.add_short(data._con)
        if data._cha is None:
            raise SerializationError("cha must be provided.")
        writer.add_short(data._cha)

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

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

        Returns:
            CharacterBaseStats: The data to serialize.
        """
        data: CharacterBaseStats = CharacterBaseStats()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._str = reader.get_short()
            data._intl = reader.get_short()
            data._wis = reader.get_short()
            data._agi = reader.get_short()
            data._con = reader.get_short()
            data._cha = 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"CharacterBaseStats(byte_size={repr(self._byte_size)}, str={repr(self._str)}, intl={repr(self._intl)}, wis={repr(self._wis)}, agi={repr(self._agi)}, con={repr(self._con)}, cha={repr(self._cha)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

str: int property writable

Note
  • Value range is 0-64008.

intl: int property writable

Note
  • Value range is 0-64008.

wis: int property writable

Note
  • Value range is 0-64008.

agi: int property writable

Note
  • Value range is 0-64008.

con: int property writable

Note
  • Value range is 0-64008.

cha: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of CharacterBaseStats to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterBaseStats

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_base_stats.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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterBaseStats") -> None:
    """
    Serializes an instance of `CharacterBaseStats` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterBaseStats): The data to serialize.
    """
    if data._str is None:
        raise SerializationError("str must be provided.")
    writer.add_short(data._str)
    if data._intl is None:
        raise SerializationError("intl must be provided.")
    writer.add_short(data._intl)
    if data._wis is None:
        raise SerializationError("wis must be provided.")
    writer.add_short(data._wis)
    if data._agi is None:
        raise SerializationError("agi must be provided.")
    writer.add_short(data._agi)
    if data._con is None:
        raise SerializationError("con must be provided.")
    writer.add_short(data._con)
    if data._cha is None:
        raise SerializationError("cha must be provided.")
    writer.add_short(data._cha)

deserialize(reader) staticmethod

Deserializes an instance of CharacterBaseStats from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterBaseStats CharacterBaseStats

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_base_stats.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterBaseStats":
    """
    Deserializes an instance of `CharacterBaseStats` from the provided `EoReader`.

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

    Returns:
        CharacterBaseStats: The data to serialize.
    """
    data: CharacterBaseStats = CharacterBaseStats()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._str = reader.get_short()
        data._intl = reader.get_short()
        data._wis = reader.get_short()
        data._agi = reader.get_short()
        data._con = reader.get_short()
        data._cha = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SitState

Bases: IntEnum

Indicates how a player is sitting (or not sitting)

Source code in src/eolib/protocol/_generated/net/server/sit_state.py
 9
10
11
12
13
14
15
class SitState(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Indicates how a player is sitting (or not sitting)
    """
    Stand = 0
    Chair = 1
    Floor = 2

Stand = 0 class-attribute instance-attribute

Chair = 1 class-attribute instance-attribute

Floor = 2 class-attribute instance-attribute

SitReplyServerPacket

Bases: Packet

Your character sitting down

Source code in src/eolib/protocol/_generated/net/server/sit_reply_server_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
class SitReplyServerPacket(Packet):
    """
    Your character sitting down
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _coords: Coords = None # type: ignore [assignment]
    _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 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

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

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

    @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.Sit

    @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.
        """
        SitReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SitReplyServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        writer.add_char(0)

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

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

        Returns:
            SitReplyServerPacket: The data to serialize.
        """
        data: SitReplyServerPacket = SitReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._coords = Coords.deserialize(reader)
            data._direction = Direction(reader.get_char())
            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"SitReplyServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, coords={repr(self._coords)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

coords: Coords property writable

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/server/sit_reply_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/sit_reply_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/sit_reply_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of SitReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SitReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/sit_reply_server_packet.py
 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: "SitReplyServerPacket") -> None:
    """
    Serializes an instance of `SitReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SitReplyServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))
    writer.add_char(0)

deserialize(reader) staticmethod

Deserializes an instance of SitReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SitReplyServerPacket SitReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/sit_reply_server_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
@staticmethod
def deserialize(reader: EoReader) -> "SitReplyServerPacket":
    """
    Deserializes an instance of `SitReplyServerPacket` from the provided `EoReader`.

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

    Returns:
        SitReplyServerPacket: The data to serialize.
    """
    data: SitReplyServerPacket = SitReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        data._direction = Direction(reader.get_char())
        reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SitRemoveServerPacket

Bases: Packet

Nearby player standing up

Source code in src/eolib/protocol/_generated/net/server/sit_remove_server_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 SitRemoveServerPacket(Packet):
    """
    Nearby player standing up
    """
    _byte_size: int = 0
    _player_id: 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 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

    @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.Sit

    @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.
        """
        SitRemoveServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SitRemoveServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

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

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

        Returns:
            SitRemoveServerPacket: The data to serialize.
        """
        data: SitRemoveServerPacket = SitRemoveServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"SitRemoveServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/sit_remove_server_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

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

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/sit_remove_server_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.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/server/sit_remove_server_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.
    """
    SitRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SitRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SitRemoveServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/sit_remove_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "SitRemoveServerPacket") -> None:
    """
    Serializes an instance of `SitRemoveServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SitRemoveServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

deserialize(reader) staticmethod

Deserializes an instance of SitRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SitRemoveServerPacket SitRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/sit_remove_server_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) -> "SitRemoveServerPacket":
    """
    Deserializes an instance of `SitRemoveServerPacket` from the provided `EoReader`.

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

    Returns:
        SitRemoveServerPacket: The data to serialize.
    """
    data: SitRemoveServerPacket = SitRemoveServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SitPlayerServerPacket

Bases: Packet

Nearby player sitting down

Source code in src/eolib/protocol/_generated/net/server/sit_player_server_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
class SitPlayerServerPacket(Packet):
    """
    Nearby player sitting down
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _coords: Coords = None # type: ignore [assignment]
    _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 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

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

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

    @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.Sit

    @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.
        """
        SitPlayerServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SitPlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        writer.add_char(0)

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

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

        Returns:
            SitPlayerServerPacket: The data to serialize.
        """
        data: SitPlayerServerPacket = SitPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._coords = Coords.deserialize(reader)
            data._direction = Direction(reader.get_char())
            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"SitPlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, coords={repr(self._coords)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

coords: Coords property writable

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/server/sit_player_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/sit_player_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/sit_player_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of SitPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SitPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/sit_player_server_packet.py
 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: "SitPlayerServerPacket") -> None:
    """
    Serializes an instance of `SitPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SitPlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))
    writer.add_char(0)

deserialize(reader) staticmethod

Deserializes an instance of SitPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SitPlayerServerPacket SitPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/sit_player_server_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
@staticmethod
def deserialize(reader: EoReader) -> "SitPlayerServerPacket":
    """
    Deserializes an instance of `SitPlayerServerPacket` from the provided `EoReader`.

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

    Returns:
        SitPlayerServerPacket: The data to serialize.
    """
    data: SitPlayerServerPacket = SitPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        data._direction = Direction(reader.get_char())
        reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

SitCloseServerPacket

Bases: Packet

Your character standing up

Source code in src/eolib/protocol/_generated/net/server/sit_close_server_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 SitCloseServerPacket(Packet):
    """
    Your character standing up
    """
    _byte_size: int = 0
    _player_id: 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 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

    @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.Sit

    @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.
        """
        SitCloseServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (SitCloseServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

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

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

        Returns:
            SitCloseServerPacket: The data to serialize.
        """
        data: SitCloseServerPacket = SitCloseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"SitCloseServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/sit_close_server_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

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

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/sit_close_server_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.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/server/sit_close_server_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.
    """
    SitCloseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of SitCloseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data SitCloseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/sit_close_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "SitCloseServerPacket") -> None:
    """
    Serializes an instance of `SitCloseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (SitCloseServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

deserialize(reader) staticmethod

Deserializes an instance of SitCloseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
SitCloseServerPacket SitCloseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/sit_close_server_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) -> "SitCloseServerPacket":
    """
    Deserializes an instance of `SitCloseServerPacket` from the provided `EoReader`.

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

    Returns:
        SitCloseServerPacket: The data to serialize.
    """
    data: SitCloseServerPacket = SitCloseServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopTradeItem

An item that a shop can buy or sell

Source code in src/eolib/protocol/_generated/net/server/shop_trade_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
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 ShopTradeItem:
    """
    An item that a shop can buy or sell
    """
    _byte_size: int = 0
    _item_id: int = None # type: ignore [assignment]
    _buy_price: int = None # type: ignore [assignment]
    _sell_price: int = None # type: ignore [assignment]
    _max_buy_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 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 buy_price(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._buy_price

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

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

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

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopTradeItem): 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._buy_price is None:
            raise SerializationError("buy_price must be provided.")
        writer.add_three(data._buy_price)
        if data._sell_price is None:
            raise SerializationError("sell_price must be provided.")
        writer.add_three(data._sell_price)
        if data._max_buy_amount is None:
            raise SerializationError("max_buy_amount must be provided.")
        writer.add_char(data._max_buy_amount)

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

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

        Returns:
            ShopTradeItem: The data to serialize.
        """
        data: ShopTradeItem = ShopTradeItem()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_id = reader.get_short()
            data._buy_price = reader.get_three()
            data._sell_price = reader.get_three()
            data._max_buy_amount = 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"ShopTradeItem(byte_size={repr(self._byte_size)}, item_id={repr(self._item_id)}, buy_price={repr(self._buy_price)}, sell_price={repr(self._sell_price)}, max_buy_amount={repr(self._max_buy_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.

item_id: int property writable

Note
  • Value range is 0-64008.

buy_price: int property writable

Note
  • Value range is 0-16194276.

sell_price: int property writable

Note
  • Value range is 0-16194276.

max_buy_amount: int property writable

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of ShopTradeItem to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopTradeItem

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/shop_trade_item.py
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
@staticmethod
def serialize(writer: EoWriter, data: "ShopTradeItem") -> None:
    """
    Serializes an instance of `ShopTradeItem` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopTradeItem): 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._buy_price is None:
        raise SerializationError("buy_price must be provided.")
    writer.add_three(data._buy_price)
    if data._sell_price is None:
        raise SerializationError("sell_price must be provided.")
    writer.add_three(data._sell_price)
    if data._max_buy_amount is None:
        raise SerializationError("max_buy_amount must be provided.")
    writer.add_char(data._max_buy_amount)

deserialize(reader) staticmethod

Deserializes an instance of ShopTradeItem from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopTradeItem ShopTradeItem

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/shop_trade_item.py
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) -> "ShopTradeItem":
    """
    Deserializes an instance of `ShopTradeItem` from the provided `EoReader`.

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

    Returns:
        ShopTradeItem: The data to serialize.
    """
    data: ShopTradeItem = ShopTradeItem()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_id = reader.get_short()
        data._buy_price = reader.get_three()
        data._sell_price = reader.get_three()
        data._max_buy_amount = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopSoldItem

A sold item when selling an item to a shop

Source code in src/eolib/protocol/_generated/net/server/shop_sold_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 ShopSoldItem:
    """
    A sold item when selling an item to a shop
    """
    _byte_size: int = 0
    _amount: int = None # type: ignore [assignment]
    _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 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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopSoldItem): The data to serialize.
        """
        if data._amount is None:
            raise SerializationError("amount must be provided.")
        writer.add_int(data._amount)
        if data._id is None:
            raise SerializationError("id must be provided.")
        writer.add_short(data._id)

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

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

        Returns:
            ShopSoldItem: The data to serialize.
        """
        data: ShopSoldItem = ShopSoldItem()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._amount = reader.get_int()
            data._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"ShopSoldItem(byte_size={repr(self._byte_size)}, amount={repr(self._amount)}, id={repr(self._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.

id: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of ShopSoldItem to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopSoldItem

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopSoldItem): The data to serialize.
    """
    if data._amount is None:
        raise SerializationError("amount must be provided.")
    writer.add_int(data._amount)
    if data._id is None:
        raise SerializationError("id must be provided.")
    writer.add_short(data._id)

deserialize(reader) staticmethod

Deserializes an instance of ShopSoldItem from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopSoldItem ShopSoldItem

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/shop_sold_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) -> "ShopSoldItem":
    """
    Deserializes an instance of `ShopSoldItem` from the provided `EoReader`.

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

    Returns:
        ShopSoldItem: The data to serialize.
    """
    data: ShopSoldItem = ShopSoldItem()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._amount = reader.get_int()
        data._id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopSellServerPacket

Bases: Packet

Response to selling an item to a shop

Source code in src/eolib/protocol/_generated/net/server/shop_sell_server_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class ShopSellServerPacket(Packet):
    """
    Response to selling an item to a shop
    """
    _byte_size: int = 0
    _sold_item: ShopSoldItem = None # type: ignore [assignment]
    _gold_amount: int = None # type: ignore [assignment]
    _weight: Weight = 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 sold_item(self) -> ShopSoldItem:
        return self._sold_item

    @sold_item.setter
    def sold_item(self, sold_item: ShopSoldItem) -> None:
        self._sold_item = sold_item

    @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

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @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.
        """
        ShopSellServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopSellServerPacket): The data to serialize.
        """
        if data._sold_item is None:
            raise SerializationError("sold_item must be provided.")
        ShopSoldItem.serialize(writer, data._sold_item)
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)

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

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

        Returns:
            ShopSellServerPacket: The data to serialize.
        """
        data: ShopSellServerPacket = ShopSellServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._sold_item = ShopSoldItem.deserialize(reader)
            data._gold_amount = reader.get_int()
            data._weight = Weight.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"ShopSellServerPacket(byte_size={repr(self._byte_size)}, sold_item={repr(self._sold_item)}, gold_amount={repr(self._gold_amount)}, weight={repr(self._weight)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

sold_item: ShopSoldItem property writable

gold_amount: int property writable

Note
  • Value range is 0-4097152080.

weight: Weight 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/server/shop_sell_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/shop_sell_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/shop_sell_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of ShopSellServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopSellServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/shop_sell_server_packet.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "ShopSellServerPacket") -> None:
    """
    Serializes an instance of `ShopSellServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopSellServerPacket): The data to serialize.
    """
    if data._sold_item is None:
        raise SerializationError("sold_item must be provided.")
    ShopSoldItem.serialize(writer, data._sold_item)
    if data._gold_amount is None:
        raise SerializationError("gold_amount must be provided.")
    writer.add_int(data._gold_amount)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)

deserialize(reader) staticmethod

Deserializes an instance of ShopSellServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopSellServerPacket ShopSellServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/shop_sell_server_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@staticmethod
def deserialize(reader: EoReader) -> "ShopSellServerPacket":
    """
    Deserializes an instance of `ShopSellServerPacket` from the provided `EoReader`.

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

    Returns:
        ShopSellServerPacket: The data to serialize.
    """
    data: ShopSellServerPacket = ShopSellServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._sold_item = ShopSoldItem.deserialize(reader)
        data._gold_amount = reader.get_int()
        data._weight = Weight.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopCraftItem

An item that a shop can craft

Source code in src/eolib/protocol/_generated/net/server/shop_craft_item.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 ShopCraftItem:
    """
    An item that a shop can craft
    """
    _byte_size: int = 0
    _item_id: int = None # type: ignore [assignment]
    _ingredients: list[CharItem] = 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 ingredients(self) -> list[CharItem]:
        """
        Note:
          - Length must be `4`.
        """
        return self._ingredients

    @ingredients.setter
    def ingredients(self, ingredients: list[CharItem]) -> None:
        """
        Note:
          - Length must be `4`.
        """
        self._ingredients = ingredients

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopCraftItem): 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._ingredients is None:
            raise SerializationError("ingredients must be provided.")
        if len(data._ingredients) != 4:
            raise SerializationError(f"Expected length of ingredients to be exactly 4, got {len(data._ingredients)}.")
        for i in range(4):
            CharItem.serialize(writer, data._ingredients[i])

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

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

        Returns:
            ShopCraftItem: The data to serialize.
        """
        data: ShopCraftItem = ShopCraftItem()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_id = reader.get_short()
            data._ingredients = []
            for i in range(4):
                data._ingredients.append(CharItem.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"ShopCraftItem(byte_size={repr(self._byte_size)}, item_id={repr(self._item_id)}, ingredients={repr(self._ingredients)})"

byte_size: int property

Returns the size 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.

ingredients: list[CharItem] property writable

Note
  • Length must be 4.

serialize(writer, data) staticmethod

Serializes an instance of ShopCraftItem to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopCraftItem

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopCraftItem): 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._ingredients is None:
        raise SerializationError("ingredients must be provided.")
    if len(data._ingredients) != 4:
        raise SerializationError(f"Expected length of ingredients to be exactly 4, got {len(data._ingredients)}.")
    for i in range(4):
        CharItem.serialize(writer, data._ingredients[i])

deserialize(reader) staticmethod

Deserializes an instance of ShopCraftItem from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopCraftItem 'ShopCraftItem'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/shop_craft_item.py
 81
 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) -> "ShopCraftItem":
    """
    Deserializes an instance of `ShopCraftItem` from the provided `EoReader`.

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

    Returns:
        ShopCraftItem: The data to serialize.
    """
    data: ShopCraftItem = ShopCraftItem()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_id = reader.get_short()
        data._ingredients = []
        for i in range(4):
            data._ingredients.append(CharItem.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopOpenServerPacket

Bases: Packet

Response from talking to a shop NPC

Source code in src/eolib/protocol/_generated/net/server/shop_open_server_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
class ShopOpenServerPacket(Packet):
    """
    Response from talking to a shop NPC
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _shop_name: str = None # type: ignore [assignment]
    _trade_items: list[ShopTradeItem] = None # type: ignore [assignment]
    _craft_items: list[ShopCraftItem] = 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 shop_name(self) -> str:
        return self._shop_name

    @shop_name.setter
    def shop_name(self, shop_name: str) -> None:
        self._shop_name = shop_name

    @property
    def trade_items(self) -> list[ShopTradeItem]:
        return self._trade_items

    @trade_items.setter
    def trade_items(self, trade_items: list[ShopTradeItem]) -> None:
        self._trade_items = trade_items

    @property
    def craft_items(self) -> list[ShopCraftItem]:
        return self._craft_items

    @craft_items.setter
    def craft_items(self, craft_items: list[ShopCraftItem]) -> None:
        self._craft_items = craft_items

    @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.
        """
        ShopOpenServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopOpenServerPacket): 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._shop_name is None:
            raise SerializationError("shop_name must be provided.")
        writer.add_string(data._shop_name)
        writer.add_byte(0xFF)
        if data._trade_items is None:
            raise SerializationError("trade_items must be provided.")
        for i in range(len(data._trade_items)):
            ShopTradeItem.serialize(writer, data._trade_items[i])
        writer.add_byte(0xFF)
        if data._craft_items is None:
            raise SerializationError("craft_items must be provided.")
        for i in range(len(data._craft_items)):
            ShopCraftItem.serialize(writer, data._craft_items[i])
        writer.add_byte(0xFF)

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

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

        Returns:
            ShopOpenServerPacket: The data to serialize.
        """
        data: ShopOpenServerPacket = ShopOpenServerPacket()
        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._shop_name = reader.get_string()
            reader.next_chunk()
            trade_items_length = int(reader.remaining / 9)
            data._trade_items = []
            for i in range(trade_items_length):
                data._trade_items.append(ShopTradeItem.deserialize(reader))
            reader.next_chunk()
            craft_items_length = int(reader.remaining / 14)
            data._craft_items = []
            for i in range(craft_items_length):
                data._craft_items.append(ShopCraftItem.deserialize(reader))
            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"ShopOpenServerPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, shop_name={repr(self._shop_name)}, trade_items={repr(self._trade_items)}, craft_items={repr(self._craft_items)})"

byte_size: int property

Returns the size 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.

shop_name: str property writable

trade_items: list[ShopTradeItem] property writable

craft_items: list[ShopCraftItem] 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/server/shop_open_server_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.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/server/shop_open_server_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.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/server/shop_open_server_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.
    """
    ShopOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ShopOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/shop_open_server_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
129
130
@staticmethod
def serialize(writer: EoWriter, data: "ShopOpenServerPacket") -> None:
    """
    Serializes an instance of `ShopOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopOpenServerPacket): 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._shop_name is None:
        raise SerializationError("shop_name must be provided.")
    writer.add_string(data._shop_name)
    writer.add_byte(0xFF)
    if data._trade_items is None:
        raise SerializationError("trade_items must be provided.")
    for i in range(len(data._trade_items)):
        ShopTradeItem.serialize(writer, data._trade_items[i])
    writer.add_byte(0xFF)
    if data._craft_items is None:
        raise SerializationError("craft_items must be provided.")
    for i in range(len(data._craft_items)):
        ShopCraftItem.serialize(writer, data._craft_items[i])
    writer.add_byte(0xFF)

deserialize(reader) staticmethod

Deserializes an instance of ShopOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopOpenServerPacket 'ShopOpenServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/shop_open_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "ShopOpenServerPacket":
    """
    Deserializes an instance of `ShopOpenServerPacket` from the provided `EoReader`.

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

    Returns:
        ShopOpenServerPacket: The data to serialize.
    """
    data: ShopOpenServerPacket = ShopOpenServerPacket()
    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._shop_name = reader.get_string()
        reader.next_chunk()
        trade_items_length = int(reader.remaining / 9)
        data._trade_items = []
        for i in range(trade_items_length):
            data._trade_items.append(ShopTradeItem.deserialize(reader))
        reader.next_chunk()
        craft_items_length = int(reader.remaining / 14)
        data._craft_items = []
        for i in range(craft_items_length):
            data._craft_items.append(ShopCraftItem.deserialize(reader))
        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

ShopCreateServerPacket

Bases: Packet

Response to crafting an item from a shop

Source code in src/eolib/protocol/_generated/net/server/shop_create_server_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
class ShopCreateServerPacket(Packet):
    """
    Response to crafting an item from a shop
    """
    _byte_size: int = 0
    _craft_item_id: int = None # type: ignore [assignment]
    _weight: Weight = None # type: ignore [assignment]
    _ingredients: list[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 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 weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @property
    def ingredients(self) -> list[Item]:
        """
        Note:
          - Length must be `4`.
        """
        return self._ingredients

    @ingredients.setter
    def ingredients(self, ingredients: list[Item]) -> None:
        """
        Note:
          - Length must be `4`.
        """
        self._ingredients = ingredients

    @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.
        """
        ShopCreateServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopCreateServerPacket): 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._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)
        if data._ingredients is None:
            raise SerializationError("ingredients must be provided.")
        if len(data._ingredients) != 4:
            raise SerializationError(f"Expected length of ingredients to be exactly 4, got {len(data._ingredients)}.")
        for i in range(4):
            Item.serialize(writer, data._ingredients[i])

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

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

        Returns:
            ShopCreateServerPacket: The data to serialize.
        """
        data: ShopCreateServerPacket = ShopCreateServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._craft_item_id = reader.get_short()
            data._weight = Weight.deserialize(reader)
            data._ingredients = []
            for i in range(4):
                data._ingredients.append(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"ShopCreateServerPacket(byte_size={repr(self._byte_size)}, craft_item_id={repr(self._craft_item_id)}, weight={repr(self._weight)}, ingredients={repr(self._ingredients)})"

byte_size: int property

Returns the size 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.

weight: Weight property writable

ingredients: list[Item] property writable

Note
  • Length must be 4.

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/server/shop_create_server_packet.py
75
76
77
78
79
80
81
82
83
@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/server/shop_create_server_packet.py
85
86
87
88
89
90
91
92
93
@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/server/shop_create_server_packet.py
 95
 96
 97
 98
 99
100
101
102
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of ShopCreateServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopCreateServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/shop_create_server_packet.py
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
@staticmethod
def serialize(writer: EoWriter, data: "ShopCreateServerPacket") -> None:
    """
    Serializes an instance of `ShopCreateServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopCreateServerPacket): 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._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)
    if data._ingredients is None:
        raise SerializationError("ingredients must be provided.")
    if len(data._ingredients) != 4:
        raise SerializationError(f"Expected length of ingredients to be exactly 4, got {len(data._ingredients)}.")
    for i in range(4):
        Item.serialize(writer, data._ingredients[i])

deserialize(reader) staticmethod

Deserializes an instance of ShopCreateServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopCreateServerPacket 'ShopCreateServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/shop_create_server_packet.py
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) -> "ShopCreateServerPacket":
    """
    Deserializes an instance of `ShopCreateServerPacket` from the provided `EoReader`.

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

    Returns:
        ShopCreateServerPacket: The data to serialize.
    """
    data: ShopCreateServerPacket = ShopCreateServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._craft_item_id = reader.get_short()
        data._weight = Weight.deserialize(reader)
        data._ingredients = []
        for i in range(4):
            data._ingredients.append(Item.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ShopBuyServerPacket

Bases: Packet

Response to purchasing an item from a shop

Source code in src/eolib/protocol/_generated/net/server/shop_buy_server_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class ShopBuyServerPacket(Packet):
    """
    Response to purchasing an item from a shop
    """
    _byte_size: int = 0
    _gold_amount: int = None # type: ignore [assignment]
    _bought_item: Item = None # type: ignore [assignment]
    _weight: Weight = 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 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

    @property
    def bought_item(self) -> Item:
        return self._bought_item

    @bought_item.setter
    def bought_item(self, bought_item: Item) -> None:
        self._bought_item = bought_item

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @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.
        """
        ShopBuyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ShopBuyServerPacket): The data to serialize.
        """
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)
        if data._bought_item is None:
            raise SerializationError("bought_item must be provided.")
        Item.serialize(writer, data._bought_item)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)

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

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

        Returns:
            ShopBuyServerPacket: The data to serialize.
        """
        data: ShopBuyServerPacket = ShopBuyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._gold_amount = reader.get_int()
            data._bought_item = Item.deserialize(reader)
            data._weight = Weight.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"ShopBuyServerPacket(byte_size={repr(self._byte_size)}, gold_amount={repr(self._gold_amount)}, bought_item={repr(self._bought_item)}, weight={repr(self._weight)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

gold_amount: int property writable

Note
  • Value range is 0-4097152080.

bought_item: Item property writable

weight: Weight 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/server/shop_buy_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/shop_buy_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/shop_buy_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of ShopBuyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ShopBuyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/shop_buy_server_packet.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "ShopBuyServerPacket") -> None:
    """
    Serializes an instance of `ShopBuyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ShopBuyServerPacket): The data to serialize.
    """
    if data._gold_amount is None:
        raise SerializationError("gold_amount must be provided.")
    writer.add_int(data._gold_amount)
    if data._bought_item is None:
        raise SerializationError("bought_item must be provided.")
    Item.serialize(writer, data._bought_item)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)

deserialize(reader) staticmethod

Deserializes an instance of ShopBuyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ShopBuyServerPacket ShopBuyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/shop_buy_server_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@staticmethod
def deserialize(reader: EoReader) -> "ShopBuyServerPacket":
    """
    Deserializes an instance of `ShopBuyServerPacket` from the provided `EoReader`.

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

    Returns:
        ShopBuyServerPacket: The data to serialize.
    """
    data: ShopBuyServerPacket = ShopBuyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._gold_amount = reader.get_int()
        data._bought_item = Item.deserialize(reader)
        data._weight = Weight.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

RefreshReplyServerPacket

Bases: Packet

Reply to request for new info about nearby objects

Source code in src/eolib/protocol/_generated/net/server/refresh_reply_server_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 RefreshReplyServerPacket(Packet):
    """
    Reply to request for new info about nearby objects
    """
    _byte_size: int = 0
    _nearby: NearbyInfo = 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 nearby(self) -> NearbyInfo:
        return self._nearby

    @nearby.setter
    def nearby(self, nearby: NearbyInfo) -> None:
        self._nearby = nearby

    @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.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.
        """
        RefreshReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RefreshReplyServerPacket): The data to serialize.
        """
        if data._nearby is None:
            raise SerializationError("nearby must be provided.")
        NearbyInfo.serialize(writer, data._nearby)

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

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

        Returns:
            RefreshReplyServerPacket: The data to serialize.
        """
        data: RefreshReplyServerPacket = RefreshReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._nearby = NearbyInfo.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"RefreshReplyServerPacket(byte_size={repr(self._byte_size)}, nearby={repr(self._nearby)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

nearby: NearbyInfo 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/server/refresh_reply_server_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.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/server/refresh_reply_server_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.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/server/refresh_reply_server_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.
    """
    RefreshReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of RefreshReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RefreshReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/refresh_reply_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "RefreshReplyServerPacket") -> None:
    """
    Serializes an instance of `RefreshReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RefreshReplyServerPacket): The data to serialize.
    """
    if data._nearby is None:
        raise SerializationError("nearby must be provided.")
    NearbyInfo.serialize(writer, data._nearby)

deserialize(reader) staticmethod

Deserializes an instance of RefreshReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RefreshReplyServerPacket RefreshReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/refresh_reply_server_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) -> "RefreshReplyServerPacket":
    """
    Deserializes an instance of `RefreshReplyServerPacket` from the provided `EoReader`.

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

    Returns:
        RefreshReplyServerPacket: The data to serialize.
    """
    data: RefreshReplyServerPacket = RefreshReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._nearby = NearbyInfo.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

RecoverTargetGroupServerPacket

Bases: Packet

Updated stats when levelling up from party experience

Source code in src/eolib/protocol/_generated/net/server/recover_target_group_server_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
class RecoverTargetGroupServerPacket(Packet):
    """
    Updated stats when levelling up from party experience
    """
    _byte_size: int = 0
    _stat_points: int = None # type: ignore [assignment]
    _skill_points: int = None # type: ignore [assignment]
    _max_hp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _max_sp: 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 stat_points(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._stat_points

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

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

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

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

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

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

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

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

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

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

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

    @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.
        """
        RecoverTargetGroupServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RecoverTargetGroupServerPacket): The data to serialize.
        """
        if data._stat_points is None:
            raise SerializationError("stat_points must be provided.")
        writer.add_short(data._stat_points)
        if data._skill_points is None:
            raise SerializationError("skill_points must be provided.")
        writer.add_short(data._skill_points)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._max_sp is None:
            raise SerializationError("max_sp must be provided.")
        writer.add_short(data._max_sp)

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

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

        Returns:
            RecoverTargetGroupServerPacket: The data to serialize.
        """
        data: RecoverTargetGroupServerPacket = RecoverTargetGroupServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._stat_points = reader.get_short()
            data._skill_points = reader.get_short()
            data._max_hp = reader.get_short()
            data._max_tp = reader.get_short()
            data._max_sp = 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"RecoverTargetGroupServerPacket(byte_size={repr(self._byte_size)}, stat_points={repr(self._stat_points)}, skill_points={repr(self._skill_points)}, max_hp={repr(self._max_hp)}, max_tp={repr(self._max_tp)}, max_sp={repr(self._max_sp)})"

byte_size: int property

Returns the size 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_points: int property writable

Note
  • Value range is 0-64008.

skill_points: int property writable

Note
  • Value range is 0-64008.

max_hp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

max_sp: 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/server/recover_target_group_server_packet.py
114
115
116
117
118
119
120
121
122
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

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

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/server/recover_target_group_server_packet.py
124
125
126
127
128
129
130
131
132
@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/server/recover_target_group_server_packet.py
134
135
136
137
138
139
140
141
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of RecoverTargetGroupServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RecoverTargetGroupServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/recover_target_group_server_packet.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
@staticmethod
def serialize(writer: EoWriter, data: "RecoverTargetGroupServerPacket") -> None:
    """
    Serializes an instance of `RecoverTargetGroupServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RecoverTargetGroupServerPacket): The data to serialize.
    """
    if data._stat_points is None:
        raise SerializationError("stat_points must be provided.")
    writer.add_short(data._stat_points)
    if data._skill_points is None:
        raise SerializationError("skill_points must be provided.")
    writer.add_short(data._skill_points)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._max_sp is None:
        raise SerializationError("max_sp must be provided.")
    writer.add_short(data._max_sp)

deserialize(reader) staticmethod

Deserializes an instance of RecoverTargetGroupServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RecoverTargetGroupServerPacket RecoverTargetGroupServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/recover_target_group_server_packet.py
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
@staticmethod
def deserialize(reader: EoReader) -> "RecoverTargetGroupServerPacket":
    """
    Deserializes an instance of `RecoverTargetGroupServerPacket` from the provided `EoReader`.

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

    Returns:
        RecoverTargetGroupServerPacket: The data to serialize.
    """
    data: RecoverTargetGroupServerPacket = RecoverTargetGroupServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._stat_points = reader.get_short()
        data._skill_points = reader.get_short()
        data._max_hp = reader.get_short()
        data._max_tp = reader.get_short()
        data._max_sp = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

RecoverReplyServerPacket

Bases: Packet

Karma/experience update

Source code in src/eolib/protocol/_generated/net/server/recover_reply_server_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
class RecoverReplyServerPacket(Packet):
    """
    Karma/experience update
    """
    _byte_size: int = 0
    _experience: int = None # type: ignore [assignment]
    _karma: int = None # type: ignore [assignment]
    _level_up: Optional[int] = None # type: ignore [assignment]
    _stat_points: Optional[int] = None # type: ignore [assignment]
    _skill_points: Optional[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 experience(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._experience

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

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

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

    @property
    def level_up(self) -> Optional[int]:
        """
        A value greater than 0 is &quot;new level&quot; and indicates the player leveled up.
        The official client reads this if the packet is larger than 6 bytes.

        Note:
          - Value range is 0-252.
        """
        return self._level_up

    @level_up.setter
    def level_up(self, level_up: Optional[int]) -> None:
        """
        A value greater than 0 is &quot;new level&quot; and indicates the player leveled up.
        The official client reads this if the packet is larger than 6 bytes.

        Note:
          - Value range is 0-252.
        """
        self._level_up = level_up

    @property
    def stat_points(self) -> Optional[int]:
        """
        The official client reads this if the player leveled up

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

    @stat_points.setter
    def stat_points(self, stat_points: Optional[int]) -> None:
        """
        The official client reads this if the player leveled up

        Note:
          - Value range is 0-64008.
        """
        self._stat_points = stat_points

    @property
    def skill_points(self) -> Optional[int]:
        """
        The official client reads this if the player leveled up

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

    @skill_points.setter
    def skill_points(self, skill_points: Optional[int]) -> None:
        """
        The official client reads this if the player leveled up

        Note:
          - Value range is 0-64008.
        """
        self._skill_points = skill_points

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

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

    @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.
        """
        RecoverReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RecoverReplyServerPacket): The data to serialize.
        """
        if data._experience is None:
            raise SerializationError("experience must be provided.")
        writer.add_int(data._experience)
        if data._karma is None:
            raise SerializationError("karma must be provided.")
        writer.add_short(data._karma)
        reached_missing_optional = data._level_up is None
        if not reached_missing_optional:
            writer.add_char(cast(int, data._level_up))
        reached_missing_optional = reached_missing_optional or data._stat_points is None
        if not reached_missing_optional:
            writer.add_short(cast(int, data._stat_points))
        reached_missing_optional = reached_missing_optional or data._skill_points is None
        if not reached_missing_optional:
            writer.add_short(cast(int, data._skill_points))

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

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

        Returns:
            RecoverReplyServerPacket: The data to serialize.
        """
        data: RecoverReplyServerPacket = RecoverReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._experience = reader.get_int()
            data._karma = reader.get_short()
            if reader.remaining > 0:
                data._level_up = reader.get_char()
            if reader.remaining > 0:
                data._stat_points = reader.get_short()
            if reader.remaining > 0:
                data._skill_points = 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"RecoverReplyServerPacket(byte_size={repr(self._byte_size)}, experience={repr(self._experience)}, karma={repr(self._karma)}, level_up={repr(self._level_up)}, stat_points={repr(self._stat_points)}, skill_points={repr(self._skill_points)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

experience: int property writable

Note
  • Value range is 0-4097152080.

karma: int property writable

Note
  • Value range is 0-64008.

level_up: Optional[int] property writable

A value greater than 0 is "new level" and indicates the player leveled up. The official client reads this if the packet is larger than 6 bytes.

Note
  • Value range is 0-252.

stat_points: Optional[int] property writable

The official client reads this if the player leveled up

Note
  • Value range is 0-64008.

skill_points: Optional[int] property writable

The official client reads this if the player leveled up

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/server/recover_reply_server_packet.py
130
131
132
133
134
135
136
137
138
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

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

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/server/recover_reply_server_packet.py
140
141
142
143
144
145
146
147
148
@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/server/recover_reply_server_packet.py
150
151
152
153
154
155
156
157
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of RecoverReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RecoverReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/recover_reply_server_packet.py
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
@staticmethod
def serialize(writer: EoWriter, data: "RecoverReplyServerPacket") -> None:
    """
    Serializes an instance of `RecoverReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RecoverReplyServerPacket): The data to serialize.
    """
    if data._experience is None:
        raise SerializationError("experience must be provided.")
    writer.add_int(data._experience)
    if data._karma is None:
        raise SerializationError("karma must be provided.")
    writer.add_short(data._karma)
    reached_missing_optional = data._level_up is None
    if not reached_missing_optional:
        writer.add_char(cast(int, data._level_up))
    reached_missing_optional = reached_missing_optional or data._stat_points is None
    if not reached_missing_optional:
        writer.add_short(cast(int, data._stat_points))
    reached_missing_optional = reached_missing_optional or data._skill_points is None
    if not reached_missing_optional:
        writer.add_short(cast(int, data._skill_points))

deserialize(reader) staticmethod

Deserializes an instance of RecoverReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RecoverReplyServerPacket RecoverReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/recover_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "RecoverReplyServerPacket":
    """
    Deserializes an instance of `RecoverReplyServerPacket` from the provided `EoReader`.

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

    Returns:
        RecoverReplyServerPacket: The data to serialize.
    """
    data: RecoverReplyServerPacket = RecoverReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._experience = reader.get_int()
        data._karma = reader.get_short()
        if reader.remaining > 0:
            data._level_up = reader.get_char()
        if reader.remaining > 0:
            data._stat_points = reader.get_short()
        if reader.remaining > 0:
            data._skill_points = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

RecoverPlayerServerPacket

Bases: Packet

HP/TP update

Source code in src/eolib/protocol/_generated/net/server/recover_player_server_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 RecoverPlayerServerPacket(Packet):
    """
    HP/TP update
    """
    _byte_size: int = 0
    _hp: int = None # type: ignore [assignment]
    _tp: 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 hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

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

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

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

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

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

    @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.
        """
        RecoverPlayerServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RecoverPlayerServerPacket): The data to serialize.
        """
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)
        if data._tp is None:
            raise SerializationError("tp must be provided.")
        writer.add_short(data._tp)

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

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

        Returns:
            RecoverPlayerServerPacket: The data to serialize.
        """
        data: RecoverPlayerServerPacket = RecoverPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._hp = reader.get_short()
            data._tp = 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"RecoverPlayerServerPacket(byte_size={repr(self._byte_size)}, hp={repr(self._hp)}, tp={repr(self._tp)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

hp: int property writable

Note
  • Value range is 0-64008.

tp: 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/server/recover_player_server_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.Recover

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/server/recover_player_server_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.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/server/recover_player_server_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.
    """
    RecoverPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of RecoverPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RecoverPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/recover_player_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "RecoverPlayerServerPacket") -> None:
    """
    Serializes an instance of `RecoverPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RecoverPlayerServerPacket): The data to serialize.
    """
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)
    if data._tp is None:
        raise SerializationError("tp must be provided.")
    writer.add_short(data._tp)

deserialize(reader) staticmethod

Deserializes an instance of RecoverPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RecoverPlayerServerPacket RecoverPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/recover_player_server_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) -> "RecoverPlayerServerPacket":
    """
    Deserializes an instance of `RecoverPlayerServerPacket` from the provided `EoReader`.

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

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

RecoverListServerPacket

Bases: Packet

Stats update

Source code in src/eolib/protocol/_generated/net/server/recover_list_server_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 RecoverListServerPacket(Packet):
    """
    Stats update
    """
    _byte_size: int = 0
    _class_id: int = None # type: ignore [assignment]
    _stats: CharacterStatsUpdate = 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 class_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._class_id

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

    @property
    def stats(self) -> CharacterStatsUpdate:
        return self._stats

    @stats.setter
    def stats(self, stats: CharacterStatsUpdate) -> None:
        self._stats = stats

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

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

    @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.
        """
        RecoverListServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RecoverListServerPacket): The data to serialize.
        """
        if data._class_id is None:
            raise SerializationError("class_id must be provided.")
        writer.add_short(data._class_id)
        if data._stats is None:
            raise SerializationError("stats must be provided.")
        CharacterStatsUpdate.serialize(writer, data._stats)

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

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

        Returns:
            RecoverListServerPacket: The data to serialize.
        """
        data: RecoverListServerPacket = RecoverListServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._class_id = reader.get_short()
            data._stats = CharacterStatsUpdate.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"RecoverListServerPacket(byte_size={repr(self._byte_size)}, class_id={repr(self._class_id)}, stats={repr(self._stats)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

class_id: int property writable

Note
  • Value range is 0-64008.

stats: CharacterStatsUpdate 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/server/recover_list_server_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.Recover

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/server/recover_list_server_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.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/server/recover_list_server_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.
    """
    RecoverListServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of RecoverListServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RecoverListServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/recover_list_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "RecoverListServerPacket") -> None:
    """
    Serializes an instance of `RecoverListServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RecoverListServerPacket): The data to serialize.
    """
    if data._class_id is None:
        raise SerializationError("class_id must be provided.")
    writer.add_short(data._class_id)
    if data._stats is None:
        raise SerializationError("stats must be provided.")
    CharacterStatsUpdate.serialize(writer, data._stats)

deserialize(reader) staticmethod

Deserializes an instance of RecoverListServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RecoverListServerPacket RecoverListServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/recover_list_server_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) -> "RecoverListServerPacket":
    """
    Deserializes an instance of `RecoverListServerPacket` from the provided `EoReader`.

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

    Returns:
        RecoverListServerPacket: The data to serialize.
    """
    data: RecoverListServerPacket = RecoverListServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._class_id = reader.get_short()
        data._stats = CharacterStatsUpdate.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

RecoverAgreeServerPacket

Bases: Packet

Nearby player gained HP

Source code in src/eolib/protocol/_generated/net/server/recover_agree_server_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 RecoverAgreeServerPacket(Packet):
    """
    Nearby player gained HP
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _heal_hp: int = None # type: ignore [assignment]
    _hp_percentage: 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

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

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

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

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

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

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

    @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.
        """
        RecoverAgreeServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RecoverAgreeServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._heal_hp is None:
            raise SerializationError("heal_hp must be provided.")
        writer.add_int(data._heal_hp)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)

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

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

        Returns:
            RecoverAgreeServerPacket: The data to serialize.
        """
        data: RecoverAgreeServerPacket = RecoverAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._heal_hp = reader.get_int()
            data._hp_percentage = 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"RecoverAgreeServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, heal_hp={repr(self._heal_hp)}, hp_percentage={repr(self._hp_percentage)})"

byte_size: int property

Returns the size 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.

heal_hp: int property writable

Note
  • Value range is 0-4097152080.

hp_percentage: 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/server/recover_agree_server_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.Recover

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/server/recover_agree_server_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.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/server/recover_agree_server_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.
    """
    RecoverAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of RecoverAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RecoverAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/recover_agree_server_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: "RecoverAgreeServerPacket") -> None:
    """
    Serializes an instance of `RecoverAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RecoverAgreeServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._heal_hp is None:
        raise SerializationError("heal_hp must be provided.")
    writer.add_int(data._heal_hp)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)

deserialize(reader) staticmethod

Deserializes an instance of RecoverAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RecoverAgreeServerPacket RecoverAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/recover_agree_server_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) -> "RecoverAgreeServerPacket":
    """
    Deserializes an instance of `RecoverAgreeServerPacket` from the provided `EoReader`.

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

    Returns:
        RecoverAgreeServerPacket: The data to serialize.
    """
    data: RecoverAgreeServerPacket = RecoverAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._heal_hp = reader.get_int()
        data._hp_percentage = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

RangeReplyServerPacket

Bases: Packet

Reply to request for information about nearby players and NPCs

Source code in src/eolib/protocol/_generated/net/server/range_reply_server_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 RangeReplyServerPacket(Packet):
    """
    Reply to request for information about nearby players and NPCs
    """
    _byte_size: int = 0
    _nearby: NearbyInfo = 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 nearby(self) -> NearbyInfo:
        return self._nearby

    @nearby.setter
    def nearby(self, nearby: NearbyInfo) -> None:
        self._nearby = nearby

    @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.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.
        """
        RangeReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (RangeReplyServerPacket): The data to serialize.
        """
        if data._nearby is None:
            raise SerializationError("nearby must be provided.")
        NearbyInfo.serialize(writer, data._nearby)

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

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

        Returns:
            RangeReplyServerPacket: The data to serialize.
        """
        data: RangeReplyServerPacket = RangeReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._nearby = NearbyInfo.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"RangeReplyServerPacket(byte_size={repr(self._byte_size)}, nearby={repr(self._nearby)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

nearby: NearbyInfo 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/server/range_reply_server_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.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/server/range_reply_server_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.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/server/range_reply_server_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.
    """
    RangeReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of RangeReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data RangeReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/range_reply_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "RangeReplyServerPacket") -> None:
    """
    Serializes an instance of `RangeReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (RangeReplyServerPacket): The data to serialize.
    """
    if data._nearby is None:
        raise SerializationError("nearby must be provided.")
    NearbyInfo.serialize(writer, data._nearby)

deserialize(reader) staticmethod

Deserializes an instance of RangeReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
RangeReplyServerPacket RangeReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/range_reply_server_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) -> "RangeReplyServerPacket":
    """
    Deserializes an instance of `RangeReplyServerPacket` from the provided `EoReader`.

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

    Returns:
        RangeReplyServerPacket: The data to serialize.
    """
    data: RangeReplyServerPacket = RangeReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._nearby = NearbyInfo.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

QuestRequirementIcon

Bases: IntEnum

Icon displayed for each quest in the Quest Progress window

Source code in src/eolib/protocol/_generated/net/server/quest_requirement_icon.py
 9
10
11
12
13
14
15
16
class QuestRequirementIcon(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Icon displayed for each quest in the Quest Progress window
    """
    Item = 3
    Talk = 5
    Kill = 8
    Step = 10

Item = 3 class-attribute instance-attribute

Talk = 5 class-attribute instance-attribute

Kill = 8 class-attribute instance-attribute

Step = 10 class-attribute instance-attribute

QuestReportServerPacket

Bases: Packet

NPC chat messages

Source code in src/eolib/protocol/_generated/net/server/quest_report_server_packet.py
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
class QuestReportServerPacket(Packet):
    """
    NPC chat messages
    """
    _byte_size: int = 0
    _npc_id: int = None # type: ignore [assignment]
    _messages: 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 npc_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_id

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

    @property
    def messages(self) -> list[str]:
        return self._messages

    @messages.setter
    def messages(self, messages: list[str]) -> None:
        self._messages = messages

    @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.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.
        """
        QuestReportServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestReportServerPacket): The data to serialize.
        """
        if data._npc_id is None:
            raise SerializationError("npc_id must be provided.")
        writer.add_short(data._npc_id)
        writer.add_byte(0xFF)
        if data._messages is None:
            raise SerializationError("messages must be provided.")
        for i in range(len(data._messages)):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._messages[i])

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

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

        Returns:
            QuestReportServerPacket: The data to serialize.
        """
        data: QuestReportServerPacket = QuestReportServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._npc_id = reader.get_short()
            reader.next_chunk()
            data._messages = []
            while reader.remaining > 0:
                data._messages.append(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"QuestReportServerPacket(byte_size={repr(self._byte_size)}, npc_id={repr(self._npc_id)}, messages={repr(self._messages)})"

byte_size: int property

Returns the size 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_id: int property writable

Note
  • Value range is 0-64008.

messages: list[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/server/quest_report_server_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.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/server/quest_report_server_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.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/server/quest_report_server_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.
    """
    QuestReportServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of QuestReportServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data QuestReportServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/quest_report_server_packet.py
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
@staticmethod
def serialize(writer: EoWriter, data: "QuestReportServerPacket") -> None:
    """
    Serializes an instance of `QuestReportServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestReportServerPacket): The data to serialize.
    """
    if data._npc_id is None:
        raise SerializationError("npc_id must be provided.")
    writer.add_short(data._npc_id)
    writer.add_byte(0xFF)
    if data._messages is None:
        raise SerializationError("messages must be provided.")
    for i in range(len(data._messages)):
        if i > 0:
            writer.add_byte(0xFF)
        writer.add_string(data._messages[i])

deserialize(reader) staticmethod

Deserializes an instance of QuestReportServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
QuestReportServerPacket 'QuestReportServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/quest_report_server_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
129
130
131
@staticmethod
def deserialize(reader: EoReader) -> "QuestReportServerPacket":
    """
    Deserializes an instance of `QuestReportServerPacket` from the provided `EoReader`.

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

    Returns:
        QuestReportServerPacket: The data to serialize.
    """
    data: QuestReportServerPacket = QuestReportServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._npc_id = reader.get_short()
        reader.next_chunk()
        data._messages = []
        while reader.remaining > 0:
            data._messages.append(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

QuestProgressEntry

An entry in the Quest Progress window

Source code in src/eolib/protocol/_generated/net/server/quest_progress_entry.py
 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
class QuestProgressEntry:
    """
    An entry in the Quest Progress window
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _description: str = None # type: ignore [assignment]
    _icon: QuestRequirementIcon = None # type: ignore [assignment]
    _progress: int = None # type: ignore [assignment]
    _target: 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 name(self) -> str:
        return self._name

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

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

    @description.setter
    def description(self, description: str) -> None:
        self._description = description

    @property
    def icon(self) -> QuestRequirementIcon:
        return self._icon

    @icon.setter
    def icon(self, icon: QuestRequirementIcon) -> None:
        self._icon = icon

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

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

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestProgressEntry): 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._description is None:
            raise SerializationError("description must be provided.")
        writer.add_string(data._description)
        writer.add_byte(0xFF)
        if data._icon is None:
            raise SerializationError("icon must be provided.")
        writer.add_short(int(data._icon))
        if data._progress is None:
            raise SerializationError("progress must be provided.")
        writer.add_short(data._progress)
        if data._target is None:
            raise SerializationError("target must be provided.")
        writer.add_short(data._target)

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

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

        Returns:
            QuestProgressEntry: The data to serialize.
        """
        data: QuestProgressEntry = QuestProgressEntry()
        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._description = reader.get_string()
            reader.next_chunk()
            data._icon = QuestRequirementIcon(reader.get_short())
            data._progress = reader.get_short()
            data._target = 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"QuestProgressEntry(byte_size={repr(self._byte_size)}, name={repr(self._name)}, description={repr(self._description)}, icon={repr(self._icon)}, progress={repr(self._progress)}, target={repr(self._target)})"

byte_size: int property

Returns the size 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

description: str property writable

icon: QuestRequirementIcon property writable

progress: int property writable

Note
  • Value range is 0-64008.

target: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of QuestProgressEntry to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data QuestProgressEntry

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/quest_progress_entry.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@staticmethod
def serialize(writer: EoWriter, data: "QuestProgressEntry") -> None:
    """
    Serializes an instance of `QuestProgressEntry` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestProgressEntry): 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._description is None:
        raise SerializationError("description must be provided.")
    writer.add_string(data._description)
    writer.add_byte(0xFF)
    if data._icon is None:
        raise SerializationError("icon must be provided.")
    writer.add_short(int(data._icon))
    if data._progress is None:
        raise SerializationError("progress must be provided.")
    writer.add_short(data._progress)
    if data._target is None:
        raise SerializationError("target must be provided.")
    writer.add_short(data._target)

deserialize(reader) staticmethod

Deserializes an instance of QuestProgressEntry from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
QuestProgressEntry QuestProgressEntry

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/quest_progress_entry.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
142
@staticmethod
def deserialize(reader: EoReader) -> "QuestProgressEntry":
    """
    Deserializes an instance of `QuestProgressEntry` from the provided `EoReader`.

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

    Returns:
        QuestProgressEntry: The data to serialize.
    """
    data: QuestProgressEntry = QuestProgressEntry()
    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._description = reader.get_string()
        reader.next_chunk()
        data._icon = QuestRequirementIcon(reader.get_short())
        data._progress = reader.get_short()
        data._target = 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

QuestListServerPacket

Bases: Packet

Quest history / progress reply

Source code in src/eolib/protocol/_generated/net/server/quest_list_server_packet.py
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
class QuestListServerPacket(Packet):
    """
    Quest history / progress reply
    """
    _byte_size: int = 0
    _page: QuestPage = None # type: ignore [assignment]
    _quests_count: int = None # type: ignore [assignment]
    _page_data: 'QuestListServerPacket.PageData' = 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 page(self) -> QuestPage:
        return self._page

    @page.setter
    def page(self, page: QuestPage) -> None:
        self._page = page

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

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

    @property
    def page_data(self) -> 'QuestListServerPacket.PageData':
        """
        QuestListServerPacket.PageData: Gets or sets the data associated with the `page` field.
        """
        return self._page_data

    @page_data.setter
    def page_data(self, page_data: 'QuestListServerPacket.PageData') -> None:
        self._page_data = page_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.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.
        """
        QuestListServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestListServerPacket): The data to serialize.
        """
        if data._page is None:
            raise SerializationError("page must be provided.")
        writer.add_char(int(data._page))
        if data._quests_count is None:
            raise SerializationError("quests_count must be provided.")
        writer.add_short(data._quests_count)
        if data._page == QuestPage.Progress:
            if not isinstance(data._page_data, QuestListServerPacket.PageDataProgress):
                raise SerializationError("Expected page_data to be type QuestListServerPacket.PageDataProgress for page " + QuestPage(data._page).name + ".")
            QuestListServerPacket.PageDataProgress.serialize(writer, data._page_data)
        elif data._page == QuestPage.History:
            if not isinstance(data._page_data, QuestListServerPacket.PageDataHistory):
                raise SerializationError("Expected page_data to be type QuestListServerPacket.PageDataHistory for page " + QuestPage(data._page).name + ".")
            QuestListServerPacket.PageDataHistory.serialize(writer, data._page_data)

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

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

        Returns:
            QuestListServerPacket: The data to serialize.
        """
        data: QuestListServerPacket = QuestListServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._page = QuestPage(reader.get_char())
            data._quests_count = reader.get_short()
            if data._page == QuestPage.Progress:
                data._page_data = QuestListServerPacket.PageDataProgress.deserialize(reader)
            elif data._page == QuestPage.History:
                data._page_data = QuestListServerPacket.PageDataHistory.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"QuestListServerPacket(byte_size={repr(self._byte_size)}, page={repr(self._page)}, quests_count={repr(self._quests_count)}, page_data={repr(self._page_data)})"

    PageData = Union['QuestListServerPacket.PageDataProgress', 'QuestListServerPacket.PageDataHistory', None]
    PageData.__doc__ = \
        """
        Data associated with different values of the `page` field.
        """

    class PageDataProgress:
        """
        Data associated with page value QuestPage.Progress
        """
        _byte_size: int = 0
        _quest_progress_entries: list[QuestProgressEntry] = 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 quest_progress_entries(self) -> list[QuestProgressEntry]:
            return self._quest_progress_entries

        @quest_progress_entries.setter
        def quest_progress_entries(self, quest_progress_entries: list[QuestProgressEntry]) -> None:
            self._quest_progress_entries = quest_progress_entries

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (QuestListServerPacket.PageDataProgress): The data to serialize.
            """
            if data._quest_progress_entries is None:
                raise SerializationError("quest_progress_entries must be provided.")
            for i in range(len(data._quest_progress_entries)):
                if i > 0:
                    writer.add_byte(0xFF)
                QuestProgressEntry.serialize(writer, data._quest_progress_entries[i])

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

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

            Returns:
                QuestListServerPacket.PageDataProgress: The data to serialize.
            """
            data: QuestListServerPacket.PageDataProgress = QuestListServerPacket.PageDataProgress()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._quest_progress_entries = []
                while reader.remaining > 0:
                    data._quest_progress_entries.append(QuestProgressEntry.deserialize(reader))
                    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"QuestListServerPacket.PageDataProgress(byte_size={repr(self._byte_size)}, quest_progress_entries={repr(self._quest_progress_entries)})"

    class PageDataHistory:
        """
        Data associated with page value QuestPage.History
        """
        _byte_size: int = 0
        _completed_quests: 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 completed_quests(self) -> list[str]:
            return self._completed_quests

        @completed_quests.setter
        def completed_quests(self, completed_quests: list[str]) -> None:
            self._completed_quests = completed_quests

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (QuestListServerPacket.PageDataHistory): The data to serialize.
            """
            if data._completed_quests is None:
                raise SerializationError("completed_quests must be provided.")
            for i in range(len(data._completed_quests)):
                if i > 0:
                    writer.add_byte(0xFF)
                writer.add_string(data._completed_quests[i])

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

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

            Returns:
                QuestListServerPacket.PageDataHistory: The data to serialize.
            """
            data: QuestListServerPacket.PageDataHistory = QuestListServerPacket.PageDataHistory()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._completed_quests = []
                while reader.remaining > 0:
                    data._completed_quests.append(reader.get_string())
                    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"QuestListServerPacket.PageDataHistory(byte_size={repr(self._byte_size)}, completed_quests={repr(self._completed_quests)})"

byte_size: int property

Returns the size 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

quests_count: int property writable

Note
  • Value range is 0-64008.

page_data: 'QuestListServerPacket.PageData' property writable

QuestListServerPacket.PageData: Gets or sets the data associated with the page field.

PageData = Union['QuestListServerPacket.PageDataProgress', 'QuestListServerPacket.PageDataHistory', None] class-attribute instance-attribute

PageDataProgress

Data associated with page value QuestPage.Progress

Source code in src/eolib/protocol/_generated/net/server/quest_list_server_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
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
class PageDataProgress:
    """
    Data associated with page value QuestPage.Progress
    """
    _byte_size: int = 0
    _quest_progress_entries: list[QuestProgressEntry] = 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 quest_progress_entries(self) -> list[QuestProgressEntry]:
        return self._quest_progress_entries

    @quest_progress_entries.setter
    def quest_progress_entries(self, quest_progress_entries: list[QuestProgressEntry]) -> None:
        self._quest_progress_entries = quest_progress_entries

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestListServerPacket.PageDataProgress): The data to serialize.
        """
        if data._quest_progress_entries is None:
            raise SerializationError("quest_progress_entries must be provided.")
        for i in range(len(data._quest_progress_entries)):
            if i > 0:
                writer.add_byte(0xFF)
            QuestProgressEntry.serialize(writer, data._quest_progress_entries[i])

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

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

        Returns:
            QuestListServerPacket.PageDataProgress: The data to serialize.
        """
        data: QuestListServerPacket.PageDataProgress = QuestListServerPacket.PageDataProgress()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._quest_progress_entries = []
            while reader.remaining > 0:
                data._quest_progress_entries.append(QuestProgressEntry.deserialize(reader))
                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"QuestListServerPacket.PageDataProgress(byte_size={repr(self._byte_size)}, quest_progress_entries={repr(self._quest_progress_entries)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

quest_progress_entries: list[QuestProgressEntry] property writable

serialize(writer, data) staticmethod

Serializes an instance of QuestListServerPacket.PageDataProgress to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PageDataProgress

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/quest_list_server_packet.py
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
@staticmethod
def serialize(writer: EoWriter, data: "QuestListServerPacket.PageDataProgress") -> None:
    """
    Serializes an instance of `QuestListServerPacket.PageDataProgress` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestListServerPacket.PageDataProgress): The data to serialize.
    """
    if data._quest_progress_entries is None:
        raise SerializationError("quest_progress_entries must be provided.")
    for i in range(len(data._quest_progress_entries)):
        if i > 0:
            writer.add_byte(0xFF)
        QuestProgressEntry.serialize(writer, data._quest_progress_entries[i])

deserialize(reader) staticmethod

Deserializes an instance of QuestListServerPacket.PageDataProgress from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'QuestListServerPacket.PageDataProgress'

QuestListServerPacket.PageDataProgress: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/quest_list_server_packet.py
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
@staticmethod
def deserialize(reader: EoReader) -> "QuestListServerPacket.PageDataProgress":
    """
    Deserializes an instance of `QuestListServerPacket.PageDataProgress` from the provided `EoReader`.

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

    Returns:
        QuestListServerPacket.PageDataProgress: The data to serialize.
    """
    data: QuestListServerPacket.PageDataProgress = QuestListServerPacket.PageDataProgress()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._quest_progress_entries = []
        while reader.remaining > 0:
            data._quest_progress_entries.append(QuestProgressEntry.deserialize(reader))
            reader.next_chunk()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PageDataHistory

Data associated with page value QuestPage.History

Source code in src/eolib/protocol/_generated/net/server/quest_list_server_packet.py
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
class PageDataHistory:
    """
    Data associated with page value QuestPage.History
    """
    _byte_size: int = 0
    _completed_quests: 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 completed_quests(self) -> list[str]:
        return self._completed_quests

    @completed_quests.setter
    def completed_quests(self, completed_quests: list[str]) -> None:
        self._completed_quests = completed_quests

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestListServerPacket.PageDataHistory): The data to serialize.
        """
        if data._completed_quests is None:
            raise SerializationError("completed_quests must be provided.")
        for i in range(len(data._completed_quests)):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._completed_quests[i])

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

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

        Returns:
            QuestListServerPacket.PageDataHistory: The data to serialize.
        """
        data: QuestListServerPacket.PageDataHistory = QuestListServerPacket.PageDataHistory()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._completed_quests = []
            while reader.remaining > 0:
                data._completed_quests.append(reader.get_string())
                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"QuestListServerPacket.PageDataHistory(byte_size={repr(self._byte_size)}, completed_quests={repr(self._completed_quests)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

completed_quests: list[str] property writable

serialize(writer, data) staticmethod

Serializes an instance of QuestListServerPacket.PageDataHistory to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PageDataHistory

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/quest_list_server_packet.py
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
@staticmethod
def serialize(writer: EoWriter, data: "QuestListServerPacket.PageDataHistory") -> None:
    """
    Serializes an instance of `QuestListServerPacket.PageDataHistory` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestListServerPacket.PageDataHistory): The data to serialize.
    """
    if data._completed_quests is None:
        raise SerializationError("completed_quests must be provided.")
    for i in range(len(data._completed_quests)):
        if i > 0:
            writer.add_byte(0xFF)
        writer.add_string(data._completed_quests[i])

deserialize(reader) staticmethod

Deserializes an instance of QuestListServerPacket.PageDataHistory from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'QuestListServerPacket.PageDataHistory'

QuestListServerPacket.PageDataHistory: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/quest_list_server_packet.py
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
@staticmethod
def deserialize(reader: EoReader) -> "QuestListServerPacket.PageDataHistory":
    """
    Deserializes an instance of `QuestListServerPacket.PageDataHistory` from the provided `EoReader`.

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

    Returns:
        QuestListServerPacket.PageDataHistory: The data to serialize.
    """
    data: QuestListServerPacket.PageDataHistory = QuestListServerPacket.PageDataHistory()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._completed_quests = []
        while reader.remaining > 0:
            data._completed_quests.append(reader.get_string())
            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/server/quest_list_server_packet.py
71
72
73
74
75
76
77
78
79
@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/server/quest_list_server_packet.py
81
82
83
84
85
86
87
88
89
@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/server/quest_list_server_packet.py
91
92
93
94
95
96
97
98
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of QuestListServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data QuestListServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/quest_list_server_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
@staticmethod
def serialize(writer: EoWriter, data: "QuestListServerPacket") -> None:
    """
    Serializes an instance of `QuestListServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestListServerPacket): The data to serialize.
    """
    if data._page is None:
        raise SerializationError("page must be provided.")
    writer.add_char(int(data._page))
    if data._quests_count is None:
        raise SerializationError("quests_count must be provided.")
    writer.add_short(data._quests_count)
    if data._page == QuestPage.Progress:
        if not isinstance(data._page_data, QuestListServerPacket.PageDataProgress):
            raise SerializationError("Expected page_data to be type QuestListServerPacket.PageDataProgress for page " + QuestPage(data._page).name + ".")
        QuestListServerPacket.PageDataProgress.serialize(writer, data._page_data)
    elif data._page == QuestPage.History:
        if not isinstance(data._page_data, QuestListServerPacket.PageDataHistory):
            raise SerializationError("Expected page_data to be type QuestListServerPacket.PageDataHistory for page " + QuestPage(data._page).name + ".")
        QuestListServerPacket.PageDataHistory.serialize(writer, data._page_data)

deserialize(reader) staticmethod

Deserializes an instance of QuestListServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
QuestListServerPacket 'QuestListServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/quest_list_server_packet.py
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
@staticmethod
def deserialize(reader: EoReader) -> "QuestListServerPacket":
    """
    Deserializes an instance of `QuestListServerPacket` from the provided `EoReader`.

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

    Returns:
        QuestListServerPacket: The data to serialize.
    """
    data: QuestListServerPacket = QuestListServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._page = QuestPage(reader.get_char())
        data._quests_count = reader.get_short()
        if data._page == QuestPage.Progress:
            data._page_data = QuestListServerPacket.PageDataProgress.deserialize(reader)
        elif data._page == QuestPage.History:
            data._page_data = QuestListServerPacket.PageDataHistory.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

DialogQuestEntry

An entry in the quest switcher

Source code in src/eolib/protocol/_generated/net/server/dialog_quest_entry.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
class DialogQuestEntry:
    """
    An entry in the quest switcher
    """
    _byte_size: int = 0
    _quest_id: int = None # type: ignore [assignment]
    _quest_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 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 quest_name(self) -> str:
        return self._quest_name

    @quest_name.setter
    def quest_name(self, quest_name: str) -> None:
        self._quest_name = quest_name

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (DialogQuestEntry): The data to serialize.
        """
        if data._quest_id is None:
            raise SerializationError("quest_id must be provided.")
        writer.add_short(data._quest_id)
        if data._quest_name is None:
            raise SerializationError("quest_name must be provided.")
        writer.add_string(data._quest_name)

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

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

        Returns:
            DialogQuestEntry: The data to serialize.
        """
        data: DialogQuestEntry = DialogQuestEntry()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._quest_id = reader.get_short()
            data._quest_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"DialogQuestEntry(byte_size={repr(self._byte_size)}, quest_id={repr(self._quest_id)}, quest_name={repr(self._quest_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.

quest_id: int property writable

Note
  • Value range is 0-64008.

quest_name: str property writable

serialize(writer, data) staticmethod

Serializes an instance of DialogQuestEntry to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data DialogQuestEntry

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (DialogQuestEntry): The data to serialize.
    """
    if data._quest_id is None:
        raise SerializationError("quest_id must be provided.")
    writer.add_short(data._quest_id)
    if data._quest_name is None:
        raise SerializationError("quest_name must be provided.")
    writer.add_string(data._quest_name)

deserialize(reader) staticmethod

Deserializes an instance of DialogQuestEntry from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
DialogQuestEntry DialogQuestEntry

The data to serialize.

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

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

    Returns:
        DialogQuestEntry: The data to serialize.
    """
    data: DialogQuestEntry = DialogQuestEntry()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._quest_id = reader.get_short()
        data._quest_name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

DialogEntry

An entry in a quest dialog

Source code in src/eolib/protocol/_generated/net/server/dialog_entry.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
class DialogEntry:
    """
    An entry in a quest dialog
    """
    _byte_size: int = 0
    _entry_type: DialogEntryType = None # type: ignore [assignment]
    _entry_type_data: 'DialogEntry.EntryTypeData' = None
    _line: 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 entry_type(self) -> DialogEntryType:
        return self._entry_type

    @entry_type.setter
    def entry_type(self, entry_type: DialogEntryType) -> None:
        self._entry_type = entry_type

    @property
    def entry_type_data(self) -> 'DialogEntry.EntryTypeData':
        """
        DialogEntry.EntryTypeData: Gets or sets the data associated with the `entry_type` field.
        """
        return self._entry_type_data

    @entry_type_data.setter
    def entry_type_data(self, entry_type_data: 'DialogEntry.EntryTypeData') -> None:
        self._entry_type_data = entry_type_data

    @property
    def line(self) -> str:
        return self._line

    @line.setter
    def line(self, line: str) -> None:
        self._line = line

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (DialogEntry): The data to serialize.
        """
        if data._entry_type is None:
            raise SerializationError("entry_type must be provided.")
        writer.add_short(int(data._entry_type))
        if data._entry_type == DialogEntryType.Link:
            if not isinstance(data._entry_type_data, DialogEntry.EntryTypeDataLink):
                raise SerializationError("Expected entry_type_data to be type DialogEntry.EntryTypeDataLink for entry_type " + DialogEntryType(data._entry_type).name + ".")
            DialogEntry.EntryTypeDataLink.serialize(writer, data._entry_type_data)
        if data._line is None:
            raise SerializationError("line must be provided.")
        writer.add_string(data._line)

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

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

        Returns:
            DialogEntry: The data to serialize.
        """
        data: DialogEntry = DialogEntry()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._entry_type = DialogEntryType(reader.get_short())
            if data._entry_type == DialogEntryType.Link:
                data._entry_type_data = DialogEntry.EntryTypeDataLink.deserialize(reader)
            data._line = 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"DialogEntry(byte_size={repr(self._byte_size)}, entry_type={repr(self._entry_type)}, entry_type_data={repr(self._entry_type_data)}, line={repr(self._line)})"

    EntryTypeData = Union['DialogEntry.EntryTypeDataLink', None]
    EntryTypeData.__doc__ = \
        """
        Data associated with different values of the `entry_type` field.
        """

    class EntryTypeDataLink:
        """
        Data associated with entry_type value DialogEntryType.Link
        """
        _byte_size: int = 0
        _link_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 link_id(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._link_id

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

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (DialogEntry.EntryTypeDataLink): The data to serialize.
            """
            if data._link_id is None:
                raise SerializationError("link_id must be provided.")
            writer.add_short(data._link_id)

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

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

            Returns:
                DialogEntry.EntryTypeDataLink: The data to serialize.
            """
            data: DialogEntry.EntryTypeDataLink = DialogEntry.EntryTypeDataLink()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._link_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"DialogEntry.EntryTypeDataLink(byte_size={repr(self._byte_size)}, link_id={repr(self._link_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.

entry_type: DialogEntryType property writable

entry_type_data: DialogEntry.EntryTypeData property writable

DialogEntry.EntryTypeData: Gets or sets the data associated with the entry_type field.

line: str property writable

EntryTypeData = Union['DialogEntry.EntryTypeDataLink', None] class-attribute instance-attribute

Data associated with entry_type value DialogEntryType.Link

Source code in src/eolib/protocol/_generated/net/server/dialog_entry.py
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
class EntryTypeDataLink:
    """
    Data associated with entry_type value DialogEntryType.Link
    """
    _byte_size: int = 0
    _link_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 link_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._link_id

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (DialogEntry.EntryTypeDataLink): The data to serialize.
        """
        if data._link_id is None:
            raise SerializationError("link_id must be provided.")
        writer.add_short(data._link_id)

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

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

        Returns:
            DialogEntry.EntryTypeDataLink: The data to serialize.
        """
        data: DialogEntry.EntryTypeDataLink = DialogEntry.EntryTypeDataLink()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._link_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"DialogEntry.EntryTypeDataLink(byte_size={repr(self._byte_size)}, link_id={repr(self._link_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.

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of DialogEntry.EntryTypeDataLink to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EntryTypeDataLink

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/dialog_entry.py
144
145
146
147
148
149
150
151
152
153
154
155
@staticmethod
def serialize(writer: EoWriter, data: "DialogEntry.EntryTypeDataLink") -> None:
    """
    Serializes an instance of `DialogEntry.EntryTypeDataLink` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (DialogEntry.EntryTypeDataLink): The data to serialize.
    """
    if data._link_id is None:
        raise SerializationError("link_id must be provided.")
    writer.add_short(data._link_id)

deserialize(reader) staticmethod

Deserializes an instance of DialogEntry.EntryTypeDataLink from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
EntryTypeDataLink

DialogEntry.EntryTypeDataLink: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/dialog_entry.py
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
@staticmethod
def deserialize(reader: EoReader) -> "DialogEntry.EntryTypeDataLink":
    """
    Deserializes an instance of `DialogEntry.EntryTypeDataLink` from the provided `EoReader`.

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

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

serialize(writer, data) staticmethod

Serializes an instance of DialogEntry to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data DialogEntry

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (DialogEntry): The data to serialize.
    """
    if data._entry_type is None:
        raise SerializationError("entry_type must be provided.")
    writer.add_short(int(data._entry_type))
    if data._entry_type == DialogEntryType.Link:
        if not isinstance(data._entry_type_data, DialogEntry.EntryTypeDataLink):
            raise SerializationError("Expected entry_type_data to be type DialogEntry.EntryTypeDataLink for entry_type " + DialogEntryType(data._entry_type).name + ".")
        DialogEntry.EntryTypeDataLink.serialize(writer, data._entry_type_data)
    if data._line is None:
        raise SerializationError("line must be provided.")
    writer.add_string(data._line)

deserialize(reader) staticmethod

Deserializes an instance of DialogEntry from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
DialogEntry DialogEntry

The data to serialize.

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

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

    Returns:
        DialogEntry: The data to serialize.
    """
    data: DialogEntry = DialogEntry()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._entry_type = DialogEntryType(reader.get_short())
        if data._entry_type == DialogEntryType.Link:
            data._entry_type_data = DialogEntry.EntryTypeDataLink.deserialize(reader)
        data._line = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

QuestDialogServerPacket

Bases: Packet

Quest selection dialog

Source code in src/eolib/protocol/_generated/net/server/quest_dialog_server_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
class QuestDialogServerPacket(Packet):
    """
    Quest selection dialog
    """
    _byte_size: int = 0
    _quest_count: int = None # type: ignore [assignment]
    _behavior_id: int = None # type: ignore [assignment]
    _quest_id: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]
    _dialog_id: int = None # type: ignore [assignment]
    _quest_entries: list[DialogQuestEntry] = None # type: ignore [assignment]
    _dialog_entries: list[DialogEntry] = 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

    @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 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_entries(self) -> list[DialogQuestEntry]:
        """
        Note:
          - Length must be 252 or less.
        """
        return self._quest_entries

    @quest_entries.setter
    def quest_entries(self, quest_entries: list[DialogQuestEntry]) -> None:
        """
        Note:
          - Length must be 252 or less.
        """
        self._quest_entries = quest_entries
        self._quest_count = len(self._quest_entries)

    @property
    def dialog_entries(self) -> list[DialogEntry]:
        return self._dialog_entries

    @dialog_entries.setter
    def dialog_entries(self, dialog_entries: list[DialogEntry]) -> None:
        self._dialog_entries = dialog_entries

    @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.Dialog

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (QuestDialogServerPacket): The data to serialize.
        """
        if data._quest_count is None:
            raise SerializationError("quest_count must be provided.")
        writer.add_char(data._quest_count)
        if data._behavior_id is None:
            raise SerializationError("behavior_id must be provided.")
        writer.add_short(data._behavior_id)
        if data._quest_id is None:
            raise SerializationError("quest_id must be provided.")
        writer.add_short(data._quest_id)
        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)
        writer.add_byte(0xFF)
        if data._quest_entries is None:
            raise SerializationError("quest_entries must be provided.")
        if len(data._quest_entries) > 252:
            raise SerializationError(f"Expected length of quest_entries to be 252 or less, got {len(data._quest_entries)}.")
        for i in range(data._quest_count):
            if i > 0:
                writer.add_byte(0xFF)
            DialogQuestEntry.serialize(writer, data._quest_entries[i])
        if data._dialog_entries is None:
            raise SerializationError("dialog_entries must be provided.")
        for i in range(len(data._dialog_entries)):
            if i > 0:
                writer.add_byte(0xFF)
            DialogEntry.serialize(writer, data._dialog_entries[i])

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

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

        Returns:
            QuestDialogServerPacket: The data to serialize.
        """
        data: QuestDialogServerPacket = QuestDialogServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._quest_count = reader.get_char()
            data._behavior_id = reader.get_short()
            data._quest_id = reader.get_short()
            data._session_id = reader.get_short()
            data._dialog_id = reader.get_short()
            reader.next_chunk()
            data._quest_entries = []
            for i in range(data._quest_count):
                data._quest_entries.append(DialogQuestEntry.deserialize(reader))
                if i + 1 < data._quest_count:
                    reader.next_chunk()
            data._dialog_entries = []
            while reader.remaining > 0:
                data._dialog_entries.append(DialogEntry.deserialize(reader))
                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"QuestDialogServerPacket(byte_size={repr(self._byte_size)}, behavior_id={repr(self._behavior_id)}, quest_id={repr(self._quest_id)}, session_id={repr(self._session_id)}, dialog_id={repr(self._dialog_id)}, quest_entries={repr(self._quest_entries)}, dialog_entries={repr(self._dialog_entries)})"

byte_size: int property

Returns the size 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.

quest_id: int property writable

Note
  • Value range is 0-64008.

session_id: int property writable

Note
  • Value range is 0-64008.

dialog_id: int property writable

Note
  • Value range is 0-64008.

quest_entries: list[DialogQuestEntry] property writable

Note
  • Length must be 252 or less.

dialog_entries: list[DialogEntry] 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/server/quest_dialog_server_packet.py
128
129
130
131
132
133
134
135
136
@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/server/quest_dialog_server_packet.py
138
139
140
141
142
143
144
145
146
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

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

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/server/quest_dialog_server_packet.py
148
149
150
151
152
153
154
155
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of QuestDialogServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data QuestDialogServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/quest_dialog_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "QuestDialogServerPacket") -> None:
    """
    Serializes an instance of `QuestDialogServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (QuestDialogServerPacket): The data to serialize.
    """
    if data._quest_count is None:
        raise SerializationError("quest_count must be provided.")
    writer.add_char(data._quest_count)
    if data._behavior_id is None:
        raise SerializationError("behavior_id must be provided.")
    writer.add_short(data._behavior_id)
    if data._quest_id is None:
        raise SerializationError("quest_id must be provided.")
    writer.add_short(data._quest_id)
    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)
    writer.add_byte(0xFF)
    if data._quest_entries is None:
        raise SerializationError("quest_entries must be provided.")
    if len(data._quest_entries) > 252:
        raise SerializationError(f"Expected length of quest_entries to be 252 or less, got {len(data._quest_entries)}.")
    for i in range(data._quest_count):
        if i > 0:
            writer.add_byte(0xFF)
        DialogQuestEntry.serialize(writer, data._quest_entries[i])
    if data._dialog_entries is None:
        raise SerializationError("dialog_entries must be provided.")
    for i in range(len(data._dialog_entries)):
        if i > 0:
            writer.add_byte(0xFF)
        DialogEntry.serialize(writer, data._dialog_entries[i])

deserialize(reader) staticmethod

Deserializes an instance of QuestDialogServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
QuestDialogServerPacket 'QuestDialogServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/quest_dialog_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "QuestDialogServerPacket":
    """
    Deserializes an instance of `QuestDialogServerPacket` from the provided `EoReader`.

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

    Returns:
        QuestDialogServerPacket: The data to serialize.
    """
    data: QuestDialogServerPacket = QuestDialogServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._quest_count = reader.get_char()
        data._behavior_id = reader.get_short()
        data._quest_id = reader.get_short()
        data._session_id = reader.get_short()
        data._dialog_id = reader.get_short()
        reader.next_chunk()
        data._quest_entries = []
        for i in range(data._quest_count):
            data._quest_entries.append(DialogQuestEntry.deserialize(reader))
            if i + 1 < data._quest_count:
                reader.next_chunk()
        data._dialog_entries = []
        while reader.remaining > 0:
            data._dialog_entries.append(DialogEntry.deserialize(reader))
            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

PriestRequestServerPacket

Bases: Packet

Wedding request

Source code in src/eolib/protocol/_generated/net/server/priest_request_server_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 PriestRequestServerPacket(Packet):
    """
    Wedding request
    """
    _byte_size: int = 0
    _session_id: int = None # type: ignore [assignment]
    _partner_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 partner_name(self) -> str:
        return self._partner_name

    @partner_name.setter
    def partner_name(self, partner_name: str) -> None:
        self._partner_name = partner_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.
        """
        PriestRequestServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PriestRequestServerPacket): 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._partner_name is None:
            raise SerializationError("partner_name must be provided.")
        writer.add_string(data._partner_name)

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

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

        Returns:
            PriestRequestServerPacket: The data to serialize.
        """
        data: PriestRequestServerPacket = PriestRequestServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._session_id = reader.get_short()
            data._partner_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"PriestRequestServerPacket(byte_size={repr(self._byte_size)}, session_id={repr(self._session_id)}, partner_name={repr(self._partner_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.

partner_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/server/priest_request_server_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/server/priest_request_server_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/server/priest_request_server_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.
    """
    PriestRequestServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PriestRequestServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PriestRequestServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PriestRequestServerPacket): 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._partner_name is None:
        raise SerializationError("partner_name must be provided.")
    writer.add_string(data._partner_name)

deserialize(reader) staticmethod

Deserializes an instance of PriestRequestServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PriestRequestServerPacket PriestRequestServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/priest_request_server_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) -> "PriestRequestServerPacket":
    """
    Deserializes an instance of `PriestRequestServerPacket` from the provided `EoReader`.

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

    Returns:
        PriestRequestServerPacket: The data to serialize.
    """
    data: PriestRequestServerPacket = PriestRequestServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._session_id = reader.get_short()
        data._partner_name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PriestReply

Bases: IntEnum

Reply code sent with PRIEST_REPLY packet

Source code in src/eolib/protocol/_generated/net/server/priest_reply.py
 9
10
11
12
13
14
15
16
17
18
19
20
class PriestReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with PRIEST_REPLY packet
    """
    NotDressed = 1
    LowLevel = 2
    PartnerNotPresent = 3
    PartnerNotDressed = 4
    Busy = 5
    DoYou = 6
    PartnerAlreadyMarried = 7
    NoPermission = 8

NotDressed = 1 class-attribute instance-attribute

LowLevel = 2 class-attribute instance-attribute

PartnerNotPresent = 3 class-attribute instance-attribute

PartnerNotDressed = 4 class-attribute instance-attribute

Busy = 5 class-attribute instance-attribute

DoYou = 6 class-attribute instance-attribute

PartnerAlreadyMarried = 7 class-attribute instance-attribute

NoPermission = 8 class-attribute instance-attribute

PriestReplyServerPacket

Bases: Packet

Reply to client Priest-family packets

Source code in src/eolib/protocol/_generated/net/server/priest_reply_server_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 PriestReplyServerPacket(Packet):
    """
    Reply to client Priest-family packets
    """
    _byte_size: int = 0
    _reply_code: PriestReply = 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 reply_code(self) -> PriestReply:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: PriestReply) -> None:
        self._reply_code = reply_code

    @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.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.
        """
        PriestReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PriestReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_short(int(data._reply_code))

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

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

        Returns:
            PriestReplyServerPacket: The data to serialize.
        """
        data: PriestReplyServerPacket = PriestReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = PriestReply(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"PriestReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

reply_code: PriestReply 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/server/priest_reply_server_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.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/server/priest_reply_server_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.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/server/priest_reply_server_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.
    """
    PriestReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PriestReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PriestReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/priest_reply_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "PriestReplyServerPacket") -> None:
    """
    Serializes an instance of `PriestReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PriestReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_short(int(data._reply_code))

deserialize(reader) staticmethod

Deserializes an instance of PriestReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PriestReplyServerPacket PriestReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/priest_reply_server_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) -> "PriestReplyServerPacket":
    """
    Deserializes an instance of `PriestReplyServerPacket` from the provided `EoReader`.

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

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

PriestOpenServerPacket

Bases: Packet

Response from talking to a priest NPC

Source code in src/eolib/protocol/_generated/net/server/priest_open_server_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 PriestOpenServerPacket(Packet):
    """
    Response from talking to a priest NPC
    """
    _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.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.
        """
        PriestOpenServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PriestOpenServerPacket): 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) -> "PriestOpenServerPacket":
        """
        Deserializes an instance of `PriestOpenServerPacket` from the provided `EoReader`.

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

        Returns:
            PriestOpenServerPacket: The data to serialize.
        """
        data: PriestOpenServerPacket = PriestOpenServerPacket()
        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"PriestOpenServerPacket(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/server/priest_open_server_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/server/priest_open_server_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/server/priest_open_server_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.
    """
    PriestOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PriestOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PriestOpenServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PriestOpenServerPacket): 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 PriestOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PriestOpenServerPacket PriestOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/priest_open_server_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) -> "PriestOpenServerPacket":
    """
    Deserializes an instance of `PriestOpenServerPacket` from the provided `EoReader`.

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

    Returns:
        PriestOpenServerPacket: The data to serialize.
    """
    data: PriestOpenServerPacket = PriestOpenServerPacket()
    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

PlayersListFriends

Information about online players. Sent in reply to friends list requests.

Source code in src/eolib/protocol/_generated/net/server/players_list_friends.py
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 PlayersListFriends:
    """
    Information about online players.
    Sent in reply to friends list requests.
    """
    _byte_size: int = 0
    _players_count: int = None # type: ignore [assignment]
    _players: 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 players(self) -> list[str]:
        """
        Note:
          - Length must be 64008 or less.
        """
        return self._players

    @players.setter
    def players(self, players: list[str]) -> None:
        """
        Note:
          - Length must be 64008 or less.
        """
        self._players = players
        self._players_count = len(self._players)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersListFriends): The data to serialize.
        """
        if data._players_count is None:
            raise SerializationError("players_count must be provided.")
        writer.add_short(data._players_count)
        writer.add_byte(0xFF)
        if data._players is None:
            raise SerializationError("players must be provided.")
        if len(data._players) > 64008:
            raise SerializationError(f"Expected length of players to be 64008 or less, got {len(data._players)}.")
        for i in range(data._players_count):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._players[i])

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

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

        Returns:
            PlayersListFriends: The data to serialize.
        """
        data: PlayersListFriends = PlayersListFriends()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._players_count = reader.get_short()
            reader.next_chunk()
            data._players = []
            for i in range(data._players_count):
                data._players.append(reader.get_string())
                if i + 1 < data._players_count:
                    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"PlayersListFriends(byte_size={repr(self._byte_size)}, players={repr(self._players)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

players: list[str] property writable

Note
  • Length must be 64008 or less.

serialize(writer, data) staticmethod

Serializes an instance of PlayersListFriends to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersListFriends

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersListFriends): The data to serialize.
    """
    if data._players_count is None:
        raise SerializationError("players_count must be provided.")
    writer.add_short(data._players_count)
    writer.add_byte(0xFF)
    if data._players is None:
        raise SerializationError("players must be provided.")
    if len(data._players) > 64008:
        raise SerializationError(f"Expected length of players to be 64008 or less, got {len(data._players)}.")
    for i in range(data._players_count):
        if i > 0:
            writer.add_byte(0xFF)
        writer.add_string(data._players[i])

deserialize(reader) staticmethod

Deserializes an instance of PlayersListFriends from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersListFriends 'PlayersListFriends'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/players_list_friends.py
69
70
71
72
73
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) -> "PlayersListFriends":
    """
    Deserializes an instance of `PlayersListFriends` from the provided `EoReader`.

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

    Returns:
        PlayersListFriends: The data to serialize.
    """
    data: PlayersListFriends = PlayersListFriends()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._players_count = reader.get_short()
        reader.next_chunk()
        data._players = []
        for i in range(data._players_count):
            data._players.append(reader.get_string())
            if i + 1 < data._players_count:
                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

PlayersReplyServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.PlayersListFriends

Source code in src/eolib/protocol/_generated/net/server/players_reply_server_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
class PlayersReplyServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.PlayersListFriends
    """
    _byte_size: int = 0
    _players_list: PlayersListFriends = 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 players_list(self) -> PlayersListFriends:
        return self._players_list

    @players_list.setter
    def players_list(self, players_list: PlayersListFriends) -> None:
        self._players_list = players_list

    @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.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.
        """
        PlayersReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersReplyServerPacket): The data to serialize.
        """
        if data._players_list is None:
            raise SerializationError("players_list must be provided.")
        PlayersListFriends.serialize(writer, data._players_list)

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

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

        Returns:
            PlayersReplyServerPacket: The data to serialize.
        """
        data: PlayersReplyServerPacket = PlayersReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._players_list = PlayersListFriends.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"PlayersReplyServerPacket(byte_size={repr(self._byte_size)}, players_list={repr(self._players_list)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

players_list: PlayersListFriends 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/server/players_reply_server_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.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/server/players_reply_server_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.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/server/players_reply_server_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.
    """
    PlayersReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/players_reply_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "PlayersReplyServerPacket") -> None:
    """
    Serializes an instance of `PlayersReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersReplyServerPacket): The data to serialize.
    """
    if data._players_list is None:
        raise SerializationError("players_list must be provided.")
    PlayersListFriends.serialize(writer, data._players_list)

deserialize(reader) staticmethod

Deserializes an instance of PlayersReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersReplyServerPacket PlayersReplyServerPacket

The data to serialize.

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

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

    Returns:
        PlayersReplyServerPacket: The data to serialize.
    """
    data: PlayersReplyServerPacket = PlayersReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._players_list = PlayersListFriends.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

PlayersRemoveServerPacket

Bases: Packet

Nearby player has logged out

Source code in src/eolib/protocol/_generated/net/server/players_remove_server_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 PlayersRemoveServerPacket(Packet):
    """
    Nearby player has logged out
    """
    _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.Players

    @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.
        """
        PlayersRemoveServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersRemoveServerPacket): 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) -> "PlayersRemoveServerPacket":
        """
        Deserializes an instance of `PlayersRemoveServerPacket` from the provided `EoReader`.

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

        Returns:
            PlayersRemoveServerPacket: The data to serialize.
        """
        data: PlayersRemoveServerPacket = PlayersRemoveServerPacket()
        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"PlayersRemoveServerPacket(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/server/players_remove_server_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.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/server/players_remove_server_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/server/players_remove_server_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.
    """
    PlayersRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersRemoveServerPacket

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersRemoveServerPacket): 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 PlayersRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersRemoveServerPacket PlayersRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/players_remove_server_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) -> "PlayersRemoveServerPacket":
    """
    Deserializes an instance of `PlayersRemoveServerPacket` from the provided `EoReader`.

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

    Returns:
        PlayersRemoveServerPacket: The data to serialize.
    """
    data: PlayersRemoveServerPacket = PlayersRemoveServerPacket()
    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

PlayersPongServerPacket

Bases: Packet

find command reply - same map

Source code in src/eolib/protocol/_generated/net/server/players_pong_server_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 PlayersPongServerPacket(Packet):
    """
    #find command reply - same map
    """
    _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.Pong

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersPongServerPacket): 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) -> "PlayersPongServerPacket":
        """
        Deserializes an instance of `PlayersPongServerPacket` from the provided `EoReader`.

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

        Returns:
            PlayersPongServerPacket: The data to serialize.
        """
        data: PlayersPongServerPacket = PlayersPongServerPacket()
        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"PlayersPongServerPacket(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/server/players_pong_server_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/server/players_pong_server_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.Pong

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/server/players_pong_server_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.
    """
    PlayersPongServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersPongServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersPongServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/players_pong_server_packet.py
67
68
69
70
71
72
73
74
75
76
77
78
@staticmethod
def serialize(writer: EoWriter, data: "PlayersPongServerPacket") -> None:
    """
    Serializes an instance of `PlayersPongServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersPongServerPacket): 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 PlayersPongServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersPongServerPacket PlayersPongServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/players_pong_server_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) -> "PlayersPongServerPacket":
    """
    Deserializes an instance of `PlayersPongServerPacket` from the provided `EoReader`.

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

    Returns:
        PlayersPongServerPacket: The data to serialize.
    """
    data: PlayersPongServerPacket = PlayersPongServerPacket()
    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

PlayersPingServerPacket

Bases: Packet

find command reply - offline

Source code in src/eolib/protocol/_generated/net/server/players_ping_server_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 PlayersPingServerPacket(Packet):
    """
    #find command reply - offline
    """
    _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.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.
        """
        PlayersPingServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersPingServerPacket): 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) -> "PlayersPingServerPacket":
        """
        Deserializes an instance of `PlayersPingServerPacket` from the provided `EoReader`.

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

        Returns:
            PlayersPingServerPacket: The data to serialize.
        """
        data: PlayersPingServerPacket = PlayersPingServerPacket()
        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"PlayersPingServerPacket(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/server/players_ping_server_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/server/players_ping_server_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.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/server/players_ping_server_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.
    """
    PlayersPingServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersPingServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersPingServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/players_ping_server_packet.py
67
68
69
70
71
72
73
74
75
76
77
78
@staticmethod
def serialize(writer: EoWriter, data: "PlayersPingServerPacket") -> None:
    """
    Serializes an instance of `PlayersPingServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersPingServerPacket): 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 PlayersPingServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersPingServerPacket PlayersPingServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/players_ping_server_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) -> "PlayersPingServerPacket":
    """
    Deserializes an instance of `PlayersPingServerPacket` from the provided `EoReader`.

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

    Returns:
        PlayersPingServerPacket: The data to serialize.
    """
    data: PlayersPingServerPacket = PlayersPingServerPacket()
    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

PlayersNet242ServerPacket

Bases: Packet

find command reply - different map

Source code in src/eolib/protocol/_generated/net/server/players_net242_server_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 PlayersNet242ServerPacket(Packet):
    """
    #find command reply - different map
    """
    _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.Net242

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersNet242ServerPacket): 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) -> "PlayersNet242ServerPacket":
        """
        Deserializes an instance of `PlayersNet242ServerPacket` from the provided `EoReader`.

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

        Returns:
            PlayersNet242ServerPacket: The data to serialize.
        """
        data: PlayersNet242ServerPacket = PlayersNet242ServerPacket()
        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"PlayersNet242ServerPacket(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/server/players_net242_server_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/server/players_net242_server_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.Net242

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/server/players_net242_server_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.
    """
    PlayersNet242ServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersNet242ServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersNet242ServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/players_net242_server_packet.py
67
68
69
70
71
72
73
74
75
76
77
78
@staticmethod
def serialize(writer: EoWriter, data: "PlayersNet242ServerPacket") -> None:
    """
    Serializes an instance of `PlayersNet242ServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersNet242ServerPacket): 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 PlayersNet242ServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersNet242ServerPacket PlayersNet242ServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/players_net242_server_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) -> "PlayersNet242ServerPacket":
    """
    Deserializes an instance of `PlayersNet242ServerPacket` from the provided `EoReader`.

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

    Returns:
        PlayersNet242ServerPacket: The data to serialize.
    """
    data: PlayersNet242ServerPacket = PlayersNet242ServerPacket()
    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

PlayersList

Information about online players

Source code in src/eolib/protocol/_generated/net/server/players_list.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 PlayersList:
    """
    Information about online players
    """
    _byte_size: int = 0
    _players_count: int = None # type: ignore [assignment]
    _players: list[OnlinePlayer] = 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 players(self) -> list[OnlinePlayer]:
        """
        Note:
          - Length must be 64008 or less.
        """
        return self._players

    @players.setter
    def players(self, players: list[OnlinePlayer]) -> None:
        """
        Note:
          - Length must be 64008 or less.
        """
        self._players = players
        self._players_count = len(self._players)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersList): The data to serialize.
        """
        if data._players_count is None:
            raise SerializationError("players_count must be provided.")
        writer.add_short(data._players_count)
        writer.add_byte(0xFF)
        if data._players is None:
            raise SerializationError("players must be provided.")
        if len(data._players) > 64008:
            raise SerializationError(f"Expected length of players to be 64008 or less, got {len(data._players)}.")
        for i in range(data._players_count):
            if i > 0:
                writer.add_byte(0xFF)
            OnlinePlayer.serialize(writer, data._players[i])

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

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

        Returns:
            PlayersList: The data to serialize.
        """
        data: PlayersList = PlayersList()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._players_count = reader.get_short()
            reader.next_chunk()
            data._players = []
            for i in range(data._players_count):
                data._players.append(OnlinePlayer.deserialize(reader))
                if i + 1 < data._players_count:
                    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"PlayersList(byte_size={repr(self._byte_size)}, players={repr(self._players)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

players: list[OnlinePlayer] property writable

Note
  • Length must be 64008 or less.

serialize(writer, data) staticmethod

Serializes an instance of PlayersList to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersList

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersList): The data to serialize.
    """
    if data._players_count is None:
        raise SerializationError("players_count must be provided.")
    writer.add_short(data._players_count)
    writer.add_byte(0xFF)
    if data._players is None:
        raise SerializationError("players must be provided.")
    if len(data._players) > 64008:
        raise SerializationError(f"Expected length of players to be 64008 or less, got {len(data._players)}.")
    for i in range(data._players_count):
        if i > 0:
            writer.add_byte(0xFF)
        OnlinePlayer.serialize(writer, data._players[i])

deserialize(reader) staticmethod

Deserializes an instance of PlayersList from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersList 'PlayersList'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/players_list.py
69
70
71
72
73
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) -> "PlayersList":
    """
    Deserializes an instance of `PlayersList` from the provided `EoReader`.

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

    Returns:
        PlayersList: The data to serialize.
    """
    data: PlayersList = PlayersList()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._players_count = reader.get_short()
        reader.next_chunk()
        data._players = []
        for i in range(data._players_count):
            data._players.append(OnlinePlayer.deserialize(reader))
            if i + 1 < data._players_count:
                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

PlayersListServerPacket

Bases: Packet

Equivalent to INIT_INIT with InitReply.PlayersList

Source code in src/eolib/protocol/_generated/net/server/players_list_server_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
class PlayersListServerPacket(Packet):
    """
    Equivalent to INIT_INIT with InitReply.PlayersList
    """
    _byte_size: int = 0
    _players_list: PlayersList = 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 players_list(self) -> PlayersList:
        return self._players_list

    @players_list.setter
    def players_list(self, players_list: PlayersList) -> None:
        self._players_list = players_list

    @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.
        """
        PlayersListServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersListServerPacket): The data to serialize.
        """
        if data._players_list is None:
            raise SerializationError("players_list must be provided.")
        PlayersList.serialize(writer, data._players_list)

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

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

        Returns:
            PlayersListServerPacket: The data to serialize.
        """
        data: PlayersListServerPacket = PlayersListServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._players_list = PlayersList.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"PlayersListServerPacket(byte_size={repr(self._byte_size)}, players_list={repr(self._players_list)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

players_list: PlayersList 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/server/players_list_server_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.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/server/players_list_server_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/server/players_list_server_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.
    """
    PlayersListServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersListServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersListServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/players_list_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "PlayersListServerPacket") -> None:
    """
    Serializes an instance of `PlayersListServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersListServerPacket): The data to serialize.
    """
    if data._players_list is None:
        raise SerializationError("players_list must be provided.")
    PlayersList.serialize(writer, data._players_list)

deserialize(reader) staticmethod

Deserializes an instance of PlayersListServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersListServerPacket PlayersListServerPacket

The data to serialize.

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

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

    Returns:
        PlayersListServerPacket: The data to serialize.
    """
    data: PlayersListServerPacket = PlayersListServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._players_list = PlayersList.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

OnlinePlayer

A player in the online list

Source code in src/eolib/protocol/_generated/net/server/online_player.py
 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
class OnlinePlayer:
    """
    A player in the online list
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _title: str = None # type: ignore [assignment]
    _level: int = None # type: ignore [assignment]
    _icon: CharacterIcon = None # type: ignore [assignment]
    _class_id: int = None # type: ignore [assignment]
    _guild_tag: 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 title(self) -> str:
        return self._title

    @title.setter
    def title(self, title: str) -> None:
        self._title = title

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

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

    @property
    def icon(self) -> CharacterIcon:
        return self._icon

    @icon.setter
    def icon(self, icon: CharacterIcon) -> None:
        self._icon = icon

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

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

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (OnlinePlayer): 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._title is None:
            raise SerializationError("title must be provided.")
        writer.add_string(data._title)
        writer.add_byte(0xFF)
        if data._level is None:
            raise SerializationError("level must be provided.")
        writer.add_char(data._level)
        if data._icon is None:
            raise SerializationError("icon must be provided.")
        writer.add_char(int(data._icon))
        if data._class_id is None:
            raise SerializationError("class_id must be provided.")
        writer.add_char(data._class_id)
        if data._guild_tag is None:
            raise SerializationError("guild_tag must be provided.")
        writer.add_string(data._guild_tag)

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

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

        Returns:
            OnlinePlayer: The data to serialize.
        """
        data: OnlinePlayer = OnlinePlayer()
        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._title = reader.get_string()
            reader.next_chunk()
            data._level = reader.get_char()
            data._icon = CharacterIcon(reader.get_char())
            data._class_id = reader.get_char()
            data._guild_tag = 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"OnlinePlayer(byte_size={repr(self._byte_size)}, name={repr(self._name)}, title={repr(self._title)}, level={repr(self._level)}, icon={repr(self._icon)}, class_id={repr(self._class_id)}, guild_tag={repr(self._guild_tag)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

name: str property writable

title: str property writable

level: int property writable

Note
  • Value range is 0-252.

icon: CharacterIcon property writable

class_id: int property writable

Note
  • Value range is 0-252.

guild_tag: str property writable

serialize(writer, data) staticmethod

Serializes an instance of OnlinePlayer to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data OnlinePlayer

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/online_player.py
 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
@staticmethod
def serialize(writer: EoWriter, data: "OnlinePlayer") -> None:
    """
    Serializes an instance of `OnlinePlayer` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (OnlinePlayer): 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._title is None:
        raise SerializationError("title must be provided.")
    writer.add_string(data._title)
    writer.add_byte(0xFF)
    if data._level is None:
        raise SerializationError("level must be provided.")
    writer.add_char(data._level)
    if data._icon is None:
        raise SerializationError("icon must be provided.")
    writer.add_char(int(data._icon))
    if data._class_id is None:
        raise SerializationError("class_id must be provided.")
    writer.add_char(data._class_id)
    if data._guild_tag is None:
        raise SerializationError("guild_tag must be provided.")
    writer.add_string(data._guild_tag)

deserialize(reader) staticmethod

Deserializes an instance of OnlinePlayer from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
OnlinePlayer OnlinePlayer

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/online_player.py
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
@staticmethod
def deserialize(reader: EoReader) -> "OnlinePlayer":
    """
    Deserializes an instance of `OnlinePlayer` from the provided `EoReader`.

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

    Returns:
        OnlinePlayer: The data to serialize.
    """
    data: OnlinePlayer = OnlinePlayer()
    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._title = reader.get_string()
        reader.next_chunk()
        data._level = reader.get_char()
        data._icon = CharacterIcon(reader.get_char())
        data._class_id = reader.get_char()
        data._guild_tag = 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

PlayersAgreeServerPacket

Bases: Packet

Player has appeared in nearby view

Source code in src/eolib/protocol/_generated/net/server/players_agree_server_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 PlayersAgreeServerPacket(Packet):
    """
    Player has appeared in nearby view
    """
    _byte_size: int = 0
    _nearby: NearbyInfo = 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 nearby(self) -> NearbyInfo:
        return self._nearby

    @nearby.setter
    def nearby(self, nearby: NearbyInfo) -> None:
        self._nearby = nearby

    @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.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.
        """
        PlayersAgreeServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PlayersAgreeServerPacket): The data to serialize.
        """
        if data._nearby is None:
            raise SerializationError("nearby must be provided.")
        NearbyInfo.serialize(writer, data._nearby)

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

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

        Returns:
            PlayersAgreeServerPacket: The data to serialize.
        """
        data: PlayersAgreeServerPacket = PlayersAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._nearby = NearbyInfo.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"PlayersAgreeServerPacket(byte_size={repr(self._byte_size)}, nearby={repr(self._nearby)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

nearby: NearbyInfo 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/server/players_agree_server_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.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/server/players_agree_server_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.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/server/players_agree_server_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.
    """
    PlayersAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PlayersAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PlayersAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/players_agree_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "PlayersAgreeServerPacket") -> None:
    """
    Serializes an instance of `PlayersAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PlayersAgreeServerPacket): The data to serialize.
    """
    if data._nearby is None:
        raise SerializationError("nearby must be provided.")
    NearbyInfo.serialize(writer, data._nearby)

deserialize(reader) staticmethod

Deserializes an instance of PlayersAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PlayersAgreeServerPacket PlayersAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/players_agree_server_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) -> "PlayersAgreeServerPacket":
    """
    Deserializes an instance of `PlayersAgreeServerPacket` from the provided `EoReader`.

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

    Returns:
        PlayersAgreeServerPacket: The data to serialize.
    """
    data: PlayersAgreeServerPacket = PlayersAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._nearby = NearbyInfo.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PlayerKilledState

Bases: IntEnum

Flag to indicate that a player has been killed

Source code in src/eolib/protocol/_generated/net/server/player_killed_state.py
 9
10
11
12
13
14
class PlayerKilledState(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Flag to indicate that a player has been killed
    """
    Alive = 1
    Killed = 2

Alive = 1 class-attribute instance-attribute

Killed = 2 class-attribute instance-attribute

PartyExpShare

EXP gain for a member of the player's party

Source code in src/eolib/protocol/_generated/net/server/party_exp_share.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
121
122
123
124
class PartyExpShare:
    """
    EXP gain for a member of the player&#x27;s party
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _experience: int = None # type: ignore [assignment]
    _level_up: 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

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

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

    @property
    def level_up(self) -> int:
        """
        A value greater than 0 is &quot;new level&quot; and indicates the player leveled up.

        Note:
          - Value range is 0-252.
        """
        return self._level_up

    @level_up.setter
    def level_up(self, level_up: int) -> None:
        """
        A value greater than 0 is &quot;new level&quot; and indicates the player leveled up.

        Note:
          - Value range is 0-252.
        """
        self._level_up = level_up

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyExpShare): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._experience is None:
            raise SerializationError("experience must be provided.")
        writer.add_int(data._experience)
        if data._level_up is None:
            raise SerializationError("level_up must be provided.")
        writer.add_char(data._level_up)

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

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

        Returns:
            PartyExpShare: The data to serialize.
        """
        data: PartyExpShare = PartyExpShare()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._experience = reader.get_int()
            data._level_up = 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"PartyExpShare(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, experience={repr(self._experience)}, level_up={repr(self._level_up)})"

byte_size: int property

Returns the size 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.

experience: int property writable

Note
  • Value range is 0-4097152080.

level_up: int property writable

A value greater than 0 is "new level" and indicates the player leveled up.

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of PartyExpShare to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyExpShare

The data to serialize.

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

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyExpShare): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._experience is None:
        raise SerializationError("experience must be provided.")
    writer.add_int(data._experience)
    if data._level_up is None:
        raise SerializationError("level_up must be provided.")
    writer.add_char(data._level_up)

deserialize(reader) staticmethod

Deserializes an instance of PartyExpShare from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyExpShare PartyExpShare

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_exp_share.py
100
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) -> "PartyExpShare":
    """
    Deserializes an instance of `PartyExpShare` from the provided `EoReader`.

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

    Returns:
        PartyExpShare: The data to serialize.
    """
    data: PartyExpShare = PartyExpShare()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._experience = reader.get_int()
        data._level_up = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyTargetGroupServerPacket

Bases: Packet

Updated experience and level-ups from party experience

Source code in src/eolib/protocol/_generated/net/server/party_target_group_server_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
class PartyTargetGroupServerPacket(Packet):
    """
    Updated experience and level-ups from party experience
    """
    _byte_size: int = 0
    _gains: list[PartyExpShare] = 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 gains(self) -> list[PartyExpShare]:
        return self._gains

    @gains.setter
    def gains(self, gains: list[PartyExpShare]) -> None:
        self._gains = gains

    @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.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.
        """
        PartyTargetGroupServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyTargetGroupServerPacket): The data to serialize.
        """
        if data._gains is None:
            raise SerializationError("gains must be provided.")
        for i in range(len(data._gains)):
            PartyExpShare.serialize(writer, data._gains[i])

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

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

        Returns:
            PartyTargetGroupServerPacket: The data to serialize.
        """
        data: PartyTargetGroupServerPacket = PartyTargetGroupServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            gains_length = int(reader.remaining / 7)
            data._gains = []
            for i in range(gains_length):
                data._gains.append(PartyExpShare.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"PartyTargetGroupServerPacket(byte_size={repr(self._byte_size)}, gains={repr(self._gains)})"

byte_size: int property

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

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

gains: list[PartyExpShare] 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/server/party_target_group_server_packet.py
40
41
42
43
44
45
46
47
48
@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/server/party_target_group_server_packet.py
50
51
52
53
54
55
56
57
58
@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/server/party_target_group_server_packet.py
60
61
62
63
64
65
66
67
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

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

serialize(writer, data) staticmethod

Serializes an instance of PartyTargetGroupServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyTargetGroupServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_target_group_server_packet.py
69
70
71
72
73
74
75
76
77
78
79
80
81
@staticmethod
def serialize(writer: EoWriter, data: "PartyTargetGroupServerPacket") -> None:
    """
    Serializes an instance of `PartyTargetGroupServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyTargetGroupServerPacket): The data to serialize.
    """
    if data._gains is None:
        raise SerializationError("gains must be provided.")
    for i in range(len(data._gains)):
        PartyExpShare.serialize(writer, data._gains[i])

deserialize(reader) staticmethod

Deserializes an instance of PartyTargetGroupServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyTargetGroupServerPacket 'PartyTargetGroupServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_target_group_server_packet.py
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
@staticmethod
def deserialize(reader: EoReader) -> "PartyTargetGroupServerPacket":
    """
    Deserializes an instance of `PartyTargetGroupServerPacket` from the provided `EoReader`.

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

    Returns:
        PartyTargetGroupServerPacket: The data to serialize.
    """
    data: PartyTargetGroupServerPacket = PartyTargetGroupServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        gains_length = int(reader.remaining / 7)
        data._gains = []
        for i in range(gains_length):
            data._gains.append(PartyExpShare.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyRequestServerPacket

Bases: Packet

Received party invite / join request

Source code in src/eolib/protocol/_generated/net/server/party_request_server_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
class PartyRequestServerPacket(Packet):
    """
    Received party invite / join request
    """
    _byte_size: int = 0
    _request_type: PartyRequestType = None # type: ignore [assignment]
    _inviter_player_id: int = None # type: ignore [assignment]
    _player_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) -> 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

    @property
    def player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_name

    @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.
        """
        PartyRequestServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyRequestServerPacket): 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)
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_name)

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

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

        Returns:
            PartyRequestServerPacket: The data to serialize.
        """
        data: PartyRequestServerPacket = PartyRequestServerPacket()
        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._player_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"PartyRequestServerPacket(byte_size={repr(self._byte_size)}, request_type={repr(self._request_type)}, inviter_player_id={repr(self._inviter_player_id)}, player_name={repr(self._player_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: PartyRequestType property writable

inviter_player_id: int property writable

Note
  • Value range is 0-64008.

player_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/server/party_request_server_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.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/server/party_request_server_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/server/party_request_server_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.
    """
    PartyRequestServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyRequestServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyRequestServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_request_server_packet.py
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
@staticmethod
def serialize(writer: EoWriter, data: "PartyRequestServerPacket") -> None:
    """
    Serializes an instance of `PartyRequestServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyRequestServerPacket): 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)
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_name)

deserialize(reader) staticmethod

Deserializes an instance of PartyRequestServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyRequestServerPacket PartyRequestServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_request_server_packet.py
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
@staticmethod
def deserialize(reader: EoReader) -> "PartyRequestServerPacket":
    """
    Deserializes an instance of `PartyRequestServerPacket` from the provided `EoReader`.

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

    Returns:
        PartyRequestServerPacket: The data to serialize.
    """
    data: PartyRequestServerPacket = PartyRequestServerPacket()
    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._player_name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyReplyCode

Bases: IntEnum

Reply code sent with PARTY_REPLY packet. Indicates why an invite or join request failed.

Source code in src/eolib/protocol/_generated/net/server/party_reply_code.py
 9
10
11
12
13
14
15
16
class PartyReplyCode(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with PARTY_REPLY packet.
    Indicates why an invite or join request failed.
    """
    AlreadyInAnotherParty = 0
    AlreadyInYourParty = 1
    PartyIsFull = 2

AlreadyInAnotherParty = 0 class-attribute instance-attribute

AlreadyInYourParty = 1 class-attribute instance-attribute

PartyIsFull = 2 class-attribute instance-attribute

PartyReplyServerPacket

Bases: Packet

Failed party invite / join request

Source code in src/eolib/protocol/_generated/net/server/party_reply_server_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
class PartyReplyServerPacket(Packet):
    """
    Failed party invite / join request
    """
    _byte_size: int = 0
    _reply_code: PartyReplyCode = None # type: ignore [assignment]
    _reply_code_data: 'PartyReplyServerPacket.ReplyCodeData' = 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 reply_code(self) -> PartyReplyCode:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: PartyReplyCode) -> None:
        self._reply_code = reply_code

    @property
    def reply_code_data(self) -> 'PartyReplyServerPacket.ReplyCodeData':
        """
        PartyReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the `reply_code` field.
        """
        return self._reply_code_data

    @reply_code_data.setter
    def reply_code_data(self, reply_code_data: 'PartyReplyServerPacket.ReplyCodeData') -> None:
        self._reply_code_data = reply_code_data

    @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.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.
        """
        PartyReplyServerPacket.serialize(writer, self)

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_char(int(data._reply_code))
        if data._reply_code == PartyReplyCode.AlreadyInAnotherParty:
            if not isinstance(data._reply_code_data, PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty):
                raise SerializationError("Expected reply_code_data to be type PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty for reply_code " + PartyReplyCode(data._reply_code).name + ".")
            PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty.serialize(writer, data._reply_code_data)
        elif data._reply_code == PartyReplyCode.AlreadyInYourParty:
            if not isinstance(data._reply_code_data, PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty):
                raise SerializationError("Expected reply_code_data to be type PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty for reply_code " + PartyReplyCode(data._reply_code).name + ".")
            PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty.serialize(writer, data._reply_code_data)

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

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

        Returns:
            PartyReplyServerPacket: The data to serialize.
        """
        data: PartyReplyServerPacket = PartyReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = PartyReplyCode(reader.get_char())
            if data._reply_code == PartyReplyCode.AlreadyInAnotherParty:
                data._reply_code_data = PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty.deserialize(reader)
            elif data._reply_code == PartyReplyCode.AlreadyInYourParty:
                data._reply_code_data = PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty.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"PartyReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, reply_code_data={repr(self._reply_code_data)})"

    ReplyCodeData = Union['PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty', 'PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty', None]
    ReplyCodeData.__doc__ = \
        """
        Data associated with different values of the `reply_code` field.
        """

    class ReplyCodeDataAlreadyInAnotherParty:
        """
        Data associated with reply_code value PartyReplyCode.AlreadyInAnotherParty
        """
        _byte_size: int = 0
        _player_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 player_name(self) -> str:
            return self._player_name

        @player_name.setter
        def player_name(self, player_name: str) -> None:
            self._player_name = player_name

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty): The data to serialize.
            """
            if data._player_name is None:
                raise SerializationError("player_name must be provided.")
            writer.add_string(data._player_name)

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

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

            Returns:
                PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty: The data to serialize.
            """
            data: PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty = PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._player_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"PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty(byte_size={repr(self._byte_size)}, player_name={repr(self._player_name)})"

    class ReplyCodeDataAlreadyInYourParty:
        """
        Data associated with reply_code value PartyReplyCode.AlreadyInYourParty
        """
        _byte_size: int = 0
        _player_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 player_name(self) -> str:
            return self._player_name

        @player_name.setter
        def player_name(self, player_name: str) -> None:
            self._player_name = player_name

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

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty): The data to serialize.
            """
            if data._player_name is None:
                raise SerializationError("player_name must be provided.")
            writer.add_string(data._player_name)

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

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

            Returns:
                PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty: The data to serialize.
            """
            data: PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty = PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._player_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"PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

reply_code: PartyReplyCode property writable

reply_code_data: PartyReplyServerPacket.ReplyCodeData property writable

PartyReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the reply_code field.

ReplyCodeData = Union['PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty', 'PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty', None] class-attribute instance-attribute

ReplyCodeDataAlreadyInAnotherParty

Data associated with reply_code value PartyReplyCode.AlreadyInAnotherParty

Source code in src/eolib/protocol/_generated/net/server/party_reply_server_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
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
class ReplyCodeDataAlreadyInAnotherParty:
    """
    Data associated with reply_code value PartyReplyCode.AlreadyInAnotherParty
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_name

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

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_name)

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

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

        Returns:
            PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty: The data to serialize.
        """
        data: PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty = PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_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"PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_name: str property writable

serialize(writer, data) staticmethod

Serializes an instance of PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataAlreadyInAnotherParty

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_reply_server_packet.py
161
162
163
164
165
166
167
168
169
170
171
172
@staticmethod
def serialize(writer: EoWriter, data: "PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty") -> None:
    """
    Serializes an instance of `PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_name)

deserialize(reader) staticmethod

Deserializes an instance of PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataAlreadyInAnotherParty

PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_reply_server_packet.py
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
@staticmethod
def deserialize(reader: EoReader) -> "PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty":
    """
    Deserializes an instance of `PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty: The data to serialize.
    """
    data: PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty = PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataAlreadyInYourParty

Data associated with reply_code value PartyReplyCode.AlreadyInYourParty

Source code in src/eolib/protocol/_generated/net/server/party_reply_server_packet.py
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
class ReplyCodeDataAlreadyInYourParty:
    """
    Data associated with reply_code value PartyReplyCode.AlreadyInYourParty
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_name

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty") -> None:
        """
        Serializes an instance of `PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_name)

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty":
        """
        Deserializes an instance of `PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty: The data to serialize.
        """
        data: PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty = PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_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"PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_name: str property writable

serialize(writer, data) staticmethod

Serializes an instance of PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataAlreadyInYourParty

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_reply_server_packet.py
223
224
225
226
227
228
229
230
231
232
233
234
@staticmethod
def serialize(writer: EoWriter, data: "PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty") -> None:
    """
    Serializes an instance of `PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_name)

deserialize(reader) staticmethod

Deserializes an instance of PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataAlreadyInYourParty

PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_reply_server_packet.py
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
@staticmethod
def deserialize(reader: EoReader) -> "PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty":
    """
    Deserializes an instance of `PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty: The data to serialize.
    """
    data: PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty = PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_name = reader.get_string()
        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/server/party_reply_server_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/party_reply_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/party_reply_server_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PartyReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_reply_server_packet.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def serialize(writer: EoWriter, data: "PartyReplyServerPacket") -> None:
    """
    Serializes an instance of `PartyReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_char(int(data._reply_code))
    if data._reply_code == PartyReplyCode.AlreadyInAnotherParty:
        if not isinstance(data._reply_code_data, PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty):
            raise SerializationError("Expected reply_code_data to be type PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty for reply_code " + PartyReplyCode(data._reply_code).name + ".")
        PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty.serialize(writer, data._reply_code_data)
    elif data._reply_code == PartyReplyCode.AlreadyInYourParty:
        if not isinstance(data._reply_code_data, PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty):
            raise SerializationError("Expected reply_code_data to be type PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty for reply_code " + PartyReplyCode(data._reply_code).name + ".")
        PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty.serialize(writer, data._reply_code_data)

deserialize(reader) staticmethod

Deserializes an instance of PartyReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyReplyServerPacket PartyReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_reply_server_packet.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@staticmethod
def deserialize(reader: EoReader) -> "PartyReplyServerPacket":
    """
    Deserializes an instance of `PartyReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyReplyServerPacket: The data to serialize.
    """
    data: PartyReplyServerPacket = PartyReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._reply_code = PartyReplyCode(reader.get_char())
        if data._reply_code == PartyReplyCode.AlreadyInAnotherParty:
            data._reply_code_data = PartyReplyServerPacket.ReplyCodeDataAlreadyInAnotherParty.deserialize(reader)
        elif data._reply_code == PartyReplyCode.AlreadyInYourParty:
            data._reply_code_data = PartyReplyServerPacket.ReplyCodeDataAlreadyInYourParty.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyRemoveServerPacket

Bases: Packet

Player left the party

Source code in src/eolib/protocol/_generated/net/server/party_remove_server_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 PartyRemoveServerPacket(Packet):
    """
    Player left the 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.
        """
        PartyRemoveServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyRemoveServerPacket") -> None:
        """
        Serializes an instance of `PartyRemoveServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyRemoveServerPacket): 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) -> "PartyRemoveServerPacket":
        """
        Deserializes an instance of `PartyRemoveServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyRemoveServerPacket: The data to serialize.
        """
        data: PartyRemoveServerPacket = PartyRemoveServerPacket()
        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"PartyRemoveServerPacket(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/server/party_remove_server_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/server/party_remove_server_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/server/party_remove_server_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.
    """
    PartyRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyRemoveServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_remove_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "PartyRemoveServerPacket") -> None:
    """
    Serializes an instance of `PartyRemoveServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyRemoveServerPacket): 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 PartyRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyRemoveServerPacket PartyRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_remove_server_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) -> "PartyRemoveServerPacket":
    """
    Deserializes an instance of `PartyRemoveServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyRemoveServerPacket: The data to serialize.
    """
    data: PartyRemoveServerPacket = PartyRemoveServerPacket()
    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

PartyMember

A member of the player's party

Source code in src/eolib/protocol/_generated/net/server/party_member.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
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
class PartyMember:
    """
    A member of the player&#x27;s party
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _leader: bool = None # type: ignore [assignment]
    _level: int = None # type: ignore [assignment]
    _hp_percentage: 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 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

    @property
    def leader(self) -> bool:
        return self._leader

    @leader.setter
    def leader(self, leader: bool) -> None:
        self._leader = leader

    @property
    def level(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._level

    @level.setter
    def level(self, level: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._level = level

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hp_percentage = hp_percentage

    @property
    def name(self) -> str:
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        self._name = name

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyMember") -> None:
        """
        Serializes an instance of `PartyMember` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyMember): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._leader is None:
            raise SerializationError("leader must be provided.")
        writer.add_char(1 if data._leader else 0)
        if data._level is None:
            raise SerializationError("level must be provided.")
        writer.add_char(data._level)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyMember":
        """
        Deserializes an instance of `PartyMember` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyMember: The data to serialize.
        """
        data: PartyMember = PartyMember()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._leader = reader.get_char() != 0
            data._level = reader.get_char()
            data._hp_percentage = reader.get_char()
            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"PartyMember(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, leader={repr(self._leader)}, level={repr(self._level)}, hp_percentage={repr(self._hp_percentage)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

leader: bool property writable

level: int property writable

Note
  • Value range is 0-252.

hp_percentage: int property writable

Note
  • Value range is 0-252.

name: str property writable

serialize(writer, data) staticmethod

Serializes an instance of PartyMember to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyMember

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_member.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@staticmethod
def serialize(writer: EoWriter, data: "PartyMember") -> None:
    """
    Serializes an instance of `PartyMember` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyMember): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._leader is None:
        raise SerializationError("leader must be provided.")
    writer.add_char(1 if data._leader else 0)
    if data._level is None:
        raise SerializationError("level must be provided.")
    writer.add_char(data._level)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)
    if data._name is None:
        raise SerializationError("name must be provided.")
    writer.add_string(data._name)

deserialize(reader) staticmethod

Deserializes an instance of PartyMember from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyMember PartyMember

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_member.py
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
@staticmethod
def deserialize(reader: EoReader) -> "PartyMember":
    """
    Deserializes an instance of `PartyMember` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyMember: The data to serialize.
    """
    data: PartyMember = PartyMember()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._leader = reader.get_char() != 0
        data._level = reader.get_char()
        data._hp_percentage = reader.get_char()
        data._name = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyListServerPacket

Bases: Packet

Party member list update

Source code in src/eolib/protocol/_generated/net/server/party_list_server_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
class PartyListServerPacket(Packet):
    """
    Party member list update
    """
    _byte_size: int = 0
    _members: list[PartyMember] = 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(self) -> list[PartyMember]:
        return self._members

    @members.setter
    def members(self, members: list[PartyMember]) -> None:
        self._members = members

    @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.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.
        """
        PartyListServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyListServerPacket") -> None:
        """
        Serializes an instance of `PartyListServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyListServerPacket): The data to serialize.
        """
        if data._members is None:
            raise SerializationError("members must be provided.")
        for i in range(len(data._members)):
            if i > 0:
                writer.add_byte(0xFF)
            PartyMember.serialize(writer, data._members[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyListServerPacket":
        """
        Deserializes an instance of `PartyListServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyListServerPacket: The data to serialize.
        """
        data: PartyListServerPacket = PartyListServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._members = []
            while reader.remaining > 0:
                data._members.append(PartyMember.deserialize(reader))
                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"PartyListServerPacket(byte_size={repr(self._byte_size)}, members={repr(self._members)})"

byte_size: int property

Returns the size 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: list[PartyMember] 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/server/party_list_server_packet.py
40
41
42
43
44
45
46
47
48
@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/server/party_list_server_packet.py
50
51
52
53
54
55
56
57
58
@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/server/party_list_server_packet.py
60
61
62
63
64
65
66
67
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PartyListServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyListServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyListServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_list_server_packet.py
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@staticmethod
def serialize(writer: EoWriter, data: "PartyListServerPacket") -> None:
    """
    Serializes an instance of `PartyListServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyListServerPacket): The data to serialize.
    """
    if data._members is None:
        raise SerializationError("members must be provided.")
    for i in range(len(data._members)):
        if i > 0:
            writer.add_byte(0xFF)
        PartyMember.serialize(writer, data._members[i])

deserialize(reader) staticmethod

Deserializes an instance of PartyListServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyListServerPacket 'PartyListServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_list_server_packet.py
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "PartyListServerPacket":
    """
    Deserializes an instance of `PartyListServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyListServerPacket: The data to serialize.
    """
    data: PartyListServerPacket = PartyListServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._members = []
        while reader.remaining > 0:
            data._members.append(PartyMember.deserialize(reader))
            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

PartyCreateServerPacket

Bases: Packet

Member list received when party is first joined

Source code in src/eolib/protocol/_generated/net/server/party_create_server_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
class PartyCreateServerPacket(Packet):
    """
    Member list received when party is first joined
    """
    _byte_size: int = 0
    _members: list[PartyMember] = 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(self) -> list[PartyMember]:
        return self._members

    @members.setter
    def members(self, members: list[PartyMember]) -> None:
        self._members = members

    @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.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.
        """
        PartyCreateServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyCreateServerPacket") -> None:
        """
        Serializes an instance of `PartyCreateServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyCreateServerPacket): The data to serialize.
        """
        if data._members is None:
            raise SerializationError("members must be provided.")
        for i in range(len(data._members)):
            if i > 0:
                writer.add_byte(0xFF)
            PartyMember.serialize(writer, data._members[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyCreateServerPacket":
        """
        Deserializes an instance of `PartyCreateServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyCreateServerPacket: The data to serialize.
        """
        data: PartyCreateServerPacket = PartyCreateServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._members = []
            while reader.remaining > 0:
                data._members.append(PartyMember.deserialize(reader))
                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"PartyCreateServerPacket(byte_size={repr(self._byte_size)}, members={repr(self._members)})"

byte_size: int property

Returns the size 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: list[PartyMember] 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/server/party_create_server_packet.py
40
41
42
43
44
45
46
47
48
@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/server/party_create_server_packet.py
50
51
52
53
54
55
56
57
58
@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/server/party_create_server_packet.py
60
61
62
63
64
65
66
67
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PartyCreateServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyCreateServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyCreateServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_create_server_packet.py
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@staticmethod
def serialize(writer: EoWriter, data: "PartyCreateServerPacket") -> None:
    """
    Serializes an instance of `PartyCreateServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyCreateServerPacket): The data to serialize.
    """
    if data._members is None:
        raise SerializationError("members must be provided.")
    for i in range(len(data._members)):
        if i > 0:
            writer.add_byte(0xFF)
        PartyMember.serialize(writer, data._members[i])

deserialize(reader) staticmethod

Deserializes an instance of PartyCreateServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyCreateServerPacket 'PartyCreateServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_create_server_packet.py
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def deserialize(reader: EoReader) -> "PartyCreateServerPacket":
    """
    Deserializes an instance of `PartyCreateServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyCreateServerPacket: The data to serialize.
    """
    data: PartyCreateServerPacket = PartyCreateServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._members = []
        while reader.remaining > 0:
            data._members.append(PartyMember.deserialize(reader))
            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

PartyCloseServerPacket

Bases: Packet

Left / disbanded a party

Source code in src/eolib/protocol/_generated/net/server/party_close_server_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 PartyCloseServerPacket(Packet):
    """
    Left / disbanded a party
    """
    _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.Party

    @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.
        """
        PartyCloseServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyCloseServerPacket") -> None:
        """
        Serializes an instance of `PartyCloseServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyCloseServerPacket): 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) -> "PartyCloseServerPacket":
        """
        Deserializes an instance of `PartyCloseServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyCloseServerPacket: The data to serialize.
        """
        data: PartyCloseServerPacket = PartyCloseServerPacket()
        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"PartyCloseServerPacket(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/server/party_close_server_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.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/server/party_close_server_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/server/party_close_server_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.
    """
    PartyCloseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyCloseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyCloseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_close_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "PartyCloseServerPacket") -> None:
    """
    Serializes an instance of `PartyCloseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyCloseServerPacket): 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 PartyCloseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyCloseServerPacket PartyCloseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_close_server_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) -> "PartyCloseServerPacket":
    """
    Deserializes an instance of `PartyCloseServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyCloseServerPacket: The data to serialize.
    """
    data: PartyCloseServerPacket = PartyCloseServerPacket()
    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

PartyAgreeServerPacket

Bases: Packet

Party member list update

Source code in src/eolib/protocol/_generated/net/server/party_agree_server_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 PartyAgreeServerPacket(Packet):
    """
    Party member list update
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _hp_percentage: 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

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hp_percentage = hp_percentage

    @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.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.
        """
        PartyAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyAgreeServerPacket") -> None:
        """
        Serializes an instance of `PartyAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyAgreeServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyAgreeServerPacket":
        """
        Deserializes an instance of `PartyAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyAgreeServerPacket: The data to serialize.
        """
        data: PartyAgreeServerPacket = PartyAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._hp_percentage = 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"PartyAgreeServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, hp_percentage={repr(self._hp_percentage)})"

byte_size: int property

Returns the size 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.

hp_percentage: 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/server/party_agree_server_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.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/server/party_agree_server_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.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/server/party_agree_server_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.
    """
    PartyAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_agree_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "PartyAgreeServerPacket") -> None:
    """
    Serializes an instance of `PartyAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyAgreeServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)

deserialize(reader) staticmethod

Deserializes an instance of PartyAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyAgreeServerPacket PartyAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_agree_server_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) -> "PartyAgreeServerPacket":
    """
    Deserializes an instance of `PartyAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyAgreeServerPacket: The data to serialize.
    """
    data: PartyAgreeServerPacket = PartyAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._hp_percentage = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PartyAddServerPacket

Bases: Packet

New player joined the party

Source code in src/eolib/protocol/_generated/net/server/party_add_server_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 PartyAddServerPacket(Packet):
    """
    New player joined the party
    """
    _byte_size: int = 0
    _member: PartyMember = 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 member(self) -> PartyMember:
        return self._member

    @member.setter
    def member(self, member: PartyMember) -> None:
        self._member = member

    @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.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.
        """
        PartyAddServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PartyAddServerPacket") -> None:
        """
        Serializes an instance of `PartyAddServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PartyAddServerPacket): The data to serialize.
        """
        if data._member is None:
            raise SerializationError("member must be provided.")
        PartyMember.serialize(writer, data._member)

    @staticmethod
    def deserialize(reader: EoReader) -> "PartyAddServerPacket":
        """
        Deserializes an instance of `PartyAddServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PartyAddServerPacket: The data to serialize.
        """
        data: PartyAddServerPacket = PartyAddServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._member = PartyMember.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"PartyAddServerPacket(byte_size={repr(self._byte_size)}, member={repr(self._member)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

member: PartyMember 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/server/party_add_server_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.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/server/party_add_server_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/server/party_add_server_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.
    """
    PartyAddServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PartyAddServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PartyAddServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/party_add_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "PartyAddServerPacket") -> None:
    """
    Serializes an instance of `PartyAddServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PartyAddServerPacket): The data to serialize.
    """
    if data._member is None:
        raise SerializationError("member must be provided.")
    PartyMember.serialize(writer, data._member)

deserialize(reader) staticmethod

Deserializes an instance of PartyAddServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PartyAddServerPacket PartyAddServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/party_add_server_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) -> "PartyAddServerPacket":
    """
    Deserializes an instance of `PartyAddServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PartyAddServerPacket: The data to serialize.
    """
    data: PartyAddServerPacket = PartyAddServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._member = PartyMember.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EquipmentPaperdoll

Player equipment data. Sent with information about a player's paperdoll. Note that these values are item IDs.

Source code in src/eolib/protocol/_generated/net/server/equipment_paperdoll.py
 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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
class EquipmentPaperdoll:
    """
    Player equipment data.
    Sent with information about a player&#x27;s paperdoll.
    Note that these values are item IDs.
    """
    _byte_size: int = 0
    _boots: int = None # type: ignore [assignment]
    _accessory: int = None # type: ignore [assignment]
    _gloves: int = None # type: ignore [assignment]
    _belt: int = None # type: ignore [assignment]
    _armor: int = None # type: ignore [assignment]
    _necklace: int = None # type: ignore [assignment]
    _hat: int = None # type: ignore [assignment]
    _shield: int = None # type: ignore [assignment]
    _weapon: int = None # type: ignore [assignment]
    _ring: list[int] = None # type: ignore [assignment]
    _armlet: list[int] = None # type: ignore [assignment]
    _bracer: 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 boots(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._boots

    @boots.setter
    def boots(self, boots: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._boots = boots

    @property
    def accessory(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._accessory

    @accessory.setter
    def accessory(self, accessory: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._accessory = accessory

    @property
    def gloves(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._gloves

    @gloves.setter
    def gloves(self, gloves: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._gloves = gloves

    @property
    def belt(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._belt

    @belt.setter
    def belt(self, belt: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._belt = belt

    @property
    def armor(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._armor

    @armor.setter
    def armor(self, armor: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._armor = armor

    @property
    def necklace(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._necklace

    @necklace.setter
    def necklace(self, necklace: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._necklace = necklace

    @property
    def hat(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hat

    @hat.setter
    def hat(self, hat: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hat = hat

    @property
    def shield(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._shield

    @shield.setter
    def shield(self, shield: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._shield = shield

    @property
    def weapon(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._weapon

    @weapon.setter
    def weapon(self, weapon: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._weapon = weapon

    @property
    def ring(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._ring

    @ring.setter
    def ring(self, ring: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._ring = ring

    @property
    def armlet(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._armlet

    @armlet.setter
    def armlet(self, armlet: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._armlet = armlet

    @property
    def bracer(self) -> list[int]:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        return self._bracer

    @bracer.setter
    def bracer(self, bracer: list[int]) -> None:
        """
        Note:
          - Length must be `2`.
          - Element value range is 0-64008.
        """
        self._bracer = bracer

    @staticmethod
    def serialize(writer: EoWriter, data: "EquipmentPaperdoll") -> None:
        """
        Serializes an instance of `EquipmentPaperdoll` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EquipmentPaperdoll): The data to serialize.
        """
        if data._boots is None:
            raise SerializationError("boots must be provided.")
        writer.add_short(data._boots)
        if data._accessory is None:
            raise SerializationError("accessory must be provided.")
        writer.add_short(data._accessory)
        if data._gloves is None:
            raise SerializationError("gloves must be provided.")
        writer.add_short(data._gloves)
        if data._belt is None:
            raise SerializationError("belt must be provided.")
        writer.add_short(data._belt)
        if data._armor is None:
            raise SerializationError("armor must be provided.")
        writer.add_short(data._armor)
        if data._necklace is None:
            raise SerializationError("necklace must be provided.")
        writer.add_short(data._necklace)
        if data._hat is None:
            raise SerializationError("hat must be provided.")
        writer.add_short(data._hat)
        if data._shield is None:
            raise SerializationError("shield must be provided.")
        writer.add_short(data._shield)
        if data._weapon is None:
            raise SerializationError("weapon must be provided.")
        writer.add_short(data._weapon)
        if data._ring is None:
            raise SerializationError("ring must be provided.")
        if len(data._ring) != 2:
            raise SerializationError(f"Expected length of ring to be exactly 2, got {len(data._ring)}.")
        for i in range(2):
            writer.add_short(data._ring[i])
        if data._armlet is None:
            raise SerializationError("armlet must be provided.")
        if len(data._armlet) != 2:
            raise SerializationError(f"Expected length of armlet to be exactly 2, got {len(data._armlet)}.")
        for i in range(2):
            writer.add_short(data._armlet[i])
        if data._bracer is None:
            raise SerializationError("bracer must be provided.")
        if len(data._bracer) != 2:
            raise SerializationError(f"Expected length of bracer to be exactly 2, got {len(data._bracer)}.")
        for i in range(2):
            writer.add_short(data._bracer[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "EquipmentPaperdoll":
        """
        Deserializes an instance of `EquipmentPaperdoll` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EquipmentPaperdoll: The data to serialize.
        """
        data: EquipmentPaperdoll = EquipmentPaperdoll()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._boots = reader.get_short()
            data._accessory = reader.get_short()
            data._gloves = reader.get_short()
            data._belt = reader.get_short()
            data._armor = reader.get_short()
            data._necklace = reader.get_short()
            data._hat = reader.get_short()
            data._shield = reader.get_short()
            data._weapon = reader.get_short()
            data._ring = []
            for i in range(2):
                data._ring.append(reader.get_short())
            data._armlet = []
            for i in range(2):
                data._armlet.append(reader.get_short())
            data._bracer = []
            for i in range(2):
                data._bracer.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"EquipmentPaperdoll(byte_size={repr(self._byte_size)}, boots={repr(self._boots)}, accessory={repr(self._accessory)}, gloves={repr(self._gloves)}, belt={repr(self._belt)}, armor={repr(self._armor)}, necklace={repr(self._necklace)}, hat={repr(self._hat)}, shield={repr(self._shield)}, weapon={repr(self._weapon)}, ring={repr(self._ring)}, armlet={repr(self._armlet)}, bracer={repr(self._bracer)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

boots: int property writable

Note
  • Value range is 0-64008.

accessory: int property writable

Note
  • Value range is 0-64008.

gloves: int property writable

Note
  • Value range is 0-64008.

belt: int property writable

Note
  • Value range is 0-64008.

armor: int property writable

Note
  • Value range is 0-64008.

necklace: int property writable

Note
  • Value range is 0-64008.

hat: int property writable

Note
  • Value range is 0-64008.

shield: int property writable

Note
  • Value range is 0-64008.

weapon: int property writable

Note
  • Value range is 0-64008.

ring: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

armlet: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

bracer: list[int] property writable

Note
  • Length must be 2.
  • Element value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of EquipmentPaperdoll to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EquipmentPaperdoll

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/equipment_paperdoll.py
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
@staticmethod
def serialize(writer: EoWriter, data: "EquipmentPaperdoll") -> None:
    """
    Serializes an instance of `EquipmentPaperdoll` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EquipmentPaperdoll): The data to serialize.
    """
    if data._boots is None:
        raise SerializationError("boots must be provided.")
    writer.add_short(data._boots)
    if data._accessory is None:
        raise SerializationError("accessory must be provided.")
    writer.add_short(data._accessory)
    if data._gloves is None:
        raise SerializationError("gloves must be provided.")
    writer.add_short(data._gloves)
    if data._belt is None:
        raise SerializationError("belt must be provided.")
    writer.add_short(data._belt)
    if data._armor is None:
        raise SerializationError("armor must be provided.")
    writer.add_short(data._armor)
    if data._necklace is None:
        raise SerializationError("necklace must be provided.")
    writer.add_short(data._necklace)
    if data._hat is None:
        raise SerializationError("hat must be provided.")
    writer.add_short(data._hat)
    if data._shield is None:
        raise SerializationError("shield must be provided.")
    writer.add_short(data._shield)
    if data._weapon is None:
        raise SerializationError("weapon must be provided.")
    writer.add_short(data._weapon)
    if data._ring is None:
        raise SerializationError("ring must be provided.")
    if len(data._ring) != 2:
        raise SerializationError(f"Expected length of ring to be exactly 2, got {len(data._ring)}.")
    for i in range(2):
        writer.add_short(data._ring[i])
    if data._armlet is None:
        raise SerializationError("armlet must be provided.")
    if len(data._armlet) != 2:
        raise SerializationError(f"Expected length of armlet to be exactly 2, got {len(data._armlet)}.")
    for i in range(2):
        writer.add_short(data._armlet[i])
    if data._bracer is None:
        raise SerializationError("bracer must be provided.")
    if len(data._bracer) != 2:
        raise SerializationError(f"Expected length of bracer to be exactly 2, got {len(data._bracer)}.")
    for i in range(2):
        writer.add_short(data._bracer[i])

deserialize(reader) staticmethod

Deserializes an instance of EquipmentPaperdoll from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EquipmentPaperdoll 'EquipmentPaperdoll'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/equipment_paperdoll.py
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
@staticmethod
def deserialize(reader: EoReader) -> "EquipmentPaperdoll":
    """
    Deserializes an instance of `EquipmentPaperdoll` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EquipmentPaperdoll: The data to serialize.
    """
    data: EquipmentPaperdoll = EquipmentPaperdoll()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._boots = reader.get_short()
        data._accessory = reader.get_short()
        data._gloves = reader.get_short()
        data._belt = reader.get_short()
        data._armor = reader.get_short()
        data._necklace = reader.get_short()
        data._hat = reader.get_short()
        data._shield = reader.get_short()
        data._weapon = reader.get_short()
        data._ring = []
        for i in range(2):
            data._ring.append(reader.get_short())
        data._armlet = []
        for i in range(2):
            data._armlet.append(reader.get_short())
        data._bracer = []
        for i in range(2):
            data._bracer.append(reader.get_short())
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterIcon

Bases: IntEnum

Icon displayed in paperdolls, books, and the online list

Source code in src/eolib/protocol/_generated/net/server/character_icon.py
 9
10
11
12
13
14
15
16
17
18
class CharacterIcon(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Icon displayed in paperdolls, books, and the online list
    """
    Player = 1
    Gm = 4
    Hgm = 5
    Party = 6
    GmParty = 9
    HgmParty = 10

Player = 1 class-attribute instance-attribute

Gm = 4 class-attribute instance-attribute

Hgm = 5 class-attribute instance-attribute

Party = 6 class-attribute instance-attribute

GmParty = 9 class-attribute instance-attribute

HgmParty = 10 class-attribute instance-attribute

CharacterDetails

Information displayed on the paperdoll and book

Source code in src/eolib/protocol/_generated/net/server/character_details.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 CharacterDetails:
    """
    Information displayed on the paperdoll and book
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _home: str = None # type: ignore [assignment]
    _partner: str = None # type: ignore [assignment]
    _title: str = None # type: ignore [assignment]
    _guild: str = None # type: ignore [assignment]
    _guild_rank: str = None # type: ignore [assignment]
    _player_id: int = None # type: ignore [assignment]
    _class_id: int = None # type: ignore [assignment]
    _gender: Gender = None # type: ignore [assignment]
    _admin: AdminLevel = 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 home(self) -> str:
        return self._home

    @home.setter
    def home(self, home: str) -> None:
        self._home = home

    @property
    def partner(self) -> str:
        return self._partner

    @partner.setter
    def partner(self, partner: str) -> None:
        self._partner = partner

    @property
    def title(self) -> str:
        return self._title

    @title.setter
    def title(self, title: str) -> None:
        self._title = title

    @property
    def guild(self) -> str:
        return self._guild

    @guild.setter
    def guild(self, guild: str) -> None:
        self._guild = guild

    @property
    def guild_rank(self) -> str:
        return self._guild_rank

    @guild_rank.setter
    def guild_rank(self, guild_rank: str) -> None:
        self._guild_rank = guild_rank

    @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

    @property
    def class_id(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._class_id

    @class_id.setter
    def class_id(self, class_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._class_id = class_id

    @property
    def gender(self) -> Gender:
        return self._gender

    @gender.setter
    def gender(self, gender: Gender) -> None:
        self._gender = gender

    @property
    def admin(self) -> AdminLevel:
        return self._admin

    @admin.setter
    def admin(self, admin: AdminLevel) -> None:
        self._admin = admin

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterDetails") -> None:
        """
        Serializes an instance of `CharacterDetails` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterDetails): 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._home is None:
            raise SerializationError("home must be provided.")
        writer.add_string(data._home)
        writer.add_byte(0xFF)
        if data._partner is None:
            raise SerializationError("partner must be provided.")
        writer.add_string(data._partner)
        writer.add_byte(0xFF)
        if data._title is None:
            raise SerializationError("title must be provided.")
        writer.add_string(data._title)
        writer.add_byte(0xFF)
        if data._guild is None:
            raise SerializationError("guild must be provided.")
        writer.add_string(data._guild)
        writer.add_byte(0xFF)
        if data._guild_rank is None:
            raise SerializationError("guild_rank must be provided.")
        writer.add_string(data._guild_rank)
        writer.add_byte(0xFF)
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._class_id is None:
            raise SerializationError("class_id must be provided.")
        writer.add_char(data._class_id)
        if data._gender is None:
            raise SerializationError("gender must be provided.")
        writer.add_char(int(data._gender))
        if data._admin is None:
            raise SerializationError("admin must be provided.")
        writer.add_char(int(data._admin))

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterDetails":
        """
        Deserializes an instance of `CharacterDetails` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterDetails: The data to serialize.
        """
        data: CharacterDetails = CharacterDetails()
        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._home = reader.get_string()
            reader.next_chunk()
            data._partner = reader.get_string()
            reader.next_chunk()
            data._title = reader.get_string()
            reader.next_chunk()
            data._guild = reader.get_string()
            reader.next_chunk()
            data._guild_rank = reader.get_string()
            reader.next_chunk()
            data._player_id = reader.get_short()
            data._class_id = reader.get_char()
            data._gender = Gender(reader.get_char())
            data._admin = AdminLevel(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"CharacterDetails(byte_size={repr(self._byte_size)}, name={repr(self._name)}, home={repr(self._home)}, partner={repr(self._partner)}, title={repr(self._title)}, guild={repr(self._guild)}, guild_rank={repr(self._guild_rank)}, player_id={repr(self._player_id)}, class_id={repr(self._class_id)}, gender={repr(self._gender)}, admin={repr(self._admin)})"

byte_size: int property

Returns the size 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

home: str property writable

partner: str property writable

title: str property writable

guild: str property writable

guild_rank: str property writable

player_id: int property writable

Note
  • Value range is 0-64008.

class_id: int property writable

Note
  • Value range is 0-252.

gender: Gender property writable

admin: AdminLevel property writable

serialize(writer, data) staticmethod

Serializes an instance of CharacterDetails to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterDetails

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_details.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
@staticmethod
def serialize(writer: EoWriter, data: "CharacterDetails") -> None:
    """
    Serializes an instance of `CharacterDetails` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterDetails): 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._home is None:
        raise SerializationError("home must be provided.")
    writer.add_string(data._home)
    writer.add_byte(0xFF)
    if data._partner is None:
        raise SerializationError("partner must be provided.")
    writer.add_string(data._partner)
    writer.add_byte(0xFF)
    if data._title is None:
        raise SerializationError("title must be provided.")
    writer.add_string(data._title)
    writer.add_byte(0xFF)
    if data._guild is None:
        raise SerializationError("guild must be provided.")
    writer.add_string(data._guild)
    writer.add_byte(0xFF)
    if data._guild_rank is None:
        raise SerializationError("guild_rank must be provided.")
    writer.add_string(data._guild_rank)
    writer.add_byte(0xFF)
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._class_id is None:
        raise SerializationError("class_id must be provided.")
    writer.add_char(data._class_id)
    if data._gender is None:
        raise SerializationError("gender must be provided.")
    writer.add_char(int(data._gender))
    if data._admin is None:
        raise SerializationError("admin must be provided.")
    writer.add_char(int(data._admin))

deserialize(reader) staticmethod

Deserializes an instance of CharacterDetails from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterDetails CharacterDetails

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_details.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) -> "CharacterDetails":
    """
    Deserializes an instance of `CharacterDetails` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterDetails: The data to serialize.
    """
    data: CharacterDetails = CharacterDetails()
    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._home = reader.get_string()
        reader.next_chunk()
        data._partner = reader.get_string()
        reader.next_chunk()
        data._title = reader.get_string()
        reader.next_chunk()
        data._guild = reader.get_string()
        reader.next_chunk()
        data._guild_rank = reader.get_string()
        reader.next_chunk()
        data._player_id = reader.get_short()
        data._class_id = reader.get_char()
        data._gender = Gender(reader.get_char())
        data._admin = AdminLevel(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

PaperdollReplyServerPacket

Bases: Packet

Reply to requesting a paperdoll

Source code in src/eolib/protocol/_generated/net/server/paperdoll_reply_server_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
class PaperdollReplyServerPacket(Packet):
    """
    Reply to requesting a paperdoll
    """
    _byte_size: int = 0
    _details: CharacterDetails = None # type: ignore [assignment]
    _equipment: EquipmentPaperdoll = None # type: ignore [assignment]
    _icon: CharacterIcon = 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 details(self) -> CharacterDetails:
        return self._details

    @details.setter
    def details(self, details: CharacterDetails) -> None:
        self._details = details

    @property
    def equipment(self) -> EquipmentPaperdoll:
        return self._equipment

    @equipment.setter
    def equipment(self, equipment: EquipmentPaperdoll) -> None:
        self._equipment = equipment

    @property
    def icon(self) -> CharacterIcon:
        return self._icon

    @icon.setter
    def icon(self, icon: CharacterIcon) -> None:
        self._icon = icon

    @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.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.
        """
        PaperdollReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PaperdollReplyServerPacket") -> None:
        """
        Serializes an instance of `PaperdollReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PaperdollReplyServerPacket): The data to serialize.
        """
        if data._details is None:
            raise SerializationError("details must be provided.")
        CharacterDetails.serialize(writer, data._details)
        if data._equipment is None:
            raise SerializationError("equipment must be provided.")
        EquipmentPaperdoll.serialize(writer, data._equipment)
        if data._icon is None:
            raise SerializationError("icon must be provided.")
        writer.add_char(int(data._icon))

    @staticmethod
    def deserialize(reader: EoReader) -> "PaperdollReplyServerPacket":
        """
        Deserializes an instance of `PaperdollReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PaperdollReplyServerPacket: The data to serialize.
        """
        data: PaperdollReplyServerPacket = PaperdollReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._details = CharacterDetails.deserialize(reader)
            data._equipment = EquipmentPaperdoll.deserialize(reader)
            data._icon = CharacterIcon(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"PaperdollReplyServerPacket(byte_size={repr(self._byte_size)}, details={repr(self._details)}, equipment={repr(self._equipment)}, icon={repr(self._icon)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

details: CharacterDetails property writable

equipment: EquipmentPaperdoll property writable

icon: CharacterIcon 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/server/paperdoll_reply_server_packet.py
59
60
61
62
63
64
65
66
67
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/paperdoll_reply_server_packet.py
69
70
71
72
73
74
75
76
77
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Reply

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/server/paperdoll_reply_server_packet.py
79
80
81
82
83
84
85
86
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PaperdollReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PaperdollReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PaperdollReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/paperdoll_reply_server_packet.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
@staticmethod
def serialize(writer: EoWriter, data: "PaperdollReplyServerPacket") -> None:
    """
    Serializes an instance of `PaperdollReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PaperdollReplyServerPacket): The data to serialize.
    """
    if data._details is None:
        raise SerializationError("details must be provided.")
    CharacterDetails.serialize(writer, data._details)
    if data._equipment is None:
        raise SerializationError("equipment must be provided.")
    EquipmentPaperdoll.serialize(writer, data._equipment)
    if data._icon is None:
        raise SerializationError("icon must be provided.")
    writer.add_char(int(data._icon))

deserialize(reader) staticmethod

Deserializes an instance of PaperdollReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PaperdollReplyServerPacket PaperdollReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/paperdoll_reply_server_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
@staticmethod
def deserialize(reader: EoReader) -> "PaperdollReplyServerPacket":
    """
    Deserializes an instance of `PaperdollReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PaperdollReplyServerPacket: The data to serialize.
    """
    data: PaperdollReplyServerPacket = PaperdollReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._details = CharacterDetails.deserialize(reader)
        data._equipment = EquipmentPaperdoll.deserialize(reader)
        data._icon = CharacterIcon(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

CharacterStatsEquipmentChange

Character stats data. Sent when an item is equipped or unequipped.

Source code in src/eolib/protocol/_generated/net/server/character_stats_equipment_change.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
class CharacterStatsEquipmentChange:
    """
    Character stats data.
    Sent when an item is equipped or unequipped.
    """
    _byte_size: int = 0
    _max_hp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _base_stats: CharacterBaseStats = None # type: ignore [assignment]
    _secondary_stats: CharacterSecondaryStats = 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 max_hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_hp

    @max_hp.setter
    def max_hp(self, max_hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_hp = max_hp

    @property
    def max_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_tp

    @max_tp.setter
    def max_tp(self, max_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_tp = max_tp

    @property
    def base_stats(self) -> CharacterBaseStats:
        return self._base_stats

    @base_stats.setter
    def base_stats(self, base_stats: CharacterBaseStats) -> None:
        self._base_stats = base_stats

    @property
    def secondary_stats(self) -> CharacterSecondaryStats:
        return self._secondary_stats

    @secondary_stats.setter
    def secondary_stats(self, secondary_stats: CharacterSecondaryStats) -> None:
        self._secondary_stats = secondary_stats

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterStatsEquipmentChange") -> None:
        """
        Serializes an instance of `CharacterStatsEquipmentChange` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterStatsEquipmentChange): The data to serialize.
        """
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._base_stats is None:
            raise SerializationError("base_stats must be provided.")
        CharacterBaseStats.serialize(writer, data._base_stats)
        if data._secondary_stats is None:
            raise SerializationError("secondary_stats must be provided.")
        CharacterSecondaryStats.serialize(writer, data._secondary_stats)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterStatsEquipmentChange":
        """
        Deserializes an instance of `CharacterStatsEquipmentChange` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterStatsEquipmentChange: The data to serialize.
        """
        data: CharacterStatsEquipmentChange = CharacterStatsEquipmentChange()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._max_hp = reader.get_short()
            data._max_tp = reader.get_short()
            data._base_stats = CharacterBaseStats.deserialize(reader)
            data._secondary_stats = CharacterSecondaryStats.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"CharacterStatsEquipmentChange(byte_size={repr(self._byte_size)}, max_hp={repr(self._max_hp)}, max_tp={repr(self._max_tp)}, base_stats={repr(self._base_stats)}, secondary_stats={repr(self._secondary_stats)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

max_hp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

base_stats: CharacterBaseStats property writable

secondary_stats: CharacterSecondaryStats property writable

serialize(writer, data) staticmethod

Serializes an instance of CharacterStatsEquipmentChange to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterStatsEquipmentChange

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_stats_equipment_change.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@staticmethod
def serialize(writer: EoWriter, data: "CharacterStatsEquipmentChange") -> None:
    """
    Serializes an instance of `CharacterStatsEquipmentChange` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterStatsEquipmentChange): The data to serialize.
    """
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._base_stats is None:
        raise SerializationError("base_stats must be provided.")
    CharacterBaseStats.serialize(writer, data._base_stats)
    if data._secondary_stats is None:
        raise SerializationError("secondary_stats must be provided.")
    CharacterSecondaryStats.serialize(writer, data._secondary_stats)

deserialize(reader) staticmethod

Deserializes an instance of CharacterStatsEquipmentChange from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterStatsEquipmentChange CharacterStatsEquipmentChange

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_stats_equipment_change.py
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@staticmethod
def deserialize(reader: EoReader) -> "CharacterStatsEquipmentChange":
    """
    Deserializes an instance of `CharacterStatsEquipmentChange` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterStatsEquipmentChange: The data to serialize.
    """
    data: CharacterStatsEquipmentChange = CharacterStatsEquipmentChange()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._max_hp = reader.get_short()
        data._max_tp = reader.get_short()
        data._base_stats = CharacterBaseStats.deserialize(reader)
        data._secondary_stats = CharacterSecondaryStats.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AvatarChange

Information about a nearby player's appearance changing

Source code in src/eolib/protocol/_generated/net/server/avatar_change.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
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
class AvatarChange:
    """
    Information about a nearby player&#x27;s appearance changing
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _change_type: AvatarChangeType = None # type: ignore [assignment]
    _sound: bool = None # type: ignore [assignment]
    _change_type_data: 'AvatarChange.ChangeTypeData' = 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 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

    @property
    def change_type(self) -> AvatarChangeType:
        return self._change_type

    @change_type.setter
    def change_type(self, change_type: AvatarChangeType) -> None:
        self._change_type = change_type

    @property
    def sound(self) -> bool:
        return self._sound

    @sound.setter
    def sound(self, sound: bool) -> None:
        self._sound = sound

    @property
    def change_type_data(self) -> 'AvatarChange.ChangeTypeData':
        """
        AvatarChange.ChangeTypeData: Gets or sets the data associated with the `change_type` field.
        """
        return self._change_type_data

    @change_type_data.setter
    def change_type_data(self, change_type_data: 'AvatarChange.ChangeTypeData') -> None:
        self._change_type_data = change_type_data

    @staticmethod
    def serialize(writer: EoWriter, data: "AvatarChange") -> None:
        """
        Serializes an instance of `AvatarChange` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AvatarChange): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._change_type is None:
            raise SerializationError("change_type must be provided.")
        writer.add_char(int(data._change_type))
        if data._sound is None:
            raise SerializationError("sound must be provided.")
        writer.add_char(1 if data._sound else 0)
        if data._change_type == AvatarChangeType.Equipment:
            if not isinstance(data._change_type_data, AvatarChange.ChangeTypeDataEquipment):
                raise SerializationError("Expected change_type_data to be type AvatarChange.ChangeTypeDataEquipment for change_type " + AvatarChangeType(data._change_type).name + ".")
            AvatarChange.ChangeTypeDataEquipment.serialize(writer, data._change_type_data)
        elif data._change_type == AvatarChangeType.Hair:
            if not isinstance(data._change_type_data, AvatarChange.ChangeTypeDataHair):
                raise SerializationError("Expected change_type_data to be type AvatarChange.ChangeTypeDataHair for change_type " + AvatarChangeType(data._change_type).name + ".")
            AvatarChange.ChangeTypeDataHair.serialize(writer, data._change_type_data)
        elif data._change_type == AvatarChangeType.HairColor:
            if not isinstance(data._change_type_data, AvatarChange.ChangeTypeDataHairColor):
                raise SerializationError("Expected change_type_data to be type AvatarChange.ChangeTypeDataHairColor for change_type " + AvatarChangeType(data._change_type).name + ".")
            AvatarChange.ChangeTypeDataHairColor.serialize(writer, data._change_type_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "AvatarChange":
        """
        Deserializes an instance of `AvatarChange` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AvatarChange: The data to serialize.
        """
        data: AvatarChange = AvatarChange()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._change_type = AvatarChangeType(reader.get_char())
            data._sound = reader.get_char() != 0
            if data._change_type == AvatarChangeType.Equipment:
                data._change_type_data = AvatarChange.ChangeTypeDataEquipment.deserialize(reader)
            elif data._change_type == AvatarChangeType.Hair:
                data._change_type_data = AvatarChange.ChangeTypeDataHair.deserialize(reader)
            elif data._change_type == AvatarChangeType.HairColor:
                data._change_type_data = AvatarChange.ChangeTypeDataHairColor.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"AvatarChange(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, change_type={repr(self._change_type)}, sound={repr(self._sound)}, change_type_data={repr(self._change_type_data)})"

    ChangeTypeData = Union['AvatarChange.ChangeTypeDataEquipment', 'AvatarChange.ChangeTypeDataHair', 'AvatarChange.ChangeTypeDataHairColor', None]
    ChangeTypeData.__doc__ = \
        """
        Data associated with different values of the `change_type` field.
        """

    class ChangeTypeDataEquipment:
        """
        Data associated with change_type value AvatarChangeType.Equipment
        """
        _byte_size: int = 0
        _equipment: EquipmentChange = 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 equipment(self) -> EquipmentChange:
            return self._equipment

        @equipment.setter
        def equipment(self, equipment: EquipmentChange) -> None:
            self._equipment = equipment

        @staticmethod
        def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataEquipment") -> None:
            """
            Serializes an instance of `AvatarChange.ChangeTypeDataEquipment` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AvatarChange.ChangeTypeDataEquipment): The data to serialize.
            """
            if data._equipment is None:
                raise SerializationError("equipment must be provided.")
            EquipmentChange.serialize(writer, data._equipment)

        @staticmethod
        def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataEquipment":
            """
            Deserializes an instance of `AvatarChange.ChangeTypeDataEquipment` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AvatarChange.ChangeTypeDataEquipment: The data to serialize.
            """
            data: AvatarChange.ChangeTypeDataEquipment = AvatarChange.ChangeTypeDataEquipment()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._equipment = EquipmentChange.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"AvatarChange.ChangeTypeDataEquipment(byte_size={repr(self._byte_size)}, equipment={repr(self._equipment)})"

    class ChangeTypeDataHair:
        """
        Data associated with change_type value AvatarChangeType.Hair
        """
        _byte_size: int = 0
        _hair_style: int = None # type: ignore [assignment]
        _hair_color: 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

        @staticmethod
        def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataHair") -> None:
            """
            Serializes an instance of `AvatarChange.ChangeTypeDataHair` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AvatarChange.ChangeTypeDataHair): 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)

        @staticmethod
        def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataHair":
            """
            Deserializes an instance of `AvatarChange.ChangeTypeDataHair` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AvatarChange.ChangeTypeDataHair: The data to serialize.
            """
            data: AvatarChange.ChangeTypeDataHair = AvatarChange.ChangeTypeDataHair()
            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._byte_size = reader.position - reader_start_position
                return data
            finally:
                reader.chunked_reading_mode = old_chunked_reading_mode

        def __repr__(self):
            return f"AvatarChange.ChangeTypeDataHair(byte_size={repr(self._byte_size)}, hair_style={repr(self._hair_style)}, hair_color={repr(self._hair_color)})"

    class ChangeTypeDataHairColor:
        """
        Data associated with change_type value AvatarChangeType.HairColor
        """
        _byte_size: int = 0
        _hair_color: 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_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

        @staticmethod
        def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataHairColor") -> None:
            """
            Serializes an instance of `AvatarChange.ChangeTypeDataHairColor` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AvatarChange.ChangeTypeDataHairColor): The data to serialize.
            """
            if data._hair_color is None:
                raise SerializationError("hair_color must be provided.")
            writer.add_char(data._hair_color)

        @staticmethod
        def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataHairColor":
            """
            Deserializes an instance of `AvatarChange.ChangeTypeDataHairColor` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AvatarChange.ChangeTypeDataHairColor: The data to serialize.
            """
            data: AvatarChange.ChangeTypeDataHairColor = AvatarChange.ChangeTypeDataHairColor()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._hair_color = 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"AvatarChange.ChangeTypeDataHairColor(byte_size={repr(self._byte_size)}, hair_color={repr(self._hair_color)})"

byte_size: int property

Returns the size 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.

change_type: AvatarChangeType property writable

sound: bool property writable

change_type_data: AvatarChange.ChangeTypeData property writable

AvatarChange.ChangeTypeData: Gets or sets the data associated with the change_type field.

ChangeTypeData = Union['AvatarChange.ChangeTypeDataEquipment', 'AvatarChange.ChangeTypeDataHair', 'AvatarChange.ChangeTypeDataHairColor', None] class-attribute instance-attribute

ChangeTypeDataEquipment

Data associated with change_type value AvatarChangeType.Equipment

Source code in src/eolib/protocol/_generated/net/server/avatar_change.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
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
class ChangeTypeDataEquipment:
    """
    Data associated with change_type value AvatarChangeType.Equipment
    """
    _byte_size: int = 0
    _equipment: EquipmentChange = 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 equipment(self) -> EquipmentChange:
        return self._equipment

    @equipment.setter
    def equipment(self, equipment: EquipmentChange) -> None:
        self._equipment = equipment

    @staticmethod
    def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataEquipment") -> None:
        """
        Serializes an instance of `AvatarChange.ChangeTypeDataEquipment` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AvatarChange.ChangeTypeDataEquipment): The data to serialize.
        """
        if data._equipment is None:
            raise SerializationError("equipment must be provided.")
        EquipmentChange.serialize(writer, data._equipment)

    @staticmethod
    def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataEquipment":
        """
        Deserializes an instance of `AvatarChange.ChangeTypeDataEquipment` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AvatarChange.ChangeTypeDataEquipment: The data to serialize.
        """
        data: AvatarChange.ChangeTypeDataEquipment = AvatarChange.ChangeTypeDataEquipment()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._equipment = EquipmentChange.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"AvatarChange.ChangeTypeDataEquipment(byte_size={repr(self._byte_size)}, equipment={repr(self._equipment)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

equipment: EquipmentChange property writable

serialize(writer, data) staticmethod

Serializes an instance of AvatarChange.ChangeTypeDataEquipment to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChangeTypeDataEquipment

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
170
171
172
173
174
175
176
177
178
179
180
181
@staticmethod
def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataEquipment") -> None:
    """
    Serializes an instance of `AvatarChange.ChangeTypeDataEquipment` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AvatarChange.ChangeTypeDataEquipment): The data to serialize.
    """
    if data._equipment is None:
        raise SerializationError("equipment must be provided.")
    EquipmentChange.serialize(writer, data._equipment)

deserialize(reader) staticmethod

Deserializes an instance of AvatarChange.ChangeTypeDataEquipment from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ChangeTypeDataEquipment

AvatarChange.ChangeTypeDataEquipment: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
@staticmethod
def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataEquipment":
    """
    Deserializes an instance of `AvatarChange.ChangeTypeDataEquipment` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AvatarChange.ChangeTypeDataEquipment: The data to serialize.
    """
    data: AvatarChange.ChangeTypeDataEquipment = AvatarChange.ChangeTypeDataEquipment()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._equipment = EquipmentChange.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChangeTypeDataHair

Data associated with change_type value AvatarChangeType.Hair

Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
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
class ChangeTypeDataHair:
    """
    Data associated with change_type value AvatarChangeType.Hair
    """
    _byte_size: int = 0
    _hair_style: int = None # type: ignore [assignment]
    _hair_color: 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

    @staticmethod
    def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataHair") -> None:
        """
        Serializes an instance of `AvatarChange.ChangeTypeDataHair` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AvatarChange.ChangeTypeDataHair): 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)

    @staticmethod
    def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataHair":
        """
        Deserializes an instance of `AvatarChange.ChangeTypeDataHair` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AvatarChange.ChangeTypeDataHair: The data to serialize.
        """
        data: AvatarChange.ChangeTypeDataHair = AvatarChange.ChangeTypeDataHair()
        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._byte_size = reader.position - reader_start_position
            return data
        finally:
            reader.chunked_reading_mode = old_chunked_reading_mode

    def __repr__(self):
        return f"AvatarChange.ChangeTypeDataHair(byte_size={repr(self._byte_size)}, hair_style={repr(self._hair_style)}, hair_color={repr(self._hair_color)})"

byte_size: int property

Returns the size 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.

serialize(writer, data) staticmethod

Serializes an instance of AvatarChange.ChangeTypeDataHair to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChangeTypeDataHair

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
@staticmethod
def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataHair") -> None:
    """
    Serializes an instance of `AvatarChange.ChangeTypeDataHair` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AvatarChange.ChangeTypeDataHair): 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)

deserialize(reader) staticmethod

Deserializes an instance of AvatarChange.ChangeTypeDataHair from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ChangeTypeDataHair

AvatarChange.ChangeTypeDataHair: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
@staticmethod
def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataHair":
    """
    Deserializes an instance of `AvatarChange.ChangeTypeDataHair` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AvatarChange.ChangeTypeDataHair: The data to serialize.
    """
    data: AvatarChange.ChangeTypeDataHair = AvatarChange.ChangeTypeDataHair()
    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._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChangeTypeDataHairColor

Data associated with change_type value AvatarChangeType.HairColor

Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
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
class ChangeTypeDataHairColor:
    """
    Data associated with change_type value AvatarChangeType.HairColor
    """
    _byte_size: int = 0
    _hair_color: 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_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

    @staticmethod
    def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataHairColor") -> None:
        """
        Serializes an instance of `AvatarChange.ChangeTypeDataHairColor` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AvatarChange.ChangeTypeDataHairColor): The data to serialize.
        """
        if data._hair_color is None:
            raise SerializationError("hair_color must be provided.")
        writer.add_char(data._hair_color)

    @staticmethod
    def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataHairColor":
        """
        Deserializes an instance of `AvatarChange.ChangeTypeDataHairColor` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AvatarChange.ChangeTypeDataHairColor: The data to serialize.
        """
        data: AvatarChange.ChangeTypeDataHairColor = AvatarChange.ChangeTypeDataHairColor()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._hair_color = 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"AvatarChange.ChangeTypeDataHairColor(byte_size={repr(self._byte_size)}, hair_color={repr(self._hair_color)})"

byte_size: int property

Returns the size 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_color: int property writable

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of AvatarChange.ChangeTypeDataHairColor to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChangeTypeDataHairColor

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
331
332
333
334
335
336
337
338
339
340
341
342
@staticmethod
def serialize(writer: EoWriter, data: "AvatarChange.ChangeTypeDataHairColor") -> None:
    """
    Serializes an instance of `AvatarChange.ChangeTypeDataHairColor` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AvatarChange.ChangeTypeDataHairColor): The data to serialize.
    """
    if data._hair_color is None:
        raise SerializationError("hair_color must be provided.")
    writer.add_char(data._hair_color)

deserialize(reader) staticmethod

Deserializes an instance of AvatarChange.ChangeTypeDataHairColor from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ChangeTypeDataHairColor

AvatarChange.ChangeTypeDataHairColor: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
@staticmethod
def deserialize(reader: EoReader) -> "AvatarChange.ChangeTypeDataHairColor":
    """
    Deserializes an instance of `AvatarChange.ChangeTypeDataHairColor` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AvatarChange.ChangeTypeDataHairColor: The data to serialize.
    """
    data: AvatarChange.ChangeTypeDataHairColor = AvatarChange.ChangeTypeDataHairColor()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._hair_color = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

serialize(writer, data) staticmethod

Serializes an instance of AvatarChange to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AvatarChange

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/avatar_change.py
 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
@staticmethod
def serialize(writer: EoWriter, data: "AvatarChange") -> None:
    """
    Serializes an instance of `AvatarChange` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AvatarChange): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._change_type is None:
        raise SerializationError("change_type must be provided.")
    writer.add_char(int(data._change_type))
    if data._sound is None:
        raise SerializationError("sound must be provided.")
    writer.add_char(1 if data._sound else 0)
    if data._change_type == AvatarChangeType.Equipment:
        if not isinstance(data._change_type_data, AvatarChange.ChangeTypeDataEquipment):
            raise SerializationError("Expected change_type_data to be type AvatarChange.ChangeTypeDataEquipment for change_type " + AvatarChangeType(data._change_type).name + ".")
        AvatarChange.ChangeTypeDataEquipment.serialize(writer, data._change_type_data)
    elif data._change_type == AvatarChangeType.Hair:
        if not isinstance(data._change_type_data, AvatarChange.ChangeTypeDataHair):
            raise SerializationError("Expected change_type_data to be type AvatarChange.ChangeTypeDataHair for change_type " + AvatarChangeType(data._change_type).name + ".")
        AvatarChange.ChangeTypeDataHair.serialize(writer, data._change_type_data)
    elif data._change_type == AvatarChangeType.HairColor:
        if not isinstance(data._change_type_data, AvatarChange.ChangeTypeDataHairColor):
            raise SerializationError("Expected change_type_data to be type AvatarChange.ChangeTypeDataHairColor for change_type " + AvatarChangeType(data._change_type).name + ".")
        AvatarChange.ChangeTypeDataHairColor.serialize(writer, data._change_type_data)

deserialize(reader) staticmethod

Deserializes an instance of AvatarChange from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AvatarChange AvatarChange

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/avatar_change.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
134
@staticmethod
def deserialize(reader: EoReader) -> "AvatarChange":
    """
    Deserializes an instance of `AvatarChange` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AvatarChange: The data to serialize.
    """
    data: AvatarChange = AvatarChange()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._change_type = AvatarChangeType(reader.get_char())
        data._sound = reader.get_char() != 0
        if data._change_type == AvatarChangeType.Equipment:
            data._change_type_data = AvatarChange.ChangeTypeDataEquipment.deserialize(reader)
        elif data._change_type == AvatarChangeType.Hair:
            data._change_type_data = AvatarChange.ChangeTypeDataHair.deserialize(reader)
        elif data._change_type == AvatarChangeType.HairColor:
            data._change_type_data = AvatarChange.ChangeTypeDataHairColor.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PaperdollRemoveServerPacket

Bases: Packet

Reply to unequipping an item

Source code in src/eolib/protocol/_generated/net/server/paperdoll_remove_server_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
class PaperdollRemoveServerPacket(Packet):
    """
    Reply to unequipping an item
    """
    _byte_size: int = 0
    _change: AvatarChange = None # type: ignore [assignment]
    _item_id: int = None # type: ignore [assignment]
    _sub_loc: int = None # type: ignore [assignment]
    _stats: CharacterStatsEquipmentChange = 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 change(self) -> AvatarChange:
        return self._change

    @change.setter
    def change(self, change: AvatarChange) -> None:
        self._change = change

    @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

    @property
    def stats(self) -> CharacterStatsEquipmentChange:
        return self._stats

    @stats.setter
    def stats(self, stats: CharacterStatsEquipmentChange) -> None:
        self._stats = stats

    @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.
        """
        PaperdollRemoveServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PaperdollRemoveServerPacket") -> None:
        """
        Serializes an instance of `PaperdollRemoveServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PaperdollRemoveServerPacket): The data to serialize.
        """
        if data._change is None:
            raise SerializationError("change must be provided.")
        AvatarChange.serialize(writer, data._change)
        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)
        if data._stats is None:
            raise SerializationError("stats must be provided.")
        CharacterStatsEquipmentChange.serialize(writer, data._stats)

    @staticmethod
    def deserialize(reader: EoReader) -> "PaperdollRemoveServerPacket":
        """
        Deserializes an instance of `PaperdollRemoveServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PaperdollRemoveServerPacket: The data to serialize.
        """
        data: PaperdollRemoveServerPacket = PaperdollRemoveServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._change = AvatarChange.deserialize(reader)
            data._item_id = reader.get_short()
            data._sub_loc = reader.get_char()
            data._stats = CharacterStatsEquipmentChange.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"PaperdollRemoveServerPacket(byte_size={repr(self._byte_size)}, change={repr(self._change)}, item_id={repr(self._item_id)}, sub_loc={repr(self._sub_loc)}, stats={repr(self._stats)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

change: AvatarChange property writable

item_id: int property writable

Note
  • Value range is 0-64008.

sub_loc: int property writable

Note
  • Value range is 0-252.

stats: CharacterStatsEquipmentChange 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/server/paperdoll_remove_server_packet.py
83
84
85
86
87
88
89
90
91
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/paperdoll_remove_server_packet.py
 93
 94
 95
 96
 97
 98
 99
100
101
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/paperdoll_remove_server_packet.py
103
104
105
106
107
108
109
110
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PaperdollRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PaperdollRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PaperdollRemoveServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/paperdoll_remove_server_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 serialize(writer: EoWriter, data: "PaperdollRemoveServerPacket") -> None:
    """
    Serializes an instance of `PaperdollRemoveServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PaperdollRemoveServerPacket): The data to serialize.
    """
    if data._change is None:
        raise SerializationError("change must be provided.")
    AvatarChange.serialize(writer, data._change)
    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)
    if data._stats is None:
        raise SerializationError("stats must be provided.")
    CharacterStatsEquipmentChange.serialize(writer, data._stats)

deserialize(reader) staticmethod

Deserializes an instance of PaperdollRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PaperdollRemoveServerPacket PaperdollRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/paperdoll_remove_server_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
@staticmethod
def deserialize(reader: EoReader) -> "PaperdollRemoveServerPacket":
    """
    Deserializes an instance of `PaperdollRemoveServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PaperdollRemoveServerPacket: The data to serialize.
    """
    data: PaperdollRemoveServerPacket = PaperdollRemoveServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._change = AvatarChange.deserialize(reader)
        data._item_id = reader.get_short()
        data._sub_loc = reader.get_char()
        data._stats = CharacterStatsEquipmentChange.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PaperdollPingServerPacket

Bases: Packet

Failed to equip an item due to being the incorrect class

Source code in src/eolib/protocol/_generated/net/server/paperdoll_ping_server_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
class PaperdollPingServerPacket(Packet):
    """
    Failed to equip an item due to being the incorrect class
    """
    _byte_size: int = 0
    _class_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 class_id(self) -> int:
        """
        The player&#x27;s current class ID (not the item&#x27;s required class ID)

        Note:
          - Value range is 0-252.
        """
        return self._class_id

    @class_id.setter
    def class_id(self, class_id: int) -> None:
        """
        The player&#x27;s current class ID (not the item&#x27;s required class ID)

        Note:
          - Value range is 0-252.
        """
        self._class_id = class_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.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.
        """
        PaperdollPingServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PaperdollPingServerPacket") -> None:
        """
        Serializes an instance of `PaperdollPingServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PaperdollPingServerPacket): The data to serialize.
        """
        if data._class_id is None:
            raise SerializationError("class_id must be provided.")
        writer.add_char(data._class_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "PaperdollPingServerPacket":
        """
        Deserializes an instance of `PaperdollPingServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PaperdollPingServerPacket: The data to serialize.
        """
        data: PaperdollPingServerPacket = PaperdollPingServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._class_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"PaperdollPingServerPacket(byte_size={repr(self._byte_size)}, class_id={repr(self._class_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.

class_id: int property writable

The player's current class ID (not the item's required class ID)

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/server/paperdoll_ping_server_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Paperdoll

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/paperdoll_ping_server_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/paperdoll_ping_server_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PaperdollPingServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PaperdollPingServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PaperdollPingServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/paperdoll_ping_server_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
@staticmethod
def serialize(writer: EoWriter, data: "PaperdollPingServerPacket") -> None:
    """
    Serializes an instance of `PaperdollPingServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PaperdollPingServerPacket): The data to serialize.
    """
    if data._class_id is None:
        raise SerializationError("class_id must be provided.")
    writer.add_char(data._class_id)

deserialize(reader) staticmethod

Deserializes an instance of PaperdollPingServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PaperdollPingServerPacket PaperdollPingServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/paperdoll_ping_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
@staticmethod
def deserialize(reader: EoReader) -> "PaperdollPingServerPacket":
    """
    Deserializes an instance of `PaperdollPingServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PaperdollPingServerPacket: The data to serialize.
    """
    data: PaperdollPingServerPacket = PaperdollPingServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._class_id = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

PaperdollAgreeServerPacket

Bases: Packet

Reply to equipping an item

Source code in src/eolib/protocol/_generated/net/server/paperdoll_agree_server_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
class PaperdollAgreeServerPacket(Packet):
    """
    Reply to equipping an item
    """
    _byte_size: int = 0
    _change: AvatarChange = None # type: ignore [assignment]
    _item_id: int = None # type: ignore [assignment]
    _remaining_amount: int = None # type: ignore [assignment]
    _sub_loc: int = None # type: ignore [assignment]
    _stats: CharacterStatsEquipmentChange = 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 change(self) -> AvatarChange:
        return self._change

    @change.setter
    def change(self, change: AvatarChange) -> None:
        self._change = change

    @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 remaining_amount(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._remaining_amount

    @remaining_amount.setter
    def remaining_amount(self, remaining_amount: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._remaining_amount = remaining_amount

    @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

    @property
    def stats(self) -> CharacterStatsEquipmentChange:
        return self._stats

    @stats.setter
    def stats(self, stats: CharacterStatsEquipmentChange) -> None:
        self._stats = stats

    @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.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.
        """
        PaperdollAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "PaperdollAgreeServerPacket") -> None:
        """
        Serializes an instance of `PaperdollAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (PaperdollAgreeServerPacket): The data to serialize.
        """
        if data._change is None:
            raise SerializationError("change must be provided.")
        AvatarChange.serialize(writer, data._change)
        if data._item_id is None:
            raise SerializationError("item_id must be provided.")
        writer.add_short(data._item_id)
        if data._remaining_amount is None:
            raise SerializationError("remaining_amount must be provided.")
        writer.add_three(data._remaining_amount)
        if data._sub_loc is None:
            raise SerializationError("sub_loc must be provided.")
        writer.add_char(data._sub_loc)
        if data._stats is None:
            raise SerializationError("stats must be provided.")
        CharacterStatsEquipmentChange.serialize(writer, data._stats)

    @staticmethod
    def deserialize(reader: EoReader) -> "PaperdollAgreeServerPacket":
        """
        Deserializes an instance of `PaperdollAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            PaperdollAgreeServerPacket: The data to serialize.
        """
        data: PaperdollAgreeServerPacket = PaperdollAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._change = AvatarChange.deserialize(reader)
            data._item_id = reader.get_short()
            data._remaining_amount = reader.get_three()
            data._sub_loc = reader.get_char()
            data._stats = CharacterStatsEquipmentChange.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"PaperdollAgreeServerPacket(byte_size={repr(self._byte_size)}, change={repr(self._change)}, item_id={repr(self._item_id)}, remaining_amount={repr(self._remaining_amount)}, sub_loc={repr(self._sub_loc)}, stats={repr(self._stats)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

change: AvatarChange property writable

item_id: int property writable

Note
  • Value range is 0-64008.

remaining_amount: int property writable

Note
  • Value range is 0-16194276.

sub_loc: int property writable

Note
  • Value range is 0-252.

stats: CharacterStatsEquipmentChange 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/server/paperdoll_agree_server_packet.py
100
101
102
103
104
105
106
107
108
@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/server/paperdoll_agree_server_packet.py
110
111
112
113
114
115
116
117
118
@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/server/paperdoll_agree_server_packet.py
120
121
122
123
124
125
126
127
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    PaperdollAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of PaperdollAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data PaperdollAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/paperdoll_agree_server_packet.py
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
@staticmethod
def serialize(writer: EoWriter, data: "PaperdollAgreeServerPacket") -> None:
    """
    Serializes an instance of `PaperdollAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (PaperdollAgreeServerPacket): The data to serialize.
    """
    if data._change is None:
        raise SerializationError("change must be provided.")
    AvatarChange.serialize(writer, data._change)
    if data._item_id is None:
        raise SerializationError("item_id must be provided.")
    writer.add_short(data._item_id)
    if data._remaining_amount is None:
        raise SerializationError("remaining_amount must be provided.")
    writer.add_three(data._remaining_amount)
    if data._sub_loc is None:
        raise SerializationError("sub_loc must be provided.")
    writer.add_char(data._sub_loc)
    if data._stats is None:
        raise SerializationError("stats must be provided.")
    CharacterStatsEquipmentChange.serialize(writer, data._stats)

deserialize(reader) staticmethod

Deserializes an instance of PaperdollAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
PaperdollAgreeServerPacket PaperdollAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/paperdoll_agree_server_packet.py
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
@staticmethod
def deserialize(reader: EoReader) -> "PaperdollAgreeServerPacket":
    """
    Deserializes an instance of `PaperdollAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        PaperdollAgreeServerPacket: The data to serialize.
    """
    data: PaperdollAgreeServerPacket = PaperdollAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._change = AvatarChange.deserialize(reader)
        data._item_id = reader.get_short()
        data._remaining_amount = reader.get_three()
        data._sub_loc = reader.get_char()
        data._stats = CharacterStatsEquipmentChange.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcUpdatePosition

An NPC walking

Source code in src/eolib/protocol/_generated/net/server/npc_update_position.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 NpcUpdatePosition:
    """
    An NPC walking
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]
    _coords: Coords = None # type: ignore [assignment]
    _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 npc_index(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._npc_index = npc_index

    @property
    def coords(self) -> Coords:
        return self._coords

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = coords

    @property
    def direction(self) -> Direction:
        return self._direction

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcUpdatePosition") -> None:
        """
        Serializes an instance of `NpcUpdatePosition` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcUpdatePosition): The data to serialize.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_char(data._npc_index)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcUpdatePosition":
        """
        Deserializes an instance of `NpcUpdatePosition` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcUpdatePosition: The data to serialize.
        """
        data: NpcUpdatePosition = NpcUpdatePosition()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_char()
            data._coords = Coords.deserialize(reader)
            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"NpcUpdatePosition(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)}, coords={repr(self._coords)}, 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.

npc_index: int property writable

Note
  • Value range is 0-252.

coords: Coords property writable

direction: Direction property writable

serialize(writer, data) staticmethod

Serializes an instance of NpcUpdatePosition to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcUpdatePosition

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_update_position.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: "NpcUpdatePosition") -> None:
    """
    Serializes an instance of `NpcUpdatePosition` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcUpdatePosition): The data to serialize.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_char(data._npc_index)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

deserialize(reader) staticmethod

Deserializes an instance of NpcUpdatePosition from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcUpdatePosition NpcUpdatePosition

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_update_position.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) -> "NpcUpdatePosition":
    """
    Deserializes an instance of `NpcUpdatePosition` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcUpdatePosition: The data to serialize.
    """
    data: NpcUpdatePosition = NpcUpdatePosition()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_char()
        data._coords = Coords.deserialize(reader)
        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

NpcUpdateChat

An NPC talking

Source code in src/eolib/protocol/_generated/net/server/npc_update_chat.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
class NpcUpdateChat:
    """
    An NPC talking
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]
    _message_length: int = 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 npc_index(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._npc_index = npc_index

    @property
    def message(self) -> str:
        """
        Note:
          - Length must be 252 or less.
        """
        return self._message

    @message.setter
    def message(self, message: str) -> None:
        """
        Note:
          - Length must be 252 or less.
        """
        self._message = message
        self._message_length = len(self._message)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcUpdateChat") -> None:
        """
        Serializes an instance of `NpcUpdateChat` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcUpdateChat): The data to serialize.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_char(data._npc_index)
        if data._message_length is None:
            raise SerializationError("message_length must be provided.")
        writer.add_char(data._message_length)
        if data._message is None:
            raise SerializationError("message must be provided.")
        if len(data._message) > 252:
            raise SerializationError(f"Expected length of message to be 252 or less, got {len(data._message)}.")
        writer.add_fixed_string(data._message, data._message_length, False)

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcUpdateChat":
        """
        Deserializes an instance of `NpcUpdateChat` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcUpdateChat: The data to serialize.
        """
        data: NpcUpdateChat = NpcUpdateChat()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_char()
            data._message_length = reader.get_char()
            data._message = reader.get_fixed_string(data._message_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"NpcUpdateChat(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)}, 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.

npc_index: int property writable

Note
  • Value range is 0-252.

message: str property writable

Note
  • Length must be 252 or less.

serialize(writer, data) staticmethod

Serializes an instance of NpcUpdateChat to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcUpdateChat

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_update_chat.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@staticmethod
def serialize(writer: EoWriter, data: "NpcUpdateChat") -> None:
    """
    Serializes an instance of `NpcUpdateChat` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcUpdateChat): The data to serialize.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_char(data._npc_index)
    if data._message_length is None:
        raise SerializationError("message_length must be provided.")
    writer.add_char(data._message_length)
    if data._message is None:
        raise SerializationError("message must be provided.")
    if len(data._message) > 252:
        raise SerializationError(f"Expected length of message to be 252 or less, got {len(data._message)}.")
    writer.add_fixed_string(data._message, data._message_length, False)

deserialize(reader) staticmethod

Deserializes an instance of NpcUpdateChat from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcUpdateChat NpcUpdateChat

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_update_chat.py
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
@staticmethod
def deserialize(reader: EoReader) -> "NpcUpdateChat":
    """
    Deserializes an instance of `NpcUpdateChat` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcUpdateChat: The data to serialize.
    """
    data: NpcUpdateChat = NpcUpdateChat()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_char()
        data._message_length = reader.get_char()
        data._message = reader.get_fixed_string(data._message_length, False)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcUpdateAttack

An NPC attacking

Source code in src/eolib/protocol/_generated/net/server/npc_update_attack.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
class NpcUpdateAttack:
    """
    An NPC attacking
    """
    _byte_size: int = 0
    _npc_index: int = None # type: ignore [assignment]
    _killed: PlayerKilledState = None # type: ignore [assignment]
    _direction: Direction = None # type: ignore [assignment]
    _player_id: int = None # type: ignore [assignment]
    _damage: int = None # type: ignore [assignment]
    _hp_percentage: 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-252.
        """
        return self._npc_index

    @npc_index.setter
    def npc_index(self, npc_index: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._npc_index = npc_index

    @property
    def killed(self) -> PlayerKilledState:
        return self._killed

    @killed.setter
    def killed(self, killed: PlayerKilledState) -> None:
        self._killed = killed

    @property
    def direction(self) -> Direction:
        return self._direction

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @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

    @property
    def damage(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._damage = damage

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hp_percentage = hp_percentage

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcUpdateAttack") -> None:
        """
        Serializes an instance of `NpcUpdateAttack` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcUpdateAttack): The data to serialize.
        """
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_char(data._npc_index)
        if data._killed is None:
            raise SerializationError("killed must be provided.")
        writer.add_char(int(data._killed))
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_three(data._damage)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcUpdateAttack":
        """
        Deserializes an instance of `NpcUpdateAttack` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcUpdateAttack: The data to serialize.
        """
        data: NpcUpdateAttack = NpcUpdateAttack()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_char()
            data._killed = PlayerKilledState(reader.get_char())
            data._direction = Direction(reader.get_char())
            data._player_id = reader.get_short()
            data._damage = reader.get_three()
            data._hp_percentage = 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"NpcUpdateAttack(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)}, killed={repr(self._killed)}, direction={repr(self._direction)}, player_id={repr(self._player_id)}, damage={repr(self._damage)}, hp_percentage={repr(self._hp_percentage)})"

byte_size: int property

Returns the size 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-252.

killed: PlayerKilledState property writable

direction: Direction property writable

player_id: int property writable

Note
  • Value range is 0-64008.

damage: int property writable

Note
  • Value range is 0-16194276.

hp_percentage: int property writable

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of NpcUpdateAttack to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcUpdateAttack

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_update_attack.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
@staticmethod
def serialize(writer: EoWriter, data: "NpcUpdateAttack") -> None:
    """
    Serializes an instance of `NpcUpdateAttack` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcUpdateAttack): The data to serialize.
    """
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_char(data._npc_index)
    if data._killed is None:
        raise SerializationError("killed must be provided.")
    writer.add_char(int(data._killed))
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_three(data._damage)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)

deserialize(reader) staticmethod

Deserializes an instance of NpcUpdateAttack from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcUpdateAttack NpcUpdateAttack

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_update_attack.py
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
@staticmethod
def deserialize(reader: EoReader) -> "NpcUpdateAttack":
    """
    Deserializes an instance of `NpcUpdateAttack` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcUpdateAttack: The data to serialize.
    """
    data: NpcUpdateAttack = NpcUpdateAttack()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_char()
        data._killed = PlayerKilledState(reader.get_char())
        data._direction = Direction(reader.get_char())
        data._player_id = reader.get_short()
        data._damage = reader.get_three()
        data._hp_percentage = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcKilledData

Information about an NPC that has been killed

Source code in src/eolib/protocol/_generated/net/server/npc_killed_data.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
class NpcKilledData:
    """
    Information about an NPC that has been killed
    """
    _byte_size: int = 0
    _killer_id: int = None # type: ignore [assignment]
    _killer_direction: Direction = None # type: ignore [assignment]
    _npc_index: int = None # type: ignore [assignment]
    _drop_index: int = None # type: ignore [assignment]
    _drop_id: int = None # type: ignore [assignment]
    _drop_coords: Coords = None # type: ignore [assignment]
    _drop_amount: int = None # type: ignore [assignment]
    _damage: 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 killer_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._killer_id

    @killer_id.setter
    def killer_id(self, killer_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._killer_id = killer_id

    @property
    def killer_direction(self) -> Direction:
        return self._killer_direction

    @killer_direction.setter
    def killer_direction(self, killer_direction: Direction) -> None:
        self._killer_direction = killer_direction

    @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 drop_index(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._drop_index

    @drop_index.setter
    def drop_index(self, drop_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._drop_index = drop_index

    @property
    def drop_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._drop_id

    @drop_id.setter
    def drop_id(self, drop_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._drop_id = drop_id

    @property
    def drop_coords(self) -> Coords:
        return self._drop_coords

    @drop_coords.setter
    def drop_coords(self, drop_coords: Coords) -> None:
        self._drop_coords = drop_coords

    @property
    def drop_amount(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._drop_amount

    @drop_amount.setter
    def drop_amount(self, drop_amount: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._drop_amount = drop_amount

    @property
    def damage(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._damage = damage

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcKilledData") -> None:
        """
        Serializes an instance of `NpcKilledData` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcKilledData): The data to serialize.
        """
        if data._killer_id is None:
            raise SerializationError("killer_id must be provided.")
        writer.add_short(data._killer_id)
        if data._killer_direction is None:
            raise SerializationError("killer_direction must be provided.")
        writer.add_char(int(data._killer_direction))
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
        if data._drop_index is None:
            raise SerializationError("drop_index must be provided.")
        writer.add_short(data._drop_index)
        if data._drop_id is None:
            raise SerializationError("drop_id must be provided.")
        writer.add_short(data._drop_id)
        if data._drop_coords is None:
            raise SerializationError("drop_coords must be provided.")
        Coords.serialize(writer, data._drop_coords)
        if data._drop_amount is None:
            raise SerializationError("drop_amount must be provided.")
        writer.add_int(data._drop_amount)
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_three(data._damage)

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcKilledData":
        """
        Deserializes an instance of `NpcKilledData` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcKilledData: The data to serialize.
        """
        data: NpcKilledData = NpcKilledData()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._killer_id = reader.get_short()
            data._killer_direction = Direction(reader.get_char())
            data._npc_index = reader.get_short()
            data._drop_index = reader.get_short()
            data._drop_id = reader.get_short()
            data._drop_coords = Coords.deserialize(reader)
            data._drop_amount = reader.get_int()
            data._damage = 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"NpcKilledData(byte_size={repr(self._byte_size)}, killer_id={repr(self._killer_id)}, killer_direction={repr(self._killer_direction)}, npc_index={repr(self._npc_index)}, drop_index={repr(self._drop_index)}, drop_id={repr(self._drop_id)}, drop_coords={repr(self._drop_coords)}, drop_amount={repr(self._drop_amount)}, damage={repr(self._damage)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

killer_id: int property writable

Note
  • Value range is 0-64008.

killer_direction: Direction property writable

npc_index: int property writable

Note
  • Value range is 0-64008.

drop_index: int property writable

Note
  • Value range is 0-64008.

drop_id: int property writable

Note
  • Value range is 0-64008.

drop_coords: Coords property writable

drop_amount: int property writable

Note
  • Value range is 0-4097152080.

damage: int property writable

Note
  • Value range is 0-16194276.

serialize(writer, data) staticmethod

Serializes an instance of NpcKilledData to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcKilledData

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_killed_data.py
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
@staticmethod
def serialize(writer: EoWriter, data: "NpcKilledData") -> None:
    """
    Serializes an instance of `NpcKilledData` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcKilledData): The data to serialize.
    """
    if data._killer_id is None:
        raise SerializationError("killer_id must be provided.")
    writer.add_short(data._killer_id)
    if data._killer_direction is None:
        raise SerializationError("killer_direction must be provided.")
    writer.add_char(int(data._killer_direction))
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)
    if data._drop_index is None:
        raise SerializationError("drop_index must be provided.")
    writer.add_short(data._drop_index)
    if data._drop_id is None:
        raise SerializationError("drop_id must be provided.")
    writer.add_short(data._drop_id)
    if data._drop_coords is None:
        raise SerializationError("drop_coords must be provided.")
    Coords.serialize(writer, data._drop_coords)
    if data._drop_amount is None:
        raise SerializationError("drop_amount must be provided.")
    writer.add_int(data._drop_amount)
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_three(data._damage)

deserialize(reader) staticmethod

Deserializes an instance of NpcKilledData from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcKilledData NpcKilledData

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_killed_data.py
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
@staticmethod
def deserialize(reader: EoReader) -> "NpcKilledData":
    """
    Deserializes an instance of `NpcKilledData` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcKilledData: The data to serialize.
    """
    data: NpcKilledData = NpcKilledData()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._killer_id = reader.get_short()
        data._killer_direction = Direction(reader.get_char())
        data._npc_index = reader.get_short()
        data._drop_index = reader.get_short()
        data._drop_id = reader.get_short()
        data._drop_coords = Coords.deserialize(reader)
        data._drop_amount = reader.get_int()
        data._damage = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcSpecServerPacket

Bases: Packet

Nearby NPC killed by player

Source code in src/eolib/protocol/_generated/net/server/npc_spec_server_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
class NpcSpecServerPacket(Packet):
    """
    Nearby NPC killed by player
    """
    _byte_size: int = 0
    _npc_killed_data: NpcKilledData = None # type: ignore [assignment]
    _experience: Optional[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_killed_data(self) -> NpcKilledData:
        return self._npc_killed_data

    @npc_killed_data.setter
    def npc_killed_data(self, npc_killed_data: NpcKilledData) -> None:
        self._npc_killed_data = npc_killed_data

    @property
    def experience(self) -> Optional[int]:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._experience

    @experience.setter
    def experience(self, experience: Optional[int]) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._experience = experience

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Npc

    @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.
        """
        NpcSpecServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcSpecServerPacket") -> None:
        """
        Serializes an instance of `NpcSpecServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcSpecServerPacket): The data to serialize.
        """
        if data._npc_killed_data is None:
            raise SerializationError("npc_killed_data must be provided.")
        NpcKilledData.serialize(writer, data._npc_killed_data)
        reached_missing_optional = data._experience is None
        if not reached_missing_optional:
            writer.add_int(cast(int, data._experience))

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcSpecServerPacket":
        """
        Deserializes an instance of `NpcSpecServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcSpecServerPacket: The data to serialize.
        """
        data: NpcSpecServerPacket = NpcSpecServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_killed_data = NpcKilledData.deserialize(reader)
            if reader.remaining > 0:
                data._experience = 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"NpcSpecServerPacket(byte_size={repr(self._byte_size)}, npc_killed_data={repr(self._npc_killed_data)}, experience={repr(self._experience)})"

byte_size: int property

Returns the size 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_killed_data: NpcKilledData property writable

experience: Optional[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/server/npc_spec_server_packet.py
58
59
60
61
62
63
64
65
66
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Npc

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/server/npc_spec_server_packet.py
68
69
70
71
72
73
74
75
76
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/npc_spec_server_packet.py
78
79
80
81
82
83
84
85
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    NpcSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of NpcSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_spec_server_packet.py
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@staticmethod
def serialize(writer: EoWriter, data: "NpcSpecServerPacket") -> None:
    """
    Serializes an instance of `NpcSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcSpecServerPacket): The data to serialize.
    """
    if data._npc_killed_data is None:
        raise SerializationError("npc_killed_data must be provided.")
    NpcKilledData.serialize(writer, data._npc_killed_data)
    reached_missing_optional = data._experience is None
    if not reached_missing_optional:
        writer.add_int(cast(int, data._experience))

deserialize(reader) staticmethod

Deserializes an instance of NpcSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcSpecServerPacket NpcSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_spec_server_packet.py
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) -> "NpcSpecServerPacket":
    """
    Deserializes an instance of `NpcSpecServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcSpecServerPacket: The data to serialize.
    """
    data: NpcSpecServerPacket = NpcSpecServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_killed_data = NpcKilledData.deserialize(reader)
        if reader.remaining > 0:
            data._experience = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcKillStealProtectionState

Bases: IntEnum

Flag to indicate whether you are able to attack an NPC

Source code in src/eolib/protocol/_generated/net/server/npc_kill_steal_protection_state.py
 9
10
11
12
13
14
class NpcKillStealProtectionState(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Flag to indicate whether you are able to attack an NPC
    """
    Unprotected = 1
    Protected = 2

Unprotected = 1 class-attribute instance-attribute

Protected = 2 class-attribute instance-attribute

NpcReplyServerPacket

Bases: Packet

Nearby NPC hit by a player

Source code in src/eolib/protocol/_generated/net/server/npc_reply_server_packet.py
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
class NpcReplyServerPacket(Packet):
    """
    Nearby NPC hit by a player
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _player_direction: Direction = None # type: ignore [assignment]
    _npc_index: int = None # type: ignore [assignment]
    _damage: int = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _kill_steal_protection: Optional[NpcKillStealProtectionState] = 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

    @property
    def player_direction(self) -> Direction:
        return self._player_direction

    @player_direction.setter
    def player_direction(self, player_direction: Direction) -> None:
        self._player_direction = player_direction

    @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 damage(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._damage = damage

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp_percentage = hp_percentage

    @property
    def kill_steal_protection(self) -> Optional[NpcKillStealProtectionState]:
        return self._kill_steal_protection

    @kill_steal_protection.setter
    def kill_steal_protection(self, kill_steal_protection: Optional[NpcKillStealProtectionState]) -> None:
        self._kill_steal_protection = kill_steal_protection

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Npc

    @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.
        """
        NpcReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcReplyServerPacket") -> None:
        """
        Serializes an instance of `NpcReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcReplyServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._player_direction is None:
            raise SerializationError("player_direction must be provided.")
        writer.add_char(int(data._player_direction))
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_three(data._damage)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_short(data._hp_percentage)
        reached_missing_optional = data._kill_steal_protection is None
        if not reached_missing_optional:
            writer.add_char(int(cast(NpcKillStealProtectionState, data._kill_steal_protection)))

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcReplyServerPacket":
        """
        Deserializes an instance of `NpcReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcReplyServerPacket: The data to serialize.
        """
        data: NpcReplyServerPacket = NpcReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._player_direction = Direction(reader.get_char())
            data._npc_index = reader.get_short()
            data._damage = reader.get_three()
            data._hp_percentage = reader.get_short()
            if reader.remaining > 0:
                data._kill_steal_protection = NpcKillStealProtectionState(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"NpcReplyServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, player_direction={repr(self._player_direction)}, npc_index={repr(self._npc_index)}, damage={repr(self._damage)}, hp_percentage={repr(self._hp_percentage)}, kill_steal_protection={repr(self._kill_steal_protection)})"

byte_size: int property

Returns the size 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.

player_direction: Direction property writable

npc_index: int property writable

Note
  • Value range is 0-64008.

damage: int property writable

Note
  • Value range is 0-16194276.

hp_percentage: int property writable

Note
  • Value range is 0-64008.

kill_steal_protection: Optional[NpcKillStealProtectionState] 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/server/npc_reply_server_packet.py
119
120
121
122
123
124
125
126
127
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Npc

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/server/npc_reply_server_packet.py
129
130
131
132
133
134
135
136
137
@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/server/npc_reply_server_packet.py
139
140
141
142
143
144
145
146
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    NpcReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of NpcReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_reply_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "NpcReplyServerPacket") -> None:
    """
    Serializes an instance of `NpcReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcReplyServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._player_direction is None:
        raise SerializationError("player_direction must be provided.")
    writer.add_char(int(data._player_direction))
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_three(data._damage)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_short(data._hp_percentage)
    reached_missing_optional = data._kill_steal_protection is None
    if not reached_missing_optional:
        writer.add_char(int(cast(NpcKillStealProtectionState, data._kill_steal_protection)))

deserialize(reader) staticmethod

Deserializes an instance of NpcReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcReplyServerPacket NpcReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "NpcReplyServerPacket":
    """
    Deserializes an instance of `NpcReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcReplyServerPacket: The data to serialize.
    """
    data: NpcReplyServerPacket = NpcReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._player_direction = Direction(reader.get_char())
        data._npc_index = reader.get_short()
        data._damage = reader.get_three()
        data._hp_percentage = reader.get_short()
        if reader.remaining > 0:
            data._kill_steal_protection = NpcKillStealProtectionState(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcPlayerServerPacket

Bases: Packet

Main NPC update message

Source code in src/eolib/protocol/_generated/net/server/npc_player_server_packet.py
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 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 NpcPlayerServerPacket(Packet):
    """
    Main NPC update message
    """
    _byte_size: int = 0
    _positions: list[NpcUpdatePosition] = None # type: ignore [assignment]
    _attacks: list[NpcUpdateAttack] = None # type: ignore [assignment]
    _chats: list[NpcUpdateChat] = None # type: ignore [assignment]
    _hp: Optional[int] = None # type: ignore [assignment]
    _tp: Optional[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 positions(self) -> list[NpcUpdatePosition]:
        return self._positions

    @positions.setter
    def positions(self, positions: list[NpcUpdatePosition]) -> None:
        self._positions = positions

    @property
    def attacks(self) -> list[NpcUpdateAttack]:
        return self._attacks

    @attacks.setter
    def attacks(self, attacks: list[NpcUpdateAttack]) -> None:
        self._attacks = attacks

    @property
    def chats(self) -> list[NpcUpdateChat]:
        return self._chats

    @chats.setter
    def chats(self, chats: list[NpcUpdateChat]) -> None:
        self._chats = chats

    @property
    def hp(self) -> Optional[int]:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

    @hp.setter
    def hp(self, hp: Optional[int]) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp = hp

    @property
    def tp(self) -> Optional[int]:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._tp

    @tp.setter
    def tp(self, tp: Optional[int]) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._tp = tp

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Npc

    @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.
        """
        NpcPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcPlayerServerPacket") -> None:
        """
        Serializes an instance of `NpcPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcPlayerServerPacket): The data to serialize.
        """
        if data._positions is None:
            raise SerializationError("positions must be provided.")
        for i in range(len(data._positions)):
            NpcUpdatePosition.serialize(writer, data._positions[i])
        writer.add_byte(0xFF)
        if data._attacks is None:
            raise SerializationError("attacks must be provided.")
        for i in range(len(data._attacks)):
            NpcUpdateAttack.serialize(writer, data._attacks[i])
        writer.add_byte(0xFF)
        if data._chats is None:
            raise SerializationError("chats must be provided.")
        for i in range(len(data._chats)):
            NpcUpdateChat.serialize(writer, data._chats[i])
        writer.add_byte(0xFF)
        reached_missing_optional = data._hp is None
        if not reached_missing_optional:
            writer.add_short(cast(int, data._hp))
        reached_missing_optional = reached_missing_optional or data._tp is None
        if not reached_missing_optional:
            writer.add_short(cast(int, data._tp))

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcPlayerServerPacket":
        """
        Deserializes an instance of `NpcPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcPlayerServerPacket: The data to serialize.
        """
        data: NpcPlayerServerPacket = NpcPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            positions_length = int(reader.remaining / 4)
            data._positions = []
            for i in range(positions_length):
                data._positions.append(NpcUpdatePosition.deserialize(reader))
            reader.next_chunk()
            attacks_length = int(reader.remaining / 9)
            data._attacks = []
            for i in range(attacks_length):
                data._attacks.append(NpcUpdateAttack.deserialize(reader))
            reader.next_chunk()
            data._chats = []
            while reader.remaining > 0:
                data._chats.append(NpcUpdateChat.deserialize(reader))
            reader.next_chunk()
            if reader.remaining > 0:
                data._hp = reader.get_short()
            if reader.remaining > 0:
                data._tp = 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"NpcPlayerServerPacket(byte_size={repr(self._byte_size)}, positions={repr(self._positions)}, attacks={repr(self._attacks)}, chats={repr(self._chats)}, hp={repr(self._hp)}, tp={repr(self._tp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

positions: list[NpcUpdatePosition] property writable

attacks: list[NpcUpdateAttack] property writable

chats: list[NpcUpdateChat] property writable

hp: Optional[int] property writable

Note
  • Value range is 0-64008.

tp: Optional[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/server/npc_player_server_packet.py
 96
 97
 98
 99
100
101
102
103
104
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Npc

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/server/npc_player_server_packet.py
106
107
108
109
110
111
112
113
114
@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/server/npc_player_server_packet.py
116
117
118
119
120
121
122
123
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    NpcPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of NpcPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_player_server_packet.py
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
@staticmethod
def serialize(writer: EoWriter, data: "NpcPlayerServerPacket") -> None:
    """
    Serializes an instance of `NpcPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcPlayerServerPacket): The data to serialize.
    """
    if data._positions is None:
        raise SerializationError("positions must be provided.")
    for i in range(len(data._positions)):
        NpcUpdatePosition.serialize(writer, data._positions[i])
    writer.add_byte(0xFF)
    if data._attacks is None:
        raise SerializationError("attacks must be provided.")
    for i in range(len(data._attacks)):
        NpcUpdateAttack.serialize(writer, data._attacks[i])
    writer.add_byte(0xFF)
    if data._chats is None:
        raise SerializationError("chats must be provided.")
    for i in range(len(data._chats)):
        NpcUpdateChat.serialize(writer, data._chats[i])
    writer.add_byte(0xFF)
    reached_missing_optional = data._hp is None
    if not reached_missing_optional:
        writer.add_short(cast(int, data._hp))
    reached_missing_optional = reached_missing_optional or data._tp is None
    if not reached_missing_optional:
        writer.add_short(cast(int, data._tp))

deserialize(reader) staticmethod

Deserializes an instance of NpcPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcPlayerServerPacket 'NpcPlayerServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_player_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "NpcPlayerServerPacket":
    """
    Deserializes an instance of `NpcPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcPlayerServerPacket: The data to serialize.
    """
    data: NpcPlayerServerPacket = NpcPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        positions_length = int(reader.remaining / 4)
        data._positions = []
        for i in range(positions_length):
            data._positions.append(NpcUpdatePosition.deserialize(reader))
        reader.next_chunk()
        attacks_length = int(reader.remaining / 9)
        data._attacks = []
        for i in range(attacks_length):
            data._attacks.append(NpcUpdateAttack.deserialize(reader))
        reader.next_chunk()
        data._chats = []
        while reader.remaining > 0:
            data._chats.append(NpcUpdateChat.deserialize(reader))
        reader.next_chunk()
        if reader.remaining > 0:
            data._hp = reader.get_short()
        if reader.remaining > 0:
            data._tp = 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

NpcMapInfo

Information about a nearby NPC

Source code in src/eolib/protocol/_generated/net/server/npc_map_info.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
class NpcMapInfo:
    """
    Information about a nearby NPC
    """
    _byte_size: int = 0
    _index: int = None # type: ignore [assignment]
    _id: int = None # type: ignore [assignment]
    _coords: Coords = None # type: ignore [assignment]
    _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 index(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._index

    @index.setter
    def index(self, index: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._index = index

    @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 coords(self) -> Coords:
        return self._coords

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = coords

    @property
    def direction(self) -> Direction:
        return self._direction

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcMapInfo") -> None:
        """
        Serializes an instance of `NpcMapInfo` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcMapInfo): The data to serialize.
        """
        if data._index is None:
            raise SerializationError("index must be provided.")
        writer.add_char(data._index)
        if data._id is None:
            raise SerializationError("id must be provided.")
        writer.add_short(data._id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcMapInfo":
        """
        Deserializes an instance of `NpcMapInfo` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcMapInfo: The data to serialize.
        """
        data: NpcMapInfo = NpcMapInfo()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._index = reader.get_char()
            data._id = reader.get_short()
            data._coords = Coords.deserialize(reader)
            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"NpcMapInfo(byte_size={repr(self._byte_size)}, index={repr(self._index)}, id={repr(self._id)}, coords={repr(self._coords)}, 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.

index: int property writable

Note
  • Value range is 0-252.

id: int property writable

Note
  • Value range is 0-64008.

coords: Coords property writable

direction: Direction property writable

serialize(writer, data) staticmethod

Serializes an instance of NpcMapInfo to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcMapInfo

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_map_info.py
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def serialize(writer: EoWriter, data: "NpcMapInfo") -> None:
    """
    Serializes an instance of `NpcMapInfo` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcMapInfo): The data to serialize.
    """
    if data._index is None:
        raise SerializationError("index must be provided.")
    writer.add_char(data._index)
    if data._id is None:
        raise SerializationError("id must be provided.")
    writer.add_short(data._id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

deserialize(reader) staticmethod

Deserializes an instance of NpcMapInfo from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcMapInfo NpcMapInfo

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_map_info.py
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) -> "NpcMapInfo":
    """
    Deserializes an instance of `NpcMapInfo` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcMapInfo: The data to serialize.
    """
    data: NpcMapInfo = NpcMapInfo()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._index = reader.get_char()
        data._id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        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

NpcJunkServerPacket

Bases: Packet

Clearing all boss children

Source code in src/eolib/protocol/_generated/net/server/npc_junk_server_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 NpcJunkServerPacket(Packet):
    """
    Clearing all boss children
    """
    _byte_size: int = 0
    _npc_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_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._npc_id

    @npc_id.setter
    def npc_id(self, npc_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._npc_id = npc_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Npc

    @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.
        """
        NpcJunkServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcJunkServerPacket") -> None:
        """
        Serializes an instance of `NpcJunkServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcJunkServerPacket): The data to serialize.
        """
        if data._npc_id is None:
            raise SerializationError("npc_id must be provided.")
        writer.add_short(data._npc_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcJunkServerPacket":
        """
        Deserializes an instance of `NpcJunkServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcJunkServerPacket: The data to serialize.
        """
        data: NpcJunkServerPacket = NpcJunkServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_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"NpcJunkServerPacket(byte_size={repr(self._byte_size)}, npc_id={repr(self._npc_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_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/server/npc_junk_server_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.Npc

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/server/npc_junk_server_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/server/npc_junk_server_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.
    """
    NpcJunkServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of NpcJunkServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcJunkServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_junk_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "NpcJunkServerPacket") -> None:
    """
    Serializes an instance of `NpcJunkServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcJunkServerPacket): The data to serialize.
    """
    if data._npc_id is None:
        raise SerializationError("npc_id must be provided.")
    writer.add_short(data._npc_id)

deserialize(reader) staticmethod

Deserializes an instance of NpcJunkServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcJunkServerPacket NpcJunkServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_junk_server_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) -> "NpcJunkServerPacket":
    """
    Deserializes an instance of `NpcJunkServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcJunkServerPacket: The data to serialize.
    """
    data: NpcJunkServerPacket = NpcJunkServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcDialogServerPacket

Bases: Packet

NPC chat message

Source code in src/eolib/protocol/_generated/net/server/npc_dialog_server_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 NpcDialogServerPacket(Packet):
    """
    NPC chat message
    """
    _byte_size: int = 0
    _npc_index: int = 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 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 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.Npc

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Dialog

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        NpcDialogServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcDialogServerPacket") -> None:
        """
        Serializes an instance of `NpcDialogServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcDialogServerPacket): 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._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcDialogServerPacket":
        """
        Deserializes an instance of `NpcDialogServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcDialogServerPacket: The data to serialize.
        """
        data: NpcDialogServerPacket = NpcDialogServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_index = reader.get_short()
            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"NpcDialogServerPacket(byte_size={repr(self._byte_size)}, npc_index={repr(self._npc_index)}, 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.

npc_index: int property writable

Note
  • Value range is 0-64008.

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/server/npc_dialog_server_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.Npc

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/server/npc_dialog_server_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.Dialog

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/server/npc_dialog_server_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.
    """
    NpcDialogServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of NpcDialogServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcDialogServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_dialog_server_packet.py
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "NpcDialogServerPacket") -> None:
    """
    Serializes an instance of `NpcDialogServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcDialogServerPacket): 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._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)

deserialize(reader) staticmethod

Deserializes an instance of NpcDialogServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcDialogServerPacket NpcDialogServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_dialog_server_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) -> "NpcDialogServerPacket":
    """
    Deserializes an instance of `NpcDialogServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcDialogServerPacket: The data to serialize.
    """
    data: NpcDialogServerPacket = NpcDialogServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_index = reader.get_short()
        data._message = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcAgreeServerPacket

Bases: Packet

Reply to request for information about nearby NPCs

Source code in src/eolib/protocol/_generated/net/server/npc_agree_server_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
class NpcAgreeServerPacket(Packet):
    """
    Reply to request for information about nearby NPCs
    """
    _byte_size: int = 0
    _npcs_count: int = None # type: ignore [assignment]
    _npcs: list[NpcMapInfo] = 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 npcs(self) -> list[NpcMapInfo]:
        """
        Note:
          - Length must be 64008 or less.
        """
        return self._npcs

    @npcs.setter
    def npcs(self, npcs: list[NpcMapInfo]) -> None:
        """
        Note:
          - Length must be 64008 or less.
        """
        self._npcs = npcs
        self._npcs_count = len(self._npcs)

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Npc

    @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.
        """
        NpcAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcAgreeServerPacket") -> None:
        """
        Serializes an instance of `NpcAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcAgreeServerPacket): The data to serialize.
        """
        if data._npcs_count is None:
            raise SerializationError("npcs_count must be provided.")
        writer.add_short(data._npcs_count)
        if data._npcs is None:
            raise SerializationError("npcs must be provided.")
        if len(data._npcs) > 64008:
            raise SerializationError(f"Expected length of npcs to be 64008 or less, got {len(data._npcs)}.")
        for i in range(data._npcs_count):
            NpcMapInfo.serialize(writer, data._npcs[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcAgreeServerPacket":
        """
        Deserializes an instance of `NpcAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcAgreeServerPacket: The data to serialize.
        """
        data: NpcAgreeServerPacket = NpcAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npcs_count = reader.get_short()
            data._npcs = []
            for i in range(data._npcs_count):
                data._npcs.append(NpcMapInfo.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"NpcAgreeServerPacket(byte_size={repr(self._byte_size)}, npcs={repr(self._npcs)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

npcs: list[NpcMapInfo] property writable

Note
  • Length must be 64008 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/server/npc_agree_server_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Npc

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/server/npc_agree_server_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/npc_agree_server_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    NpcAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of NpcAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_agree_server_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def serialize(writer: EoWriter, data: "NpcAgreeServerPacket") -> None:
    """
    Serializes an instance of `NpcAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcAgreeServerPacket): The data to serialize.
    """
    if data._npcs_count is None:
        raise SerializationError("npcs_count must be provided.")
    writer.add_short(data._npcs_count)
    if data._npcs is None:
        raise SerializationError("npcs must be provided.")
    if len(data._npcs) > 64008:
        raise SerializationError(f"Expected length of npcs to be 64008 or less, got {len(data._npcs)}.")
    for i in range(data._npcs_count):
        NpcMapInfo.serialize(writer, data._npcs[i])

deserialize(reader) staticmethod

Deserializes an instance of NpcAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcAgreeServerPacket 'NpcAgreeServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_agree_server_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
@staticmethod
def deserialize(reader: EoReader) -> "NpcAgreeServerPacket":
    """
    Deserializes an instance of `NpcAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcAgreeServerPacket: The data to serialize.
    """
    data: NpcAgreeServerPacket = NpcAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npcs_count = reader.get_short()
        data._npcs = []
        for i in range(data._npcs_count):
            data._npcs.append(NpcMapInfo.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LevelUpStats

Level and stat updates

Source code in src/eolib/protocol/_generated/net/server/level_up_stats.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
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
class LevelUpStats:
    """
    Level and stat updates
    """
    _byte_size: int = 0
    _level: int = None # type: ignore [assignment]
    _stat_points: int = None # type: ignore [assignment]
    _skill_points: int = None # type: ignore [assignment]
    _max_hp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _max_sp: 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 level(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._level

    @level.setter
    def level(self, level: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._level = level

    @property
    def stat_points(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._stat_points

    @stat_points.setter
    def stat_points(self, stat_points: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._stat_points = stat_points

    @property
    def skill_points(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._skill_points

    @skill_points.setter
    def skill_points(self, skill_points: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._skill_points = skill_points

    @property
    def max_hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_hp

    @max_hp.setter
    def max_hp(self, max_hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_hp = max_hp

    @property
    def max_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_tp

    @max_tp.setter
    def max_tp(self, max_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_tp = max_tp

    @property
    def max_sp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_sp

    @max_sp.setter
    def max_sp(self, max_sp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_sp = max_sp

    @staticmethod
    def serialize(writer: EoWriter, data: "LevelUpStats") -> None:
        """
        Serializes an instance of `LevelUpStats` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LevelUpStats): The data to serialize.
        """
        if data._level is None:
            raise SerializationError("level must be provided.")
        writer.add_char(data._level)
        if data._stat_points is None:
            raise SerializationError("stat_points must be provided.")
        writer.add_short(data._stat_points)
        if data._skill_points is None:
            raise SerializationError("skill_points must be provided.")
        writer.add_short(data._skill_points)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._max_sp is None:
            raise SerializationError("max_sp must be provided.")
        writer.add_short(data._max_sp)

    @staticmethod
    def deserialize(reader: EoReader) -> "LevelUpStats":
        """
        Deserializes an instance of `LevelUpStats` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LevelUpStats: The data to serialize.
        """
        data: LevelUpStats = LevelUpStats()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._level = reader.get_char()
            data._stat_points = reader.get_short()
            data._skill_points = reader.get_short()
            data._max_hp = reader.get_short()
            data._max_tp = reader.get_short()
            data._max_sp = 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"LevelUpStats(byte_size={repr(self._byte_size)}, level={repr(self._level)}, stat_points={repr(self._stat_points)}, skill_points={repr(self._skill_points)}, max_hp={repr(self._max_hp)}, max_tp={repr(self._max_tp)}, max_sp={repr(self._max_sp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

level: int property writable

Note
  • Value range is 0-252.

stat_points: int property writable

Note
  • Value range is 0-64008.

skill_points: int property writable

Note
  • Value range is 0-64008.

max_hp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

max_sp: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of LevelUpStats to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LevelUpStats

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/level_up_stats.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
@staticmethod
def serialize(writer: EoWriter, data: "LevelUpStats") -> None:
    """
    Serializes an instance of `LevelUpStats` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LevelUpStats): The data to serialize.
    """
    if data._level is None:
        raise SerializationError("level must be provided.")
    writer.add_char(data._level)
    if data._stat_points is None:
        raise SerializationError("stat_points must be provided.")
    writer.add_short(data._stat_points)
    if data._skill_points is None:
        raise SerializationError("skill_points must be provided.")
    writer.add_short(data._skill_points)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._max_sp is None:
        raise SerializationError("max_sp must be provided.")
    writer.add_short(data._max_sp)

deserialize(reader) staticmethod

Deserializes an instance of LevelUpStats from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LevelUpStats LevelUpStats

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/level_up_stats.py
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
@staticmethod
def deserialize(reader: EoReader) -> "LevelUpStats":
    """
    Deserializes an instance of `LevelUpStats` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LevelUpStats: The data to serialize.
    """
    data: LevelUpStats = LevelUpStats()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._level = reader.get_char()
        data._stat_points = reader.get_short()
        data._skill_points = reader.get_short()
        data._max_hp = reader.get_short()
        data._max_tp = reader.get_short()
        data._max_sp = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

NpcAcceptServerPacket

Bases: Packet

Nearby NPC killed by player and you leveled up

Source code in src/eolib/protocol/_generated/net/server/npc_accept_server_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class NpcAcceptServerPacket(Packet):
    """
    Nearby NPC killed by player and you leveled up
    """
    _byte_size: int = 0
    _npc_killed_data: NpcKilledData = None # type: ignore [assignment]
    _experience: int = None # type: ignore [assignment]
    _level_up: LevelUpStats = 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_killed_data(self) -> NpcKilledData:
        return self._npc_killed_data

    @npc_killed_data.setter
    def npc_killed_data(self, npc_killed_data: NpcKilledData) -> None:
        self._npc_killed_data = npc_killed_data

    @property
    def experience(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._experience

    @experience.setter
    def experience(self, experience: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._experience = experience

    @property
    def level_up(self) -> LevelUpStats:
        return self._level_up

    @level_up.setter
    def level_up(self, level_up: LevelUpStats) -> None:
        self._level_up = level_up

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Npc

    @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.
        """
        NpcAcceptServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "NpcAcceptServerPacket") -> None:
        """
        Serializes an instance of `NpcAcceptServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (NpcAcceptServerPacket): The data to serialize.
        """
        if data._npc_killed_data is None:
            raise SerializationError("npc_killed_data must be provided.")
        NpcKilledData.serialize(writer, data._npc_killed_data)
        if data._experience is None:
            raise SerializationError("experience must be provided.")
        writer.add_int(data._experience)
        if data._level_up is None:
            raise SerializationError("level_up must be provided.")
        LevelUpStats.serialize(writer, data._level_up)

    @staticmethod
    def deserialize(reader: EoReader) -> "NpcAcceptServerPacket":
        """
        Deserializes an instance of `NpcAcceptServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            NpcAcceptServerPacket: The data to serialize.
        """
        data: NpcAcceptServerPacket = NpcAcceptServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._npc_killed_data = NpcKilledData.deserialize(reader)
            data._experience = reader.get_int()
            data._level_up = LevelUpStats.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"NpcAcceptServerPacket(byte_size={repr(self._byte_size)}, npc_killed_data={repr(self._npc_killed_data)}, experience={repr(self._experience)}, level_up={repr(self._level_up)})"

byte_size: int property

Returns the size 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_killed_data: NpcKilledData property writable

experience: int property writable

Note
  • Value range is 0-4097152080.

level_up: LevelUpStats 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/server/npc_accept_server_packet.py
66
67
68
69
70
71
72
73
74
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Npc

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/server/npc_accept_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/npc_accept_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    NpcAcceptServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of NpcAcceptServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data NpcAcceptServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/npc_accept_server_packet.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "NpcAcceptServerPacket") -> None:
    """
    Serializes an instance of `NpcAcceptServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (NpcAcceptServerPacket): The data to serialize.
    """
    if data._npc_killed_data is None:
        raise SerializationError("npc_killed_data must be provided.")
    NpcKilledData.serialize(writer, data._npc_killed_data)
    if data._experience is None:
        raise SerializationError("experience must be provided.")
    writer.add_int(data._experience)
    if data._level_up is None:
        raise SerializationError("level_up must be provided.")
    LevelUpStats.serialize(writer, data._level_up)

deserialize(reader) staticmethod

Deserializes an instance of NpcAcceptServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
NpcAcceptServerPacket NpcAcceptServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/npc_accept_server_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@staticmethod
def deserialize(reader: EoReader) -> "NpcAcceptServerPacket":
    """
    Deserializes an instance of `NpcAcceptServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        NpcAcceptServerPacket: The data to serialize.
    """
    data: NpcAcceptServerPacket = NpcAcceptServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._npc_killed_data = NpcKilledData.deserialize(reader)
        data._experience = reader.get_int()
        data._level_up = LevelUpStats.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterMapInfo

Information about a nearby character. The official client skips these if they're under 42 bytes in length.

Source code in src/eolib/protocol/_generated/net/server/character_map_info.py
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 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
class CharacterMapInfo:
    """
    Information about a nearby character.
    The official client skips these if they&#x27;re under 42 bytes in length.
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _player_id: int = None # type: ignore [assignment]
    _map_id: int = None # type: ignore [assignment]
    _coords: BigCoords = None # type: ignore [assignment]
    _direction: Direction = None # type: ignore [assignment]
    _class_id: int = None # type: ignore [assignment]
    _guild_tag: str = None # type: ignore [assignment]
    _level: 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]
    _max_hp: int = None # type: ignore [assignment]
    _hp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _tp: int = None # type: ignore [assignment]
    _equipment: EquipmentMapInfo = None # type: ignore [assignment]
    _sit_state: SitState = None # type: ignore [assignment]
    _invisible: bool = None # type: ignore [assignment]
    _warp_effect: Optional[WarpEffect] = 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 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

    @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 coords(self) -> BigCoords:
        return self._coords

    @coords.setter
    def coords(self, coords: BigCoords) -> None:
        self._coords = coords

    @property
    def direction(self) -> Direction:
        return self._direction

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @property
    def class_id(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._class_id

    @class_id.setter
    def class_id(self, class_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._class_id = class_id

    @property
    def guild_tag(self) -> str:
        """
        Note:
          - Length must be `3`.
        """
        return self._guild_tag

    @guild_tag.setter
    def guild_tag(self, guild_tag: str) -> None:
        """
        Note:
          - Length must be `3`.
        """
        self._guild_tag = guild_tag

    @property
    def level(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._level

    @level.setter
    def level(self, level: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._level = level

    @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-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 skin(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._skin

    @skin.setter
    def skin(self, skin: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._skin = skin

    @property
    def max_hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_hp

    @max_hp.setter
    def max_hp(self, max_hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_hp = max_hp

    @property
    def hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

    @hp.setter
    def hp(self, hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp = hp

    @property
    def max_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_tp

    @max_tp.setter
    def max_tp(self, max_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_tp = max_tp

    @property
    def tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._tp

    @tp.setter
    def tp(self, tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._tp = tp

    @property
    def equipment(self) -> EquipmentMapInfo:
        return self._equipment

    @equipment.setter
    def equipment(self, equipment: EquipmentMapInfo) -> None:
        self._equipment = equipment

    @property
    def sit_state(self) -> SitState:
        return self._sit_state

    @sit_state.setter
    def sit_state(self, sit_state: SitState) -> None:
        self._sit_state = sit_state

    @property
    def invisible(self) -> bool:
        return self._invisible

    @invisible.setter
    def invisible(self, invisible: bool) -> None:
        self._invisible = invisible

    @property
    def warp_effect(self) -> Optional[WarpEffect]:
        return self._warp_effect

    @warp_effect.setter
    def warp_effect(self, warp_effect: Optional[WarpEffect]) -> None:
        self._warp_effect = warp_effect

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterMapInfo") -> None:
        """
        Serializes an instance of `CharacterMapInfo` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterMapInfo): 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._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._map_id is None:
            raise SerializationError("map_id must be provided.")
        writer.add_short(data._map_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        BigCoords.serialize(writer, data._coords)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        if data._class_id is None:
            raise SerializationError("class_id must be provided.")
        writer.add_char(data._class_id)
        if data._guild_tag is None:
            raise SerializationError("guild_tag must be provided.")
        if len(data._guild_tag) != 3:
            raise SerializationError(f"Expected length of guild_tag to be exactly 3, got {len(data._guild_tag)}.")
        writer.add_fixed_string(data._guild_tag, 3, False)
        if data._level is None:
            raise SerializationError("level must be provided.")
        writer.add_char(data._level)
        if data._gender is None:
            raise SerializationError("gender must be provided.")
        writer.add_char(int(data._gender))
        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._skin is None:
            raise SerializationError("skin must be provided.")
        writer.add_char(data._skin)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._tp is None:
            raise SerializationError("tp must be provided.")
        writer.add_short(data._tp)
        if data._equipment is None:
            raise SerializationError("equipment must be provided.")
        EquipmentMapInfo.serialize(writer, data._equipment)
        if data._sit_state is None:
            raise SerializationError("sit_state must be provided.")
        writer.add_char(int(data._sit_state))
        if data._invisible is None:
            raise SerializationError("invisible must be provided.")
        writer.add_char(1 if data._invisible else 0)
        reached_missing_optional = data._warp_effect is None
        if not reached_missing_optional:
            writer.add_char(int(cast(WarpEffect, data._warp_effect)))

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterMapInfo":
        """
        Deserializes an instance of `CharacterMapInfo` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterMapInfo: The data to serialize.
        """
        data: CharacterMapInfo = CharacterMapInfo()
        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._player_id = reader.get_short()
            data._map_id = reader.get_short()
            data._coords = BigCoords.deserialize(reader)
            data._direction = Direction(reader.get_char())
            data._class_id = reader.get_char()
            data._guild_tag = reader.get_fixed_string(3, False)
            data._level = reader.get_char()
            data._gender = Gender(reader.get_char())
            data._hair_style = reader.get_char()
            data._hair_color = reader.get_char()
            data._skin = reader.get_char()
            data._max_hp = reader.get_short()
            data._hp = reader.get_short()
            data._max_tp = reader.get_short()
            data._tp = reader.get_short()
            data._equipment = EquipmentMapInfo.deserialize(reader)
            data._sit_state = SitState(reader.get_char())
            data._invisible = reader.get_char() != 0
            if reader.remaining > 0:
                data._warp_effect = WarpEffect(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"CharacterMapInfo(byte_size={repr(self._byte_size)}, name={repr(self._name)}, player_id={repr(self._player_id)}, map_id={repr(self._map_id)}, coords={repr(self._coords)}, direction={repr(self._direction)}, class_id={repr(self._class_id)}, guild_tag={repr(self._guild_tag)}, level={repr(self._level)}, gender={repr(self._gender)}, hair_style={repr(self._hair_style)}, hair_color={repr(self._hair_color)}, skin={repr(self._skin)}, max_hp={repr(self._max_hp)}, hp={repr(self._hp)}, max_tp={repr(self._max_tp)}, tp={repr(self._tp)}, equipment={repr(self._equipment)}, sit_state={repr(self._sit_state)}, invisible={repr(self._invisible)}, warp_effect={repr(self._warp_effect)})"

byte_size: int property

Returns the size 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

player_id: int property writable

Note
  • Value range is 0-64008.

map_id: int property writable

Note
  • Value range is 0-64008.

coords: BigCoords property writable

direction: Direction property writable

class_id: int property writable

Note
  • Value range is 0-252.

guild_tag: str property writable

Note
  • Length must be 3.

level: int property writable

Note
  • Value range is 0-252.

gender: Gender property writable

hair_style: int property writable

Note
  • Value range is 0-252.

hair_color: int property writable

Note
  • Value range is 0-252.

skin: int property writable

Note
  • Value range is 0-252.

max_hp: int property writable

Note
  • Value range is 0-64008.

hp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

tp: int property writable

Note
  • Value range is 0-64008.

equipment: EquipmentMapInfo property writable

sit_state: SitState property writable

invisible: bool property writable

warp_effect: Optional[WarpEffect] property writable

serialize(writer, data) staticmethod

Serializes an instance of CharacterMapInfo to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterMapInfo

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_map_info.py
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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterMapInfo") -> None:
    """
    Serializes an instance of `CharacterMapInfo` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterMapInfo): 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._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._map_id is None:
        raise SerializationError("map_id must be provided.")
    writer.add_short(data._map_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    BigCoords.serialize(writer, data._coords)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))
    if data._class_id is None:
        raise SerializationError("class_id must be provided.")
    writer.add_char(data._class_id)
    if data._guild_tag is None:
        raise SerializationError("guild_tag must be provided.")
    if len(data._guild_tag) != 3:
        raise SerializationError(f"Expected length of guild_tag to be exactly 3, got {len(data._guild_tag)}.")
    writer.add_fixed_string(data._guild_tag, 3, False)
    if data._level is None:
        raise SerializationError("level must be provided.")
    writer.add_char(data._level)
    if data._gender is None:
        raise SerializationError("gender must be provided.")
    writer.add_char(int(data._gender))
    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._skin is None:
        raise SerializationError("skin must be provided.")
    writer.add_char(data._skin)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._tp is None:
        raise SerializationError("tp must be provided.")
    writer.add_short(data._tp)
    if data._equipment is None:
        raise SerializationError("equipment must be provided.")
    EquipmentMapInfo.serialize(writer, data._equipment)
    if data._sit_state is None:
        raise SerializationError("sit_state must be provided.")
    writer.add_char(int(data._sit_state))
    if data._invisible is None:
        raise SerializationError("invisible must be provided.")
    writer.add_char(1 if data._invisible else 0)
    reached_missing_optional = data._warp_effect is None
    if not reached_missing_optional:
        writer.add_char(int(cast(WarpEffect, data._warp_effect)))

deserialize(reader) staticmethod

Deserializes an instance of CharacterMapInfo from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterMapInfo CharacterMapInfo

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_map_info.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterMapInfo":
    """
    Deserializes an instance of `CharacterMapInfo` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterMapInfo: The data to serialize.
    """
    data: CharacterMapInfo = CharacterMapInfo()
    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._player_id = reader.get_short()
        data._map_id = reader.get_short()
        data._coords = BigCoords.deserialize(reader)
        data._direction = Direction(reader.get_char())
        data._class_id = reader.get_char()
        data._guild_tag = reader.get_fixed_string(3, False)
        data._level = reader.get_char()
        data._gender = Gender(reader.get_char())
        data._hair_style = reader.get_char()
        data._hair_color = reader.get_char()
        data._skin = reader.get_char()
        data._max_hp = reader.get_short()
        data._hp = reader.get_short()
        data._max_tp = reader.get_short()
        data._tp = reader.get_short()
        data._equipment = EquipmentMapInfo.deserialize(reader)
        data._sit_state = SitState(reader.get_char())
        data._invisible = reader.get_char() != 0
        if reader.remaining > 0:
            data._warp_effect = WarpEffect(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

MusicPlayerServerPacket

Bases: Packet

Sound effect

Source code in src/eolib/protocol/_generated/net/server/music_player_server_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 MusicPlayerServerPacket(Packet):
    """
    Sound effect
    """
    _byte_size: int = 0
    _sound_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 sound_id(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._sound_id

    @sound_id.setter
    def sound_id(self, sound_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._sound_id = sound_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Music

    @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.
        """
        MusicPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MusicPlayerServerPacket") -> None:
        """
        Serializes an instance of `MusicPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MusicPlayerServerPacket): The data to serialize.
        """
        if data._sound_id is None:
            raise SerializationError("sound_id must be provided.")
        writer.add_char(data._sound_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "MusicPlayerServerPacket":
        """
        Deserializes an instance of `MusicPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MusicPlayerServerPacket: The data to serialize.
        """
        data: MusicPlayerServerPacket = MusicPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._sound_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"MusicPlayerServerPacket(byte_size={repr(self._byte_size)}, sound_id={repr(self._sound_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.

sound_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/server/music_player_server_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.Music

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/server/music_player_server_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.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/server/music_player_server_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.
    """
    MusicPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MusicPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MusicPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/music_player_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "MusicPlayerServerPacket") -> None:
    """
    Serializes an instance of `MusicPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MusicPlayerServerPacket): The data to serialize.
    """
    if data._sound_id is None:
        raise SerializationError("sound_id must be provided.")
    writer.add_char(data._sound_id)

deserialize(reader) staticmethod

Deserializes an instance of MusicPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MusicPlayerServerPacket MusicPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/music_player_server_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) -> "MusicPlayerServerPacket":
    """
    Deserializes an instance of `MusicPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MusicPlayerServerPacket: The data to serialize.
    """
    data: MusicPlayerServerPacket = MusicPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._sound_id = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MessagePongServerPacket

Bases: Packet

ping command reply

Source code in src/eolib/protocol/_generated/net/server/message_pong_server_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 MessagePongServerPacket(Packet):
    """
    #ping command 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.Message

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Pong

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        MessagePongServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MessagePongServerPacket") -> None:
        """
        Serializes an instance of `MessagePongServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MessagePongServerPacket): 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) -> "MessagePongServerPacket":
        """
        Deserializes an instance of `MessagePongServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MessagePongServerPacket: The data to serialize.
        """
        data: MessagePongServerPacket = MessagePongServerPacket()
        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"MessagePongServerPacket(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/server/message_pong_server_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/server/message_pong_server_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.Pong

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/server/message_pong_server_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.
    """
    MessagePongServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MessagePongServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MessagePongServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/message_pong_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "MessagePongServerPacket") -> None:
    """
    Serializes an instance of `MessagePongServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MessagePongServerPacket): 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 MessagePongServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MessagePongServerPacket MessagePongServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/message_pong_server_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) -> "MessagePongServerPacket":
    """
    Deserializes an instance of `MessagePongServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MessagePongServerPacket: The data to serialize.
    """
    data: MessagePongServerPacket = MessagePongServerPacket()
    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

MessageOpenServerPacket

Bases: Packet

Status bar message

Source code in src/eolib/protocol/_generated/net/server/message_open_server_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 MessageOpenServerPacket(Packet):
    """
    Status bar 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.Message

    @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.
        """
        MessageOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MessageOpenServerPacket") -> None:
        """
        Serializes an instance of `MessageOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MessageOpenServerPacket): 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) -> "MessageOpenServerPacket":
        """
        Deserializes an instance of `MessageOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MessageOpenServerPacket: The data to serialize.
        """
        data: MessageOpenServerPacket = MessageOpenServerPacket()
        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"MessageOpenServerPacket(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/server/message_open_server_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.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/server/message_open_server_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/server/message_open_server_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.
    """
    MessageOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MessageOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MessageOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/message_open_server_packet.py
67
68
69
70
71
72
73
74
75
76
77
78
@staticmethod
def serialize(writer: EoWriter, data: "MessageOpenServerPacket") -> None:
    """
    Serializes an instance of `MessageOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MessageOpenServerPacket): 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 MessageOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MessageOpenServerPacket MessageOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/message_open_server_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) -> "MessageOpenServerPacket":
    """
    Deserializes an instance of `MessageOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MessageOpenServerPacket: The data to serialize.
    """
    data: MessageOpenServerPacket = MessageOpenServerPacket()
    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

MessageCloseServerPacket

Bases: Packet

Server is rebooting

Source code in src/eolib/protocol/_generated/net/server/message_close_server_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 MessageCloseServerPacket(Packet):
    """
    Server is rebooting
    """
    _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.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.
        """
        MessageCloseServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MessageCloseServerPacket") -> None:
        """
        Serializes an instance of `MessageCloseServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MessageCloseServerPacket): The data to serialize.
        """
        old_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("r")

    @staticmethod
    def deserialize(reader: EoReader) -> "MessageCloseServerPacket":
        """
        Deserializes an instance of `MessageCloseServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MessageCloseServerPacket: The data to serialize.
        """
        data: MessageCloseServerPacket = MessageCloseServerPacket()
        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"MessageCloseServerPacket(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/server/message_close_server_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/server/message_close_server_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/server/message_close_server_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.
    """
    MessageCloseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MessageCloseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MessageCloseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/message_close_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "MessageCloseServerPacket") -> None:
    """
    Serializes an instance of `MessageCloseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MessageCloseServerPacket): The data to serialize.
    """
    old_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("r")

deserialize(reader) staticmethod

Deserializes an instance of MessageCloseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MessageCloseServerPacket MessageCloseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/message_close_server_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) -> "MessageCloseServerPacket":
    """
    Deserializes an instance of `MessageCloseServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MessageCloseServerPacket: The data to serialize.
    """
    data: MessageCloseServerPacket = MessageCloseServerPacket()
    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

MessageAcceptServerPacket

Bases: Packet

Large message box

Source code in src/eolib/protocol/_generated/net/server/message_accept_server_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
class MessageAcceptServerPacket(Packet):
    """
    Large message box
    """
    _byte_size: int = 0
    _messages: 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 messages(self) -> list[str]:
        """
        Note:
          - Length must be `4`.
        """
        return self._messages

    @messages.setter
    def messages(self, messages: list[str]) -> None:
        """
        Note:
          - Length must be `4`.
        """
        self._messages = messages

    @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.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.
        """
        MessageAcceptServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MessageAcceptServerPacket") -> None:
        """
        Serializes an instance of `MessageAcceptServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MessageAcceptServerPacket): The data to serialize.
        """
        if data._messages is None:
            raise SerializationError("messages must be provided.")
        if len(data._messages) != 4:
            raise SerializationError(f"Expected length of messages to be exactly 4, got {len(data._messages)}.")
        for i in range(4):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._messages[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "MessageAcceptServerPacket":
        """
        Deserializes an instance of `MessageAcceptServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MessageAcceptServerPacket: The data to serialize.
        """
        data: MessageAcceptServerPacket = MessageAcceptServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._messages = []
            for i in range(4):
                data._messages.append(reader.get_string())
                if i + 1 < 4:
                    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"MessageAcceptServerPacket(byte_size={repr(self._byte_size)}, messages={repr(self._messages)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

messages: list[str] property writable

Note
  • Length must be 4.

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/server/message_accept_server_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.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/server/message_accept_server_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.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/server/message_accept_server_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.
    """
    MessageAcceptServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MessageAcceptServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MessageAcceptServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/message_accept_server_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: "MessageAcceptServerPacket") -> None:
    """
    Serializes an instance of `MessageAcceptServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MessageAcceptServerPacket): The data to serialize.
    """
    if data._messages is None:
        raise SerializationError("messages must be provided.")
    if len(data._messages) != 4:
        raise SerializationError(f"Expected length of messages to be exactly 4, got {len(data._messages)}.")
    for i in range(4):
        if i > 0:
            writer.add_byte(0xFF)
        writer.add_string(data._messages[i])

deserialize(reader) staticmethod

Deserializes an instance of MessageAcceptServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MessageAcceptServerPacket 'MessageAcceptServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/message_accept_server_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
119
@staticmethod
def deserialize(reader: EoReader) -> "MessageAcceptServerPacket":
    """
    Deserializes an instance of `MessageAcceptServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MessageAcceptServerPacket: The data to serialize.
    """
    data: MessageAcceptServerPacket = MessageAcceptServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._messages = []
        for i in range(4):
            data._messages.append(reader.get_string())
            if i + 1 < 4:
                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

MarriageReply

Bases: IntEnum

Reply code sent with MARRIAGE_REPLY packet

Source code in src/eolib/protocol/_generated/net/server/marriage_reply.py
 9
10
11
12
13
14
15
16
17
18
19
class MarriageReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with MARRIAGE_REPLY packet
    """
    AlreadyMarried = 1
    NotMarried = 2
    Success = 3
    NotEnoughGold = 4
    WrongName = 5
    ServiceBusy = 6
    DivorceNotification = 7

AlreadyMarried = 1 class-attribute instance-attribute

NotMarried = 2 class-attribute instance-attribute

Success = 3 class-attribute instance-attribute

NotEnoughGold = 4 class-attribute instance-attribute

WrongName = 5 class-attribute instance-attribute

ServiceBusy = 6 class-attribute instance-attribute

DivorceNotification = 7 class-attribute instance-attribute

MarriageReplyServerPacket

Bases: Packet

Reply to client Marriage-family packets

Source code in src/eolib/protocol/_generated/net/server/marriage_reply_server_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
class MarriageReplyServerPacket(Packet):
    """
    Reply to client Marriage-family packets
    """
    _byte_size: int = 0
    _reply_code: MarriageReply = None # type: ignore [assignment]
    _reply_code_data: 'MarriageReplyServerPacket.ReplyCodeData' = 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 reply_code(self) -> MarriageReply:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: MarriageReply) -> None:
        self._reply_code = reply_code

    @property
    def reply_code_data(self) -> 'MarriageReplyServerPacket.ReplyCodeData':
        """
        MarriageReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the `reply_code` field.
        """
        return self._reply_code_data

    @reply_code_data.setter
    def reply_code_data(self, reply_code_data: 'MarriageReplyServerPacket.ReplyCodeData') -> None:
        self._reply_code_data = reply_code_data

    @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.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.
        """
        MarriageReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MarriageReplyServerPacket") -> None:
        """
        Serializes an instance of `MarriageReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MarriageReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_short(int(data._reply_code))
        if data._reply_code == MarriageReply.Success:
            if not isinstance(data._reply_code_data, MarriageReplyServerPacket.ReplyCodeDataSuccess):
                raise SerializationError("Expected reply_code_data to be type MarriageReplyServerPacket.ReplyCodeDataSuccess for reply_code " + MarriageReply(data._reply_code).name + ".")
            MarriageReplyServerPacket.ReplyCodeDataSuccess.serialize(writer, data._reply_code_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "MarriageReplyServerPacket":
        """
        Deserializes an instance of `MarriageReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MarriageReplyServerPacket: The data to serialize.
        """
        data: MarriageReplyServerPacket = MarriageReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = MarriageReply(reader.get_short())
            if data._reply_code == MarriageReply.Success:
                data._reply_code_data = MarriageReplyServerPacket.ReplyCodeDataSuccess.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"MarriageReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, reply_code_data={repr(self._reply_code_data)})"

    ReplyCodeData = Union['MarriageReplyServerPacket.ReplyCodeDataSuccess', None]
    ReplyCodeData.__doc__ = \
        """
        Data associated with different values of the `reply_code` field.
        """

    class ReplyCodeDataSuccess:
        """
        Data associated with reply_code value MarriageReply.Success
        """
        _byte_size: int = 0
        _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 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 serialize(writer: EoWriter, data: "MarriageReplyServerPacket.ReplyCodeDataSuccess") -> None:
            """
            Serializes an instance of `MarriageReplyServerPacket.ReplyCodeDataSuccess` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (MarriageReplyServerPacket.ReplyCodeDataSuccess): The data to serialize.
            """
            if data._gold_amount is None:
                raise SerializationError("gold_amount must be provided.")
            writer.add_int(data._gold_amount)

        @staticmethod
        def deserialize(reader: EoReader) -> "MarriageReplyServerPacket.ReplyCodeDataSuccess":
            """
            Deserializes an instance of `MarriageReplyServerPacket.ReplyCodeDataSuccess` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                MarriageReplyServerPacket.ReplyCodeDataSuccess: The data to serialize.
            """
            data: MarriageReplyServerPacket.ReplyCodeDataSuccess = MarriageReplyServerPacket.ReplyCodeDataSuccess()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                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"MarriageReplyServerPacket.ReplyCodeDataSuccess(byte_size={repr(self._byte_size)}, 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.

reply_code: MarriageReply property writable

reply_code_data: MarriageReplyServerPacket.ReplyCodeData property writable

MarriageReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the reply_code field.

ReplyCodeData = Union['MarriageReplyServerPacket.ReplyCodeDataSuccess', None] class-attribute instance-attribute

ReplyCodeDataSuccess

Data associated with reply_code value MarriageReply.Success

Source code in src/eolib/protocol/_generated/net/server/marriage_reply_server_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
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
class ReplyCodeDataSuccess:
    """
    Data associated with reply_code value MarriageReply.Success
    """
    _byte_size: int = 0
    _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 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 serialize(writer: EoWriter, data: "MarriageReplyServerPacket.ReplyCodeDataSuccess") -> None:
        """
        Serializes an instance of `MarriageReplyServerPacket.ReplyCodeDataSuccess` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MarriageReplyServerPacket.ReplyCodeDataSuccess): The data to serialize.
        """
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)

    @staticmethod
    def deserialize(reader: EoReader) -> "MarriageReplyServerPacket.ReplyCodeDataSuccess":
        """
        Deserializes an instance of `MarriageReplyServerPacket.ReplyCodeDataSuccess` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MarriageReplyServerPacket.ReplyCodeDataSuccess: The data to serialize.
        """
        data: MarriageReplyServerPacket.ReplyCodeDataSuccess = MarriageReplyServerPacket.ReplyCodeDataSuccess()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            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"MarriageReplyServerPacket.ReplyCodeDataSuccess(byte_size={repr(self._byte_size)}, 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.

gold_amount: int property writable

Note
  • Value range is 0-4097152080.

serialize(writer, data) staticmethod

Serializes an instance of MarriageReplyServerPacket.ReplyCodeDataSuccess to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataSuccess

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/marriage_reply_server_packet.py
163
164
165
166
167
168
169
170
171
172
173
174
@staticmethod
def serialize(writer: EoWriter, data: "MarriageReplyServerPacket.ReplyCodeDataSuccess") -> None:
    """
    Serializes an instance of `MarriageReplyServerPacket.ReplyCodeDataSuccess` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MarriageReplyServerPacket.ReplyCodeDataSuccess): The data to serialize.
    """
    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 MarriageReplyServerPacket.ReplyCodeDataSuccess from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataSuccess

MarriageReplyServerPacket.ReplyCodeDataSuccess: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/marriage_reply_server_packet.py
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
@staticmethod
def deserialize(reader: EoReader) -> "MarriageReplyServerPacket.ReplyCodeDataSuccess":
    """
    Deserializes an instance of `MarriageReplyServerPacket.ReplyCodeDataSuccess` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MarriageReplyServerPacket.ReplyCodeDataSuccess: The data to serialize.
    """
    data: MarriageReplyServerPacket.ReplyCodeDataSuccess = MarriageReplyServerPacket.ReplyCodeDataSuccess()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        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

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/server/marriage_reply_server_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/marriage_reply_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/marriage_reply_server_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    MarriageReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MarriageReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MarriageReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/marriage_reply_server_packet.py
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def serialize(writer: EoWriter, data: "MarriageReplyServerPacket") -> None:
    """
    Serializes an instance of `MarriageReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MarriageReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_short(int(data._reply_code))
    if data._reply_code == MarriageReply.Success:
        if not isinstance(data._reply_code_data, MarriageReplyServerPacket.ReplyCodeDataSuccess):
            raise SerializationError("Expected reply_code_data to be type MarriageReplyServerPacket.ReplyCodeDataSuccess for reply_code " + MarriageReply(data._reply_code).name + ".")
        MarriageReplyServerPacket.ReplyCodeDataSuccess.serialize(writer, data._reply_code_data)

deserialize(reader) staticmethod

Deserializes an instance of MarriageReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MarriageReplyServerPacket MarriageReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/marriage_reply_server_packet.py
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "MarriageReplyServerPacket":
    """
    Deserializes an instance of `MarriageReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MarriageReplyServerPacket: The data to serialize.
    """
    data: MarriageReplyServerPacket = MarriageReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._reply_code = MarriageReply(reader.get_short())
        if data._reply_code == MarriageReply.Success:
            data._reply_code_data = MarriageReplyServerPacket.ReplyCodeDataSuccess.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MarriageOpenServerPacket

Bases: Packet

Response from talking to a law NPC

Source code in src/eolib/protocol/_generated/net/server/marriage_open_server_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 MarriageOpenServerPacket(Packet):
    """
    Response from talking to a law NPC
    """
    _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-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.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.
        """
        MarriageOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "MarriageOpenServerPacket") -> None:
        """
        Serializes an instance of `MarriageOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MarriageOpenServerPacket): The data to serialize.
        """
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_three(data._session_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "MarriageOpenServerPacket":
        """
        Deserializes an instance of `MarriageOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MarriageOpenServerPacket: The data to serialize.
        """
        data: MarriageOpenServerPacket = MarriageOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            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"MarriageOpenServerPacket(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-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/server/marriage_open_server_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/server/marriage_open_server_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/server/marriage_open_server_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.
    """
    MarriageOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of MarriageOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MarriageOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/marriage_open_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "MarriageOpenServerPacket") -> None:
    """
    Serializes an instance of `MarriageOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MarriageOpenServerPacket): The data to serialize.
    """
    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 MarriageOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MarriageOpenServerPacket MarriageOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/marriage_open_server_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) -> "MarriageOpenServerPacket":
    """
    Deserializes an instance of `MarriageOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MarriageOpenServerPacket: The data to serialize.
    """
    data: MarriageOpenServerPacket = MarriageOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        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

MapEffect

Bases: IntEnum

An effect that occurs for all players on a map

Source code in src/eolib/protocol/_generated/net/server/map_effect.py
 9
10
11
12
13
class MapEffect(IntEnum, metaclass=ProtocolEnumMeta):
    """
    An effect that occurs for all players on a map
    """
    Quake = 1

Quake = 1 class-attribute instance-attribute

MapDrainDamageOther

Another player taking damage from a map HP drain

Source code in src/eolib/protocol/_generated/net/server/map_drain_damage_other.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 MapDrainDamageOther:
    """
    Another player taking damage from a map HP drain
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _damage: 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

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hp_percentage = hp_percentage

    @property
    def damage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._damage = damage

    @staticmethod
    def serialize(writer: EoWriter, data: "MapDrainDamageOther") -> None:
        """
        Serializes an instance of `MapDrainDamageOther` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (MapDrainDamageOther): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_short(data._damage)

    @staticmethod
    def deserialize(reader: EoReader) -> "MapDrainDamageOther":
        """
        Deserializes an instance of `MapDrainDamageOther` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            MapDrainDamageOther: The data to serialize.
        """
        data: MapDrainDamageOther = MapDrainDamageOther()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._hp_percentage = reader.get_char()
            data._damage = 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"MapDrainDamageOther(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, hp_percentage={repr(self._hp_percentage)}, damage={repr(self._damage)})"

byte_size: int property

Returns the size 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.

hp_percentage: int property writable

Note
  • Value range is 0-252.

damage: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of MapDrainDamageOther to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MapDrainDamageOther

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/map_drain_damage_other.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: "MapDrainDamageOther") -> None:
    """
    Serializes an instance of `MapDrainDamageOther` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (MapDrainDamageOther): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_short(data._damage)

deserialize(reader) staticmethod

Deserializes an instance of MapDrainDamageOther from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
MapDrainDamageOther MapDrainDamageOther

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/map_drain_damage_other.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) -> "MapDrainDamageOther":
    """
    Deserializes an instance of `MapDrainDamageOther` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        MapDrainDamageOther: The data to serialize.
    """
    data: MapDrainDamageOther = MapDrainDamageOther()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._hp_percentage = reader.get_char()
        data._damage = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MapDamageType

Bases: IntEnum

Type of damage being caused by the environment

Source code in src/eolib/protocol/_generated/net/server/map_damage_type.py
 9
10
11
12
13
14
class MapDamageType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Type of damage being caused by the environment
    """
    TpDrain = 1
    Spikes = 2

TpDrain = 1 class-attribute instance-attribute

Spikes = 2 class-attribute instance-attribute

LoginReply

Bases: IntEnum

Reply code sent with LOGIN_REPLY packet. Indicates the result of a login attempt.

Source code in src/eolib/protocol/_generated/net/server/login_reply.py
 9
10
11
12
13
14
15
16
17
18
19
class LoginReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with LOGIN_REPLY packet.
    Indicates the result of a login attempt.
    """
    WrongUser = 1
    WrongUserPassword = 2
    Ok = 3
    Banned = 4
    LoggedIn = 5
    Busy = 6

WrongUser = 1 class-attribute instance-attribute

WrongUserPassword = 2 class-attribute instance-attribute

Ok = 3 class-attribute instance-attribute

Banned = 4 class-attribute instance-attribute

LoggedIn = 5 class-attribute instance-attribute

Busy = 6 class-attribute instance-attribute

CharacterSelectionListEntry

Character selection screen character

Source code in src/eolib/protocol/_generated/net/server/character_selection_list_entry.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
220
221
class CharacterSelectionListEntry:
    """
    Character selection screen character
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _id: int = None # type: ignore [assignment]
    _level: 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]
    _admin: AdminLevel = None # type: ignore [assignment]
    _equipment: EquipmentCharacterSelect = 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 id(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._id

    @id.setter
    def id(self, id: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._id = id

    @property
    def level(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._level

    @level.setter
    def level(self, level: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._level = level

    @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-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 skin(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._skin

    @skin.setter
    def skin(self, skin: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._skin = skin

    @property
    def admin(self) -> AdminLevel:
        return self._admin

    @admin.setter
    def admin(self, admin: AdminLevel) -> None:
        self._admin = admin

    @property
    def equipment(self) -> EquipmentCharacterSelect:
        return self._equipment

    @equipment.setter
    def equipment(self, equipment: EquipmentCharacterSelect) -> None:
        self._equipment = equipment

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterSelectionListEntry") -> None:
        """
        Serializes an instance of `CharacterSelectionListEntry` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterSelectionListEntry): 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._id is None:
            raise SerializationError("id must be provided.")
        writer.add_int(data._id)
        if data._level is None:
            raise SerializationError("level must be provided.")
        writer.add_char(data._level)
        if data._gender is None:
            raise SerializationError("gender must be provided.")
        writer.add_char(int(data._gender))
        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._skin is None:
            raise SerializationError("skin must be provided.")
        writer.add_char(data._skin)
        if data._admin is None:
            raise SerializationError("admin must be provided.")
        writer.add_char(int(data._admin))
        if data._equipment is None:
            raise SerializationError("equipment must be provided.")
        EquipmentCharacterSelect.serialize(writer, data._equipment)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterSelectionListEntry":
        """
        Deserializes an instance of `CharacterSelectionListEntry` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterSelectionListEntry: The data to serialize.
        """
        data: CharacterSelectionListEntry = CharacterSelectionListEntry()
        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._id = reader.get_int()
            data._level = reader.get_char()
            data._gender = Gender(reader.get_char())
            data._hair_style = reader.get_char()
            data._hair_color = reader.get_char()
            data._skin = reader.get_char()
            data._admin = AdminLevel(reader.get_char())
            data._equipment = EquipmentCharacterSelect.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"CharacterSelectionListEntry(byte_size={repr(self._byte_size)}, name={repr(self._name)}, id={repr(self._id)}, level={repr(self._level)}, gender={repr(self._gender)}, hair_style={repr(self._hair_style)}, hair_color={repr(self._hair_color)}, skin={repr(self._skin)}, admin={repr(self._admin)}, equipment={repr(self._equipment)})"

byte_size: int property

Returns the size 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

id: int property writable

Note
  • Value range is 0-4097152080.

level: int property writable

Note
  • Value range is 0-252.

gender: Gender property writable

hair_style: int property writable

Note
  • Value range is 0-252.

hair_color: int property writable

Note
  • Value range is 0-252.

skin: int property writable

Note
  • Value range is 0-252.

admin: AdminLevel property writable

equipment: EquipmentCharacterSelect property writable

serialize(writer, data) staticmethod

Serializes an instance of CharacterSelectionListEntry to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterSelectionListEntry

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_selection_list_entry.py
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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterSelectionListEntry") -> None:
    """
    Serializes an instance of `CharacterSelectionListEntry` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterSelectionListEntry): 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._id is None:
        raise SerializationError("id must be provided.")
    writer.add_int(data._id)
    if data._level is None:
        raise SerializationError("level must be provided.")
    writer.add_char(data._level)
    if data._gender is None:
        raise SerializationError("gender must be provided.")
    writer.add_char(int(data._gender))
    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._skin is None:
        raise SerializationError("skin must be provided.")
    writer.add_char(data._skin)
    if data._admin is None:
        raise SerializationError("admin must be provided.")
    writer.add_char(int(data._admin))
    if data._equipment is None:
        raise SerializationError("equipment must be provided.")
    EquipmentCharacterSelect.serialize(writer, data._equipment)

deserialize(reader) staticmethod

Deserializes an instance of CharacterSelectionListEntry from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterSelectionListEntry CharacterSelectionListEntry

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_selection_list_entry.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterSelectionListEntry":
    """
    Deserializes an instance of `CharacterSelectionListEntry` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterSelectionListEntry: The data to serialize.
    """
    data: CharacterSelectionListEntry = CharacterSelectionListEntry()
    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._id = reader.get_int()
        data._level = reader.get_char()
        data._gender = Gender(reader.get_char())
        data._hair_style = reader.get_char()
        data._hair_color = reader.get_char()
        data._skin = reader.get_char()
        data._admin = AdminLevel(reader.get_char())
        data._equipment = EquipmentCharacterSelect.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

LoginReplyServerPacket

Bases: Packet

Login reply

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
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
class LoginReplyServerPacket(Packet):
    """
    Login reply
    """
    _byte_size: int = 0
    _reply_code: LoginReply = None # type: ignore [assignment]
    _reply_code_data: 'LoginReplyServerPacket.ReplyCodeData' = 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 reply_code(self) -> LoginReply:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: LoginReply) -> None:
        self._reply_code = reply_code

    @property
    def reply_code_data(self) -> 'LoginReplyServerPacket.ReplyCodeData':
        """
        LoginReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the `reply_code` field.
        """
        return self._reply_code_data

    @reply_code_data.setter
    def reply_code_data(self, reply_code_data: 'LoginReplyServerPacket.ReplyCodeData') -> None:
        self._reply_code_data = reply_code_data

    @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.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.
        """
        LoginReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LoginReplyServerPacket") -> None:
        """
        Serializes an instance of `LoginReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LoginReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_short(int(data._reply_code))
        if data._reply_code == LoginReply.WrongUser:
            if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataWrongUser):
                raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataWrongUser for reply_code " + LoginReply(data._reply_code).name + ".")
            LoginReplyServerPacket.ReplyCodeDataWrongUser.serialize(writer, data._reply_code_data)
        elif data._reply_code == LoginReply.WrongUserPassword:
            if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataWrongUserPassword):
                raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataWrongUserPassword for reply_code " + LoginReply(data._reply_code).name + ".")
            LoginReplyServerPacket.ReplyCodeDataWrongUserPassword.serialize(writer, data._reply_code_data)
        elif data._reply_code == LoginReply.Ok:
            if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataOk):
                raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataOk for reply_code " + LoginReply(data._reply_code).name + ".")
            LoginReplyServerPacket.ReplyCodeDataOk.serialize(writer, data._reply_code_data)
        elif data._reply_code == LoginReply.Banned:
            if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataBanned):
                raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataBanned for reply_code " + LoginReply(data._reply_code).name + ".")
            LoginReplyServerPacket.ReplyCodeDataBanned.serialize(writer, data._reply_code_data)
        elif data._reply_code == LoginReply.LoggedIn:
            if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataLoggedIn):
                raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataLoggedIn for reply_code " + LoginReply(data._reply_code).name + ".")
            LoginReplyServerPacket.ReplyCodeDataLoggedIn.serialize(writer, data._reply_code_data)
        elif data._reply_code == LoginReply.Busy:
            if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataBusy):
                raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataBusy for reply_code " + LoginReply(data._reply_code).name + ".")
            LoginReplyServerPacket.ReplyCodeDataBusy.serialize(writer, data._reply_code_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "LoginReplyServerPacket":
        """
        Deserializes an instance of `LoginReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LoginReplyServerPacket: The data to serialize.
        """
        data: LoginReplyServerPacket = LoginReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._reply_code = LoginReply(reader.get_short())
            if data._reply_code == LoginReply.WrongUser:
                data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataWrongUser.deserialize(reader)
            elif data._reply_code == LoginReply.WrongUserPassword:
                data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataWrongUserPassword.deserialize(reader)
            elif data._reply_code == LoginReply.Ok:
                data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataOk.deserialize(reader)
            elif data._reply_code == LoginReply.Banned:
                data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataBanned.deserialize(reader)
            elif data._reply_code == LoginReply.LoggedIn:
                data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataLoggedIn.deserialize(reader)
            elif data._reply_code == LoginReply.Busy:
                data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataBusy.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"LoginReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, reply_code_data={repr(self._reply_code_data)})"

    ReplyCodeData = Union['LoginReplyServerPacket.ReplyCodeDataWrongUser', 'LoginReplyServerPacket.ReplyCodeDataWrongUserPassword', 'LoginReplyServerPacket.ReplyCodeDataOk', 'LoginReplyServerPacket.ReplyCodeDataBanned', 'LoginReplyServerPacket.ReplyCodeDataLoggedIn', 'LoginReplyServerPacket.ReplyCodeDataBusy', None]
    ReplyCodeData.__doc__ = \
        """
        Data associated with different values of the `reply_code` field.
        """

    class ReplyCodeDataWrongUser:
        """
        Data associated with reply_code value LoginReply.WrongUser
        """
        _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataWrongUser") -> None:
            """
            Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUser` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (LoginReplyServerPacket.ReplyCodeDataWrongUser): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataWrongUser":
            """
            Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUser` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                LoginReplyServerPacket.ReplyCodeDataWrongUser: The data to serialize.
            """
            data: LoginReplyServerPacket.ReplyCodeDataWrongUser = LoginReplyServerPacket.ReplyCodeDataWrongUser()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataWrongUser(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataWrongUserPassword:
        """
        Data associated with reply_code value LoginReply.WrongUserPassword
        """
        _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataWrongUserPassword") -> None:
            """
            Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUserPassword` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (LoginReplyServerPacket.ReplyCodeDataWrongUserPassword): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataWrongUserPassword":
            """
            Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUserPassword` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                LoginReplyServerPacket.ReplyCodeDataWrongUserPassword: The data to serialize.
            """
            data: LoginReplyServerPacket.ReplyCodeDataWrongUserPassword = LoginReplyServerPacket.ReplyCodeDataWrongUserPassword()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataWrongUserPassword(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataOk:
        """
        Data associated with reply_code value LoginReply.Ok
        """
        _byte_size: int = 0
        _characters_count: int = None # type: ignore [assignment]
        _characters: list[CharacterSelectionListEntry] = 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 characters(self) -> list[CharacterSelectionListEntry]:
            """
            Note:
              - Length must be 252 or less.
            """
            return self._characters

        @characters.setter
        def characters(self, characters: list[CharacterSelectionListEntry]) -> None:
            """
            Note:
              - Length must be 252 or less.
            """
            self._characters = characters
            self._characters_count = len(self._characters)

        @staticmethod
        def serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataOk") -> None:
            """
            Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (LoginReplyServerPacket.ReplyCodeDataOk): The data to serialize.
            """
            if data._characters_count is None:
                raise SerializationError("characters_count must be provided.")
            writer.add_char(data._characters_count)
            writer.add_char(0)
            writer.add_byte(0xFF)
            if data._characters is None:
                raise SerializationError("characters must be provided.")
            if len(data._characters) > 252:
                raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
            for i in range(data._characters_count):
                if i > 0:
                    writer.add_byte(0xFF)
                CharacterSelectionListEntry.serialize(writer, data._characters[i])

        @staticmethod
        def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataOk":
            """
            Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                LoginReplyServerPacket.ReplyCodeDataOk: The data to serialize.
            """
            data: LoginReplyServerPacket.ReplyCodeDataOk = LoginReplyServerPacket.ReplyCodeDataOk()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._characters_count = reader.get_char()
                reader.get_char()
                reader.next_chunk()
                data._characters = []
                for i in range(data._characters_count):
                    data._characters.append(CharacterSelectionListEntry.deserialize(reader))
                    if i + 1 < data._characters_count:
                        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"LoginReplyServerPacket.ReplyCodeDataOk(byte_size={repr(self._byte_size)}, characters={repr(self._characters)})"

    class ReplyCodeDataBanned:
        """
        Data associated with reply_code value LoginReply.Banned
        """
        _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataBanned") -> None:
            """
            Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataBanned` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (LoginReplyServerPacket.ReplyCodeDataBanned): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataBanned":
            """
            Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataBanned` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                LoginReplyServerPacket.ReplyCodeDataBanned: The data to serialize.
            """
            data: LoginReplyServerPacket.ReplyCodeDataBanned = LoginReplyServerPacket.ReplyCodeDataBanned()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataBanned(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataLoggedIn:
        """
        Data associated with reply_code value LoginReply.LoggedIn
        """
        _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataLoggedIn") -> None:
            """
            Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataLoggedIn` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (LoginReplyServerPacket.ReplyCodeDataLoggedIn): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataLoggedIn":
            """
            Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataLoggedIn` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                LoginReplyServerPacket.ReplyCodeDataLoggedIn: The data to serialize.
            """
            data: LoginReplyServerPacket.ReplyCodeDataLoggedIn = LoginReplyServerPacket.ReplyCodeDataLoggedIn()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataLoggedIn(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataBusy:
        """
        Data associated with reply_code value LoginReply.Busy
        """
        _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataBusy") -> None:
            """
            Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataBusy` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (LoginReplyServerPacket.ReplyCodeDataBusy): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataBusy":
            """
            Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataBusy` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                LoginReplyServerPacket.ReplyCodeDataBusy: The data to serialize.
            """
            data: LoginReplyServerPacket.ReplyCodeDataBusy = LoginReplyServerPacket.ReplyCodeDataBusy()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataBusy(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.

reply_code: LoginReply property writable

reply_code_data: 'LoginReplyServerPacket.ReplyCodeData' property writable

LoginReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the reply_code field.

ReplyCodeData = Union['LoginReplyServerPacket.ReplyCodeDataWrongUser', 'LoginReplyServerPacket.ReplyCodeDataWrongUserPassword', 'LoginReplyServerPacket.ReplyCodeDataOk', 'LoginReplyServerPacket.ReplyCodeDataBanned', 'LoginReplyServerPacket.ReplyCodeDataLoggedIn', 'LoginReplyServerPacket.ReplyCodeDataBusy', None] class-attribute instance-attribute

ReplyCodeDataWrongUser

Data associated with reply_code value LoginReply.WrongUser

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
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
class ReplyCodeDataWrongUser:
    """
    Data associated with reply_code value LoginReply.WrongUser
    """
    _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataWrongUser") -> None:
        """
        Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUser` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LoginReplyServerPacket.ReplyCodeDataWrongUser): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataWrongUser":
        """
        Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUser` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LoginReplyServerPacket.ReplyCodeDataWrongUser: The data to serialize.
        """
        data: LoginReplyServerPacket.ReplyCodeDataWrongUser = LoginReplyServerPacket.ReplyCodeDataWrongUser()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataWrongUser(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.

serialize(writer, data) staticmethod

Serializes an instance of LoginReplyServerPacket.ReplyCodeDataWrongUser to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataWrongUser

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
181
182
183
184
185
186
187
188
189
190
@staticmethod
def serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataWrongUser") -> None:
    """
    Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUser` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LoginReplyServerPacket.ReplyCodeDataWrongUser): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of LoginReplyServerPacket.ReplyCodeDataWrongUser from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'LoginReplyServerPacket.ReplyCodeDataWrongUser'

LoginReplyServerPacket.ReplyCodeDataWrongUser: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
@staticmethod
def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataWrongUser":
    """
    Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUser` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LoginReplyServerPacket.ReplyCodeDataWrongUser: The data to serialize.
    """
    data: LoginReplyServerPacket.ReplyCodeDataWrongUser = LoginReplyServerPacket.ReplyCodeDataWrongUser()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataWrongUserPassword

Data associated with reply_code value LoginReply.WrongUserPassword

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
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
class ReplyCodeDataWrongUserPassword:
    """
    Data associated with reply_code value LoginReply.WrongUserPassword
    """
    _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataWrongUserPassword") -> None:
        """
        Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUserPassword` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LoginReplyServerPacket.ReplyCodeDataWrongUserPassword): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataWrongUserPassword":
        """
        Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUserPassword` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LoginReplyServerPacket.ReplyCodeDataWrongUserPassword: The data to serialize.
        """
        data: LoginReplyServerPacket.ReplyCodeDataWrongUserPassword = LoginReplyServerPacket.ReplyCodeDataWrongUserPassword()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataWrongUserPassword(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.

serialize(writer, data) staticmethod

Serializes an instance of LoginReplyServerPacket.ReplyCodeDataWrongUserPassword to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataWrongUserPassword

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
233
234
235
236
237
238
239
240
241
242
@staticmethod
def serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataWrongUserPassword") -> None:
    """
    Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUserPassword` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LoginReplyServerPacket.ReplyCodeDataWrongUserPassword): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of LoginReplyServerPacket.ReplyCodeDataWrongUserPassword from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'LoginReplyServerPacket.ReplyCodeDataWrongUserPassword'

LoginReplyServerPacket.ReplyCodeDataWrongUserPassword: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
@staticmethod
def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataWrongUserPassword":
    """
    Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataWrongUserPassword` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LoginReplyServerPacket.ReplyCodeDataWrongUserPassword: The data to serialize.
    """
    data: LoginReplyServerPacket.ReplyCodeDataWrongUserPassword = LoginReplyServerPacket.ReplyCodeDataWrongUserPassword()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataOk

Data associated with reply_code value LoginReply.Ok

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
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
class ReplyCodeDataOk:
    """
    Data associated with reply_code value LoginReply.Ok
    """
    _byte_size: int = 0
    _characters_count: int = None # type: ignore [assignment]
    _characters: list[CharacterSelectionListEntry] = 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 characters(self) -> list[CharacterSelectionListEntry]:
        """
        Note:
          - Length must be 252 or less.
        """
        return self._characters

    @characters.setter
    def characters(self, characters: list[CharacterSelectionListEntry]) -> None:
        """
        Note:
          - Length must be 252 or less.
        """
        self._characters = characters
        self._characters_count = len(self._characters)

    @staticmethod
    def serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataOk") -> None:
        """
        Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LoginReplyServerPacket.ReplyCodeDataOk): The data to serialize.
        """
        if data._characters_count is None:
            raise SerializationError("characters_count must be provided.")
        writer.add_char(data._characters_count)
        writer.add_char(0)
        writer.add_byte(0xFF)
        if data._characters is None:
            raise SerializationError("characters must be provided.")
        if len(data._characters) > 252:
            raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
        for i in range(data._characters_count):
            if i > 0:
                writer.add_byte(0xFF)
            CharacterSelectionListEntry.serialize(writer, data._characters[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataOk":
        """
        Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LoginReplyServerPacket.ReplyCodeDataOk: The data to serialize.
        """
        data: LoginReplyServerPacket.ReplyCodeDataOk = LoginReplyServerPacket.ReplyCodeDataOk()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._characters_count = reader.get_char()
            reader.get_char()
            reader.next_chunk()
            data._characters = []
            for i in range(data._characters_count):
                data._characters.append(CharacterSelectionListEntry.deserialize(reader))
                if i + 1 < data._characters_count:
                    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"LoginReplyServerPacket.ReplyCodeDataOk(byte_size={repr(self._byte_size)}, characters={repr(self._characters)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

characters: list[CharacterSelectionListEntry] property writable

Note
  • Length must be 252 or less.

serialize(writer, data) staticmethod

Serializes an instance of LoginReplyServerPacket.ReplyCodeDataOk to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataOk

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
@staticmethod
def serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataOk") -> None:
    """
    Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LoginReplyServerPacket.ReplyCodeDataOk): The data to serialize.
    """
    if data._characters_count is None:
        raise SerializationError("characters_count must be provided.")
    writer.add_char(data._characters_count)
    writer.add_char(0)
    writer.add_byte(0xFF)
    if data._characters is None:
        raise SerializationError("characters must be provided.")
    if len(data._characters) > 252:
        raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
    for i in range(data._characters_count):
        if i > 0:
            writer.add_byte(0xFF)
        CharacterSelectionListEntry.serialize(writer, data._characters[i])

deserialize(reader) staticmethod

Deserializes an instance of LoginReplyServerPacket.ReplyCodeDataOk from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'LoginReplyServerPacket.ReplyCodeDataOk'

LoginReplyServerPacket.ReplyCodeDataOk: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataOk":
    """
    Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LoginReplyServerPacket.ReplyCodeDataOk: The data to serialize.
    """
    data: LoginReplyServerPacket.ReplyCodeDataOk = LoginReplyServerPacket.ReplyCodeDataOk()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._characters_count = reader.get_char()
        reader.get_char()
        reader.next_chunk()
        data._characters = []
        for i in range(data._characters_count):
            data._characters.append(CharacterSelectionListEntry.deserialize(reader))
            if i + 1 < data._characters_count:
                reader.next_chunk()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataBanned

Data associated with reply_code value LoginReply.Banned

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
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
class ReplyCodeDataBanned:
    """
    Data associated with reply_code value LoginReply.Banned
    """
    _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataBanned") -> None:
        """
        Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataBanned` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LoginReplyServerPacket.ReplyCodeDataBanned): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataBanned":
        """
        Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataBanned` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LoginReplyServerPacket.ReplyCodeDataBanned: The data to serialize.
        """
        data: LoginReplyServerPacket.ReplyCodeDataBanned = LoginReplyServerPacket.ReplyCodeDataBanned()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataBanned(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.

serialize(writer, data) staticmethod

Serializes an instance of LoginReplyServerPacket.ReplyCodeDataBanned to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataBanned

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
374
375
376
377
378
379
380
381
382
383
@staticmethod
def serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataBanned") -> None:
    """
    Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataBanned` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LoginReplyServerPacket.ReplyCodeDataBanned): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of LoginReplyServerPacket.ReplyCodeDataBanned from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'LoginReplyServerPacket.ReplyCodeDataBanned'

LoginReplyServerPacket.ReplyCodeDataBanned: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
@staticmethod
def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataBanned":
    """
    Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataBanned` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LoginReplyServerPacket.ReplyCodeDataBanned: The data to serialize.
    """
    data: LoginReplyServerPacket.ReplyCodeDataBanned = LoginReplyServerPacket.ReplyCodeDataBanned()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataLoggedIn

Data associated with reply_code value LoginReply.LoggedIn

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
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
class ReplyCodeDataLoggedIn:
    """
    Data associated with reply_code value LoginReply.LoggedIn
    """
    _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataLoggedIn") -> None:
        """
        Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataLoggedIn` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LoginReplyServerPacket.ReplyCodeDataLoggedIn): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataLoggedIn":
        """
        Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataLoggedIn` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LoginReplyServerPacket.ReplyCodeDataLoggedIn: The data to serialize.
        """
        data: LoginReplyServerPacket.ReplyCodeDataLoggedIn = LoginReplyServerPacket.ReplyCodeDataLoggedIn()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataLoggedIn(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.

serialize(writer, data) staticmethod

Serializes an instance of LoginReplyServerPacket.ReplyCodeDataLoggedIn to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataLoggedIn

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
426
427
428
429
430
431
432
433
434
435
@staticmethod
def serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataLoggedIn") -> None:
    """
    Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataLoggedIn` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LoginReplyServerPacket.ReplyCodeDataLoggedIn): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of LoginReplyServerPacket.ReplyCodeDataLoggedIn from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'LoginReplyServerPacket.ReplyCodeDataLoggedIn'

LoginReplyServerPacket.ReplyCodeDataLoggedIn: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
@staticmethod
def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataLoggedIn":
    """
    Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataLoggedIn` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LoginReplyServerPacket.ReplyCodeDataLoggedIn: The data to serialize.
    """
    data: LoginReplyServerPacket.ReplyCodeDataLoggedIn = LoginReplyServerPacket.ReplyCodeDataLoggedIn()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataBusy

Data associated with reply_code value LoginReply.Busy

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
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
class ReplyCodeDataBusy:
    """
    Data associated with reply_code value LoginReply.Busy
    """
    _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 serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataBusy") -> None:
        """
        Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataBusy` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LoginReplyServerPacket.ReplyCodeDataBusy): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataBusy":
        """
        Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataBusy` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LoginReplyServerPacket.ReplyCodeDataBusy: The data to serialize.
        """
        data: LoginReplyServerPacket.ReplyCodeDataBusy = LoginReplyServerPacket.ReplyCodeDataBusy()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"LoginReplyServerPacket.ReplyCodeDataBusy(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.

serialize(writer, data) staticmethod

Serializes an instance of LoginReplyServerPacket.ReplyCodeDataBusy to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataBusy

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
478
479
480
481
482
483
484
485
486
487
@staticmethod
def serialize(writer: EoWriter, data: "LoginReplyServerPacket.ReplyCodeDataBusy") -> None:
    """
    Serializes an instance of `LoginReplyServerPacket.ReplyCodeDataBusy` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LoginReplyServerPacket.ReplyCodeDataBusy): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of LoginReplyServerPacket.ReplyCodeDataBusy from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'LoginReplyServerPacket.ReplyCodeDataBusy'

LoginReplyServerPacket.ReplyCodeDataBusy: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
@staticmethod
def deserialize(reader: EoReader) -> "LoginReplyServerPacket.ReplyCodeDataBusy":
    """
    Deserializes an instance of `LoginReplyServerPacket.ReplyCodeDataBusy` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LoginReplyServerPacket.ReplyCodeDataBusy: The data to serialize.
    """
    data: LoginReplyServerPacket.ReplyCodeDataBusy = LoginReplyServerPacket.ReplyCodeDataBusy()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        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/server/login_reply_server_packet.py
54
55
56
57
58
59
60
61
62
@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/server/login_reply_server_packet.py
64
65
66
67
68
69
70
71
72
@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/server/login_reply_server_packet.py
74
75
76
77
78
79
80
81
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LoginReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LoginReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LoginReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
 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
@staticmethod
def serialize(writer: EoWriter, data: "LoginReplyServerPacket") -> None:
    """
    Serializes an instance of `LoginReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LoginReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_short(int(data._reply_code))
    if data._reply_code == LoginReply.WrongUser:
        if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataWrongUser):
            raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataWrongUser for reply_code " + LoginReply(data._reply_code).name + ".")
        LoginReplyServerPacket.ReplyCodeDataWrongUser.serialize(writer, data._reply_code_data)
    elif data._reply_code == LoginReply.WrongUserPassword:
        if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataWrongUserPassword):
            raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataWrongUserPassword for reply_code " + LoginReply(data._reply_code).name + ".")
        LoginReplyServerPacket.ReplyCodeDataWrongUserPassword.serialize(writer, data._reply_code_data)
    elif data._reply_code == LoginReply.Ok:
        if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataOk):
            raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataOk for reply_code " + LoginReply(data._reply_code).name + ".")
        LoginReplyServerPacket.ReplyCodeDataOk.serialize(writer, data._reply_code_data)
    elif data._reply_code == LoginReply.Banned:
        if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataBanned):
            raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataBanned for reply_code " + LoginReply(data._reply_code).name + ".")
        LoginReplyServerPacket.ReplyCodeDataBanned.serialize(writer, data._reply_code_data)
    elif data._reply_code == LoginReply.LoggedIn:
        if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataLoggedIn):
            raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataLoggedIn for reply_code " + LoginReply(data._reply_code).name + ".")
        LoginReplyServerPacket.ReplyCodeDataLoggedIn.serialize(writer, data._reply_code_data)
    elif data._reply_code == LoginReply.Busy:
        if not isinstance(data._reply_code_data, LoginReplyServerPacket.ReplyCodeDataBusy):
            raise SerializationError("Expected reply_code_data to be type LoginReplyServerPacket.ReplyCodeDataBusy for reply_code " + LoginReply(data._reply_code).name + ".")
        LoginReplyServerPacket.ReplyCodeDataBusy.serialize(writer, data._reply_code_data)

deserialize(reader) staticmethod

Deserializes an instance of LoginReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LoginReplyServerPacket 'LoginReplyServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/login_reply_server_packet.py
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
@staticmethod
def deserialize(reader: EoReader) -> "LoginReplyServerPacket":
    """
    Deserializes an instance of `LoginReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LoginReplyServerPacket: The data to serialize.
    """
    data: LoginReplyServerPacket = LoginReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._reply_code = LoginReply(reader.get_short())
        if data._reply_code == LoginReply.WrongUser:
            data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataWrongUser.deserialize(reader)
        elif data._reply_code == LoginReply.WrongUserPassword:
            data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataWrongUserPassword.deserialize(reader)
        elif data._reply_code == LoginReply.Ok:
            data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataOk.deserialize(reader)
        elif data._reply_code == LoginReply.Banned:
            data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataBanned.deserialize(reader)
        elif data._reply_code == LoginReply.LoggedIn:
            data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataLoggedIn.deserialize(reader)
        elif data._reply_code == LoginReply.Busy:
            data._reply_code_data = LoginReplyServerPacket.ReplyCodeDataBusy.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

LockerSpecServerPacket

Bases: Packet

Reply to trying to add an item to a full locker

Source code in src/eolib/protocol/_generated/net/server/locker_spec_server_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 LockerSpecServerPacket(Packet):
    """
    Reply to trying to add an item to a full locker
    """
    _byte_size: int = 0
    _locker_max_items: 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_max_items(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._locker_max_items

    @locker_max_items.setter
    def locker_max_items(self, locker_max_items: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._locker_max_items = locker_max_items

    @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.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.
        """
        LockerSpecServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerSpecServerPacket") -> None:
        """
        Serializes an instance of `LockerSpecServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerSpecServerPacket): The data to serialize.
        """
        if data._locker_max_items is None:
            raise SerializationError("locker_max_items must be provided.")
        writer.add_char(data._locker_max_items)

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerSpecServerPacket":
        """
        Deserializes an instance of `LockerSpecServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerSpecServerPacket: The data to serialize.
        """
        data: LockerSpecServerPacket = LockerSpecServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._locker_max_items = 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"LockerSpecServerPacket(byte_size={repr(self._byte_size)}, locker_max_items={repr(self._locker_max_items)})"

byte_size: int property

Returns the size 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_max_items: 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/server/locker_spec_server_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.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/server/locker_spec_server_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.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/server/locker_spec_server_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.
    """
    LockerSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/locker_spec_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "LockerSpecServerPacket") -> None:
    """
    Serializes an instance of `LockerSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerSpecServerPacket): The data to serialize.
    """
    if data._locker_max_items is None:
        raise SerializationError("locker_max_items must be provided.")
    writer.add_char(data._locker_max_items)

deserialize(reader) staticmethod

Deserializes an instance of LockerSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerSpecServerPacket LockerSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/locker_spec_server_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) -> "LockerSpecServerPacket":
    """
    Deserializes an instance of `LockerSpecServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerSpecServerPacket: The data to serialize.
    """
    data: LockerSpecServerPacket = LockerSpecServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._locker_max_items = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LockerReplyServerPacket

Bases: Packet

Response to adding an item to a bank locker

Source code in src/eolib/protocol/_generated/net/server/locker_reply_server_packet.py
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
class LockerReplyServerPacket(Packet):
    """
    Response to adding an item to a bank locker
    """
    _byte_size: int = 0
    _deposited_item: Item = None # type: ignore [assignment]
    _weight: Weight = None # type: ignore [assignment]
    _locker_items: list[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 deposited_item(self) -> Item:
        return self._deposited_item

    @deposited_item.setter
    def deposited_item(self, deposited_item: Item) -> None:
        self._deposited_item = deposited_item

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @property
    def locker_items(self) -> list[ThreeItem]:
        return self._locker_items

    @locker_items.setter
    def locker_items(self, locker_items: list[ThreeItem]) -> None:
        self._locker_items = locker_items

    @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.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.
        """
        LockerReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerReplyServerPacket") -> None:
        """
        Serializes an instance of `LockerReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerReplyServerPacket): The data to serialize.
        """
        if data._deposited_item is None:
            raise SerializationError("deposited_item must be provided.")
        Item.serialize(writer, data._deposited_item)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)
        if data._locker_items is None:
            raise SerializationError("locker_items must be provided.")
        for i in range(len(data._locker_items)):
            ThreeItem.serialize(writer, data._locker_items[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerReplyServerPacket":
        """
        Deserializes an instance of `LockerReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerReplyServerPacket: The data to serialize.
        """
        data: LockerReplyServerPacket = LockerReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._deposited_item = Item.deserialize(reader)
            data._weight = Weight.deserialize(reader)
            locker_items_length = int(reader.remaining / 5)
            data._locker_items = []
            for i in range(locker_items_length):
                data._locker_items.append(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"LockerReplyServerPacket(byte_size={repr(self._byte_size)}, deposited_item={repr(self._deposited_item)}, weight={repr(self._weight)}, locker_items={repr(self._locker_items)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

deposited_item: Item property writable

weight: Weight property writable

locker_items: list[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/server/locker_reply_server_packet.py
60
61
62
63
64
65
66
67
68
@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/server/locker_reply_server_packet.py
70
71
72
73
74
75
76
77
78
@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/server/locker_reply_server_packet.py
80
81
82
83
84
85
86
87
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LockerReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/locker_reply_server_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@staticmethod
def serialize(writer: EoWriter, data: "LockerReplyServerPacket") -> None:
    """
    Serializes an instance of `LockerReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerReplyServerPacket): The data to serialize.
    """
    if data._deposited_item is None:
        raise SerializationError("deposited_item must be provided.")
    Item.serialize(writer, data._deposited_item)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)
    if data._locker_items is None:
        raise SerializationError("locker_items must be provided.")
    for i in range(len(data._locker_items)):
        ThreeItem.serialize(writer, data._locker_items[i])

deserialize(reader) staticmethod

Deserializes an instance of LockerReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerReplyServerPacket 'LockerReplyServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/locker_reply_server_packet.py
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) -> "LockerReplyServerPacket":
    """
    Deserializes an instance of `LockerReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerReplyServerPacket: The data to serialize.
    """
    data: LockerReplyServerPacket = LockerReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._deposited_item = Item.deserialize(reader)
        data._weight = Weight.deserialize(reader)
        locker_items_length = int(reader.remaining / 5)
        data._locker_items = []
        for i in range(locker_items_length):
            data._locker_items.append(ThreeItem.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LockerOpenServerPacket

Bases: Packet

Opening a bank locker

Source code in src/eolib/protocol/_generated/net/server/locker_open_server_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
class LockerOpenServerPacket(Packet):
    """
    Opening a bank locker
    """
    _byte_size: int = 0
    _locker_coords: Coords = None # type: ignore [assignment]
    _locker_items: list[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 locker_items(self) -> list[ThreeItem]:
        return self._locker_items

    @locker_items.setter
    def locker_items(self, locker_items: list[ThreeItem]) -> None:
        self._locker_items = locker_items

    @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.
        """
        LockerOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerOpenServerPacket") -> None:
        """
        Serializes an instance of `LockerOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerOpenServerPacket): 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._locker_items is None:
            raise SerializationError("locker_items must be provided.")
        for i in range(len(data._locker_items)):
            ThreeItem.serialize(writer, data._locker_items[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerOpenServerPacket":
        """
        Deserializes an instance of `LockerOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerOpenServerPacket: The data to serialize.
        """
        data: LockerOpenServerPacket = LockerOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._locker_coords = Coords.deserialize(reader)
            locker_items_length = int(reader.remaining / 5)
            data._locker_items = []
            for i in range(locker_items_length):
                data._locker_items.append(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"LockerOpenServerPacket(byte_size={repr(self._byte_size)}, locker_coords={repr(self._locker_coords)}, locker_items={repr(self._locker_items)})"

byte_size: int property

Returns the size 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

locker_items: list[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/server/locker_open_server_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/locker_open_server_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/locker_open_server_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LockerOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/locker_open_server_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@staticmethod
def serialize(writer: EoWriter, data: "LockerOpenServerPacket") -> None:
    """
    Serializes an instance of `LockerOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerOpenServerPacket): 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._locker_items is None:
        raise SerializationError("locker_items must be provided.")
    for i in range(len(data._locker_items)):
        ThreeItem.serialize(writer, data._locker_items[i])

deserialize(reader) staticmethod

Deserializes an instance of LockerOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerOpenServerPacket 'LockerOpenServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/locker_open_server_packet.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "LockerOpenServerPacket":
    """
    Deserializes an instance of `LockerOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerOpenServerPacket: The data to serialize.
    """
    data: LockerOpenServerPacket = LockerOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._locker_coords = Coords.deserialize(reader)
        locker_items_length = int(reader.remaining / 5)
        data._locker_items = []
        for i in range(locker_items_length):
            data._locker_items.append(ThreeItem.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LockerGetServerPacket

Bases: Packet

Response to taking an item from a bank locker

Source code in src/eolib/protocol/_generated/net/server/locker_get_server_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
class LockerGetServerPacket(Packet):
    """
    Response to taking an item from a bank locker
    """
    _byte_size: int = 0
    _taken_item: ThreeItem = None # type: ignore [assignment]
    _weight: Weight = None # type: ignore [assignment]
    _locker_items: list[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 taken_item(self) -> ThreeItem:
        return self._taken_item

    @taken_item.setter
    def taken_item(self, taken_item: ThreeItem) -> None:
        self._taken_item = taken_item

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @property
    def locker_items(self) -> list[ThreeItem]:
        return self._locker_items

    @locker_items.setter
    def locker_items(self, locker_items: list[ThreeItem]) -> None:
        self._locker_items = locker_items

    @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.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.
        """
        LockerGetServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerGetServerPacket") -> None:
        """
        Serializes an instance of `LockerGetServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerGetServerPacket): The data to serialize.
        """
        if data._taken_item is None:
            raise SerializationError("taken_item must be provided.")
        ThreeItem.serialize(writer, data._taken_item)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)
        if data._locker_items is None:
            raise SerializationError("locker_items must be provided.")
        for i in range(len(data._locker_items)):
            ThreeItem.serialize(writer, data._locker_items[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerGetServerPacket":
        """
        Deserializes an instance of `LockerGetServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerGetServerPacket: The data to serialize.
        """
        data: LockerGetServerPacket = LockerGetServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._taken_item = ThreeItem.deserialize(reader)
            data._weight = Weight.deserialize(reader)
            locker_items_length = int(reader.remaining / 5)
            data._locker_items = []
            for i in range(locker_items_length):
                data._locker_items.append(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"LockerGetServerPacket(byte_size={repr(self._byte_size)}, taken_item={repr(self._taken_item)}, weight={repr(self._weight)}, locker_items={repr(self._locker_items)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

taken_item: ThreeItem property writable

weight: Weight property writable

locker_items: list[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/server/locker_get_server_packet.py
59
60
61
62
63
64
65
66
67
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/locker_get_server_packet.py
69
70
71
72
73
74
75
76
77
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/locker_get_server_packet.py
79
80
81
82
83
84
85
86
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    LockerGetServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerGetServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerGetServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/locker_get_server_packet.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "LockerGetServerPacket") -> None:
    """
    Serializes an instance of `LockerGetServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerGetServerPacket): The data to serialize.
    """
    if data._taken_item is None:
        raise SerializationError("taken_item must be provided.")
    ThreeItem.serialize(writer, data._taken_item)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)
    if data._locker_items is None:
        raise SerializationError("locker_items must be provided.")
    for i in range(len(data._locker_items)):
        ThreeItem.serialize(writer, data._locker_items[i])

deserialize(reader) staticmethod

Deserializes an instance of LockerGetServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerGetServerPacket 'LockerGetServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/locker_get_server_packet.py
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@staticmethod
def deserialize(reader: EoReader) -> "LockerGetServerPacket":
    """
    Deserializes an instance of `LockerGetServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerGetServerPacket: The data to serialize.
    """
    data: LockerGetServerPacket = LockerGetServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._taken_item = ThreeItem.deserialize(reader)
        data._weight = Weight.deserialize(reader)
        locker_items_length = int(reader.remaining / 5)
        data._locker_items = []
        for i in range(locker_items_length):
            data._locker_items.append(ThreeItem.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

LockerBuyServerPacket

Bases: Packet

Response to buying a locker space upgrade from a banker NPC

Source code in src/eolib/protocol/_generated/net/server/locker_buy_server_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 LockerBuyServerPacket(Packet):
    """
    Response to buying a locker space upgrade from a banker NPC
    """
    _byte_size: int = 0
    _gold_amount: int = None # type: ignore [assignment]
    _locker_upgrades: 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 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

    @property
    def locker_upgrades(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._locker_upgrades

    @locker_upgrades.setter
    def locker_upgrades(self, locker_upgrades: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._locker_upgrades = locker_upgrades

    @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.
        """
        LockerBuyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "LockerBuyServerPacket") -> None:
        """
        Serializes an instance of `LockerBuyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (LockerBuyServerPacket): The data to serialize.
        """
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)
        if data._locker_upgrades is None:
            raise SerializationError("locker_upgrades must be provided.")
        writer.add_char(data._locker_upgrades)

    @staticmethod
    def deserialize(reader: EoReader) -> "LockerBuyServerPacket":
        """
        Deserializes an instance of `LockerBuyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            LockerBuyServerPacket: The data to serialize.
        """
        data: LockerBuyServerPacket = LockerBuyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._gold_amount = reader.get_int()
            data._locker_upgrades = 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"LockerBuyServerPacket(byte_size={repr(self._byte_size)}, gold_amount={repr(self._gold_amount)}, locker_upgrades={repr(self._locker_upgrades)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

gold_amount: int property writable

Note
  • Value range is 0-4097152080.

locker_upgrades: 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/server/locker_buy_server_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.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/server/locker_buy_server_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/server/locker_buy_server_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.
    """
    LockerBuyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of LockerBuyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data LockerBuyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/locker_buy_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "LockerBuyServerPacket") -> None:
    """
    Serializes an instance of `LockerBuyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (LockerBuyServerPacket): The data to serialize.
    """
    if data._gold_amount is None:
        raise SerializationError("gold_amount must be provided.")
    writer.add_int(data._gold_amount)
    if data._locker_upgrades is None:
        raise SerializationError("locker_upgrades must be provided.")
    writer.add_char(data._locker_upgrades)

deserialize(reader) staticmethod

Deserializes an instance of LockerBuyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
LockerBuyServerPacket LockerBuyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/locker_buy_server_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) -> "LockerBuyServerPacket":
    """
    Deserializes an instance of `LockerBuyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        LockerBuyServerPacket: The data to serialize.
    """
    data: LockerBuyServerPacket = LockerBuyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._gold_amount = reader.get_int()
        data._locker_upgrades = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

JukeboxUseServerPacket

Bases: Packet

Play jukebox music

Source code in src/eolib/protocol/_generated/net/server/jukebox_use_server_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 JukeboxUseServerPacket(Packet):
    """
    Play jukebox music
    """
    _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.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.
        """
        JukeboxUseServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxUseServerPacket") -> None:
        """
        Serializes an instance of `JukeboxUseServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxUseServerPacket): The data to serialize.
        """
        if data._track_id is None:
            raise SerializationError("track_id must be provided.")
        writer.add_short(data._track_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "JukeboxUseServerPacket":
        """
        Deserializes an instance of `JukeboxUseServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxUseServerPacket: The data to serialize.
        """
        data: JukeboxUseServerPacket = JukeboxUseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._track_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"JukeboxUseServerPacket(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/server/jukebox_use_server_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/server/jukebox_use_server_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/server/jukebox_use_server_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.
    """
    JukeboxUseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxUseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxUseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/jukebox_use_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxUseServerPacket") -> None:
    """
    Serializes an instance of `JukeboxUseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxUseServerPacket): The data to serialize.
    """
    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 JukeboxUseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxUseServerPacket JukeboxUseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/jukebox_use_server_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) -> "JukeboxUseServerPacket":
    """
    Deserializes an instance of `JukeboxUseServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxUseServerPacket: The data to serialize.
    """
    data: JukeboxUseServerPacket = JukeboxUseServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._track_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

JukeboxReplyServerPacket

Bases: Packet

Reply to unsuccessfully requesting a song

Source code in src/eolib/protocol/_generated/net/server/jukebox_reply_server_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 JukeboxReplyServerPacket(Packet):
    """
    Reply to unsuccessfully requesting a song
    """
    _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.Jukebox

    @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.
        """
        JukeboxReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxReplyServerPacket") -> None:
        """
        Serializes an instance of `JukeboxReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxReplyServerPacket): The data to serialize.
        """
        old_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_short(1)

    @staticmethod
    def deserialize(reader: EoReader) -> "JukeboxReplyServerPacket":
        """
        Deserializes an instance of `JukeboxReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxReplyServerPacket: The data to serialize.
        """
        data: JukeboxReplyServerPacket = JukeboxReplyServerPacket()
        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"JukeboxReplyServerPacket(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/server/jukebox_reply_server_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.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/server/jukebox_reply_server_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.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/server/jukebox_reply_server_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.
    """
    JukeboxReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/jukebox_reply_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxReplyServerPacket") -> None:
    """
    Serializes an instance of `JukeboxReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxReplyServerPacket): The data to serialize.
    """
    old_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_short(1)

deserialize(reader) staticmethod

Deserializes an instance of JukeboxReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxReplyServerPacket JukeboxReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/jukebox_reply_server_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) -> "JukeboxReplyServerPacket":
    """
    Deserializes an instance of `JukeboxReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxReplyServerPacket: The data to serialize.
    """
    data: JukeboxReplyServerPacket = JukeboxReplyServerPacket()
    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

JukeboxPlayerServerPacket

Bases: Packet

Play background music

Source code in src/eolib/protocol/_generated/net/server/jukebox_player_server_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 JukeboxPlayerServerPacket(Packet):
    """
    Play background music
    """
    _byte_size: int = 0
    _mfx_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 mfx_id(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._mfx_id

    @mfx_id.setter
    def mfx_id(self, mfx_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._mfx_id = mfx_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.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.
        """
        JukeboxPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxPlayerServerPacket") -> None:
        """
        Serializes an instance of `JukeboxPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxPlayerServerPacket): The data to serialize.
        """
        if data._mfx_id is None:
            raise SerializationError("mfx_id must be provided.")
        writer.add_char(data._mfx_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "JukeboxPlayerServerPacket":
        """
        Deserializes an instance of `JukeboxPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxPlayerServerPacket: The data to serialize.
        """
        data: JukeboxPlayerServerPacket = JukeboxPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._mfx_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"JukeboxPlayerServerPacket(byte_size={repr(self._byte_size)}, mfx_id={repr(self._mfx_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.

mfx_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/server/jukebox_player_server_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/server/jukebox_player_server_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.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/server/jukebox_player_server_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.
    """
    JukeboxPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/jukebox_player_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxPlayerServerPacket") -> None:
    """
    Serializes an instance of `JukeboxPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxPlayerServerPacket): The data to serialize.
    """
    if data._mfx_id is None:
        raise SerializationError("mfx_id must be provided.")
    writer.add_char(data._mfx_id)

deserialize(reader) staticmethod

Deserializes an instance of JukeboxPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxPlayerServerPacket JukeboxPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/jukebox_player_server_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) -> "JukeboxPlayerServerPacket":
    """
    Deserializes an instance of `JukeboxPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxPlayerServerPacket: The data to serialize.
    """
    data: JukeboxPlayerServerPacket = JukeboxPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._mfx_id = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

JukeboxOpenServerPacket

Bases: Packet

Reply to opening the jukebox listing

Source code in src/eolib/protocol/_generated/net/server/jukebox_open_server_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 JukeboxOpenServerPacket(Packet):
    """
    Reply to opening the jukebox listing
    """
    _byte_size: int = 0
    _map_id: int = None # type: ignore [assignment]
    _jukebox_player: 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 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 jukebox_player(self) -> str:
        return self._jukebox_player

    @jukebox_player.setter
    def jukebox_player(self, jukebox_player: str) -> None:
        self._jukebox_player = jukebox_player

    @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.
        """
        JukeboxOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxOpenServerPacket") -> None:
        """
        Serializes an instance of `JukeboxOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxOpenServerPacket): 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._jukebox_player is None:
            raise SerializationError("jukebox_player must be provided.")
        writer.add_string(data._jukebox_player)

    @staticmethod
    def deserialize(reader: EoReader) -> "JukeboxOpenServerPacket":
        """
        Deserializes an instance of `JukeboxOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxOpenServerPacket: The data to serialize.
        """
        data: JukeboxOpenServerPacket = JukeboxOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_id = reader.get_short()
            data._jukebox_player = 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"JukeboxOpenServerPacket(byte_size={repr(self._byte_size)}, map_id={repr(self._map_id)}, jukebox_player={repr(self._jukebox_player)})"

byte_size: int property

Returns the size 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.

jukebox_player: 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/server/jukebox_open_server_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.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/server/jukebox_open_server_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.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/server/jukebox_open_server_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.
    """
    JukeboxOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/jukebox_open_server_packet.py
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxOpenServerPacket") -> None:
    """
    Serializes an instance of `JukeboxOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxOpenServerPacket): 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._jukebox_player is None:
        raise SerializationError("jukebox_player must be provided.")
    writer.add_string(data._jukebox_player)

deserialize(reader) staticmethod

Deserializes an instance of JukeboxOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxOpenServerPacket JukeboxOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/jukebox_open_server_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) -> "JukeboxOpenServerPacket":
    """
    Deserializes an instance of `JukeboxOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxOpenServerPacket: The data to serialize.
    """
    data: JukeboxOpenServerPacket = JukeboxOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_id = reader.get_short()
        data._jukebox_player = reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

JukeboxMsgServerPacket

Bases: Packet

Someone playing a note with the bard skill nearby

Source code in src/eolib/protocol/_generated/net/server/jukebox_msg_server_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
class JukeboxMsgServerPacket(Packet):
    """
    Someone playing a note with the bard skill nearby
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _direction: Direction = None # type: ignore [assignment]
    _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 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

    @property
    def direction(self) -> Direction:
        return self._direction

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @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.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.
        """
        JukeboxMsgServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxMsgServerPacket") -> None:
        """
        Serializes an instance of `JukeboxMsgServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxMsgServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        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) -> "JukeboxMsgServerPacket":
        """
        Deserializes an instance of `JukeboxMsgServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxMsgServerPacket: The data to serialize.
        """
        data: JukeboxMsgServerPacket = JukeboxMsgServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._direction = Direction(reader.get_char())
            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"JukeboxMsgServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, direction={repr(self._direction)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

direction: Direction property writable

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/server/jukebox_msg_server_packet.py
90
91
92
93
94
95
96
97
98
@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/server/jukebox_msg_server_packet.py
100
101
102
103
104
105
106
107
108
@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/server/jukebox_msg_server_packet.py
110
111
112
113
114
115
116
117
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    JukeboxMsgServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxMsgServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxMsgServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/jukebox_msg_server_packet.py
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxMsgServerPacket") -> None:
    """
    Serializes an instance of `JukeboxMsgServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxMsgServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))
    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 JukeboxMsgServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxMsgServerPacket JukeboxMsgServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/jukebox_msg_server_packet.py
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
@staticmethod
def deserialize(reader: EoReader) -> "JukeboxMsgServerPacket":
    """
    Deserializes an instance of `JukeboxMsgServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxMsgServerPacket: The data to serialize.
    """
    data: JukeboxMsgServerPacket = JukeboxMsgServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._direction = Direction(reader.get_char())
        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

JukeboxAgreeServerPacket

Bases: Packet

Reply to successfully requesting a song

Source code in src/eolib/protocol/_generated/net/server/jukebox_agree_server_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 JukeboxAgreeServerPacket(Packet):
    """
    Reply to successfully requesting a song
    """
    _byte_size: int = 0
    _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 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.Jukebox

    @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.
        """
        JukeboxAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "JukeboxAgreeServerPacket") -> None:
        """
        Serializes an instance of `JukeboxAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (JukeboxAgreeServerPacket): The data to serialize.
        """
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)

    @staticmethod
    def deserialize(reader: EoReader) -> "JukeboxAgreeServerPacket":
        """
        Deserializes an instance of `JukeboxAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            JukeboxAgreeServerPacket: The data to serialize.
        """
        data: JukeboxAgreeServerPacket = JukeboxAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            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"JukeboxAgreeServerPacket(byte_size={repr(self._byte_size)}, 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.

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/server/jukebox_agree_server_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/server/jukebox_agree_server_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.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/server/jukebox_agree_server_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.
    """
    JukeboxAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of JukeboxAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data JukeboxAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/jukebox_agree_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "JukeboxAgreeServerPacket") -> None:
    """
    Serializes an instance of `JukeboxAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (JukeboxAgreeServerPacket): The data to serialize.
    """
    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 JukeboxAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
JukeboxAgreeServerPacket JukeboxAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/jukebox_agree_server_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) -> "JukeboxAgreeServerPacket":
    """
    Deserializes an instance of `JukeboxAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        JukeboxAgreeServerPacket: The data to serialize.
    """
    data: JukeboxAgreeServerPacket = JukeboxAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        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

ItemSpecServerPacket

Bases: Packet

Reply to trying to take a protected item from the ground

Source code in src/eolib/protocol/_generated/net/server/item_spec_server_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 ItemSpecServerPacket(Packet):
    """
    Reply to trying to take a protected item from the ground
    """
    _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.Item

    @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.
        """
        ItemSpecServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemSpecServerPacket") -> None:
        """
        Serializes an instance of `ItemSpecServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemSpecServerPacket): 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) -> "ItemSpecServerPacket":
        """
        Deserializes an instance of `ItemSpecServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemSpecServerPacket: The data to serialize.
        """
        data: ItemSpecServerPacket = ItemSpecServerPacket()
        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"ItemSpecServerPacket(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/server/item_spec_server_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.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/server/item_spec_server_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.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/server/item_spec_server_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.
    """
    ItemSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_spec_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "ItemSpecServerPacket") -> None:
    """
    Serializes an instance of `ItemSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemSpecServerPacket): 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 ItemSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemSpecServerPacket ItemSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_spec_server_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) -> "ItemSpecServerPacket":
    """
    Deserializes an instance of `ItemSpecServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemSpecServerPacket: The data to serialize.
    """
    data: ItemSpecServerPacket = ItemSpecServerPacket()
    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

ItemType

Bases: IntEnum

Source code in src/eolib/protocol/_generated/pub/item_type.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
class ItemType(IntEnum, metaclass=ProtocolEnumMeta):
    General = 0
    Reserved1 = 1
    Currency = 2
    Heal = 3
    Teleport = 4
    Reserved5 = 5
    ExpReward = 6
    Reserved7 = 7
    Reserved8 = 8
    Key = 9
    Weapon = 10
    Shield = 11
    Armor = 12
    Hat = 13
    Boots = 14
    Gloves = 15
    Accessory = 16
    Belt = 17
    Necklace = 18
    Ring = 19
    Armlet = 20
    Bracer = 21
    Alcohol = 22
    EffectPotion = 23
    HairDye = 24
    CureCurse = 25
    Reserved26 = 26
    Reserved27 = 27
    Reserved28 = 28
    Reserved29 = 29

General = 0 class-attribute instance-attribute

Reserved1 = 1 class-attribute instance-attribute

Currency = 2 class-attribute instance-attribute

Heal = 3 class-attribute instance-attribute

Teleport = 4 class-attribute instance-attribute

Reserved5 = 5 class-attribute instance-attribute

ExpReward = 6 class-attribute instance-attribute

Reserved7 = 7 class-attribute instance-attribute

Reserved8 = 8 class-attribute instance-attribute

Key = 9 class-attribute instance-attribute

Weapon = 10 class-attribute instance-attribute

Shield = 11 class-attribute instance-attribute

Armor = 12 class-attribute instance-attribute

Hat = 13 class-attribute instance-attribute

Boots = 14 class-attribute instance-attribute

Gloves = 15 class-attribute instance-attribute

Accessory = 16 class-attribute instance-attribute

Belt = 17 class-attribute instance-attribute

Necklace = 18 class-attribute instance-attribute

Ring = 19 class-attribute instance-attribute

Armlet = 20 class-attribute instance-attribute

Bracer = 21 class-attribute instance-attribute

Alcohol = 22 class-attribute instance-attribute

EffectPotion = 23 class-attribute instance-attribute

HairDye = 24 class-attribute instance-attribute

CureCurse = 25 class-attribute instance-attribute

Reserved26 = 26 class-attribute instance-attribute

Reserved27 = 27 class-attribute instance-attribute

Reserved28 = 28 class-attribute instance-attribute

Reserved29 = 29 class-attribute instance-attribute

ItemReplyServerPacket

Bases: Packet

Reply to using an item

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
class ItemReplyServerPacket(Packet):
    """
    Reply to using an item
    """
    _byte_size: int = 0
    _item_type: ItemType = None # type: ignore [assignment]
    _used_item: Item = None # type: ignore [assignment]
    _weight: Weight = None # type: ignore [assignment]
    _item_type_data: 'ItemReplyServerPacket.ItemTypeData' = 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 item_type(self) -> ItemType:
        return self._item_type

    @item_type.setter
    def item_type(self, item_type: ItemType) -> None:
        self._item_type = item_type

    @property
    def used_item(self) -> Item:
        return self._used_item

    @used_item.setter
    def used_item(self, used_item: Item) -> None:
        self._used_item = used_item

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @property
    def item_type_data(self) -> 'ItemReplyServerPacket.ItemTypeData':
        """
        ItemReplyServerPacket.ItemTypeData: Gets or sets the data associated with the `item_type` field.
        """
        return self._item_type_data

    @item_type_data.setter
    def item_type_data(self, item_type_data: 'ItemReplyServerPacket.ItemTypeData') -> None:
        self._item_type_data = item_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.Item

    @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.
        """
        ItemReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemReplyServerPacket") -> None:
        """
        Serializes an instance of `ItemReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemReplyServerPacket): The data to serialize.
        """
        if data._item_type is None:
            raise SerializationError("item_type must be provided.")
        writer.add_char(int(data._item_type))
        if data._used_item is None:
            raise SerializationError("used_item must be provided.")
        Item.serialize(writer, data._used_item)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)
        if data._item_type == ItemType.Heal:
            if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataHeal):
                raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataHeal for item_type " + ItemType(data._item_type).name + ".")
            ItemReplyServerPacket.ItemTypeDataHeal.serialize(writer, data._item_type_data)
        elif data._item_type == ItemType.HairDye:
            if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataHairDye):
                raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataHairDye for item_type " + ItemType(data._item_type).name + ".")
            ItemReplyServerPacket.ItemTypeDataHairDye.serialize(writer, data._item_type_data)
        elif data._item_type == ItemType.EffectPotion:
            if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataEffectPotion):
                raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataEffectPotion for item_type " + ItemType(data._item_type).name + ".")
            ItemReplyServerPacket.ItemTypeDataEffectPotion.serialize(writer, data._item_type_data)
        elif data._item_type == ItemType.CureCurse:
            if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataCureCurse):
                raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataCureCurse for item_type " + ItemType(data._item_type).name + ".")
            ItemReplyServerPacket.ItemTypeDataCureCurse.serialize(writer, data._item_type_data)
        elif data._item_type == ItemType.ExpReward:
            if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataExpReward):
                raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataExpReward for item_type " + ItemType(data._item_type).name + ".")
            ItemReplyServerPacket.ItemTypeDataExpReward.serialize(writer, data._item_type_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemReplyServerPacket":
        """
        Deserializes an instance of `ItemReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemReplyServerPacket: The data to serialize.
        """
        data: ItemReplyServerPacket = ItemReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_type = ItemType(reader.get_char())
            data._used_item = Item.deserialize(reader)
            data._weight = Weight.deserialize(reader)
            if data._item_type == ItemType.Heal:
                data._item_type_data = ItemReplyServerPacket.ItemTypeDataHeal.deserialize(reader)
            elif data._item_type == ItemType.HairDye:
                data._item_type_data = ItemReplyServerPacket.ItemTypeDataHairDye.deserialize(reader)
            elif data._item_type == ItemType.EffectPotion:
                data._item_type_data = ItemReplyServerPacket.ItemTypeDataEffectPotion.deserialize(reader)
            elif data._item_type == ItemType.CureCurse:
                data._item_type_data = ItemReplyServerPacket.ItemTypeDataCureCurse.deserialize(reader)
            elif data._item_type == ItemType.ExpReward:
                data._item_type_data = ItemReplyServerPacket.ItemTypeDataExpReward.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"ItemReplyServerPacket(byte_size={repr(self._byte_size)}, item_type={repr(self._item_type)}, used_item={repr(self._used_item)}, weight={repr(self._weight)}, item_type_data={repr(self._item_type_data)})"

    ItemTypeData = Union['ItemReplyServerPacket.ItemTypeDataHeal', 'ItemReplyServerPacket.ItemTypeDataHairDye', 'ItemReplyServerPacket.ItemTypeDataEffectPotion', 'ItemReplyServerPacket.ItemTypeDataCureCurse', 'ItemReplyServerPacket.ItemTypeDataExpReward', None]
    ItemTypeData.__doc__ = \
        """
        Data associated with different values of the `item_type` field.
        """

    class ItemTypeDataHeal:
        """
        Data associated with item_type value ItemType.Heal
        """
        _byte_size: int = 0
        _hp_gain: int = None # type: ignore [assignment]
        _hp: int = None # type: ignore [assignment]
        _tp: 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 hp_gain(self) -> int:
            """
            Note:
              - Value range is 0-4097152080.
            """
            return self._hp_gain

        @hp_gain.setter
        def hp_gain(self, hp_gain: int) -> None:
            """
            Note:
              - Value range is 0-4097152080.
            """
            self._hp_gain = hp_gain

        @property
        def hp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._hp

        @hp.setter
        def hp(self, hp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._hp = hp

        @property
        def tp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._tp

        @tp.setter
        def tp(self, tp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._tp = tp

        @staticmethod
        def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataHeal") -> None:
            """
            Serializes an instance of `ItemReplyServerPacket.ItemTypeDataHeal` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (ItemReplyServerPacket.ItemTypeDataHeal): The data to serialize.
            """
            if data._hp_gain is None:
                raise SerializationError("hp_gain must be provided.")
            writer.add_int(data._hp_gain)
            if data._hp is None:
                raise SerializationError("hp must be provided.")
            writer.add_short(data._hp)
            if data._tp is None:
                raise SerializationError("tp must be provided.")
            writer.add_short(data._tp)

        @staticmethod
        def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataHeal":
            """
            Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataHeal` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                ItemReplyServerPacket.ItemTypeDataHeal: The data to serialize.
            """
            data: ItemReplyServerPacket.ItemTypeDataHeal = ItemReplyServerPacket.ItemTypeDataHeal()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._hp_gain = reader.get_int()
                data._hp = reader.get_short()
                data._tp = 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"ItemReplyServerPacket.ItemTypeDataHeal(byte_size={repr(self._byte_size)}, hp_gain={repr(self._hp_gain)}, hp={repr(self._hp)}, tp={repr(self._tp)})"

    class ItemTypeDataHairDye:
        """
        Data associated with item_type value ItemType.HairDye
        """
        _byte_size: int = 0
        _hair_color: 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_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

        @staticmethod
        def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataHairDye") -> None:
            """
            Serializes an instance of `ItemReplyServerPacket.ItemTypeDataHairDye` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (ItemReplyServerPacket.ItemTypeDataHairDye): The data to serialize.
            """
            if data._hair_color is None:
                raise SerializationError("hair_color must be provided.")
            writer.add_char(data._hair_color)

        @staticmethod
        def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataHairDye":
            """
            Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataHairDye` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                ItemReplyServerPacket.ItemTypeDataHairDye: The data to serialize.
            """
            data: ItemReplyServerPacket.ItemTypeDataHairDye = ItemReplyServerPacket.ItemTypeDataHairDye()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._hair_color = 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"ItemReplyServerPacket.ItemTypeDataHairDye(byte_size={repr(self._byte_size)}, hair_color={repr(self._hair_color)})"

    class ItemTypeDataEffectPotion:
        """
        Data associated with item_type value ItemType.EffectPotion
        """
        _byte_size: int = 0
        _effect_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 effect_id(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._effect_id

        @effect_id.setter
        def effect_id(self, effect_id: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._effect_id = effect_id

        @staticmethod
        def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataEffectPotion") -> None:
            """
            Serializes an instance of `ItemReplyServerPacket.ItemTypeDataEffectPotion` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (ItemReplyServerPacket.ItemTypeDataEffectPotion): The data to serialize.
            """
            if data._effect_id is None:
                raise SerializationError("effect_id must be provided.")
            writer.add_short(data._effect_id)

        @staticmethod
        def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataEffectPotion":
            """
            Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataEffectPotion` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                ItemReplyServerPacket.ItemTypeDataEffectPotion: The data to serialize.
            """
            data: ItemReplyServerPacket.ItemTypeDataEffectPotion = ItemReplyServerPacket.ItemTypeDataEffectPotion()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._effect_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"ItemReplyServerPacket.ItemTypeDataEffectPotion(byte_size={repr(self._byte_size)}, effect_id={repr(self._effect_id)})"

    class ItemTypeDataCureCurse:
        """
        Data associated with item_type value ItemType.CureCurse
        """
        _byte_size: int = 0
        _stats: CharacterStatsEquipmentChange = 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 stats(self) -> CharacterStatsEquipmentChange:
            return self._stats

        @stats.setter
        def stats(self, stats: CharacterStatsEquipmentChange) -> None:
            self._stats = stats

        @staticmethod
        def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataCureCurse") -> None:
            """
            Serializes an instance of `ItemReplyServerPacket.ItemTypeDataCureCurse` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (ItemReplyServerPacket.ItemTypeDataCureCurse): The data to serialize.
            """
            if data._stats is None:
                raise SerializationError("stats must be provided.")
            CharacterStatsEquipmentChange.serialize(writer, data._stats)

        @staticmethod
        def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataCureCurse":
            """
            Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataCureCurse` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                ItemReplyServerPacket.ItemTypeDataCureCurse: The data to serialize.
            """
            data: ItemReplyServerPacket.ItemTypeDataCureCurse = ItemReplyServerPacket.ItemTypeDataCureCurse()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._stats = CharacterStatsEquipmentChange.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"ItemReplyServerPacket.ItemTypeDataCureCurse(byte_size={repr(self._byte_size)}, stats={repr(self._stats)})"

    class ItemTypeDataExpReward:
        """
        Data associated with item_type value ItemType.ExpReward
        """
        _byte_size: int = 0
        _experience: int = None # type: ignore [assignment]
        _level_up: int = None # type: ignore [assignment]
        _stat_points: int = None # type: ignore [assignment]
        _skill_points: int = None # type: ignore [assignment]
        _max_hp: int = None # type: ignore [assignment]
        _max_tp: int = None # type: ignore [assignment]
        _max_sp: 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 experience(self) -> int:
            """
            Note:
              - Value range is 0-4097152080.
            """
            return self._experience

        @experience.setter
        def experience(self, experience: int) -> None:
            """
            Note:
              - Value range is 0-4097152080.
            """
            self._experience = experience

        @property
        def level_up(self) -> int:
            """
            A value greater than 0 is &quot;new level&quot; and indicates the player leveled up.

            Note:
              - Value range is 0-252.
            """
            return self._level_up

        @level_up.setter
        def level_up(self, level_up: int) -> None:
            """
            A value greater than 0 is &quot;new level&quot; and indicates the player leveled up.

            Note:
              - Value range is 0-252.
            """
            self._level_up = level_up

        @property
        def stat_points(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._stat_points

        @stat_points.setter
        def stat_points(self, stat_points: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._stat_points = stat_points

        @property
        def skill_points(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._skill_points

        @skill_points.setter
        def skill_points(self, skill_points: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._skill_points = skill_points

        @property
        def max_hp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._max_hp

        @max_hp.setter
        def max_hp(self, max_hp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._max_hp = max_hp

        @property
        def max_tp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._max_tp

        @max_tp.setter
        def max_tp(self, max_tp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._max_tp = max_tp

        @property
        def max_sp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._max_sp

        @max_sp.setter
        def max_sp(self, max_sp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._max_sp = max_sp

        @staticmethod
        def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataExpReward") -> None:
            """
            Serializes an instance of `ItemReplyServerPacket.ItemTypeDataExpReward` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (ItemReplyServerPacket.ItemTypeDataExpReward): The data to serialize.
            """
            if data._experience is None:
                raise SerializationError("experience must be provided.")
            writer.add_int(data._experience)
            if data._level_up is None:
                raise SerializationError("level_up must be provided.")
            writer.add_char(data._level_up)
            if data._stat_points is None:
                raise SerializationError("stat_points must be provided.")
            writer.add_short(data._stat_points)
            if data._skill_points is None:
                raise SerializationError("skill_points must be provided.")
            writer.add_short(data._skill_points)
            if data._max_hp is None:
                raise SerializationError("max_hp must be provided.")
            writer.add_short(data._max_hp)
            if data._max_tp is None:
                raise SerializationError("max_tp must be provided.")
            writer.add_short(data._max_tp)
            if data._max_sp is None:
                raise SerializationError("max_sp must be provided.")
            writer.add_short(data._max_sp)

        @staticmethod
        def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataExpReward":
            """
            Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataExpReward` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                ItemReplyServerPacket.ItemTypeDataExpReward: The data to serialize.
            """
            data: ItemReplyServerPacket.ItemTypeDataExpReward = ItemReplyServerPacket.ItemTypeDataExpReward()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._experience = reader.get_int()
                data._level_up = reader.get_char()
                data._stat_points = reader.get_short()
                data._skill_points = reader.get_short()
                data._max_hp = reader.get_short()
                data._max_tp = reader.get_short()
                data._max_sp = 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"ItemReplyServerPacket.ItemTypeDataExpReward(byte_size={repr(self._byte_size)}, experience={repr(self._experience)}, level_up={repr(self._level_up)}, stat_points={repr(self._stat_points)}, skill_points={repr(self._skill_points)}, max_hp={repr(self._max_hp)}, max_tp={repr(self._max_tp)}, max_sp={repr(self._max_sp)})"

byte_size: int property

Returns the size 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_type: ItemType property writable

used_item: Item property writable

weight: Weight property writable

item_type_data: ItemReplyServerPacket.ItemTypeData property writable

ItemReplyServerPacket.ItemTypeData: Gets or sets the data associated with the item_type field.

ItemTypeData = Union['ItemReplyServerPacket.ItemTypeDataHeal', 'ItemReplyServerPacket.ItemTypeDataHairDye', 'ItemReplyServerPacket.ItemTypeDataEffectPotion', 'ItemReplyServerPacket.ItemTypeDataCureCurse', 'ItemReplyServerPacket.ItemTypeDataExpReward', None] class-attribute instance-attribute

ItemTypeDataHeal

Data associated with item_type value ItemType.Heal

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
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
class ItemTypeDataHeal:
    """
    Data associated with item_type value ItemType.Heal
    """
    _byte_size: int = 0
    _hp_gain: int = None # type: ignore [assignment]
    _hp: int = None # type: ignore [assignment]
    _tp: 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 hp_gain(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._hp_gain

    @hp_gain.setter
    def hp_gain(self, hp_gain: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._hp_gain = hp_gain

    @property
    def hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

    @hp.setter
    def hp(self, hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp = hp

    @property
    def tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._tp

    @tp.setter
    def tp(self, tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._tp = tp

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataHeal") -> None:
        """
        Serializes an instance of `ItemReplyServerPacket.ItemTypeDataHeal` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemReplyServerPacket.ItemTypeDataHeal): The data to serialize.
        """
        if data._hp_gain is None:
            raise SerializationError("hp_gain must be provided.")
        writer.add_int(data._hp_gain)
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)
        if data._tp is None:
            raise SerializationError("tp must be provided.")
        writer.add_short(data._tp)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataHeal":
        """
        Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataHeal` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemReplyServerPacket.ItemTypeDataHeal: The data to serialize.
        """
        data: ItemReplyServerPacket.ItemTypeDataHeal = ItemReplyServerPacket.ItemTypeDataHeal()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._hp_gain = reader.get_int()
            data._hp = reader.get_short()
            data._tp = 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"ItemReplyServerPacket.ItemTypeDataHeal(byte_size={repr(self._byte_size)}, hp_gain={repr(self._hp_gain)}, hp={repr(self._hp)}, tp={repr(self._tp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

hp_gain: int property writable

Note
  • Value range is 0-4097152080.

hp: int property writable

Note
  • Value range is 0-64008.

tp: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of ItemReplyServerPacket.ItemTypeDataHeal to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemTypeDataHeal

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
@staticmethod
def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataHeal") -> None:
    """
    Serializes an instance of `ItemReplyServerPacket.ItemTypeDataHeal` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemReplyServerPacket.ItemTypeDataHeal): The data to serialize.
    """
    if data._hp_gain is None:
        raise SerializationError("hp_gain must be provided.")
    writer.add_int(data._hp_gain)
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)
    if data._tp is None:
        raise SerializationError("tp must be provided.")
    writer.add_short(data._tp)

deserialize(reader) staticmethod

Deserializes an instance of ItemReplyServerPacket.ItemTypeDataHeal from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ItemTypeDataHeal

ItemReplyServerPacket.ItemTypeDataHeal: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
@staticmethod
def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataHeal":
    """
    Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataHeal` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemReplyServerPacket.ItemTypeDataHeal: The data to serialize.
    """
    data: ItemReplyServerPacket.ItemTypeDataHeal = ItemReplyServerPacket.ItemTypeDataHeal()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._hp_gain = reader.get_int()
        data._hp = reader.get_short()
        data._tp = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemTypeDataHairDye

Data associated with item_type value ItemType.HairDye

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
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
class ItemTypeDataHairDye:
    """
    Data associated with item_type value ItemType.HairDye
    """
    _byte_size: int = 0
    _hair_color: 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_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

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataHairDye") -> None:
        """
        Serializes an instance of `ItemReplyServerPacket.ItemTypeDataHairDye` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemReplyServerPacket.ItemTypeDataHairDye): The data to serialize.
        """
        if data._hair_color is None:
            raise SerializationError("hair_color must be provided.")
        writer.add_char(data._hair_color)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataHairDye":
        """
        Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataHairDye` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemReplyServerPacket.ItemTypeDataHairDye: The data to serialize.
        """
        data: ItemReplyServerPacket.ItemTypeDataHairDye = ItemReplyServerPacket.ItemTypeDataHairDye()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._hair_color = 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"ItemReplyServerPacket.ItemTypeDataHairDye(byte_size={repr(self._byte_size)}, hair_color={repr(self._hair_color)})"

byte_size: int property

Returns the size 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_color: int property writable

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of ItemReplyServerPacket.ItemTypeDataHairDye to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemTypeDataHairDye

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
328
329
330
331
332
333
334
335
336
337
338
339
@staticmethod
def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataHairDye") -> None:
    """
    Serializes an instance of `ItemReplyServerPacket.ItemTypeDataHairDye` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemReplyServerPacket.ItemTypeDataHairDye): The data to serialize.
    """
    if data._hair_color is None:
        raise SerializationError("hair_color must be provided.")
    writer.add_char(data._hair_color)

deserialize(reader) staticmethod

Deserializes an instance of ItemReplyServerPacket.ItemTypeDataHairDye from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ItemTypeDataHairDye

ItemReplyServerPacket.ItemTypeDataHairDye: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
@staticmethod
def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataHairDye":
    """
    Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataHairDye` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemReplyServerPacket.ItemTypeDataHairDye: The data to serialize.
    """
    data: ItemReplyServerPacket.ItemTypeDataHairDye = ItemReplyServerPacket.ItemTypeDataHairDye()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._hair_color = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemTypeDataEffectPotion

Data associated with item_type value ItemType.EffectPotion

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
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
class ItemTypeDataEffectPotion:
    """
    Data associated with item_type value ItemType.EffectPotion
    """
    _byte_size: int = 0
    _effect_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 effect_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._effect_id

    @effect_id.setter
    def effect_id(self, effect_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._effect_id = effect_id

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataEffectPotion") -> None:
        """
        Serializes an instance of `ItemReplyServerPacket.ItemTypeDataEffectPotion` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemReplyServerPacket.ItemTypeDataEffectPotion): The data to serialize.
        """
        if data._effect_id is None:
            raise SerializationError("effect_id must be provided.")
        writer.add_short(data._effect_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataEffectPotion":
        """
        Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataEffectPotion` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemReplyServerPacket.ItemTypeDataEffectPotion: The data to serialize.
        """
        data: ItemReplyServerPacket.ItemTypeDataEffectPotion = ItemReplyServerPacket.ItemTypeDataEffectPotion()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._effect_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"ItemReplyServerPacket.ItemTypeDataEffectPotion(byte_size={repr(self._byte_size)}, effect_id={repr(self._effect_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.

effect_id: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of ItemReplyServerPacket.ItemTypeDataEffectPotion to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemTypeDataEffectPotion

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
398
399
400
401
402
403
404
405
406
407
408
409
@staticmethod
def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataEffectPotion") -> None:
    """
    Serializes an instance of `ItemReplyServerPacket.ItemTypeDataEffectPotion` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemReplyServerPacket.ItemTypeDataEffectPotion): The data to serialize.
    """
    if data._effect_id is None:
        raise SerializationError("effect_id must be provided.")
    writer.add_short(data._effect_id)

deserialize(reader) staticmethod

Deserializes an instance of ItemReplyServerPacket.ItemTypeDataEffectPotion from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ItemTypeDataEffectPotion

ItemReplyServerPacket.ItemTypeDataEffectPotion: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
@staticmethod
def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataEffectPotion":
    """
    Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataEffectPotion` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemReplyServerPacket.ItemTypeDataEffectPotion: The data to serialize.
    """
    data: ItemReplyServerPacket.ItemTypeDataEffectPotion = ItemReplyServerPacket.ItemTypeDataEffectPotion()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._effect_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemTypeDataCureCurse

Data associated with item_type value ItemType.CureCurse

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
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
class ItemTypeDataCureCurse:
    """
    Data associated with item_type value ItemType.CureCurse
    """
    _byte_size: int = 0
    _stats: CharacterStatsEquipmentChange = 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 stats(self) -> CharacterStatsEquipmentChange:
        return self._stats

    @stats.setter
    def stats(self, stats: CharacterStatsEquipmentChange) -> None:
        self._stats = stats

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataCureCurse") -> None:
        """
        Serializes an instance of `ItemReplyServerPacket.ItemTypeDataCureCurse` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemReplyServerPacket.ItemTypeDataCureCurse): The data to serialize.
        """
        if data._stats is None:
            raise SerializationError("stats must be provided.")
        CharacterStatsEquipmentChange.serialize(writer, data._stats)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataCureCurse":
        """
        Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataCureCurse` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemReplyServerPacket.ItemTypeDataCureCurse: The data to serialize.
        """
        data: ItemReplyServerPacket.ItemTypeDataCureCurse = ItemReplyServerPacket.ItemTypeDataCureCurse()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._stats = CharacterStatsEquipmentChange.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"ItemReplyServerPacket.ItemTypeDataCureCurse(byte_size={repr(self._byte_size)}, stats={repr(self._stats)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

stats: CharacterStatsEquipmentChange property writable

serialize(writer, data) staticmethod

Serializes an instance of ItemReplyServerPacket.ItemTypeDataCureCurse to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemTypeDataCureCurse

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
460
461
462
463
464
465
466
467
468
469
470
471
@staticmethod
def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataCureCurse") -> None:
    """
    Serializes an instance of `ItemReplyServerPacket.ItemTypeDataCureCurse` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemReplyServerPacket.ItemTypeDataCureCurse): The data to serialize.
    """
    if data._stats is None:
        raise SerializationError("stats must be provided.")
    CharacterStatsEquipmentChange.serialize(writer, data._stats)

deserialize(reader) staticmethod

Deserializes an instance of ItemReplyServerPacket.ItemTypeDataCureCurse from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ItemTypeDataCureCurse

ItemReplyServerPacket.ItemTypeDataCureCurse: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
@staticmethod
def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataCureCurse":
    """
    Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataCureCurse` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemReplyServerPacket.ItemTypeDataCureCurse: The data to serialize.
    """
    data: ItemReplyServerPacket.ItemTypeDataCureCurse = ItemReplyServerPacket.ItemTypeDataCureCurse()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._stats = CharacterStatsEquipmentChange.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemTypeDataExpReward

Data associated with item_type value ItemType.ExpReward

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
class ItemTypeDataExpReward:
    """
    Data associated with item_type value ItemType.ExpReward
    """
    _byte_size: int = 0
    _experience: int = None # type: ignore [assignment]
    _level_up: int = None # type: ignore [assignment]
    _stat_points: int = None # type: ignore [assignment]
    _skill_points: int = None # type: ignore [assignment]
    _max_hp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _max_sp: 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 experience(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._experience

    @experience.setter
    def experience(self, experience: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._experience = experience

    @property
    def level_up(self) -> int:
        """
        A value greater than 0 is &quot;new level&quot; and indicates the player leveled up.

        Note:
          - Value range is 0-252.
        """
        return self._level_up

    @level_up.setter
    def level_up(self, level_up: int) -> None:
        """
        A value greater than 0 is &quot;new level&quot; and indicates the player leveled up.

        Note:
          - Value range is 0-252.
        """
        self._level_up = level_up

    @property
    def stat_points(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._stat_points

    @stat_points.setter
    def stat_points(self, stat_points: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._stat_points = stat_points

    @property
    def skill_points(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._skill_points

    @skill_points.setter
    def skill_points(self, skill_points: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._skill_points = skill_points

    @property
    def max_hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_hp

    @max_hp.setter
    def max_hp(self, max_hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_hp = max_hp

    @property
    def max_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_tp

    @max_tp.setter
    def max_tp(self, max_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_tp = max_tp

    @property
    def max_sp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_sp

    @max_sp.setter
    def max_sp(self, max_sp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_sp = max_sp

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataExpReward") -> None:
        """
        Serializes an instance of `ItemReplyServerPacket.ItemTypeDataExpReward` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemReplyServerPacket.ItemTypeDataExpReward): The data to serialize.
        """
        if data._experience is None:
            raise SerializationError("experience must be provided.")
        writer.add_int(data._experience)
        if data._level_up is None:
            raise SerializationError("level_up must be provided.")
        writer.add_char(data._level_up)
        if data._stat_points is None:
            raise SerializationError("stat_points must be provided.")
        writer.add_short(data._stat_points)
        if data._skill_points is None:
            raise SerializationError("skill_points must be provided.")
        writer.add_short(data._skill_points)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._max_sp is None:
            raise SerializationError("max_sp must be provided.")
        writer.add_short(data._max_sp)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataExpReward":
        """
        Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataExpReward` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemReplyServerPacket.ItemTypeDataExpReward: The data to serialize.
        """
        data: ItemReplyServerPacket.ItemTypeDataExpReward = ItemReplyServerPacket.ItemTypeDataExpReward()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._experience = reader.get_int()
            data._level_up = reader.get_char()
            data._stat_points = reader.get_short()
            data._skill_points = reader.get_short()
            data._max_hp = reader.get_short()
            data._max_tp = reader.get_short()
            data._max_sp = 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"ItemReplyServerPacket.ItemTypeDataExpReward(byte_size={repr(self._byte_size)}, experience={repr(self._experience)}, level_up={repr(self._level_up)}, stat_points={repr(self._stat_points)}, skill_points={repr(self._skill_points)}, max_hp={repr(self._max_hp)}, max_tp={repr(self._max_tp)}, max_sp={repr(self._max_sp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

experience: int property writable

Note
  • Value range is 0-4097152080.

level_up: int property writable

A value greater than 0 is "new level" and indicates the player leveled up.

Note
  • Value range is 0-252.

stat_points: int property writable

Note
  • Value range is 0-64008.

skill_points: int property writable

Note
  • Value range is 0-64008.

max_hp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

max_sp: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of ItemReplyServerPacket.ItemTypeDataExpReward to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemTypeDataExpReward

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
@staticmethod
def serialize(writer: EoWriter, data: "ItemReplyServerPacket.ItemTypeDataExpReward") -> None:
    """
    Serializes an instance of `ItemReplyServerPacket.ItemTypeDataExpReward` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemReplyServerPacket.ItemTypeDataExpReward): The data to serialize.
    """
    if data._experience is None:
        raise SerializationError("experience must be provided.")
    writer.add_int(data._experience)
    if data._level_up is None:
        raise SerializationError("level_up must be provided.")
    writer.add_char(data._level_up)
    if data._stat_points is None:
        raise SerializationError("stat_points must be provided.")
    writer.add_short(data._stat_points)
    if data._skill_points is None:
        raise SerializationError("skill_points must be provided.")
    writer.add_short(data._skill_points)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._max_sp is None:
        raise SerializationError("max_sp must be provided.")
    writer.add_short(data._max_sp)

deserialize(reader) staticmethod

Deserializes an instance of ItemReplyServerPacket.ItemTypeDataExpReward from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ItemTypeDataExpReward

ItemReplyServerPacket.ItemTypeDataExpReward: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
@staticmethod
def deserialize(reader: EoReader) -> "ItemReplyServerPacket.ItemTypeDataExpReward":
    """
    Deserializes an instance of `ItemReplyServerPacket.ItemTypeDataExpReward` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemReplyServerPacket.ItemTypeDataExpReward: The data to serialize.
    """
    data: ItemReplyServerPacket.ItemTypeDataExpReward = ItemReplyServerPacket.ItemTypeDataExpReward()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._experience = reader.get_int()
        data._level_up = reader.get_char()
        data._stat_points = reader.get_short()
        data._skill_points = reader.get_short()
        data._max_hp = reader.get_short()
        data._max_tp = reader.get_short()
        data._max_sp = 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/server/item_reply_server_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.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/server/item_reply_server_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.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/server/item_reply_server_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.
    """
    ItemReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_reply_server_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
127
128
129
130
131
132
133
134
135
136
137
138
139
@staticmethod
def serialize(writer: EoWriter, data: "ItemReplyServerPacket") -> None:
    """
    Serializes an instance of `ItemReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemReplyServerPacket): The data to serialize.
    """
    if data._item_type is None:
        raise SerializationError("item_type must be provided.")
    writer.add_char(int(data._item_type))
    if data._used_item is None:
        raise SerializationError("used_item must be provided.")
    Item.serialize(writer, data._used_item)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)
    if data._item_type == ItemType.Heal:
        if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataHeal):
            raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataHeal for item_type " + ItemType(data._item_type).name + ".")
        ItemReplyServerPacket.ItemTypeDataHeal.serialize(writer, data._item_type_data)
    elif data._item_type == ItemType.HairDye:
        if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataHairDye):
            raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataHairDye for item_type " + ItemType(data._item_type).name + ".")
        ItemReplyServerPacket.ItemTypeDataHairDye.serialize(writer, data._item_type_data)
    elif data._item_type == ItemType.EffectPotion:
        if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataEffectPotion):
            raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataEffectPotion for item_type " + ItemType(data._item_type).name + ".")
        ItemReplyServerPacket.ItemTypeDataEffectPotion.serialize(writer, data._item_type_data)
    elif data._item_type == ItemType.CureCurse:
        if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataCureCurse):
            raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataCureCurse for item_type " + ItemType(data._item_type).name + ".")
        ItemReplyServerPacket.ItemTypeDataCureCurse.serialize(writer, data._item_type_data)
    elif data._item_type == ItemType.ExpReward:
        if not isinstance(data._item_type_data, ItemReplyServerPacket.ItemTypeDataExpReward):
            raise SerializationError("Expected item_type_data to be type ItemReplyServerPacket.ItemTypeDataExpReward for item_type " + ItemType(data._item_type).name + ".")
        ItemReplyServerPacket.ItemTypeDataExpReward.serialize(writer, data._item_type_data)

deserialize(reader) staticmethod

Deserializes an instance of ItemReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemReplyServerPacket ItemReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "ItemReplyServerPacket":
    """
    Deserializes an instance of `ItemReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemReplyServerPacket: The data to serialize.
    """
    data: ItemReplyServerPacket = ItemReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_type = ItemType(reader.get_char())
        data._used_item = Item.deserialize(reader)
        data._weight = Weight.deserialize(reader)
        if data._item_type == ItemType.Heal:
            data._item_type_data = ItemReplyServerPacket.ItemTypeDataHeal.deserialize(reader)
        elif data._item_type == ItemType.HairDye:
            data._item_type_data = ItemReplyServerPacket.ItemTypeDataHairDye.deserialize(reader)
        elif data._item_type == ItemType.EffectPotion:
            data._item_type_data = ItemReplyServerPacket.ItemTypeDataEffectPotion.deserialize(reader)
        elif data._item_type == ItemType.CureCurse:
            data._item_type_data = ItemReplyServerPacket.ItemTypeDataCureCurse.deserialize(reader)
        elif data._item_type == ItemType.ExpReward:
            data._item_type_data = ItemReplyServerPacket.ItemTypeDataExpReward.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemRemoveServerPacket

Bases: Packet

Item disappeared from the ground

Source code in src/eolib/protocol/_generated/net/server/item_remove_server_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 ItemRemoveServerPacket(Packet):
    """
    Item disappeared 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.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.
        """
        ItemRemoveServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemRemoveServerPacket") -> None:
        """
        Serializes an instance of `ItemRemoveServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemRemoveServerPacket): 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) -> "ItemRemoveServerPacket":
        """
        Deserializes an instance of `ItemRemoveServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemRemoveServerPacket: The data to serialize.
        """
        data: ItemRemoveServerPacket = ItemRemoveServerPacket()
        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"ItemRemoveServerPacket(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/server/item_remove_server_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/server/item_remove_server_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/server/item_remove_server_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.
    """
    ItemRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemRemoveServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_remove_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "ItemRemoveServerPacket") -> None:
    """
    Serializes an instance of `ItemRemoveServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemRemoveServerPacket): 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 ItemRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemRemoveServerPacket ItemRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_remove_server_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) -> "ItemRemoveServerPacket":
    """
    Deserializes an instance of `ItemRemoveServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemRemoveServerPacket: The data to serialize.
    """
    data: ItemRemoveServerPacket = ItemRemoveServerPacket()
    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

ItemObtainServerPacket

Bases: Packet

Receive item (from quest)

Source code in src/eolib/protocol/_generated/net/server/item_obtain_server_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 ItemObtainServerPacket(Packet):
    """
    Receive item (from quest)
    """
    _byte_size: int = 0
    _item: ThreeItem = None # type: ignore [assignment]
    _current_weight: 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(self) -> ThreeItem:
        return self._item

    @item.setter
    def item(self, item: ThreeItem) -> None:
        self._item = item

    @property
    def current_weight(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._current_weight

    @current_weight.setter
    def current_weight(self, current_weight: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._current_weight = current_weight

    @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.Obtain

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        ItemObtainServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemObtainServerPacket") -> None:
        """
        Serializes an instance of `ItemObtainServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemObtainServerPacket): The data to serialize.
        """
        if data._item is None:
            raise SerializationError("item must be provided.")
        ThreeItem.serialize(writer, data._item)
        if data._current_weight is None:
            raise SerializationError("current_weight must be provided.")
        writer.add_char(data._current_weight)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemObtainServerPacket":
        """
        Deserializes an instance of `ItemObtainServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemObtainServerPacket: The data to serialize.
        """
        data: ItemObtainServerPacket = ItemObtainServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item = ThreeItem.deserialize(reader)
            data._current_weight = 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"ItemObtainServerPacket(byte_size={repr(self._byte_size)}, item={repr(self._item)}, current_weight={repr(self._current_weight)})"

byte_size: int property

Returns the size 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

current_weight: 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/server/item_obtain_server_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.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/server/item_obtain_server_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.Obtain

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/server/item_obtain_server_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.
    """
    ItemObtainServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemObtainServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemObtainServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_obtain_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "ItemObtainServerPacket") -> None:
    """
    Serializes an instance of `ItemObtainServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemObtainServerPacket): The data to serialize.
    """
    if data._item is None:
        raise SerializationError("item must be provided.")
    ThreeItem.serialize(writer, data._item)
    if data._current_weight is None:
        raise SerializationError("current_weight must be provided.")
    writer.add_char(data._current_weight)

deserialize(reader) staticmethod

Deserializes an instance of ItemObtainServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemObtainServerPacket ItemObtainServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_obtain_server_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) -> "ItemObtainServerPacket":
    """
    Deserializes an instance of `ItemObtainServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemObtainServerPacket: The data to serialize.
    """
    data: ItemObtainServerPacket = ItemObtainServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item = ThreeItem.deserialize(reader)
        data._current_weight = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemKickServerPacket

Bases: Packet

Lose item (from quest)

Source code in src/eolib/protocol/_generated/net/server/item_kick_server_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 ItemKickServerPacket(Packet):
    """
    Lose item (from quest)
    """
    _byte_size: int = 0
    _item: Item = None # type: ignore [assignment]
    _current_weight: 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(self) -> Item:
        return self._item

    @item.setter
    def item(self, item: Item) -> None:
        self._item = item

    @property
    def current_weight(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._current_weight

    @current_weight.setter
    def current_weight(self, current_weight: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._current_weight = current_weight

    @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.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.
        """
        ItemKickServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemKickServerPacket") -> None:
        """
        Serializes an instance of `ItemKickServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemKickServerPacket): The data to serialize.
        """
        if data._item is None:
            raise SerializationError("item must be provided.")
        Item.serialize(writer, data._item)
        if data._current_weight is None:
            raise SerializationError("current_weight must be provided.")
        writer.add_char(data._current_weight)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemKickServerPacket":
        """
        Deserializes an instance of `ItemKickServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemKickServerPacket: The data to serialize.
        """
        data: ItemKickServerPacket = ItemKickServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item = Item.deserialize(reader)
            data._current_weight = 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"ItemKickServerPacket(byte_size={repr(self._byte_size)}, item={repr(self._item)}, current_weight={repr(self._current_weight)})"

byte_size: int property

Returns the size 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

current_weight: 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/server/item_kick_server_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.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/server/item_kick_server_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.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/server/item_kick_server_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.
    """
    ItemKickServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemKickServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemKickServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_kick_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "ItemKickServerPacket") -> None:
    """
    Serializes an instance of `ItemKickServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemKickServerPacket): The data to serialize.
    """
    if data._item is None:
        raise SerializationError("item must be provided.")
    Item.serialize(writer, data._item)
    if data._current_weight is None:
        raise SerializationError("current_weight must be provided.")
    writer.add_char(data._current_weight)

deserialize(reader) staticmethod

Deserializes an instance of ItemKickServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemKickServerPacket ItemKickServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_kick_server_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) -> "ItemKickServerPacket":
    """
    Deserializes an instance of `ItemKickServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemKickServerPacket: The data to serialize.
    """
    data: ItemKickServerPacket = ItemKickServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item = Item.deserialize(reader)
        data._current_weight = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemJunkServerPacket

Bases: Packet

Reply to junking items

Source code in src/eolib/protocol/_generated/net/server/item_junk_server_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class ItemJunkServerPacket(Packet):
    """
    Reply to junking items
    """
    _byte_size: int = 0
    _junked_item: ThreeItem = None # type: ignore [assignment]
    _remaining_amount: int = None # type: ignore [assignment]
    _weight: Weight = 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 junked_item(self) -> ThreeItem:
        return self._junked_item

    @junked_item.setter
    def junked_item(self, junked_item: ThreeItem) -> None:
        self._junked_item = junked_item

    @property
    def remaining_amount(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._remaining_amount

    @remaining_amount.setter
    def remaining_amount(self, remaining_amount: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._remaining_amount = remaining_amount

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @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.
        """
        ItemJunkServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemJunkServerPacket") -> None:
        """
        Serializes an instance of `ItemJunkServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemJunkServerPacket): The data to serialize.
        """
        if data._junked_item is None:
            raise SerializationError("junked_item must be provided.")
        ThreeItem.serialize(writer, data._junked_item)
        if data._remaining_amount is None:
            raise SerializationError("remaining_amount must be provided.")
        writer.add_int(data._remaining_amount)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemJunkServerPacket":
        """
        Deserializes an instance of `ItemJunkServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemJunkServerPacket: The data to serialize.
        """
        data: ItemJunkServerPacket = ItemJunkServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._junked_item = ThreeItem.deserialize(reader)
            data._remaining_amount = reader.get_int()
            data._weight = Weight.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"ItemJunkServerPacket(byte_size={repr(self._byte_size)}, junked_item={repr(self._junked_item)}, remaining_amount={repr(self._remaining_amount)}, weight={repr(self._weight)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

junked_item: ThreeItem property writable

remaining_amount: int property writable

Note
  • Value range is 0-4097152080.

weight: Weight 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/server/item_junk_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/item_junk_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/item_junk_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ItemJunkServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemJunkServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemJunkServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_junk_server_packet.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "ItemJunkServerPacket") -> None:
    """
    Serializes an instance of `ItemJunkServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemJunkServerPacket): The data to serialize.
    """
    if data._junked_item is None:
        raise SerializationError("junked_item must be provided.")
    ThreeItem.serialize(writer, data._junked_item)
    if data._remaining_amount is None:
        raise SerializationError("remaining_amount must be provided.")
    writer.add_int(data._remaining_amount)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)

deserialize(reader) staticmethod

Deserializes an instance of ItemJunkServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemJunkServerPacket ItemJunkServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_junk_server_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@staticmethod
def deserialize(reader: EoReader) -> "ItemJunkServerPacket":
    """
    Deserializes an instance of `ItemJunkServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemJunkServerPacket: The data to serialize.
    """
    data: ItemJunkServerPacket = ItemJunkServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._junked_item = ThreeItem.deserialize(reader)
        data._remaining_amount = reader.get_int()
        data._weight = Weight.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemGetServerPacket

Bases: Packet

Reply to taking items from the ground

Source code in src/eolib/protocol/_generated/net/server/item_get_server_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class ItemGetServerPacket(Packet):
    """
    Reply to taking items from the ground
    """
    _byte_size: int = 0
    _taken_item_index: int = None # type: ignore [assignment]
    _taken_item: ThreeItem = None # type: ignore [assignment]
    _weight: Weight = 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 taken_item_index(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._taken_item_index

    @taken_item_index.setter
    def taken_item_index(self, taken_item_index: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._taken_item_index = taken_item_index

    @property
    def taken_item(self) -> ThreeItem:
        return self._taken_item

    @taken_item.setter
    def taken_item(self, taken_item: ThreeItem) -> None:
        self._taken_item = taken_item

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @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.
        """
        ItemGetServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemGetServerPacket") -> None:
        """
        Serializes an instance of `ItemGetServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemGetServerPacket): The data to serialize.
        """
        if data._taken_item_index is None:
            raise SerializationError("taken_item_index must be provided.")
        writer.add_short(data._taken_item_index)
        if data._taken_item is None:
            raise SerializationError("taken_item must be provided.")
        ThreeItem.serialize(writer, data._taken_item)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemGetServerPacket":
        """
        Deserializes an instance of `ItemGetServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemGetServerPacket: The data to serialize.
        """
        data: ItemGetServerPacket = ItemGetServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._taken_item_index = reader.get_short()
            data._taken_item = ThreeItem.deserialize(reader)
            data._weight = Weight.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"ItemGetServerPacket(byte_size={repr(self._byte_size)}, taken_item_index={repr(self._taken_item_index)}, taken_item={repr(self._taken_item)}, weight={repr(self._weight)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

taken_item_index: int property writable

Note
  • Value range is 0-64008.

taken_item: ThreeItem property writable

weight: Weight 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/server/item_get_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/item_get_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/item_get_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ItemGetServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemGetServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemGetServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_get_server_packet.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "ItemGetServerPacket") -> None:
    """
    Serializes an instance of `ItemGetServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemGetServerPacket): The data to serialize.
    """
    if data._taken_item_index is None:
        raise SerializationError("taken_item_index must be provided.")
    writer.add_short(data._taken_item_index)
    if data._taken_item is None:
        raise SerializationError("taken_item must be provided.")
    ThreeItem.serialize(writer, data._taken_item)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)

deserialize(reader) staticmethod

Deserializes an instance of ItemGetServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemGetServerPacket ItemGetServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_get_server_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@staticmethod
def deserialize(reader: EoReader) -> "ItemGetServerPacket":
    """
    Deserializes an instance of `ItemGetServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemGetServerPacket: The data to serialize.
    """
    data: ItemGetServerPacket = ItemGetServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._taken_item_index = reader.get_short()
        data._taken_item = ThreeItem.deserialize(reader)
        data._weight = Weight.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemDropServerPacket

Bases: Packet

Reply to dropping items on the ground

Source code in src/eolib/protocol/_generated/net/server/item_drop_server_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
class ItemDropServerPacket(Packet):
    """
    Reply to dropping items on the ground
    """
    _byte_size: int = 0
    _dropped_item: ThreeItem = None # type: ignore [assignment]
    _remaining_amount: int = None # type: ignore [assignment]
    _item_index: int = None # type: ignore [assignment]
    _coords: Coords = None # type: ignore [assignment]
    _weight: Weight = 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 dropped_item(self) -> ThreeItem:
        return self._dropped_item

    @dropped_item.setter
    def dropped_item(self, dropped_item: ThreeItem) -> None:
        self._dropped_item = dropped_item

    @property
    def remaining_amount(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._remaining_amount

    @remaining_amount.setter
    def remaining_amount(self, remaining_amount: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._remaining_amount = remaining_amount

    @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

    @property
    def coords(self) -> Coords:
        return self._coords

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = coords

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @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.
        """
        ItemDropServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemDropServerPacket") -> None:
        """
        Serializes an instance of `ItemDropServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemDropServerPacket): The data to serialize.
        """
        if data._dropped_item is None:
            raise SerializationError("dropped_item must be provided.")
        ThreeItem.serialize(writer, data._dropped_item)
        if data._remaining_amount is None:
            raise SerializationError("remaining_amount must be provided.")
        writer.add_int(data._remaining_amount)
        if data._item_index is None:
            raise SerializationError("item_index must be provided.")
        writer.add_short(data._item_index)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemDropServerPacket":
        """
        Deserializes an instance of `ItemDropServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemDropServerPacket: The data to serialize.
        """
        data: ItemDropServerPacket = ItemDropServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._dropped_item = ThreeItem.deserialize(reader)
            data._remaining_amount = reader.get_int()
            data._item_index = reader.get_short()
            data._coords = Coords.deserialize(reader)
            data._weight = Weight.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"ItemDropServerPacket(byte_size={repr(self._byte_size)}, dropped_item={repr(self._dropped_item)}, remaining_amount={repr(self._remaining_amount)}, item_index={repr(self._item_index)}, coords={repr(self._coords)}, weight={repr(self._weight)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

dropped_item: ThreeItem property writable

remaining_amount: int property writable

Note
  • Value range is 0-4097152080.

item_index: int property writable

Note
  • Value range is 0-64008.

coords: Coords property writable

weight: Weight 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/server/item_drop_server_packet.py
 93
 94
 95
 96
 97
 98
 99
100
101
@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/server/item_drop_server_packet.py
103
104
105
106
107
108
109
110
111
@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/server/item_drop_server_packet.py
113
114
115
116
117
118
119
120
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ItemDropServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemDropServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemDropServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_drop_server_packet.py
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
@staticmethod
def serialize(writer: EoWriter, data: "ItemDropServerPacket") -> None:
    """
    Serializes an instance of `ItemDropServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemDropServerPacket): The data to serialize.
    """
    if data._dropped_item is None:
        raise SerializationError("dropped_item must be provided.")
    ThreeItem.serialize(writer, data._dropped_item)
    if data._remaining_amount is None:
        raise SerializationError("remaining_amount must be provided.")
    writer.add_int(data._remaining_amount)
    if data._item_index is None:
        raise SerializationError("item_index must be provided.")
    writer.add_short(data._item_index)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)

deserialize(reader) staticmethod

Deserializes an instance of ItemDropServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemDropServerPacket ItemDropServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_drop_server_packet.py
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@staticmethod
def deserialize(reader: EoReader) -> "ItemDropServerPacket":
    """
    Deserializes an instance of `ItemDropServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemDropServerPacket: The data to serialize.
    """
    data: ItemDropServerPacket = ItemDropServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._dropped_item = ThreeItem.deserialize(reader)
        data._remaining_amount = reader.get_int()
        data._item_index = reader.get_short()
        data._coords = Coords.deserialize(reader)
        data._weight = Weight.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ItemAgreeServerPacket

Bases: Packet

Reply to using an item that you don't have

Source code in src/eolib/protocol/_generated/net/server/item_agree_server_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 ItemAgreeServerPacket(Packet):
    """
    Reply to using an item that you don&#x27;t have
    """
    _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.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.
        """
        ItemAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemAgreeServerPacket") -> None:
        """
        Serializes an instance of `ItemAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemAgreeServerPacket): 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) -> "ItemAgreeServerPacket":
        """
        Deserializes an instance of `ItemAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemAgreeServerPacket: The data to serialize.
        """
        data: ItemAgreeServerPacket = ItemAgreeServerPacket()
        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"ItemAgreeServerPacket(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/server/item_agree_server_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/server/item_agree_server_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.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/server/item_agree_server_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.
    """
    ItemAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_agree_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "ItemAgreeServerPacket") -> None:
    """
    Serializes an instance of `ItemAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemAgreeServerPacket): 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 ItemAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemAgreeServerPacket ItemAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_agree_server_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) -> "ItemAgreeServerPacket":
    """
    Deserializes an instance of `ItemAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemAgreeServerPacket: The data to serialize.
    """
    data: ItemAgreeServerPacket = ItemAgreeServerPacket()
    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

ItemAddServerPacket

Bases: Packet

Item appeared on the ground

Source code in src/eolib/protocol/_generated/net/server/item_add_server_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
class ItemAddServerPacket(Packet):
    """
    Item appeared on the ground
    """
    _byte_size: int = 0
    _item_id: int = None # type: ignore [assignment]
    _item_index: int = None # type: ignore [assignment]
    _item_amount: 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 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 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

    @property
    def item_amount(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._item_amount

    @item_amount.setter
    def item_amount(self, item_amount: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._item_amount = item_amount

    @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.Item

    @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.
        """
        ItemAddServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemAddServerPacket") -> None:
        """
        Serializes an instance of `ItemAddServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemAddServerPacket): 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._item_index is None:
            raise SerializationError("item_index must be provided.")
        writer.add_short(data._item_index)
        if data._item_amount is None:
            raise SerializationError("item_amount must be provided.")
        writer.add_three(data._item_amount)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

    @staticmethod
    def deserialize(reader: EoReader) -> "ItemAddServerPacket":
        """
        Deserializes an instance of `ItemAddServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemAddServerPacket: The data to serialize.
        """
        data: ItemAddServerPacket = ItemAddServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._item_id = reader.get_short()
            data._item_index = reader.get_short()
            data._item_amount = 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"ItemAddServerPacket(byte_size={repr(self._byte_size)}, item_id={repr(self._item_id)}, item_index={repr(self._item_index)}, item_amount={repr(self._item_amount)}, 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_id: int property writable

Note
  • Value range is 0-64008.

item_index: int property writable

Note
  • Value range is 0-64008.

item_amount: int property writable

Note
  • Value range is 0-16194276.

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/server/item_add_server_packet.py
90
91
92
93
94
95
96
97
98
@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/server/item_add_server_packet.py
100
101
102
103
104
105
106
107
108
@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/server/item_add_server_packet.py
110
111
112
113
114
115
116
117
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ItemAddServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemAddServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemAddServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_add_server_packet.py
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@staticmethod
def serialize(writer: EoWriter, data: "ItemAddServerPacket") -> None:
    """
    Serializes an instance of `ItemAddServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemAddServerPacket): 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._item_index is None:
        raise SerializationError("item_index must be provided.")
    writer.add_short(data._item_index)
    if data._item_amount is None:
        raise SerializationError("item_amount must be provided.")
    writer.add_three(data._item_amount)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

deserialize(reader) staticmethod

Deserializes an instance of ItemAddServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemAddServerPacket ItemAddServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_add_server_packet.py
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
@staticmethod
def deserialize(reader: EoReader) -> "ItemAddServerPacket":
    """
    Deserializes an instance of `ItemAddServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemAddServerPacket: The data to serialize.
    """
    data: ItemAddServerPacket = ItemAddServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._item_id = reader.get_short()
        data._item_index = reader.get_short()
        data._item_amount = 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

ItemAcceptServerPacket

Bases: Packet

Nearby player leveled up from quest

Source code in src/eolib/protocol/_generated/net/server/item_accept_server_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 ItemAcceptServerPacket(Packet):
    """
    Nearby player leveled up from quest
    """
    _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.Item

    @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.
        """
        ItemAcceptServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ItemAcceptServerPacket") -> None:
        """
        Serializes an instance of `ItemAcceptServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ItemAcceptServerPacket): 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) -> "ItemAcceptServerPacket":
        """
        Deserializes an instance of `ItemAcceptServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ItemAcceptServerPacket: The data to serialize.
        """
        data: ItemAcceptServerPacket = ItemAcceptServerPacket()
        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"ItemAcceptServerPacket(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/server/item_accept_server_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/server/item_accept_server_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/server/item_accept_server_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.
    """
    ItemAcceptServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ItemAcceptServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ItemAcceptServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/item_accept_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "ItemAcceptServerPacket") -> None:
    """
    Serializes an instance of `ItemAcceptServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ItemAcceptServerPacket): 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 ItemAcceptServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ItemAcceptServerPacket ItemAcceptServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/item_accept_server_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) -> "ItemAcceptServerPacket":
    """
    Deserializes an instance of `ItemAcceptServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ItemAcceptServerPacket: The data to serialize.
    """
    data: ItemAcceptServerPacket = ItemAcceptServerPacket()
    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

InnUnsubscribeReply

Bases: IntEnum

Reply code sent with CITIZEN_REMOVE packet. Indicates the result of trying to give up citizenship to a town.

Source code in src/eolib/protocol/_generated/net/server/inn_unsubscribe_reply.py
 9
10
11
12
13
14
15
class InnUnsubscribeReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with CITIZEN_REMOVE packet.
    Indicates the result of trying to give up citizenship to a town.
    """
    NotCitizen = 0
    Unsubscribed = 1

NotCitizen = 0 class-attribute instance-attribute

Unsubscribed = 1 class-attribute instance-attribute

InitReply

Bases: IntEnum

Reply code sent with INIT_INIT packet

Source code in src/eolib/protocol/_generated/net/server/init_reply.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class InitReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with INIT_INIT packet
    """
    OutOfDate = 1
    Ok = 2
    Banned = 3
    WarpMap = 4
    FileEmf = 5
    FileEif = 6
    FileEnf = 7
    FileEsf = 8
    PlayersList = 9
    MapMutation = 10
    PlayersListFriends = 11
    FileEcf = 12

OutOfDate = 1 class-attribute instance-attribute

Ok = 2 class-attribute instance-attribute

Banned = 3 class-attribute instance-attribute

WarpMap = 4 class-attribute instance-attribute

FileEmf = 5 class-attribute instance-attribute

FileEif = 6 class-attribute instance-attribute

FileEnf = 7 class-attribute instance-attribute

FileEsf = 8 class-attribute instance-attribute

PlayersList = 9 class-attribute instance-attribute

MapMutation = 10 class-attribute instance-attribute

PlayersListFriends = 11 class-attribute instance-attribute

FileEcf = 12 class-attribute instance-attribute

InitBanType

Bases: IntEnum

Ban type sent with INIT_INIT packet. The official client treats a value >= 2 as Permanent. Otherwise, it's Temporary.

Source code in src/eolib/protocol/_generated/net/server/init_ban_type.py
 9
10
11
12
13
14
15
class InitBanType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Ban type sent with INIT_INIT packet.
    The official client treats a value &gt;= 2 as Permanent. Otherwise, it&#x27;s Temporary.
    """
    Temporary = 1
    Permanent = 2

Temporary = 1 class-attribute instance-attribute

Permanent = 2 class-attribute instance-attribute

InitInitServerPacket

Bases: Packet

Reply to connection initialization and requests for unencrypted data. This packet is unencrypted.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
class InitInitServerPacket(Packet):
    """
    Reply to connection initialization and requests for unencrypted data.
    This packet is unencrypted.
    """
    _byte_size: int = 0
    _reply_code: InitReply = None # type: ignore [assignment]
    _reply_code_data: 'InitInitServerPacket.ReplyCodeData' = 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 reply_code(self) -> InitReply:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: InitReply) -> None:
        self._reply_code = reply_code

    @property
    def reply_code_data(self) -> 'InitInitServerPacket.ReplyCodeData':
        """
        InitInitServerPacket.ReplyCodeData: Gets or sets the data associated with the `reply_code` field.
        """
        return self._reply_code_data

    @reply_code_data.setter
    def reply_code_data(self, reply_code_data: 'InitInitServerPacket.ReplyCodeData') -> None:
        self._reply_code_data = reply_code_data

    @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.
        """
        InitInitServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket") -> None:
        """
        Serializes an instance of `InitInitServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_byte(int(data._reply_code))
        if data._reply_code == InitReply.OutOfDate:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataOutOfDate):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataOutOfDate for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataOutOfDate.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.Ok:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataOk):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataOk for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataOk.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.Banned:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataBanned):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataBanned for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataBanned.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.WarpMap:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataWarpMap):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataWarpMap for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataWarpMap.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.FileEmf:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEmf):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEmf for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataFileEmf.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.FileEif:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEif):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEif for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataFileEif.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.FileEnf:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEnf):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEnf for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataFileEnf.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.FileEsf:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEsf):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEsf for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataFileEsf.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.FileEcf:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEcf):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEcf for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataFileEcf.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.MapMutation:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataMapMutation):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataMapMutation for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataMapMutation.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.PlayersList:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataPlayersList):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataPlayersList for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataPlayersList.serialize(writer, data._reply_code_data)
        elif data._reply_code == InitReply.PlayersListFriends:
            if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataPlayersListFriends):
                raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataPlayersListFriends for reply_code " + InitReply(data._reply_code).name + ".")
            InitInitServerPacket.ReplyCodeDataPlayersListFriends.serialize(writer, data._reply_code_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket":
        """
        Deserializes an instance of `InitInitServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket: The data to serialize.
        """
        data: InitInitServerPacket = InitInitServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = InitReply(reader.get_byte())
            if data._reply_code == InitReply.OutOfDate:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataOutOfDate.deserialize(reader)
            elif data._reply_code == InitReply.Ok:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataOk.deserialize(reader)
            elif data._reply_code == InitReply.Banned:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataBanned.deserialize(reader)
            elif data._reply_code == InitReply.WarpMap:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataWarpMap.deserialize(reader)
            elif data._reply_code == InitReply.FileEmf:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEmf.deserialize(reader)
            elif data._reply_code == InitReply.FileEif:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEif.deserialize(reader)
            elif data._reply_code == InitReply.FileEnf:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEnf.deserialize(reader)
            elif data._reply_code == InitReply.FileEsf:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEsf.deserialize(reader)
            elif data._reply_code == InitReply.FileEcf:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEcf.deserialize(reader)
            elif data._reply_code == InitReply.MapMutation:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataMapMutation.deserialize(reader)
            elif data._reply_code == InitReply.PlayersList:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataPlayersList.deserialize(reader)
            elif data._reply_code == InitReply.PlayersListFriends:
                data._reply_code_data = InitInitServerPacket.ReplyCodeDataPlayersListFriends.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"InitInitServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, reply_code_data={repr(self._reply_code_data)})"

    ReplyCodeData = Union['InitInitServerPacket.ReplyCodeDataOutOfDate', 'InitInitServerPacket.ReplyCodeDataOk', 'InitInitServerPacket.ReplyCodeDataBanned', 'InitInitServerPacket.ReplyCodeDataWarpMap', 'InitInitServerPacket.ReplyCodeDataFileEmf', 'InitInitServerPacket.ReplyCodeDataFileEif', 'InitInitServerPacket.ReplyCodeDataFileEnf', 'InitInitServerPacket.ReplyCodeDataFileEsf', 'InitInitServerPacket.ReplyCodeDataFileEcf', 'InitInitServerPacket.ReplyCodeDataMapMutation', 'InitInitServerPacket.ReplyCodeDataPlayersList', 'InitInitServerPacket.ReplyCodeDataPlayersListFriends', None]
    ReplyCodeData.__doc__ = \
        """
        Data associated with different values of the `reply_code` field.
        """

    class ReplyCodeDataOutOfDate:
        """
        Data associated with reply_code value InitReply.OutOfDate
        """
        _byte_size: int = 0
        _version: Version = 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 version(self) -> Version:
            return self._version

        @version.setter
        def version(self, version: Version) -> None:
            self._version = version

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataOutOfDate") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataOutOfDate` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataOutOfDate): The data to serialize.
            """
            if data._version is None:
                raise SerializationError("version must be provided.")
            Version.serialize(writer, data._version)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataOutOfDate":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataOutOfDate` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataOutOfDate: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataOutOfDate = InitInitServerPacket.ReplyCodeDataOutOfDate()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._version = Version.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"InitInitServerPacket.ReplyCodeDataOutOfDate(byte_size={repr(self._byte_size)}, version={repr(self._version)})"

    class ReplyCodeDataOk:
        """
        Data associated with reply_code value InitReply.Ok
        """
        _byte_size: int = 0
        _seq1: int = None # type: ignore [assignment]
        _seq2: int = None # type: ignore [assignment]
        _server_encryption_multiple: int = None # type: ignore [assignment]
        _client_encryption_multiple: int = None # type: ignore [assignment]
        _player_id: int = None # type: ignore [assignment]
        _challenge_response: 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 seq1(self) -> int:
            """
            Note:
              - Value range is 0-255.
            """
            return self._seq1

        @seq1.setter
        def seq1(self, seq1: int) -> None:
            """
            Note:
              - Value range is 0-255.
            """
            self._seq1 = seq1

        @property
        def seq2(self) -> int:
            """
            Note:
              - Value range is 0-255.
            """
            return self._seq2

        @seq2.setter
        def seq2(self, seq2: int) -> None:
            """
            Note:
              - Value range is 0-255.
            """
            self._seq2 = seq2

        @property
        def server_encryption_multiple(self) -> int:
            """
            Note:
              - Value range is 0-255.
            """
            return self._server_encryption_multiple

        @server_encryption_multiple.setter
        def server_encryption_multiple(self, server_encryption_multiple: int) -> None:
            """
            Note:
              - Value range is 0-255.
            """
            self._server_encryption_multiple = server_encryption_multiple

        @property
        def client_encryption_multiple(self) -> int:
            """
            Note:
              - Value range is 0-255.
            """
            return self._client_encryption_multiple

        @client_encryption_multiple.setter
        def client_encryption_multiple(self, client_encryption_multiple: int) -> None:
            """
            Note:
              - Value range is 0-255.
            """
            self._client_encryption_multiple = client_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

        @property
        def challenge_response(self) -> int:
            """
            Note:
              - Value range is 0-16194276.
            """
            return self._challenge_response

        @challenge_response.setter
        def challenge_response(self, challenge_response: int) -> None:
            """
            Note:
              - Value range is 0-16194276.
            """
            self._challenge_response = challenge_response

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataOk") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataOk): The data to serialize.
            """
            if data._seq1 is None:
                raise SerializationError("seq1 must be provided.")
            writer.add_byte(data._seq1)
            if data._seq2 is None:
                raise SerializationError("seq2 must be provided.")
            writer.add_byte(data._seq2)
            if data._server_encryption_multiple is None:
                raise SerializationError("server_encryption_multiple must be provided.")
            writer.add_byte(data._server_encryption_multiple)
            if data._client_encryption_multiple is None:
                raise SerializationError("client_encryption_multiple must be provided.")
            writer.add_byte(data._client_encryption_multiple)
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
            if data._challenge_response is None:
                raise SerializationError("challenge_response must be provided.")
            writer.add_three(data._challenge_response)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataOk":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataOk: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataOk = InitInitServerPacket.ReplyCodeDataOk()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._seq1 = reader.get_byte()
                data._seq2 = reader.get_byte()
                data._server_encryption_multiple = reader.get_byte()
                data._client_encryption_multiple = reader.get_byte()
                data._player_id = reader.get_short()
                data._challenge_response = 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"InitInitServerPacket.ReplyCodeDataOk(byte_size={repr(self._byte_size)}, seq1={repr(self._seq1)}, seq2={repr(self._seq2)}, server_encryption_multiple={repr(self._server_encryption_multiple)}, client_encryption_multiple={repr(self._client_encryption_multiple)}, player_id={repr(self._player_id)}, challenge_response={repr(self._challenge_response)})"

    class ReplyCodeDataBanned:
        """
        Data associated with reply_code value InitReply.Banned
        """
        _byte_size: int = 0
        _ban_type: InitBanType = None # type: ignore [assignment]
        _ban_type_data: 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeData' = 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 ban_type(self) -> InitBanType:
            return self._ban_type

        @ban_type.setter
        def ban_type(self, ban_type: InitBanType) -> None:
            self._ban_type = ban_type

        @property
        def ban_type_data(self) -> 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeData':
            """
            InitInitServerPacket.ReplyCodeDataBanned.BanTypeData: Gets or sets the data associated with the `ban_type` field.
            """
            return self._ban_type_data

        @ban_type_data.setter
        def ban_type_data(self, ban_type_data: 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeData') -> None:
            self._ban_type_data = ban_type_data

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataBanned): The data to serialize.
            """
            if data._ban_type is None:
                raise SerializationError("ban_type must be provided.")
            writer.add_byte(int(data._ban_type))
            if data._ban_type == 0:
                if not isinstance(data._ban_type_data, InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0):
                    raise SerializationError("Expected ban_type_data to be type InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 for ban_type " + InitBanType(data._ban_type).name + ".")
                InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0.serialize(writer, data._ban_type_data)
            elif data._ban_type == InitBanType.Temporary:
                if not isinstance(data._ban_type_data, InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary):
                    raise SerializationError("Expected ban_type_data to be type InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary for ban_type " + InitBanType(data._ban_type).name + ".")
                InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary.serialize(writer, data._ban_type_data)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataBanned: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataBanned = InitInitServerPacket.ReplyCodeDataBanned()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._ban_type = InitBanType(reader.get_byte())
                if data._ban_type == 0:
                    data._ban_type_data = InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0.deserialize(reader)
                elif data._ban_type == InitBanType.Temporary:
                    data._ban_type_data = InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary.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"InitInitServerPacket.ReplyCodeDataBanned(byte_size={repr(self._byte_size)}, ban_type={repr(self._ban_type)}, ban_type_data={repr(self._ban_type_data)})"

        BanTypeData = Union['InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0', 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary', None]
        BanTypeData.__doc__ = \
            """
            Data associated with different values of the `ban_type` field.
            """

        class BanTypeData0:
            """
            Data associated with ban_type value 0

            The official client treats any value below 2 as a temporary ban.
            The official server sends 1, but some game server implementations
            erroneously send 0.
            """
            _byte_size: int = 0
            _minutes_remaining: 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 minutes_remaining(self) -> int:
                """
                Note:
                  - Value range is 0-255.
                """
                return self._minutes_remaining

            @minutes_remaining.setter
            def minutes_remaining(self, minutes_remaining: int) -> None:
                """
                Note:
                  - Value range is 0-255.
                """
                self._minutes_remaining = minutes_remaining

            @staticmethod
            def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0") -> None:
                """
                Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0` to the provided `EoWriter`.

                Args:
                    writer (EoWriter): The writer that the data will be serialized to.
                    data (InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0): The data to serialize.
                """
                if data._minutes_remaining is None:
                    raise SerializationError("minutes_remaining must be provided.")
                writer.add_byte(data._minutes_remaining)

            @staticmethod
            def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0":
                """
                Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0` from the provided `EoReader`.

                Args:
                    reader (EoReader): The writer that the data will be serialized to.

                Returns:
                    InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0: The data to serialize.
                """
                data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 = InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0()
                old_chunked_reading_mode: bool = reader.chunked_reading_mode
                try:
                    reader_start_position: int = reader.position
                    data._minutes_remaining = 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"InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0(byte_size={repr(self._byte_size)}, minutes_remaining={repr(self._minutes_remaining)})"

        class BanTypeDataTemporary:
            """
            Data associated with ban_type value InitBanType.Temporary
            """
            _byte_size: int = 0
            _minutes_remaining: 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 minutes_remaining(self) -> int:
                """
                Note:
                  - Value range is 0-255.
                """
                return self._minutes_remaining

            @minutes_remaining.setter
            def minutes_remaining(self, minutes_remaining: int) -> None:
                """
                Note:
                  - Value range is 0-255.
                """
                self._minutes_remaining = minutes_remaining

            @staticmethod
            def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary") -> None:
                """
                Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary` to the provided `EoWriter`.

                Args:
                    writer (EoWriter): The writer that the data will be serialized to.
                    data (InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary): The data to serialize.
                """
                if data._minutes_remaining is None:
                    raise SerializationError("minutes_remaining must be provided.")
                writer.add_byte(data._minutes_remaining)

            @staticmethod
            def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary":
                """
                Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary` from the provided `EoReader`.

                Args:
                    reader (EoReader): The writer that the data will be serialized to.

                Returns:
                    InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary: The data to serialize.
                """
                data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary = InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary()
                old_chunked_reading_mode: bool = reader.chunked_reading_mode
                try:
                    reader_start_position: int = reader.position
                    data._minutes_remaining = 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"InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary(byte_size={repr(self._byte_size)}, minutes_remaining={repr(self._minutes_remaining)})"

    class ReplyCodeDataWarpMap:
        """
        Data associated with reply_code value InitReply.WarpMap
        """
        _byte_size: int = 0
        _map_file: MapFile = 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_file(self) -> MapFile:
            return self._map_file

        @map_file.setter
        def map_file(self, map_file: MapFile) -> None:
            self._map_file = map_file

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataWarpMap") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataWarpMap` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataWarpMap): The data to serialize.
            """
            if data._map_file is None:
                raise SerializationError("map_file must be provided.")
            MapFile.serialize(writer, data._map_file)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataWarpMap":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataWarpMap` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataWarpMap: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataWarpMap = InitInitServerPacket.ReplyCodeDataWarpMap()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._map_file = MapFile.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"InitInitServerPacket.ReplyCodeDataWarpMap(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

    class ReplyCodeDataFileEmf:
        """
        Data associated with reply_code value InitReply.FileEmf
        """
        _byte_size: int = 0
        _map_file: MapFile = 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_file(self) -> MapFile:
            return self._map_file

        @map_file.setter
        def map_file(self, map_file: MapFile) -> None:
            self._map_file = map_file

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEmf") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEmf` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataFileEmf): The data to serialize.
            """
            if data._map_file is None:
                raise SerializationError("map_file must be provided.")
            MapFile.serialize(writer, data._map_file)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEmf":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEmf` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataFileEmf: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataFileEmf = InitInitServerPacket.ReplyCodeDataFileEmf()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._map_file = MapFile.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"InitInitServerPacket.ReplyCodeDataFileEmf(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

    class ReplyCodeDataFileEif:
        """
        Data associated with reply_code value InitReply.FileEif
        """
        _byte_size: int = 0
        _pub_file: PubFile = 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 pub_file(self) -> PubFile:
            return self._pub_file

        @pub_file.setter
        def pub_file(self, pub_file: PubFile) -> None:
            self._pub_file = pub_file

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEif") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEif` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataFileEif): The data to serialize.
            """
            if data._pub_file is None:
                raise SerializationError("pub_file must be provided.")
            PubFile.serialize(writer, data._pub_file)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEif":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEif` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataFileEif: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataFileEif = InitInitServerPacket.ReplyCodeDataFileEif()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._pub_file = PubFile.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"InitInitServerPacket.ReplyCodeDataFileEif(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

    class ReplyCodeDataFileEnf:
        """
        Data associated with reply_code value InitReply.FileEnf
        """
        _byte_size: int = 0
        _pub_file: PubFile = 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 pub_file(self) -> PubFile:
            return self._pub_file

        @pub_file.setter
        def pub_file(self, pub_file: PubFile) -> None:
            self._pub_file = pub_file

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEnf") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEnf` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataFileEnf): The data to serialize.
            """
            if data._pub_file is None:
                raise SerializationError("pub_file must be provided.")
            PubFile.serialize(writer, data._pub_file)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEnf":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEnf` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataFileEnf: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataFileEnf = InitInitServerPacket.ReplyCodeDataFileEnf()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._pub_file = PubFile.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"InitInitServerPacket.ReplyCodeDataFileEnf(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

    class ReplyCodeDataFileEsf:
        """
        Data associated with reply_code value InitReply.FileEsf
        """
        _byte_size: int = 0
        _pub_file: PubFile = 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 pub_file(self) -> PubFile:
            return self._pub_file

        @pub_file.setter
        def pub_file(self, pub_file: PubFile) -> None:
            self._pub_file = pub_file

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEsf") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEsf` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataFileEsf): The data to serialize.
            """
            if data._pub_file is None:
                raise SerializationError("pub_file must be provided.")
            PubFile.serialize(writer, data._pub_file)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEsf":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEsf` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataFileEsf: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataFileEsf = InitInitServerPacket.ReplyCodeDataFileEsf()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._pub_file = PubFile.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"InitInitServerPacket.ReplyCodeDataFileEsf(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

    class ReplyCodeDataFileEcf:
        """
        Data associated with reply_code value InitReply.FileEcf
        """
        _byte_size: int = 0
        _pub_file: PubFile = 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 pub_file(self) -> PubFile:
            return self._pub_file

        @pub_file.setter
        def pub_file(self, pub_file: PubFile) -> None:
            self._pub_file = pub_file

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEcf") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEcf` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataFileEcf): The data to serialize.
            """
            if data._pub_file is None:
                raise SerializationError("pub_file must be provided.")
            PubFile.serialize(writer, data._pub_file)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEcf":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEcf` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataFileEcf: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataFileEcf = InitInitServerPacket.ReplyCodeDataFileEcf()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._pub_file = PubFile.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"InitInitServerPacket.ReplyCodeDataFileEcf(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

    class ReplyCodeDataMapMutation:
        """
        Data associated with reply_code value InitReply.MapMutation
        """
        _byte_size: int = 0
        _map_file: MapFile = 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_file(self) -> MapFile:
            return self._map_file

        @map_file.setter
        def map_file(self, map_file: MapFile) -> None:
            self._map_file = map_file

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataMapMutation") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataMapMutation` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataMapMutation): The data to serialize.
            """
            if data._map_file is None:
                raise SerializationError("map_file must be provided.")
            MapFile.serialize(writer, data._map_file)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataMapMutation":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataMapMutation` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataMapMutation: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataMapMutation = InitInitServerPacket.ReplyCodeDataMapMutation()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._map_file = MapFile.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"InitInitServerPacket.ReplyCodeDataMapMutation(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

    class ReplyCodeDataPlayersList:
        """
        Data associated with reply_code value InitReply.PlayersList
        """
        _byte_size: int = 0
        _players_list: PlayersList = 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 players_list(self) -> PlayersList:
            return self._players_list

        @players_list.setter
        def players_list(self, players_list: PlayersList) -> None:
            self._players_list = players_list

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataPlayersList") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersList` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataPlayersList): The data to serialize.
            """
            if data._players_list is None:
                raise SerializationError("players_list must be provided.")
            PlayersList.serialize(writer, data._players_list)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataPlayersList":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersList` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataPlayersList: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataPlayersList = InitInitServerPacket.ReplyCodeDataPlayersList()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                reader.chunked_reading_mode = True
                data._players_list = PlayersList.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"InitInitServerPacket.ReplyCodeDataPlayersList(byte_size={repr(self._byte_size)}, players_list={repr(self._players_list)})"

    class ReplyCodeDataPlayersListFriends:
        """
        Data associated with reply_code value InitReply.PlayersListFriends
        """
        _byte_size: int = 0
        _players_list: PlayersListFriends = 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 players_list(self) -> PlayersListFriends:
            return self._players_list

        @players_list.setter
        def players_list(self, players_list: PlayersListFriends) -> None:
            self._players_list = players_list

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataPlayersListFriends") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersListFriends` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataPlayersListFriends): The data to serialize.
            """
            if data._players_list is None:
                raise SerializationError("players_list must be provided.")
            PlayersListFriends.serialize(writer, data._players_list)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataPlayersListFriends":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersListFriends` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataPlayersListFriends: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataPlayersListFriends = InitInitServerPacket.ReplyCodeDataPlayersListFriends()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                reader.chunked_reading_mode = True
                data._players_list = PlayersListFriends.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"InitInitServerPacket.ReplyCodeDataPlayersListFriends(byte_size={repr(self._byte_size)}, players_list={repr(self._players_list)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

reply_code: InitReply property writable

reply_code_data: InitInitServerPacket.ReplyCodeData property writable

InitInitServerPacket.ReplyCodeData: Gets or sets the data associated with the reply_code field.

ReplyCodeData = Union['InitInitServerPacket.ReplyCodeDataOutOfDate', 'InitInitServerPacket.ReplyCodeDataOk', 'InitInitServerPacket.ReplyCodeDataBanned', 'InitInitServerPacket.ReplyCodeDataWarpMap', 'InitInitServerPacket.ReplyCodeDataFileEmf', 'InitInitServerPacket.ReplyCodeDataFileEif', 'InitInitServerPacket.ReplyCodeDataFileEnf', 'InitInitServerPacket.ReplyCodeDataFileEsf', 'InitInitServerPacket.ReplyCodeDataFileEcf', 'InitInitServerPacket.ReplyCodeDataMapMutation', 'InitInitServerPacket.ReplyCodeDataPlayersList', 'InitInitServerPacket.ReplyCodeDataPlayersListFriends', None] class-attribute instance-attribute

ReplyCodeDataOutOfDate

Data associated with reply_code value InitReply.OutOfDate

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
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
class ReplyCodeDataOutOfDate:
    """
    Data associated with reply_code value InitReply.OutOfDate
    """
    _byte_size: int = 0
    _version: Version = 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 version(self) -> Version:
        return self._version

    @version.setter
    def version(self, version: Version) -> None:
        self._version = version

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataOutOfDate") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataOutOfDate` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataOutOfDate): The data to serialize.
        """
        if data._version is None:
            raise SerializationError("version must be provided.")
        Version.serialize(writer, data._version)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataOutOfDate":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataOutOfDate` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataOutOfDate: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataOutOfDate = InitInitServerPacket.ReplyCodeDataOutOfDate()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._version = Version.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"InitInitServerPacket.ReplyCodeDataOutOfDate(byte_size={repr(self._byte_size)}, version={repr(self._version)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

version: Version property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataOutOfDate to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataOutOfDate

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
228
229
230
231
232
233
234
235
236
237
238
239
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataOutOfDate") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataOutOfDate` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataOutOfDate): The data to serialize.
    """
    if data._version is None:
        raise SerializationError("version must be provided.")
    Version.serialize(writer, data._version)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataOutOfDate from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataOutOfDate

InitInitServerPacket.ReplyCodeDataOutOfDate: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataOutOfDate":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataOutOfDate` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataOutOfDate: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataOutOfDate = InitInitServerPacket.ReplyCodeDataOutOfDate()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._version = Version.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataOk

Data associated with reply_code value InitReply.Ok

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
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
class ReplyCodeDataOk:
    """
    Data associated with reply_code value InitReply.Ok
    """
    _byte_size: int = 0
    _seq1: int = None # type: ignore [assignment]
    _seq2: int = None # type: ignore [assignment]
    _server_encryption_multiple: int = None # type: ignore [assignment]
    _client_encryption_multiple: int = None # type: ignore [assignment]
    _player_id: int = None # type: ignore [assignment]
    _challenge_response: 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 seq1(self) -> int:
        """
        Note:
          - Value range is 0-255.
        """
        return self._seq1

    @seq1.setter
    def seq1(self, seq1: int) -> None:
        """
        Note:
          - Value range is 0-255.
        """
        self._seq1 = seq1

    @property
    def seq2(self) -> int:
        """
        Note:
          - Value range is 0-255.
        """
        return self._seq2

    @seq2.setter
    def seq2(self, seq2: int) -> None:
        """
        Note:
          - Value range is 0-255.
        """
        self._seq2 = seq2

    @property
    def server_encryption_multiple(self) -> int:
        """
        Note:
          - Value range is 0-255.
        """
        return self._server_encryption_multiple

    @server_encryption_multiple.setter
    def server_encryption_multiple(self, server_encryption_multiple: int) -> None:
        """
        Note:
          - Value range is 0-255.
        """
        self._server_encryption_multiple = server_encryption_multiple

    @property
    def client_encryption_multiple(self) -> int:
        """
        Note:
          - Value range is 0-255.
        """
        return self._client_encryption_multiple

    @client_encryption_multiple.setter
    def client_encryption_multiple(self, client_encryption_multiple: int) -> None:
        """
        Note:
          - Value range is 0-255.
        """
        self._client_encryption_multiple = client_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

    @property
    def challenge_response(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._challenge_response

    @challenge_response.setter
    def challenge_response(self, challenge_response: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._challenge_response = challenge_response

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataOk") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataOk): The data to serialize.
        """
        if data._seq1 is None:
            raise SerializationError("seq1 must be provided.")
        writer.add_byte(data._seq1)
        if data._seq2 is None:
            raise SerializationError("seq2 must be provided.")
        writer.add_byte(data._seq2)
        if data._server_encryption_multiple is None:
            raise SerializationError("server_encryption_multiple must be provided.")
        writer.add_byte(data._server_encryption_multiple)
        if data._client_encryption_multiple is None:
            raise SerializationError("client_encryption_multiple must be provided.")
        writer.add_byte(data._client_encryption_multiple)
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._challenge_response is None:
            raise SerializationError("challenge_response must be provided.")
        writer.add_three(data._challenge_response)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataOk":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataOk: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataOk = InitInitServerPacket.ReplyCodeDataOk()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._seq1 = reader.get_byte()
            data._seq2 = reader.get_byte()
            data._server_encryption_multiple = reader.get_byte()
            data._client_encryption_multiple = reader.get_byte()
            data._player_id = reader.get_short()
            data._challenge_response = 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"InitInitServerPacket.ReplyCodeDataOk(byte_size={repr(self._byte_size)}, seq1={repr(self._seq1)}, seq2={repr(self._seq2)}, server_encryption_multiple={repr(self._server_encryption_multiple)}, client_encryption_multiple={repr(self._client_encryption_multiple)}, player_id={repr(self._player_id)}, challenge_response={repr(self._challenge_response)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

seq1: int property writable

Note
  • Value range is 0-255.

seq2: int property writable

Note
  • Value range is 0-255.

server_encryption_multiple: int property writable

Note
  • Value range is 0-255.

client_encryption_multiple: int property writable

Note
  • Value range is 0-255.

player_id: int property writable

Note
  • Value range is 0-64008.

challenge_response: int property writable

Note
  • Value range is 0-16194276.

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataOk to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataOk

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataOk") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataOk): The data to serialize.
    """
    if data._seq1 is None:
        raise SerializationError("seq1 must be provided.")
    writer.add_byte(data._seq1)
    if data._seq2 is None:
        raise SerializationError("seq2 must be provided.")
    writer.add_byte(data._seq2)
    if data._server_encryption_multiple is None:
        raise SerializationError("server_encryption_multiple must be provided.")
    writer.add_byte(data._server_encryption_multiple)
    if data._client_encryption_multiple is None:
        raise SerializationError("client_encryption_multiple must be provided.")
    writer.add_byte(data._client_encryption_multiple)
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._challenge_response is None:
        raise SerializationError("challenge_response must be provided.")
    writer.add_three(data._challenge_response)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataOk from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataOk

InitInitServerPacket.ReplyCodeDataOk: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataOk":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataOk: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataOk = InitInitServerPacket.ReplyCodeDataOk()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._seq1 = reader.get_byte()
        data._seq2 = reader.get_byte()
        data._server_encryption_multiple = reader.get_byte()
        data._client_encryption_multiple = reader.get_byte()
        data._player_id = reader.get_short()
        data._challenge_response = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataBanned

Data associated with reply_code value InitReply.Banned

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
class ReplyCodeDataBanned:
    """
    Data associated with reply_code value InitReply.Banned
    """
    _byte_size: int = 0
    _ban_type: InitBanType = None # type: ignore [assignment]
    _ban_type_data: 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeData' = 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 ban_type(self) -> InitBanType:
        return self._ban_type

    @ban_type.setter
    def ban_type(self, ban_type: InitBanType) -> None:
        self._ban_type = ban_type

    @property
    def ban_type_data(self) -> 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeData':
        """
        InitInitServerPacket.ReplyCodeDataBanned.BanTypeData: Gets or sets the data associated with the `ban_type` field.
        """
        return self._ban_type_data

    @ban_type_data.setter
    def ban_type_data(self, ban_type_data: 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeData') -> None:
        self._ban_type_data = ban_type_data

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataBanned): The data to serialize.
        """
        if data._ban_type is None:
            raise SerializationError("ban_type must be provided.")
        writer.add_byte(int(data._ban_type))
        if data._ban_type == 0:
            if not isinstance(data._ban_type_data, InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0):
                raise SerializationError("Expected ban_type_data to be type InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 for ban_type " + InitBanType(data._ban_type).name + ".")
            InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0.serialize(writer, data._ban_type_data)
        elif data._ban_type == InitBanType.Temporary:
            if not isinstance(data._ban_type_data, InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary):
                raise SerializationError("Expected ban_type_data to be type InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary for ban_type " + InitBanType(data._ban_type).name + ".")
            InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary.serialize(writer, data._ban_type_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataBanned: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataBanned = InitInitServerPacket.ReplyCodeDataBanned()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._ban_type = InitBanType(reader.get_byte())
            if data._ban_type == 0:
                data._ban_type_data = InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0.deserialize(reader)
            elif data._ban_type == InitBanType.Temporary:
                data._ban_type_data = InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary.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"InitInitServerPacket.ReplyCodeDataBanned(byte_size={repr(self._byte_size)}, ban_type={repr(self._ban_type)}, ban_type_data={repr(self._ban_type_data)})"

    BanTypeData = Union['InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0', 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary', None]
    BanTypeData.__doc__ = \
        """
        Data associated with different values of the `ban_type` field.
        """

    class BanTypeData0:
        """
        Data associated with ban_type value 0

        The official client treats any value below 2 as a temporary ban.
        The official server sends 1, but some game server implementations
        erroneously send 0.
        """
        _byte_size: int = 0
        _minutes_remaining: 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 minutes_remaining(self) -> int:
            """
            Note:
              - Value range is 0-255.
            """
            return self._minutes_remaining

        @minutes_remaining.setter
        def minutes_remaining(self, minutes_remaining: int) -> None:
            """
            Note:
              - Value range is 0-255.
            """
            self._minutes_remaining = minutes_remaining

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0): The data to serialize.
            """
            if data._minutes_remaining is None:
                raise SerializationError("minutes_remaining must be provided.")
            writer.add_byte(data._minutes_remaining)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 = InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._minutes_remaining = 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"InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0(byte_size={repr(self._byte_size)}, minutes_remaining={repr(self._minutes_remaining)})"

    class BanTypeDataTemporary:
        """
        Data associated with ban_type value InitBanType.Temporary
        """
        _byte_size: int = 0
        _minutes_remaining: 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 minutes_remaining(self) -> int:
            """
            Note:
              - Value range is 0-255.
            """
            return self._minutes_remaining

        @minutes_remaining.setter
        def minutes_remaining(self, minutes_remaining: int) -> None:
            """
            Note:
              - Value range is 0-255.
            """
            self._minutes_remaining = minutes_remaining

        @staticmethod
        def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary") -> None:
            """
            Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary): The data to serialize.
            """
            if data._minutes_remaining is None:
                raise SerializationError("minutes_remaining must be provided.")
            writer.add_byte(data._minutes_remaining)

        @staticmethod
        def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary":
            """
            Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary: The data to serialize.
            """
            data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary = InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._minutes_remaining = 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"InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary(byte_size={repr(self._byte_size)}, minutes_remaining={repr(self._minutes_remaining)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

ban_type: InitBanType property writable

ban_type_data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeData property writable

InitInitServerPacket.ReplyCodeDataBanned.BanTypeData: Gets or sets the data associated with the ban_type field.

BanTypeData = Union['InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0', 'InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary', None] class-attribute instance-attribute

BanTypeData0

Data associated with ban_type value 0

The official client treats any value below 2 as a temporary ban. The official server sends 1, but some game server implementations erroneously send 0.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
class BanTypeData0:
    """
    Data associated with ban_type value 0

    The official client treats any value below 2 as a temporary ban.
    The official server sends 1, but some game server implementations
    erroneously send 0.
    """
    _byte_size: int = 0
    _minutes_remaining: 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 minutes_remaining(self) -> int:
        """
        Note:
          - Value range is 0-255.
        """
        return self._minutes_remaining

    @minutes_remaining.setter
    def minutes_remaining(self, minutes_remaining: int) -> None:
        """
        Note:
          - Value range is 0-255.
        """
        self._minutes_remaining = minutes_remaining

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0): The data to serialize.
        """
        if data._minutes_remaining is None:
            raise SerializationError("minutes_remaining must be provided.")
        writer.add_byte(data._minutes_remaining)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 = InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._minutes_remaining = 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"InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0(byte_size={repr(self._byte_size)}, minutes_remaining={repr(self._minutes_remaining)})"
byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

minutes_remaining: int property writable
Note
  • Value range is 0-255.
serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BanTypeData0

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
569
570
571
572
573
574
575
576
577
578
579
580
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0): The data to serialize.
    """
    if data._minutes_remaining is None:
        raise SerializationError("minutes_remaining must be provided.")
    writer.add_byte(data._minutes_remaining)
deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
BanTypeData0

InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 = InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._minutes_remaining = reader.get_byte()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BanTypeDataTemporary

Data associated with ban_type value InitBanType.Temporary

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
class BanTypeDataTemporary:
    """
    Data associated with ban_type value InitBanType.Temporary
    """
    _byte_size: int = 0
    _minutes_remaining: 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 minutes_remaining(self) -> int:
        """
        Note:
          - Value range is 0-255.
        """
        return self._minutes_remaining

    @minutes_remaining.setter
    def minutes_remaining(self, minutes_remaining: int) -> None:
        """
        Note:
          - Value range is 0-255.
        """
        self._minutes_remaining = minutes_remaining

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary): The data to serialize.
        """
        if data._minutes_remaining is None:
            raise SerializationError("minutes_remaining must be provided.")
        writer.add_byte(data._minutes_remaining)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary = InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._minutes_remaining = 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"InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary(byte_size={repr(self._byte_size)}, minutes_remaining={repr(self._minutes_remaining)})"
byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

minutes_remaining: int property writable
Note
  • Value range is 0-255.
serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BanTypeDataTemporary

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
639
640
641
642
643
644
645
646
647
648
649
650
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary): The data to serialize.
    """
    if data._minutes_remaining is None:
        raise SerializationError("minutes_remaining must be provided.")
    writer.add_byte(data._minutes_remaining)
deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
BanTypeDataTemporary

InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary = InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._minutes_remaining = reader.get_byte()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataBanned to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataBanned

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataBanned") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataBanned` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataBanned): The data to serialize.
    """
    if data._ban_type is None:
        raise SerializationError("ban_type must be provided.")
    writer.add_byte(int(data._ban_type))
    if data._ban_type == 0:
        if not isinstance(data._ban_type_data, InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0):
            raise SerializationError("Expected ban_type_data to be type InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0 for ban_type " + InitBanType(data._ban_type).name + ".")
        InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0.serialize(writer, data._ban_type_data)
    elif data._ban_type == InitBanType.Temporary:
        if not isinstance(data._ban_type_data, InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary):
            raise SerializationError("Expected ban_type_data to be type InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary for ban_type " + InitBanType(data._ban_type).name + ".")
        InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary.serialize(writer, data._ban_type_data)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataBanned from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataBanned

InitInitServerPacket.ReplyCodeDataBanned: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataBanned":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataBanned` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataBanned: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataBanned = InitInitServerPacket.ReplyCodeDataBanned()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._ban_type = InitBanType(reader.get_byte())
        if data._ban_type == 0:
            data._ban_type_data = InitInitServerPacket.ReplyCodeDataBanned.BanTypeData0.deserialize(reader)
        elif data._ban_type == InitBanType.Temporary:
            data._ban_type_data = InitInitServerPacket.ReplyCodeDataBanned.BanTypeDataTemporary.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataWarpMap

Data associated with reply_code value InitReply.WarpMap

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
class ReplyCodeDataWarpMap:
    """
    Data associated with reply_code value InitReply.WarpMap
    """
    _byte_size: int = 0
    _map_file: MapFile = 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_file(self) -> MapFile:
        return self._map_file

    @map_file.setter
    def map_file(self, map_file: MapFile) -> None:
        self._map_file = map_file

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataWarpMap") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataWarpMap` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataWarpMap): The data to serialize.
        """
        if data._map_file is None:
            raise SerializationError("map_file must be provided.")
        MapFile.serialize(writer, data._map_file)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataWarpMap":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataWarpMap` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataWarpMap: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataWarpMap = InitInitServerPacket.ReplyCodeDataWarpMap()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_file = MapFile.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"InitInitServerPacket.ReplyCodeDataWarpMap(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

byte_size: int property

Returns the size 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_file: MapFile property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataWarpMap to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataWarpMap

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
701
702
703
704
705
706
707
708
709
710
711
712
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataWarpMap") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataWarpMap` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataWarpMap): The data to serialize.
    """
    if data._map_file is None:
        raise SerializationError("map_file must be provided.")
    MapFile.serialize(writer, data._map_file)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataWarpMap from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataWarpMap

InitInitServerPacket.ReplyCodeDataWarpMap: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataWarpMap":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataWarpMap` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataWarpMap: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataWarpMap = InitInitServerPacket.ReplyCodeDataWarpMap()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_file = MapFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataFileEmf

Data associated with reply_code value InitReply.FileEmf

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
class ReplyCodeDataFileEmf:
    """
    Data associated with reply_code value InitReply.FileEmf
    """
    _byte_size: int = 0
    _map_file: MapFile = 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_file(self) -> MapFile:
        return self._map_file

    @map_file.setter
    def map_file(self, map_file: MapFile) -> None:
        self._map_file = map_file

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEmf") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEmf` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataFileEmf): The data to serialize.
        """
        if data._map_file is None:
            raise SerializationError("map_file must be provided.")
        MapFile.serialize(writer, data._map_file)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEmf":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEmf` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataFileEmf: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataFileEmf = InitInitServerPacket.ReplyCodeDataFileEmf()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_file = MapFile.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"InitInitServerPacket.ReplyCodeDataFileEmf(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

byte_size: int property

Returns the size 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_file: MapFile property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataFileEmf to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataFileEmf

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
763
764
765
766
767
768
769
770
771
772
773
774
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEmf") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEmf` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataFileEmf): The data to serialize.
    """
    if data._map_file is None:
        raise SerializationError("map_file must be provided.")
    MapFile.serialize(writer, data._map_file)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataFileEmf from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataFileEmf

InitInitServerPacket.ReplyCodeDataFileEmf: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEmf":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEmf` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataFileEmf: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataFileEmf = InitInitServerPacket.ReplyCodeDataFileEmf()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_file = MapFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataFileEif

Data associated with reply_code value InitReply.FileEif

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
class ReplyCodeDataFileEif:
    """
    Data associated with reply_code value InitReply.FileEif
    """
    _byte_size: int = 0
    _pub_file: PubFile = 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 pub_file(self) -> PubFile:
        return self._pub_file

    @pub_file.setter
    def pub_file(self, pub_file: PubFile) -> None:
        self._pub_file = pub_file

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEif") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEif` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataFileEif): The data to serialize.
        """
        if data._pub_file is None:
            raise SerializationError("pub_file must be provided.")
        PubFile.serialize(writer, data._pub_file)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEif":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEif` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataFileEif: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataFileEif = InitInitServerPacket.ReplyCodeDataFileEif()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._pub_file = PubFile.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"InitInitServerPacket.ReplyCodeDataFileEif(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

pub_file: PubFile property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataFileEif to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataFileEif

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
825
826
827
828
829
830
831
832
833
834
835
836
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEif") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEif` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataFileEif): The data to serialize.
    """
    if data._pub_file is None:
        raise SerializationError("pub_file must be provided.")
    PubFile.serialize(writer, data._pub_file)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataFileEif from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataFileEif

InitInitServerPacket.ReplyCodeDataFileEif: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEif":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEif` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataFileEif: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataFileEif = InitInitServerPacket.ReplyCodeDataFileEif()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._pub_file = PubFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataFileEnf

Data associated with reply_code value InitReply.FileEnf

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
class ReplyCodeDataFileEnf:
    """
    Data associated with reply_code value InitReply.FileEnf
    """
    _byte_size: int = 0
    _pub_file: PubFile = 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 pub_file(self) -> PubFile:
        return self._pub_file

    @pub_file.setter
    def pub_file(self, pub_file: PubFile) -> None:
        self._pub_file = pub_file

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEnf") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEnf` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataFileEnf): The data to serialize.
        """
        if data._pub_file is None:
            raise SerializationError("pub_file must be provided.")
        PubFile.serialize(writer, data._pub_file)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEnf":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEnf` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataFileEnf: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataFileEnf = InitInitServerPacket.ReplyCodeDataFileEnf()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._pub_file = PubFile.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"InitInitServerPacket.ReplyCodeDataFileEnf(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

pub_file: PubFile property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataFileEnf to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataFileEnf

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
887
888
889
890
891
892
893
894
895
896
897
898
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEnf") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEnf` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataFileEnf): The data to serialize.
    """
    if data._pub_file is None:
        raise SerializationError("pub_file must be provided.")
    PubFile.serialize(writer, data._pub_file)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataFileEnf from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataFileEnf

InitInitServerPacket.ReplyCodeDataFileEnf: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEnf":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEnf` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataFileEnf: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataFileEnf = InitInitServerPacket.ReplyCodeDataFileEnf()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._pub_file = PubFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataFileEsf

Data associated with reply_code value InitReply.FileEsf

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
class ReplyCodeDataFileEsf:
    """
    Data associated with reply_code value InitReply.FileEsf
    """
    _byte_size: int = 0
    _pub_file: PubFile = 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 pub_file(self) -> PubFile:
        return self._pub_file

    @pub_file.setter
    def pub_file(self, pub_file: PubFile) -> None:
        self._pub_file = pub_file

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEsf") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEsf` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataFileEsf): The data to serialize.
        """
        if data._pub_file is None:
            raise SerializationError("pub_file must be provided.")
        PubFile.serialize(writer, data._pub_file)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEsf":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEsf` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataFileEsf: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataFileEsf = InitInitServerPacket.ReplyCodeDataFileEsf()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._pub_file = PubFile.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"InitInitServerPacket.ReplyCodeDataFileEsf(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

pub_file: PubFile property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataFileEsf to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataFileEsf

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
949
950
951
952
953
954
955
956
957
958
959
960
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEsf") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEsf` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataFileEsf): The data to serialize.
    """
    if data._pub_file is None:
        raise SerializationError("pub_file must be provided.")
    PubFile.serialize(writer, data._pub_file)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataFileEsf from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataFileEsf

InitInitServerPacket.ReplyCodeDataFileEsf: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEsf":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEsf` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataFileEsf: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataFileEsf = InitInitServerPacket.ReplyCodeDataFileEsf()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._pub_file = PubFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataFileEcf

Data associated with reply_code value InitReply.FileEcf

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
class ReplyCodeDataFileEcf:
    """
    Data associated with reply_code value InitReply.FileEcf
    """
    _byte_size: int = 0
    _pub_file: PubFile = 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 pub_file(self) -> PubFile:
        return self._pub_file

    @pub_file.setter
    def pub_file(self, pub_file: PubFile) -> None:
        self._pub_file = pub_file

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEcf") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEcf` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataFileEcf): The data to serialize.
        """
        if data._pub_file is None:
            raise SerializationError("pub_file must be provided.")
        PubFile.serialize(writer, data._pub_file)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEcf":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEcf` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataFileEcf: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataFileEcf = InitInitServerPacket.ReplyCodeDataFileEcf()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._pub_file = PubFile.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"InitInitServerPacket.ReplyCodeDataFileEcf(byte_size={repr(self._byte_size)}, pub_file={repr(self._pub_file)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

pub_file: PubFile property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataFileEcf to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataFileEcf

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataFileEcf") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataFileEcf` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataFileEcf): The data to serialize.
    """
    if data._pub_file is None:
        raise SerializationError("pub_file must be provided.")
    PubFile.serialize(writer, data._pub_file)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataFileEcf from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataFileEcf

InitInitServerPacket.ReplyCodeDataFileEcf: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataFileEcf":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataFileEcf` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataFileEcf: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataFileEcf = InitInitServerPacket.ReplyCodeDataFileEcf()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._pub_file = PubFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataMapMutation

Data associated with reply_code value InitReply.MapMutation

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
class ReplyCodeDataMapMutation:
    """
    Data associated with reply_code value InitReply.MapMutation
    """
    _byte_size: int = 0
    _map_file: MapFile = 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_file(self) -> MapFile:
        return self._map_file

    @map_file.setter
    def map_file(self, map_file: MapFile) -> None:
        self._map_file = map_file

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataMapMutation") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataMapMutation` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataMapMutation): The data to serialize.
        """
        if data._map_file is None:
            raise SerializationError("map_file must be provided.")
        MapFile.serialize(writer, data._map_file)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataMapMutation":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataMapMutation` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataMapMutation: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataMapMutation = InitInitServerPacket.ReplyCodeDataMapMutation()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_file = MapFile.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"InitInitServerPacket.ReplyCodeDataMapMutation(byte_size={repr(self._byte_size)}, map_file={repr(self._map_file)})"

byte_size: int property

Returns the size 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_file: MapFile property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataMapMutation to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataMapMutation

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataMapMutation") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataMapMutation` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataMapMutation): The data to serialize.
    """
    if data._map_file is None:
        raise SerializationError("map_file must be provided.")
    MapFile.serialize(writer, data._map_file)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataMapMutation from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataMapMutation

InitInitServerPacket.ReplyCodeDataMapMutation: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataMapMutation":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataMapMutation` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataMapMutation: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataMapMutation = InitInitServerPacket.ReplyCodeDataMapMutation()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_file = MapFile.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataPlayersList

Data associated with reply_code value InitReply.PlayersList

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
class ReplyCodeDataPlayersList:
    """
    Data associated with reply_code value InitReply.PlayersList
    """
    _byte_size: int = 0
    _players_list: PlayersList = 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 players_list(self) -> PlayersList:
        return self._players_list

    @players_list.setter
    def players_list(self, players_list: PlayersList) -> None:
        self._players_list = players_list

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataPlayersList") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersList` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataPlayersList): The data to serialize.
        """
        if data._players_list is None:
            raise SerializationError("players_list must be provided.")
        PlayersList.serialize(writer, data._players_list)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataPlayersList":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersList` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataPlayersList: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataPlayersList = InitInitServerPacket.ReplyCodeDataPlayersList()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._players_list = PlayersList.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"InitInitServerPacket.ReplyCodeDataPlayersList(byte_size={repr(self._byte_size)}, players_list={repr(self._players_list)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

players_list: PlayersList property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataPlayersList to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataPlayersList

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataPlayersList") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersList` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataPlayersList): The data to serialize.
    """
    if data._players_list is None:
        raise SerializationError("players_list must be provided.")
    PlayersList.serialize(writer, data._players_list)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataPlayersList from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataPlayersList

InitInitServerPacket.ReplyCodeDataPlayersList: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataPlayersList":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersList` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataPlayersList: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataPlayersList = InitInitServerPacket.ReplyCodeDataPlayersList()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._players_list = PlayersList.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

ReplyCodeDataPlayersListFriends

Data associated with reply_code value InitReply.PlayersListFriends

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
class ReplyCodeDataPlayersListFriends:
    """
    Data associated with reply_code value InitReply.PlayersListFriends
    """
    _byte_size: int = 0
    _players_list: PlayersListFriends = 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 players_list(self) -> PlayersListFriends:
        return self._players_list

    @players_list.setter
    def players_list(self, players_list: PlayersListFriends) -> None:
        self._players_list = players_list

    @staticmethod
    def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataPlayersListFriends") -> None:
        """
        Serializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersListFriends` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (InitInitServerPacket.ReplyCodeDataPlayersListFriends): The data to serialize.
        """
        if data._players_list is None:
            raise SerializationError("players_list must be provided.")
        PlayersListFriends.serialize(writer, data._players_list)

    @staticmethod
    def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataPlayersListFriends":
        """
        Deserializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersListFriends` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            InitInitServerPacket.ReplyCodeDataPlayersListFriends: The data to serialize.
        """
        data: InitInitServerPacket.ReplyCodeDataPlayersListFriends = InitInitServerPacket.ReplyCodeDataPlayersListFriends()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._players_list = PlayersListFriends.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"InitInitServerPacket.ReplyCodeDataPlayersListFriends(byte_size={repr(self._byte_size)}, players_list={repr(self._players_list)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

players_list: PlayersListFriends property writable

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket.ReplyCodeDataPlayersListFriends to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataPlayersListFriends

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket.ReplyCodeDataPlayersListFriends") -> None:
    """
    Serializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersListFriends` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket.ReplyCodeDataPlayersListFriends): The data to serialize.
    """
    if data._players_list is None:
        raise SerializationError("players_list must be provided.")
    PlayersListFriends.serialize(writer, data._players_list)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket.ReplyCodeDataPlayersListFriends from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataPlayersListFriends

InitInitServerPacket.ReplyCodeDataPlayersListFriends: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket.ReplyCodeDataPlayersListFriends":
    """
    Deserializes an instance of `InitInitServerPacket.ReplyCodeDataPlayersListFriends` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket.ReplyCodeDataPlayersListFriends: The data to serialize.
    """
    data: InitInitServerPacket.ReplyCodeDataPlayersListFriends = InitInitServerPacket.ReplyCodeDataPlayersListFriends()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._players_list = PlayersListFriends.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

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/server/init_init_server_packet.py
59
60
61
62
63
64
65
66
67
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/init_init_server_packet.py
69
70
71
72
73
74
75
76
77
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/init_init_server_packet.py
79
80
81
82
83
84
85
86
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    InitInitServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of InitInitServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data InitInitServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@staticmethod
def serialize(writer: EoWriter, data: "InitInitServerPacket") -> None:
    """
    Serializes an instance of `InitInitServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (InitInitServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_byte(int(data._reply_code))
    if data._reply_code == InitReply.OutOfDate:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataOutOfDate):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataOutOfDate for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataOutOfDate.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.Ok:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataOk):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataOk for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataOk.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.Banned:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataBanned):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataBanned for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataBanned.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.WarpMap:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataWarpMap):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataWarpMap for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataWarpMap.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.FileEmf:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEmf):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEmf for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataFileEmf.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.FileEif:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEif):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEif for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataFileEif.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.FileEnf:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEnf):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEnf for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataFileEnf.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.FileEsf:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEsf):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEsf for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataFileEsf.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.FileEcf:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataFileEcf):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataFileEcf for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataFileEcf.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.MapMutation:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataMapMutation):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataMapMutation for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataMapMutation.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.PlayersList:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataPlayersList):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataPlayersList for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataPlayersList.serialize(writer, data._reply_code_data)
    elif data._reply_code == InitReply.PlayersListFriends:
        if not isinstance(data._reply_code_data, InitInitServerPacket.ReplyCodeDataPlayersListFriends):
            raise SerializationError("Expected reply_code_data to be type InitInitServerPacket.ReplyCodeDataPlayersListFriends for reply_code " + InitReply(data._reply_code).name + ".")
        InitInitServerPacket.ReplyCodeDataPlayersListFriends.serialize(writer, data._reply_code_data)

deserialize(reader) staticmethod

Deserializes an instance of InitInitServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
InitInitServerPacket InitInitServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/init_init_server_packet.py
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
@staticmethod
def deserialize(reader: EoReader) -> "InitInitServerPacket":
    """
    Deserializes an instance of `InitInitServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        InitInitServerPacket: The data to serialize.
    """
    data: InitInitServerPacket = InitInitServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._reply_code = InitReply(reader.get_byte())
        if data._reply_code == InitReply.OutOfDate:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataOutOfDate.deserialize(reader)
        elif data._reply_code == InitReply.Ok:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataOk.deserialize(reader)
        elif data._reply_code == InitReply.Banned:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataBanned.deserialize(reader)
        elif data._reply_code == InitReply.WarpMap:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataWarpMap.deserialize(reader)
        elif data._reply_code == InitReply.FileEmf:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEmf.deserialize(reader)
        elif data._reply_code == InitReply.FileEif:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEif.deserialize(reader)
        elif data._reply_code == InitReply.FileEnf:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEnf.deserialize(reader)
        elif data._reply_code == InitReply.FileEsf:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEsf.deserialize(reader)
        elif data._reply_code == InitReply.FileEcf:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataFileEcf.deserialize(reader)
        elif data._reply_code == InitReply.MapMutation:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataMapMutation.deserialize(reader)
        elif data._reply_code == InitReply.PlayersList:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataPlayersList.deserialize(reader)
        elif data._reply_code == InitReply.PlayersListFriends:
            data._reply_code_data = InitInitServerPacket.ReplyCodeDataPlayersListFriends.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildMember

Information about a guild member

Source code in src/eolib/protocol/_generated/net/server/guild_member.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
class GuildMember:
    """
    Information about a guild member
    """
    _byte_size: int = 0
    _rank: int = None # type: ignore [assignment]
    _name: str = None # type: ignore [assignment]
    _rank_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 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 name(self) -> str:
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        self._name = name

    @property
    def rank_name(self) -> str:
        return self._rank_name

    @rank_name.setter
    def rank_name(self, rank_name: str) -> None:
        self._rank_name = rank_name

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildMember") -> None:
        """
        Serializes an instance of `GuildMember` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildMember): The data to serialize.
        """
        if data._rank is None:
            raise SerializationError("rank must be provided.")
        writer.add_char(data._rank)
        writer.add_byte(0xFF)
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)
        writer.add_byte(0xFF)
        if data._rank_name is None:
            raise SerializationError("rank_name must be provided.")
        writer.add_string(data._rank_name)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildMember":
        """
        Deserializes an instance of `GuildMember` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildMember: The data to serialize.
        """
        data: GuildMember = GuildMember()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._rank = reader.get_char()
            reader.next_chunk()
            data._name = reader.get_string()
            reader.next_chunk()
            data._rank_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"GuildMember(byte_size={repr(self._byte_size)}, rank={repr(self._rank)}, name={repr(self._name)}, rank_name={repr(self._rank_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.

rank: int property writable

Note
  • Value range is 0-252.

name: str property writable

rank_name: str property writable

serialize(writer, data) staticmethod

Serializes an instance of GuildMember to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildMember

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_member.py
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@staticmethod
def serialize(writer: EoWriter, data: "GuildMember") -> None:
    """
    Serializes an instance of `GuildMember` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildMember): The data to serialize.
    """
    if data._rank is None:
        raise SerializationError("rank must be provided.")
    writer.add_char(data._rank)
    writer.add_byte(0xFF)
    if data._name is None:
        raise SerializationError("name must be provided.")
    writer.add_string(data._name)
    writer.add_byte(0xFF)
    if data._rank_name is None:
        raise SerializationError("rank_name must be provided.")
    writer.add_string(data._rank_name)

deserialize(reader) staticmethod

Deserializes an instance of GuildMember from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildMember GuildMember

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_member.py
 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
@staticmethod
def deserialize(reader: EoReader) -> "GuildMember":
    """
    Deserializes an instance of `GuildMember` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildMember: The data to serialize.
    """
    data: GuildMember = GuildMember()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._rank = reader.get_char()
        reader.next_chunk()
        data._name = reader.get_string()
        reader.next_chunk()
        data._rank_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

GuildTellServerPacket

Bases: Packet

Get guild member list reply

Source code in src/eolib/protocol/_generated/net/server/guild_tell_server_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 GuildTellServerPacket(Packet):
    """
    Get guild member list reply
    """
    _byte_size: int = 0
    _members_count: int = None # type: ignore [assignment]
    _members: list[GuildMember] = 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(self) -> list[GuildMember]:
        """
        Note:
          - Length must be 64008 or less.
        """
        return self._members

    @members.setter
    def members(self, members: list[GuildMember]) -> None:
        """
        Note:
          - Length must be 64008 or less.
        """
        self._members = members
        self._members_count = len(self._members)

    @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.
        """
        GuildTellServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildTellServerPacket") -> None:
        """
        Serializes an instance of `GuildTellServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildTellServerPacket): The data to serialize.
        """
        if data._members_count is None:
            raise SerializationError("members_count must be provided.")
        writer.add_short(data._members_count)
        writer.add_byte(0xFF)
        if data._members is None:
            raise SerializationError("members must be provided.")
        if len(data._members) > 64008:
            raise SerializationError(f"Expected length of members to be 64008 or less, got {len(data._members)}.")
        for i in range(data._members_count):
            if i > 0:
                writer.add_byte(0xFF)
            GuildMember.serialize(writer, data._members[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildTellServerPacket":
        """
        Deserializes an instance of `GuildTellServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildTellServerPacket: The data to serialize.
        """
        data: GuildTellServerPacket = GuildTellServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._members_count = reader.get_short()
            reader.next_chunk()
            data._members = []
            for i in range(data._members_count):
                data._members.append(GuildMember.deserialize(reader))
                if i + 1 < data._members_count:
                    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"GuildTellServerPacket(byte_size={repr(self._byte_size)}, members={repr(self._members)})"

byte_size: int property

Returns the size 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: list[GuildMember] property writable

Note
  • Length must be 64008 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/server/guild_tell_server_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Guild

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/guild_tell_server_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Tell

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/server/guild_tell_server_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildTellServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildTellServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildTellServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_tell_server_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "GuildTellServerPacket") -> None:
    """
    Serializes an instance of `GuildTellServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildTellServerPacket): The data to serialize.
    """
    if data._members_count is None:
        raise SerializationError("members_count must be provided.")
    writer.add_short(data._members_count)
    writer.add_byte(0xFF)
    if data._members is None:
        raise SerializationError("members must be provided.")
    if len(data._members) > 64008:
        raise SerializationError(f"Expected length of members to be 64008 or less, got {len(data._members)}.")
    for i in range(data._members_count):
        if i > 0:
            writer.add_byte(0xFF)
        GuildMember.serialize(writer, data._members[i])

deserialize(reader) staticmethod

Deserializes an instance of GuildTellServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildTellServerPacket 'GuildTellServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_tell_server_packet.py
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@staticmethod
def deserialize(reader: EoReader) -> "GuildTellServerPacket":
    """
    Deserializes an instance of `GuildTellServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildTellServerPacket: The data to serialize.
    """
    data: GuildTellServerPacket = GuildTellServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._members_count = reader.get_short()
        reader.next_chunk()
        data._members = []
        for i in range(data._members_count):
            data._members.append(GuildMember.deserialize(reader))
            if i + 1 < data._members_count:
                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

GuildTakeServerPacket

Bases: Packet

Get guild description reply

Source code in src/eolib/protocol/_generated/net/server/guild_take_server_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 GuildTakeServerPacket(Packet):
    """
    Get guild description reply
    """
    _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 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.
        """
        GuildTakeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildTakeServerPacket") -> None:
        """
        Serializes an instance of `GuildTakeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildTakeServerPacket): 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) -> "GuildTakeServerPacket":
        """
        Deserializes an instance of `GuildTakeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildTakeServerPacket: The data to serialize.
        """
        data: GuildTakeServerPacket = GuildTakeServerPacket()
        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"GuildTakeServerPacket(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

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/server/guild_take_server_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.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/server/guild_take_server_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.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/server/guild_take_server_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.
    """
    GuildTakeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildTakeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildTakeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_take_server_packet.py
67
68
69
70
71
72
73
74
75
76
77
78
@staticmethod
def serialize(writer: EoWriter, data: "GuildTakeServerPacket") -> None:
    """
    Serializes an instance of `GuildTakeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildTakeServerPacket): 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 GuildTakeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildTakeServerPacket GuildTakeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_take_server_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) -> "GuildTakeServerPacket":
    """
    Deserializes an instance of `GuildTakeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildTakeServerPacket: The data to serialize.
    """
    data: GuildTakeServerPacket = GuildTakeServerPacket()
    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

GuildStaff

Information about a guild staff member (recruiter or leader)

Source code in src/eolib/protocol/_generated/net/server/guild_staff.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
class GuildStaff:
    """
    Information about a guild staff member (recruiter or leader)
    """
    _byte_size: int = 0
    _rank: 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 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 name(self) -> str:
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        self._name = name

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildStaff") -> None:
        """
        Serializes an instance of `GuildStaff` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildStaff): The data to serialize.
        """
        if data._rank is None:
            raise SerializationError("rank must be provided.")
        writer.add_char(data._rank)
        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) -> "GuildStaff":
        """
        Deserializes an instance of `GuildStaff` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildStaff: The data to serialize.
        """
        data: GuildStaff = GuildStaff()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._rank = reader.get_char()
            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"GuildStaff(byte_size={repr(self._byte_size)}, rank={repr(self._rank)}, 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.

rank: int property writable

Note
  • Value range is 0-252.

name: str property writable

serialize(writer, data) staticmethod

Serializes an instance of GuildStaff to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildStaff

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_staff.py
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@staticmethod
def serialize(writer: EoWriter, data: "GuildStaff") -> None:
    """
    Serializes an instance of `GuildStaff` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildStaff): The data to serialize.
    """
    if data._rank is None:
        raise SerializationError("rank must be provided.")
    writer.add_char(data._rank)
    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 GuildStaff from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildStaff GuildStaff

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_staff.py
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@staticmethod
def deserialize(reader: EoReader) -> "GuildStaff":
    """
    Deserializes an instance of `GuildStaff` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildStaff: The data to serialize.
    """
    data: GuildStaff = GuildStaff()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._rank = reader.get_char()
        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

GuildSellServerPacket

Bases: Packet

Get guild bank reply

Source code in src/eolib/protocol/_generated/net/server/guild_sell_server_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 GuildSellServerPacket(Packet):
    """
    Get guild bank reply
    """
    _byte_size: int = 0
    _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 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.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.
        """
        GuildSellServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildSellServerPacket") -> None:
        """
        Serializes an instance of `GuildSellServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildSellServerPacket): The data to serialize.
        """
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildSellServerPacket":
        """
        Deserializes an instance of `GuildSellServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildSellServerPacket: The data to serialize.
        """
        data: GuildSellServerPacket = GuildSellServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            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"GuildSellServerPacket(byte_size={repr(self._byte_size)}, 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.

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/server/guild_sell_server_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/server/guild_sell_server_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.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/server/guild_sell_server_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.
    """
    GuildSellServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildSellServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildSellServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_sell_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "GuildSellServerPacket") -> None:
    """
    Serializes an instance of `GuildSellServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildSellServerPacket): The data to serialize.
    """
    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 GuildSellServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildSellServerPacket GuildSellServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_sell_server_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) -> "GuildSellServerPacket":
    """
    Deserializes an instance of `GuildSellServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildSellServerPacket: The data to serialize.
    """
    data: GuildSellServerPacket = GuildSellServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        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

GuildRequestServerPacket

Bases: Packet

Guild create request

Source code in src/eolib/protocol/_generated/net/server/guild_request_server_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 GuildRequestServerPacket(Packet):
    """
    Guild create request
    """
    _byte_size: int = 0
    _player_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 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

    @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.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.
        """
        GuildRequestServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildRequestServerPacket") -> None:
        """
        Serializes an instance of `GuildRequestServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildRequestServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_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) -> "GuildRequestServerPacket":
        """
        Deserializes an instance of `GuildRequestServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildRequestServerPacket: The data to serialize.
        """
        data: GuildRequestServerPacket = GuildRequestServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"GuildRequestServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/guild_request_server_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/server/guild_request_server_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/server/guild_request_server_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.
    """
    GuildRequestServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildRequestServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildRequestServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_request_server_packet.py
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "GuildRequestServerPacket") -> None:
    """
    Serializes an instance of `GuildRequestServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildRequestServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_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 GuildRequestServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildRequestServerPacket GuildRequestServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_request_server_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) -> "GuildRequestServerPacket":
    """
    Deserializes an instance of `GuildRequestServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildRequestServerPacket: The data to serialize.
    """
    data: GuildRequestServerPacket = GuildRequestServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        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

GuildReportServerPacket

Bases: Packet

Get guild info reply

Source code in src/eolib/protocol/_generated/net/server/guild_report_server_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
class GuildReportServerPacket(Packet):
    """
    Get guild info reply
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _tag: str = None # type: ignore [assignment]
    _create_date: str = None # type: ignore [assignment]
    _description: str = None # type: ignore [assignment]
    _wealth: str = None # type: ignore [assignment]
    _ranks: list[str] = None # type: ignore [assignment]
    _staff_count: int = None # type: ignore [assignment]
    _staff: list[GuildStaff] = 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 tag(self) -> str:
        return self._tag

    @tag.setter
    def tag(self, tag: str) -> None:
        self._tag = tag

    @property
    def create_date(self) -> str:
        return self._create_date

    @create_date.setter
    def create_date(self, create_date: str) -> None:
        self._create_date = create_date

    @property
    def description(self) -> str:
        return self._description

    @description.setter
    def description(self, description: str) -> None:
        self._description = description

    @property
    def wealth(self) -> str:
        return self._wealth

    @wealth.setter
    def wealth(self, wealth: str) -> None:
        self._wealth = wealth

    @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

    @property
    def staff(self) -> list[GuildStaff]:
        """
        Note:
          - Length must be 64008 or less.
        """
        return self._staff

    @staff.setter
    def staff(self, staff: list[GuildStaff]) -> None:
        """
        Note:
          - Length must be 64008 or less.
        """
        self._staff = staff
        self._staff_count = len(self._staff)

    @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.
        """
        GuildReportServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildReportServerPacket") -> None:
        """
        Serializes an instance of `GuildReportServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildReportServerPacket): 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._tag is None:
            raise SerializationError("tag must be provided.")
        writer.add_string(data._tag)
        writer.add_byte(0xFF)
        if data._create_date is None:
            raise SerializationError("create_date must be provided.")
        writer.add_string(data._create_date)
        writer.add_byte(0xFF)
        if data._description is None:
            raise SerializationError("description must be provided.")
        writer.add_string(data._description)
        writer.add_byte(0xFF)
        if data._wealth is None:
            raise SerializationError("wealth must be provided.")
        writer.add_string(data._wealth)
        writer.add_byte(0xFF)
        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])
        if data._staff_count is None:
            raise SerializationError("staff_count must be provided.")
        writer.add_short(data._staff_count)
        writer.add_byte(0xFF)
        if data._staff is None:
            raise SerializationError("staff must be provided.")
        if len(data._staff) > 64008:
            raise SerializationError(f"Expected length of staff to be 64008 or less, got {len(data._staff)}.")
        for i in range(data._staff_count):
            if i > 0:
                writer.add_byte(0xFF)
            GuildStaff.serialize(writer, data._staff[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildReportServerPacket":
        """
        Deserializes an instance of `GuildReportServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildReportServerPacket: The data to serialize.
        """
        data: GuildReportServerPacket = GuildReportServerPacket()
        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._tag = reader.get_string()
            reader.next_chunk()
            data._create_date = reader.get_string()
            reader.next_chunk()
            data._description = reader.get_string()
            reader.next_chunk()
            data._wealth = reader.get_string()
            reader.next_chunk()
            data._ranks = []
            for i in range(9):
                data._ranks.append(reader.get_string())
                if i + 1 < 9:
                    reader.next_chunk()
            data._staff_count = reader.get_short()
            reader.next_chunk()
            data._staff = []
            for i in range(data._staff_count):
                data._staff.append(GuildStaff.deserialize(reader))
                if i + 1 < data._staff_count:
                    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"GuildReportServerPacket(byte_size={repr(self._byte_size)}, name={repr(self._name)}, tag={repr(self._tag)}, create_date={repr(self._create_date)}, description={repr(self._description)}, wealth={repr(self._wealth)}, ranks={repr(self._ranks)}, staff={repr(self._staff)})"

byte_size: int property

Returns the size 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

tag: str property writable

create_date: str property writable

description: str property writable

wealth: str property writable

ranks: list[str] property writable

Note
  • Length must be 9.

staff: list[GuildStaff] property writable

Note
  • Length must be 64008 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/server/guild_report_server_packet.py
112
113
114
115
116
117
118
119
120
@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/server/guild_report_server_packet.py
122
123
124
125
126
127
128
129
130
@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/server/guild_report_server_packet.py
132
133
134
135
136
137
138
139
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildReportServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildReportServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildReportServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_report_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "GuildReportServerPacket") -> None:
    """
    Serializes an instance of `GuildReportServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildReportServerPacket): 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._tag is None:
        raise SerializationError("tag must be provided.")
    writer.add_string(data._tag)
    writer.add_byte(0xFF)
    if data._create_date is None:
        raise SerializationError("create_date must be provided.")
    writer.add_string(data._create_date)
    writer.add_byte(0xFF)
    if data._description is None:
        raise SerializationError("description must be provided.")
    writer.add_string(data._description)
    writer.add_byte(0xFF)
    if data._wealth is None:
        raise SerializationError("wealth must be provided.")
    writer.add_string(data._wealth)
    writer.add_byte(0xFF)
    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])
    if data._staff_count is None:
        raise SerializationError("staff_count must be provided.")
    writer.add_short(data._staff_count)
    writer.add_byte(0xFF)
    if data._staff is None:
        raise SerializationError("staff must be provided.")
    if len(data._staff) > 64008:
        raise SerializationError(f"Expected length of staff to be 64008 or less, got {len(data._staff)}.")
    for i in range(data._staff_count):
        if i > 0:
            writer.add_byte(0xFF)
        GuildStaff.serialize(writer, data._staff[i])

deserialize(reader) staticmethod

Deserializes an instance of GuildReportServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildReportServerPacket 'GuildReportServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_report_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "GuildReportServerPacket":
    """
    Deserializes an instance of `GuildReportServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildReportServerPacket: The data to serialize.
    """
    data: GuildReportServerPacket = GuildReportServerPacket()
    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._tag = reader.get_string()
        reader.next_chunk()
        data._create_date = reader.get_string()
        reader.next_chunk()
        data._description = reader.get_string()
        reader.next_chunk()
        data._wealth = reader.get_string()
        reader.next_chunk()
        data._ranks = []
        for i in range(9):
            data._ranks.append(reader.get_string())
            if i + 1 < 9:
                reader.next_chunk()
        data._staff_count = reader.get_short()
        reader.next_chunk()
        data._staff = []
        for i in range(data._staff_count):
            data._staff.append(GuildStaff.deserialize(reader))
            if i + 1 < data._staff_count:
                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

GuildReply

Bases: IntEnum

Reply code sent with GUILD_REPLY packet

Source code in src/eolib/protocol/_generated/net/server/guild_reply.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
class GuildReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with GUILD_REPLY packet
    """
    Busy = 1
    NotApproved = 2
    AlreadyMember = 3
    NoCandidates = 4
    Exists = 5
    CreateBegin = 6
    CreateAddConfirm = 7
    CreateAdd = 8
    RecruiterOffline = 9
    RecruiterNotHere = 10
    RecruiterWrongGuild = 11
    NotRecruiter = 12
    JoinRequest = 13
    NotPresent = 14
    AccountLow = 15
    Accepted = 16
    NotFound = 17
    Updated = 18
    RanksUpdated = 19
    RemoveLeader = 20
    RemoveNotMember = 21
    Removed = 22
    RankingLeader = 23
    RankingNotMember = 24

Busy = 1 class-attribute instance-attribute

NotApproved = 2 class-attribute instance-attribute

AlreadyMember = 3 class-attribute instance-attribute

NoCandidates = 4 class-attribute instance-attribute

Exists = 5 class-attribute instance-attribute

CreateBegin = 6 class-attribute instance-attribute

CreateAddConfirm = 7 class-attribute instance-attribute

CreateAdd = 8 class-attribute instance-attribute

RecruiterOffline = 9 class-attribute instance-attribute

RecruiterNotHere = 10 class-attribute instance-attribute

RecruiterWrongGuild = 11 class-attribute instance-attribute

NotRecruiter = 12 class-attribute instance-attribute

JoinRequest = 13 class-attribute instance-attribute

NotPresent = 14 class-attribute instance-attribute

AccountLow = 15 class-attribute instance-attribute

Accepted = 16 class-attribute instance-attribute

NotFound = 17 class-attribute instance-attribute

Updated = 18 class-attribute instance-attribute

RanksUpdated = 19 class-attribute instance-attribute

RemoveLeader = 20 class-attribute instance-attribute

RemoveNotMember = 21 class-attribute instance-attribute

Removed = 22 class-attribute instance-attribute

RankingLeader = 23 class-attribute instance-attribute

RankingNotMember = 24 class-attribute instance-attribute

GuildReplyServerPacket

Bases: Packet

Generic guild reply messages

Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_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
class GuildReplyServerPacket(Packet):
    """
    Generic guild reply messages
    """
    _byte_size: int = 0
    _reply_code: GuildReply = None # type: ignore [assignment]
    _reply_code_data: 'GuildReplyServerPacket.ReplyCodeData' = 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 reply_code(self) -> GuildReply:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: GuildReply) -> None:
        self._reply_code = reply_code

    @property
    def reply_code_data(self) -> 'GuildReplyServerPacket.ReplyCodeData':
        """
        GuildReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the `reply_code` field.
        """
        return self._reply_code_data

    @reply_code_data.setter
    def reply_code_data(self, reply_code_data: 'GuildReplyServerPacket.ReplyCodeData') -> None:
        self._reply_code_data = reply_code_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.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.
        """
        GuildReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildReplyServerPacket") -> None:
        """
        Serializes an instance of `GuildReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_short(int(data._reply_code))
        if data._reply_code == GuildReply.CreateAdd:
            if not isinstance(data._reply_code_data, GuildReplyServerPacket.ReplyCodeDataCreateAdd):
                raise SerializationError("Expected reply_code_data to be type GuildReplyServerPacket.ReplyCodeDataCreateAdd for reply_code " + GuildReply(data._reply_code).name + ".")
            GuildReplyServerPacket.ReplyCodeDataCreateAdd.serialize(writer, data._reply_code_data)
        elif data._reply_code == GuildReply.CreateAddConfirm:
            if not isinstance(data._reply_code_data, GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm):
                raise SerializationError("Expected reply_code_data to be type GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm for reply_code " + GuildReply(data._reply_code).name + ".")
            GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm.serialize(writer, data._reply_code_data)
        elif data._reply_code == GuildReply.JoinRequest:
            if not isinstance(data._reply_code_data, GuildReplyServerPacket.ReplyCodeDataJoinRequest):
                raise SerializationError("Expected reply_code_data to be type GuildReplyServerPacket.ReplyCodeDataJoinRequest for reply_code " + GuildReply(data._reply_code).name + ".")
            GuildReplyServerPacket.ReplyCodeDataJoinRequest.serialize(writer, data._reply_code_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildReplyServerPacket":
        """
        Deserializes an instance of `GuildReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildReplyServerPacket: The data to serialize.
        """
        data: GuildReplyServerPacket = GuildReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = GuildReply(reader.get_short())
            if data._reply_code == GuildReply.CreateAdd:
                data._reply_code_data = GuildReplyServerPacket.ReplyCodeDataCreateAdd.deserialize(reader)
            elif data._reply_code == GuildReply.CreateAddConfirm:
                data._reply_code_data = GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm.deserialize(reader)
            elif data._reply_code == GuildReply.JoinRequest:
                data._reply_code_data = GuildReplyServerPacket.ReplyCodeDataJoinRequest.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"GuildReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, reply_code_data={repr(self._reply_code_data)})"

    ReplyCodeData = Union['GuildReplyServerPacket.ReplyCodeDataCreateAdd', 'GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm', 'GuildReplyServerPacket.ReplyCodeDataJoinRequest', None]
    ReplyCodeData.__doc__ = \
        """
        Data associated with different values of the `reply_code` field.
        """

    class ReplyCodeDataCreateAdd:
        """
        Data associated with reply_code value GuildReply.CreateAdd
        """
        _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 serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataCreateAdd") -> None:
            """
            Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAdd` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (GuildReplyServerPacket.ReplyCodeDataCreateAdd): 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) -> "GuildReplyServerPacket.ReplyCodeDataCreateAdd":
            """
            Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAdd` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                GuildReplyServerPacket.ReplyCodeDataCreateAdd: The data to serialize.
            """
            data: GuildReplyServerPacket.ReplyCodeDataCreateAdd = GuildReplyServerPacket.ReplyCodeDataCreateAdd()
            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"GuildReplyServerPacket.ReplyCodeDataCreateAdd(byte_size={repr(self._byte_size)}, name={repr(self._name)})"

    class ReplyCodeDataCreateAddConfirm:
        """
        Data associated with reply_code value GuildReply.CreateAddConfirm
        """
        _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 serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm") -> None:
            """
            Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm): 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) -> "GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm":
            """
            Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm: The data to serialize.
            """
            data: GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm = GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm()
            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"GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm(byte_size={repr(self._byte_size)}, name={repr(self._name)})"

    class ReplyCodeDataJoinRequest:
        """
        Data associated with reply_code value GuildReply.JoinRequest
        """
        _byte_size: int = 0
        _player_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 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

        @property
        def name(self) -> str:
            return self._name

        @name.setter
        def name(self, name: str) -> None:
            self._name = name

        @staticmethod
        def serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataJoinRequest") -> None:
            """
            Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataJoinRequest` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (GuildReplyServerPacket.ReplyCodeDataJoinRequest): The data to serialize.
            """
            if data._player_id is None:
                raise SerializationError("player_id must be provided.")
            writer.add_short(data._player_id)
            if data._name is None:
                raise SerializationError("name must be provided.")
            writer.add_string(data._name)

        @staticmethod
        def deserialize(reader: EoReader) -> "GuildReplyServerPacket.ReplyCodeDataJoinRequest":
            """
            Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataJoinRequest` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                GuildReplyServerPacket.ReplyCodeDataJoinRequest: The data to serialize.
            """
            data: GuildReplyServerPacket.ReplyCodeDataJoinRequest = GuildReplyServerPacket.ReplyCodeDataJoinRequest()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._player_id = reader.get_short()
                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"GuildReplyServerPacket.ReplyCodeDataJoinRequest(byte_size={repr(self._byte_size)}, player_id={repr(self._player_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.

reply_code: GuildReply property writable

reply_code_data: GuildReplyServerPacket.ReplyCodeData property writable

GuildReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the reply_code field.

ReplyCodeData = Union['GuildReplyServerPacket.ReplyCodeDataCreateAdd', 'GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm', 'GuildReplyServerPacket.ReplyCodeDataJoinRequest', None] class-attribute instance-attribute

ReplyCodeDataCreateAdd

Data associated with reply_code value GuildReply.CreateAdd

Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
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
class ReplyCodeDataCreateAdd:
    """
    Data associated with reply_code value GuildReply.CreateAdd
    """
    _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 serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataCreateAdd") -> None:
        """
        Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAdd` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildReplyServerPacket.ReplyCodeDataCreateAdd): 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) -> "GuildReplyServerPacket.ReplyCodeDataCreateAdd":
        """
        Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAdd` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildReplyServerPacket.ReplyCodeDataCreateAdd: The data to serialize.
        """
        data: GuildReplyServerPacket.ReplyCodeDataCreateAdd = GuildReplyServerPacket.ReplyCodeDataCreateAdd()
        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"GuildReplyServerPacket.ReplyCodeDataCreateAdd(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

serialize(writer, data) staticmethod

Serializes an instance of GuildReplyServerPacket.ReplyCodeDataCreateAdd to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataCreateAdd

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
167
168
169
170
171
172
173
174
175
176
177
178
@staticmethod
def serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataCreateAdd") -> None:
    """
    Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAdd` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildReplyServerPacket.ReplyCodeDataCreateAdd): 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 GuildReplyServerPacket.ReplyCodeDataCreateAdd from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataCreateAdd

GuildReplyServerPacket.ReplyCodeDataCreateAdd: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
@staticmethod
def deserialize(reader: EoReader) -> "GuildReplyServerPacket.ReplyCodeDataCreateAdd":
    """
    Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAdd` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildReplyServerPacket.ReplyCodeDataCreateAdd: The data to serialize.
    """
    data: GuildReplyServerPacket.ReplyCodeDataCreateAdd = GuildReplyServerPacket.ReplyCodeDataCreateAdd()
    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

ReplyCodeDataCreateAddConfirm

Data associated with reply_code value GuildReply.CreateAddConfirm

Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
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
class ReplyCodeDataCreateAddConfirm:
    """
    Data associated with reply_code value GuildReply.CreateAddConfirm
    """
    _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 serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm") -> None:
        """
        Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm): 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) -> "GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm":
        """
        Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm: The data to serialize.
        """
        data: GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm = GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm()
        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"GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm(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

serialize(writer, data) staticmethod

Serializes an instance of GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataCreateAddConfirm

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
229
230
231
232
233
234
235
236
237
238
239
240
@staticmethod
def serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm") -> None:
    """
    Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm): 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 GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataCreateAddConfirm

GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
@staticmethod
def deserialize(reader: EoReader) -> "GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm":
    """
    Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm: The data to serialize.
    """
    data: GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm = GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm()
    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

ReplyCodeDataJoinRequest

Data associated with reply_code value GuildReply.JoinRequest

Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
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
class ReplyCodeDataJoinRequest:
    """
    Data associated with reply_code value GuildReply.JoinRequest
    """
    _byte_size: int = 0
    _player_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 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

    @property
    def name(self) -> str:
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        self._name = name

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataJoinRequest") -> None:
        """
        Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataJoinRequest` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildReplyServerPacket.ReplyCodeDataJoinRequest): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._name is None:
            raise SerializationError("name must be provided.")
        writer.add_string(data._name)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildReplyServerPacket.ReplyCodeDataJoinRequest":
        """
        Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataJoinRequest` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildReplyServerPacket.ReplyCodeDataJoinRequest: The data to serialize.
        """
        data: GuildReplyServerPacket.ReplyCodeDataJoinRequest = GuildReplyServerPacket.ReplyCodeDataJoinRequest()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"GuildReplyServerPacket.ReplyCodeDataJoinRequest(byte_size={repr(self._byte_size)}, player_id={repr(self._player_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.

player_id: int property writable

Note
  • Value range is 0-64008.

name: str property writable

serialize(writer, data) staticmethod

Serializes an instance of GuildReplyServerPacket.ReplyCodeDataJoinRequest to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataJoinRequest

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
@staticmethod
def serialize(writer: EoWriter, data: "GuildReplyServerPacket.ReplyCodeDataJoinRequest") -> None:
    """
    Serializes an instance of `GuildReplyServerPacket.ReplyCodeDataJoinRequest` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildReplyServerPacket.ReplyCodeDataJoinRequest): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._name is None:
        raise SerializationError("name must be provided.")
    writer.add_string(data._name)

deserialize(reader) staticmethod

Deserializes an instance of GuildReplyServerPacket.ReplyCodeDataJoinRequest from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataJoinRequest

GuildReplyServerPacket.ReplyCodeDataJoinRequest: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
@staticmethod
def deserialize(reader: EoReader) -> "GuildReplyServerPacket.ReplyCodeDataJoinRequest":
    """
    Deserializes an instance of `GuildReplyServerPacket.ReplyCodeDataJoinRequest` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildReplyServerPacket.ReplyCodeDataJoinRequest: The data to serialize.
    """
    data: GuildReplyServerPacket.ReplyCodeDataJoinRequest = GuildReplyServerPacket.ReplyCodeDataJoinRequest()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._name = reader.get_string()
        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/server/guild_reply_server_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/guild_reply_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/guild_reply_server_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
@staticmethod
def serialize(writer: EoWriter, data: "GuildReplyServerPacket") -> None:
    """
    Serializes an instance of `GuildReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_short(int(data._reply_code))
    if data._reply_code == GuildReply.CreateAdd:
        if not isinstance(data._reply_code_data, GuildReplyServerPacket.ReplyCodeDataCreateAdd):
            raise SerializationError("Expected reply_code_data to be type GuildReplyServerPacket.ReplyCodeDataCreateAdd for reply_code " + GuildReply(data._reply_code).name + ".")
        GuildReplyServerPacket.ReplyCodeDataCreateAdd.serialize(writer, data._reply_code_data)
    elif data._reply_code == GuildReply.CreateAddConfirm:
        if not isinstance(data._reply_code_data, GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm):
            raise SerializationError("Expected reply_code_data to be type GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm for reply_code " + GuildReply(data._reply_code).name + ".")
        GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm.serialize(writer, data._reply_code_data)
    elif data._reply_code == GuildReply.JoinRequest:
        if not isinstance(data._reply_code_data, GuildReplyServerPacket.ReplyCodeDataJoinRequest):
            raise SerializationError("Expected reply_code_data to be type GuildReplyServerPacket.ReplyCodeDataJoinRequest for reply_code " + GuildReply(data._reply_code).name + ".")
        GuildReplyServerPacket.ReplyCodeDataJoinRequest.serialize(writer, data._reply_code_data)

deserialize(reader) staticmethod

Deserializes an instance of GuildReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildReplyServerPacket GuildReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_reply_server_packet.py
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
@staticmethod
def deserialize(reader: EoReader) -> "GuildReplyServerPacket":
    """
    Deserializes an instance of `GuildReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildReplyServerPacket: The data to serialize.
    """
    data: GuildReplyServerPacket = GuildReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._reply_code = GuildReply(reader.get_short())
        if data._reply_code == GuildReply.CreateAdd:
            data._reply_code_data = GuildReplyServerPacket.ReplyCodeDataCreateAdd.deserialize(reader)
        elif data._reply_code == GuildReply.CreateAddConfirm:
            data._reply_code_data = GuildReplyServerPacket.ReplyCodeDataCreateAddConfirm.deserialize(reader)
        elif data._reply_code == GuildReply.JoinRequest:
            data._reply_code_data = GuildReplyServerPacket.ReplyCodeDataJoinRequest.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildRankServerPacket

Bases: Packet

Get guild rank list reply

Source code in src/eolib/protocol/_generated/net/server/guild_rank_server_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
class GuildRankServerPacket(Packet):
    """
    Get guild rank list reply
    """
    _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 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.
        """
        GuildRankServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildRankServerPacket") -> None:
        """
        Serializes an instance of `GuildRankServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildRankServerPacket): 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) -> "GuildRankServerPacket":
        """
        Deserializes an instance of `GuildRankServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildRankServerPacket: The data to serialize.
        """
        data: GuildRankServerPacket = GuildRankServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._ranks = []
            for i in range(9):
                data._ranks.append(reader.get_string())
                if i + 1 < 9:
                    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"GuildRankServerPacket(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.

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/server/guild_rank_server_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.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/server/guild_rank_server_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.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/server/guild_rank_server_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.
    """
    GuildRankServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildRankServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildRankServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_rank_server_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: "GuildRankServerPacket") -> None:
    """
    Serializes an instance of `GuildRankServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildRankServerPacket): 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 GuildRankServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildRankServerPacket 'GuildRankServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_rank_server_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
119
@staticmethod
def deserialize(reader: EoReader) -> "GuildRankServerPacket":
    """
    Deserializes an instance of `GuildRankServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildRankServerPacket: The data to serialize.
    """
    data: GuildRankServerPacket = GuildRankServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._ranks = []
        for i in range(9):
            data._ranks.append(reader.get_string())
            if i + 1 < 9:
                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

GuildOpenServerPacket

Bases: Packet

Talk to guild master NPC reply

Source code in src/eolib/protocol/_generated/net/server/guild_open_server_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 GuildOpenServerPacket(Packet):
    """
    Talk to guild master NPC reply
    """
    _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-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.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.
        """
        GuildOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildOpenServerPacket") -> None:
        """
        Serializes an instance of `GuildOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildOpenServerPacket): The data to serialize.
        """
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_three(data._session_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildOpenServerPacket":
        """
        Deserializes an instance of `GuildOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildOpenServerPacket: The data to serialize.
        """
        data: GuildOpenServerPacket = GuildOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            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"GuildOpenServerPacket(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-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/server/guild_open_server_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/server/guild_open_server_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/server/guild_open_server_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.
    """
    GuildOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_open_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "GuildOpenServerPacket") -> None:
    """
    Serializes an instance of `GuildOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildOpenServerPacket): The data to serialize.
    """
    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 GuildOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildOpenServerPacket GuildOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_open_server_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) -> "GuildOpenServerPacket":
    """
    Deserializes an instance of `GuildOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildOpenServerPacket: The data to serialize.
    """
    data: GuildOpenServerPacket = GuildOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        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

GuildKickServerPacket

Bases: Packet

Left the guild

Source code in src/eolib/protocol/_generated/net/server/guild_kick_server_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 GuildKickServerPacket(Packet):
    """
    Left the guild
    """
    _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.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.
        """
        GuildKickServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildKickServerPacket") -> None:
        """
        Serializes an instance of `GuildKickServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildKickServerPacket): 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) -> "GuildKickServerPacket":
        """
        Deserializes an instance of `GuildKickServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildKickServerPacket: The data to serialize.
        """
        data: GuildKickServerPacket = GuildKickServerPacket()
        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"GuildKickServerPacket(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/server/guild_kick_server_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.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/server/guild_kick_server_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.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/server/guild_kick_server_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.
    """
    GuildKickServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildKickServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildKickServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_kick_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "GuildKickServerPacket") -> None:
    """
    Serializes an instance of `GuildKickServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildKickServerPacket): 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 GuildKickServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildKickServerPacket GuildKickServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_kick_server_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) -> "GuildKickServerPacket":
    """
    Deserializes an instance of `GuildKickServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildKickServerPacket: The data to serialize.
    """
    data: GuildKickServerPacket = GuildKickServerPacket()
    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

GuildCreateServerPacket

Bases: Packet

Guild created

Source code in src/eolib/protocol/_generated/net/server/guild_create_server_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
class GuildCreateServerPacket(Packet):
    """
    Guild created
    """
    _byte_size: int = 0
    _leader_player_id: int = None # type: ignore [assignment]
    _guild_tag: str = None # type: ignore [assignment]
    _guild_name: str = None # type: ignore [assignment]
    _rank_name: str = 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 leader_player_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._leader_player_id

    @leader_player_id.setter
    def leader_player_id(self, leader_player_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._leader_player_id = leader_player_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 rank_name(self) -> str:
        return self._rank_name

    @rank_name.setter
    def rank_name(self, rank_name: str) -> None:
        self._rank_name = rank_name

    @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.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.
        """
        GuildCreateServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildCreateServerPacket") -> None:
        """
        Serializes an instance of `GuildCreateServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildCreateServerPacket): The data to serialize.
        """
        if data._leader_player_id is None:
            raise SerializationError("leader_player_id must be provided.")
        writer.add_short(data._leader_player_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._rank_name is None:
            raise SerializationError("rank_name must be provided.")
        writer.add_string(data._rank_name)
        writer.add_byte(0xFF)
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildCreateServerPacket":
        """
        Deserializes an instance of `GuildCreateServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildCreateServerPacket: The data to serialize.
        """
        data: GuildCreateServerPacket = GuildCreateServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._leader_player_id = reader.get_short()
            reader.next_chunk()
            data._guild_tag = reader.get_string()
            reader.next_chunk()
            data._guild_name = reader.get_string()
            reader.next_chunk()
            data._rank_name = reader.get_string()
            reader.next_chunk()
            data._gold_amount = reader.get_int()
            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"GuildCreateServerPacket(byte_size={repr(self._byte_size)}, leader_player_id={repr(self._leader_player_id)}, guild_tag={repr(self._guild_tag)}, guild_name={repr(self._guild_name)}, rank_name={repr(self._rank_name)}, 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.

leader_player_id: int property writable

Note
  • Value range is 0-64008.

guild_tag: str property writable

guild_name: str property writable

rank_name: str property writable

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/server/guild_create_server_packet.py
90
91
92
93
94
95
96
97
98
@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/server/guild_create_server_packet.py
100
101
102
103
104
105
106
107
108
@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/server/guild_create_server_packet.py
110
111
112
113
114
115
116
117
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    GuildCreateServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildCreateServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildCreateServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_create_server_packet.py
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
@staticmethod
def serialize(writer: EoWriter, data: "GuildCreateServerPacket") -> None:
    """
    Serializes an instance of `GuildCreateServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildCreateServerPacket): The data to serialize.
    """
    if data._leader_player_id is None:
        raise SerializationError("leader_player_id must be provided.")
    writer.add_short(data._leader_player_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._rank_name is None:
        raise SerializationError("rank_name must be provided.")
    writer.add_string(data._rank_name)
    writer.add_byte(0xFF)
    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 GuildCreateServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildCreateServerPacket GuildCreateServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_create_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "GuildCreateServerPacket":
    """
    Deserializes an instance of `GuildCreateServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildCreateServerPacket: The data to serialize.
    """
    data: GuildCreateServerPacket = GuildCreateServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._leader_player_id = reader.get_short()
        reader.next_chunk()
        data._guild_tag = reader.get_string()
        reader.next_chunk()
        data._guild_name = reader.get_string()
        reader.next_chunk()
        data._rank_name = reader.get_string()
        reader.next_chunk()
        data._gold_amount = reader.get_int()
        reader.chunked_reading_mode = False
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

GuildBuyServerPacket

Bases: Packet

Deposit guild bank list reply

Source code in src/eolib/protocol/_generated/net/server/guild_buy_server_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 GuildBuyServerPacket(Packet):
    """
    Deposit guild bank list reply
    """
    _byte_size: int = 0
    _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 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.
        """
        GuildBuyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildBuyServerPacket") -> None:
        """
        Serializes an instance of `GuildBuyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildBuyServerPacket): The data to serialize.
        """
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildBuyServerPacket":
        """
        Deserializes an instance of `GuildBuyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildBuyServerPacket: The data to serialize.
        """
        data: GuildBuyServerPacket = GuildBuyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            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"GuildBuyServerPacket(byte_size={repr(self._byte_size)}, 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.

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/server/guild_buy_server_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/server/guild_buy_server_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.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/server/guild_buy_server_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.
    """
    GuildBuyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildBuyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildBuyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_buy_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "GuildBuyServerPacket") -> None:
    """
    Serializes an instance of `GuildBuyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildBuyServerPacket): The data to serialize.
    """
    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 GuildBuyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildBuyServerPacket GuildBuyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_buy_server_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) -> "GuildBuyServerPacket":
    """
    Deserializes an instance of `GuildBuyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildBuyServerPacket: The data to serialize.
    """
    data: GuildBuyServerPacket = GuildBuyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        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

GuildAgreeServerPacket

Bases: Packet

Joined guild info

Source code in src/eolib/protocol/_generated/net/server/guild_agree_server_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 GuildAgreeServerPacket(Packet):
    """
    Joined guild info
    """
    _byte_size: int = 0
    _recruiter_id: int = None # type: ignore [assignment]
    _guild_tag: str = None # type: ignore [assignment]
    _guild_name: str = None # type: ignore [assignment]
    _rank_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 recruiter_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._recruiter_id

    @recruiter_id.setter
    def recruiter_id(self, recruiter_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._recruiter_id = recruiter_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 rank_name(self) -> str:
        return self._rank_name

    @rank_name.setter
    def rank_name(self, rank_name: str) -> None:
        self._rank_name = rank_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.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.
        """
        GuildAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildAgreeServerPacket") -> None:
        """
        Serializes an instance of `GuildAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildAgreeServerPacket): The data to serialize.
        """
        if data._recruiter_id is None:
            raise SerializationError("recruiter_id must be provided.")
        writer.add_short(data._recruiter_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._rank_name is None:
            raise SerializationError("rank_name must be provided.")
        writer.add_string(data._rank_name)
        writer.add_byte(0xFF)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildAgreeServerPacket":
        """
        Deserializes an instance of `GuildAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildAgreeServerPacket: The data to serialize.
        """
        data: GuildAgreeServerPacket = GuildAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._recruiter_id = reader.get_short()
            reader.next_chunk()
            data._guild_tag = reader.get_string()
            reader.next_chunk()
            data._guild_name = reader.get_string()
            reader.next_chunk()
            data._rank_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"GuildAgreeServerPacket(byte_size={repr(self._byte_size)}, recruiter_id={repr(self._recruiter_id)}, guild_tag={repr(self._guild_tag)}, guild_name={repr(self._guild_name)}, rank_name={repr(self._rank_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.

recruiter_id: int property writable

Note
  • Value range is 0-64008.

guild_tag: str property writable

guild_name: str property writable

rank_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/server/guild_agree_server_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/server/guild_agree_server_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.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/server/guild_agree_server_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.
    """
    GuildAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_agree_server_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: "GuildAgreeServerPacket") -> None:
    """
    Serializes an instance of `GuildAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildAgreeServerPacket): The data to serialize.
    """
    if data._recruiter_id is None:
        raise SerializationError("recruiter_id must be provided.")
    writer.add_short(data._recruiter_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._rank_name is None:
        raise SerializationError("rank_name must be provided.")
    writer.add_string(data._rank_name)
    writer.add_byte(0xFF)

deserialize(reader) staticmethod

Deserializes an instance of GuildAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildAgreeServerPacket GuildAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_agree_server_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) -> "GuildAgreeServerPacket":
    """
    Deserializes an instance of `GuildAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildAgreeServerPacket: The data to serialize.
    """
    data: GuildAgreeServerPacket = GuildAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._recruiter_id = reader.get_short()
        reader.next_chunk()
        data._guild_tag = reader.get_string()
        reader.next_chunk()
        data._guild_name = reader.get_string()
        reader.next_chunk()
        data._rank_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

GuildAcceptServerPacket

Bases: Packet

Update guild rank

Source code in src/eolib/protocol/_generated/net/server/guild_accept_server_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 GuildAcceptServerPacket(Packet):
    """
    Update guild rank
    """
    _byte_size: int = 0
    _rank: 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 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

    @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.
        """
        GuildAcceptServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "GuildAcceptServerPacket") -> None:
        """
        Serializes an instance of `GuildAcceptServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (GuildAcceptServerPacket): The data to serialize.
        """
        if data._rank is None:
            raise SerializationError("rank must be provided.")
        writer.add_char(data._rank)

    @staticmethod
    def deserialize(reader: EoReader) -> "GuildAcceptServerPacket":
        """
        Deserializes an instance of `GuildAcceptServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            GuildAcceptServerPacket: The data to serialize.
        """
        data: GuildAcceptServerPacket = GuildAcceptServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._rank = 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"GuildAcceptServerPacket(byte_size={repr(self._byte_size)}, rank={repr(self._rank)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

rank: 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/server/guild_accept_server_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/server/guild_accept_server_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/server/guild_accept_server_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.
    """
    GuildAcceptServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of GuildAcceptServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data GuildAcceptServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/guild_accept_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "GuildAcceptServerPacket") -> None:
    """
    Serializes an instance of `GuildAcceptServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (GuildAcceptServerPacket): The data to serialize.
    """
    if data._rank is None:
        raise SerializationError("rank must be provided.")
    writer.add_char(data._rank)

deserialize(reader) staticmethod

Deserializes an instance of GuildAcceptServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
GuildAcceptServerPacket GuildAcceptServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/guild_accept_server_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) -> "GuildAcceptServerPacket":
    """
    Deserializes an instance of `GuildAcceptServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        GuildAcceptServerPacket: The data to serialize.
    """
    data: GuildAcceptServerPacket = GuildAcceptServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._rank = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

FacePlayerServerPacket

Bases: Packet

Nearby player facing a direction

Source code in src/eolib/protocol/_generated/net/server/face_player_server_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 FacePlayerServerPacket(Packet):
    """
    Nearby player facing a direction
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _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 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

    @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.
        """
        FacePlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "FacePlayerServerPacket") -> None:
        """
        Serializes an instance of `FacePlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (FacePlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

    @staticmethod
    def deserialize(reader: EoReader) -> "FacePlayerServerPacket":
        """
        Deserializes an instance of `FacePlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            FacePlayerServerPacket: The data to serialize.
        """
        data: FacePlayerServerPacket = FacePlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"FacePlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/face_player_server_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.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/server/face_player_server_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.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/server/face_player_server_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.
    """
    FacePlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of FacePlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data FacePlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/face_player_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "FacePlayerServerPacket") -> None:
    """
    Serializes an instance of `FacePlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (FacePlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

deserialize(reader) staticmethod

Deserializes an instance of FacePlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
FacePlayerServerPacket FacePlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/face_player_server_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) -> "FacePlayerServerPacket":
    """
    Deserializes an instance of `FacePlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        FacePlayerServerPacket: The data to serialize.
    """
    data: FacePlayerServerPacket = FacePlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        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

EquipmentMapInfo

Player equipment data. Sent with map information about a nearby character. Note that these values are graphic IDs.

Source code in src/eolib/protocol/_generated/net/server/equipment_map_info.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
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
class EquipmentMapInfo:
    """
    Player equipment data.
    Sent with map information about a nearby character.
    Note that these values are graphic IDs.
    """
    _byte_size: int = 0
    _boots: int = None # type: ignore [assignment]
    _armor: int = None # type: ignore [assignment]
    _hat: int = None # type: ignore [assignment]
    _shield: int = None # type: ignore [assignment]
    _weapon: 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 boots(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._boots

    @boots.setter
    def boots(self, boots: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._boots = boots

    @property
    def armor(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._armor

    @armor.setter
    def armor(self, armor: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._armor = armor

    @property
    def hat(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hat

    @hat.setter
    def hat(self, hat: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hat = hat

    @property
    def shield(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._shield

    @shield.setter
    def shield(self, shield: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._shield = shield

    @property
    def weapon(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._weapon

    @weapon.setter
    def weapon(self, weapon: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._weapon = weapon

    @staticmethod
    def serialize(writer: EoWriter, data: "EquipmentMapInfo") -> None:
        """
        Serializes an instance of `EquipmentMapInfo` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EquipmentMapInfo): The data to serialize.
        """
        if data._boots is None:
            raise SerializationError("boots must be provided.")
        writer.add_short(data._boots)
        writer.add_short(0)
        writer.add_short(0)
        writer.add_short(0)
        if data._armor is None:
            raise SerializationError("armor must be provided.")
        writer.add_short(data._armor)
        writer.add_short(0)
        if data._hat is None:
            raise SerializationError("hat must be provided.")
        writer.add_short(data._hat)
        if data._shield is None:
            raise SerializationError("shield must be provided.")
        writer.add_short(data._shield)
        if data._weapon is None:
            raise SerializationError("weapon must be provided.")
        writer.add_short(data._weapon)

    @staticmethod
    def deserialize(reader: EoReader) -> "EquipmentMapInfo":
        """
        Deserializes an instance of `EquipmentMapInfo` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EquipmentMapInfo: The data to serialize.
        """
        data: EquipmentMapInfo = EquipmentMapInfo()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._boots = reader.get_short()
            reader.get_short()
            reader.get_short()
            reader.get_short()
            data._armor = reader.get_short()
            reader.get_short()
            data._hat = reader.get_short()
            data._shield = reader.get_short()
            data._weapon = 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"EquipmentMapInfo(byte_size={repr(self._byte_size)}, boots={repr(self._boots)}, armor={repr(self._armor)}, hat={repr(self._hat)}, shield={repr(self._shield)}, weapon={repr(self._weapon)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

boots: int property writable

Note
  • Value range is 0-64008.

armor: int property writable

Note
  • Value range is 0-64008.

hat: int property writable

Note
  • Value range is 0-64008.

shield: int property writable

Note
  • Value range is 0-64008.

weapon: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of EquipmentMapInfo to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EquipmentMapInfo

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/equipment_map_info.py
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
@staticmethod
def serialize(writer: EoWriter, data: "EquipmentMapInfo") -> None:
    """
    Serializes an instance of `EquipmentMapInfo` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EquipmentMapInfo): The data to serialize.
    """
    if data._boots is None:
        raise SerializationError("boots must be provided.")
    writer.add_short(data._boots)
    writer.add_short(0)
    writer.add_short(0)
    writer.add_short(0)
    if data._armor is None:
        raise SerializationError("armor must be provided.")
    writer.add_short(data._armor)
    writer.add_short(0)
    if data._hat is None:
        raise SerializationError("hat must be provided.")
    writer.add_short(data._hat)
    if data._shield is None:
        raise SerializationError("shield must be provided.")
    writer.add_short(data._shield)
    if data._weapon is None:
        raise SerializationError("weapon must be provided.")
    writer.add_short(data._weapon)

deserialize(reader) staticmethod

Deserializes an instance of EquipmentMapInfo from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EquipmentMapInfo EquipmentMapInfo

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/equipment_map_info.py
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
@staticmethod
def deserialize(reader: EoReader) -> "EquipmentMapInfo":
    """
    Deserializes an instance of `EquipmentMapInfo` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EquipmentMapInfo: The data to serialize.
    """
    data: EquipmentMapInfo = EquipmentMapInfo()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._boots = reader.get_short()
        reader.get_short()
        reader.get_short()
        reader.get_short()
        data._armor = reader.get_short()
        reader.get_short()
        data._hat = reader.get_short()
        data._shield = reader.get_short()
        data._weapon = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EquipmentCharacterSelect

Player equipment data. Sent with a character in the character selection list. Note that these values are graphic IDs.

Source code in src/eolib/protocol/_generated/net/server/equipment_character_select.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
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
class EquipmentCharacterSelect:
    """
    Player equipment data.
    Sent with a character in the character selection list.
    Note that these values are graphic IDs.
    """
    _byte_size: int = 0
    _boots: int = None # type: ignore [assignment]
    _armor: int = None # type: ignore [assignment]
    _hat: int = None # type: ignore [assignment]
    _shield: int = None # type: ignore [assignment]
    _weapon: 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 boots(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._boots

    @boots.setter
    def boots(self, boots: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._boots = boots

    @property
    def armor(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._armor

    @armor.setter
    def armor(self, armor: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._armor = armor

    @property
    def hat(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hat

    @hat.setter
    def hat(self, hat: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hat = hat

    @property
    def shield(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._shield

    @shield.setter
    def shield(self, shield: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._shield = shield

    @property
    def weapon(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._weapon

    @weapon.setter
    def weapon(self, weapon: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._weapon = weapon

    @staticmethod
    def serialize(writer: EoWriter, data: "EquipmentCharacterSelect") -> None:
        """
        Serializes an instance of `EquipmentCharacterSelect` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EquipmentCharacterSelect): The data to serialize.
        """
        if data._boots is None:
            raise SerializationError("boots must be provided.")
        writer.add_short(data._boots)
        if data._armor is None:
            raise SerializationError("armor must be provided.")
        writer.add_short(data._armor)
        if data._hat is None:
            raise SerializationError("hat must be provided.")
        writer.add_short(data._hat)
        if data._shield is None:
            raise SerializationError("shield must be provided.")
        writer.add_short(data._shield)
        if data._weapon is None:
            raise SerializationError("weapon must be provided.")
        writer.add_short(data._weapon)

    @staticmethod
    def deserialize(reader: EoReader) -> "EquipmentCharacterSelect":
        """
        Deserializes an instance of `EquipmentCharacterSelect` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EquipmentCharacterSelect: The data to serialize.
        """
        data: EquipmentCharacterSelect = EquipmentCharacterSelect()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._boots = reader.get_short()
            data._armor = reader.get_short()
            data._hat = reader.get_short()
            data._shield = reader.get_short()
            data._weapon = 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"EquipmentCharacterSelect(byte_size={repr(self._byte_size)}, boots={repr(self._boots)}, armor={repr(self._armor)}, hat={repr(self._hat)}, shield={repr(self._shield)}, weapon={repr(self._weapon)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

boots: int property writable

Note
  • Value range is 0-64008.

armor: int property writable

Note
  • Value range is 0-64008.

hat: int property writable

Note
  • Value range is 0-64008.

shield: int property writable

Note
  • Value range is 0-64008.

weapon: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of EquipmentCharacterSelect to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EquipmentCharacterSelect

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/equipment_character_select.py
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
@staticmethod
def serialize(writer: EoWriter, data: "EquipmentCharacterSelect") -> None:
    """
    Serializes an instance of `EquipmentCharacterSelect` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EquipmentCharacterSelect): The data to serialize.
    """
    if data._boots is None:
        raise SerializationError("boots must be provided.")
    writer.add_short(data._boots)
    if data._armor is None:
        raise SerializationError("armor must be provided.")
    writer.add_short(data._armor)
    if data._hat is None:
        raise SerializationError("hat must be provided.")
    writer.add_short(data._hat)
    if data._shield is None:
        raise SerializationError("shield must be provided.")
    writer.add_short(data._shield)
    if data._weapon is None:
        raise SerializationError("weapon must be provided.")
    writer.add_short(data._weapon)

deserialize(reader) staticmethod

Deserializes an instance of EquipmentCharacterSelect from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EquipmentCharacterSelect EquipmentCharacterSelect

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/equipment_character_select.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
@staticmethod
def deserialize(reader: EoReader) -> "EquipmentCharacterSelect":
    """
    Deserializes an instance of `EquipmentCharacterSelect` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EquipmentCharacterSelect: The data to serialize.
    """
    data: EquipmentCharacterSelect = EquipmentCharacterSelect()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._boots = reader.get_short()
        data._armor = reader.get_short()
        data._hat = reader.get_short()
        data._shield = reader.get_short()
        data._weapon = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EquipmentChange

Player equipment data. Sent when a player's visible equipment changes. Note that these values are graphic IDs.

Source code in src/eolib/protocol/_generated/net/server/equipment_change.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
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
class EquipmentChange:
    """
    Player equipment data.
    Sent when a player&#x27;s visible equipment changes.
    Note that these values are graphic IDs.
    """
    _byte_size: int = 0
    _boots: int = None # type: ignore [assignment]
    _armor: int = None # type: ignore [assignment]
    _hat: int = None # type: ignore [assignment]
    _weapon: int = None # type: ignore [assignment]
    _shield: 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 boots(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._boots

    @boots.setter
    def boots(self, boots: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._boots = boots

    @property
    def armor(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._armor

    @armor.setter
    def armor(self, armor: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._armor = armor

    @property
    def hat(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hat

    @hat.setter
    def hat(self, hat: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hat = hat

    @property
    def weapon(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._weapon

    @weapon.setter
    def weapon(self, weapon: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._weapon = weapon

    @property
    def shield(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._shield

    @shield.setter
    def shield(self, shield: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._shield = shield

    @staticmethod
    def serialize(writer: EoWriter, data: "EquipmentChange") -> None:
        """
        Serializes an instance of `EquipmentChange` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EquipmentChange): The data to serialize.
        """
        if data._boots is None:
            raise SerializationError("boots must be provided.")
        writer.add_short(data._boots)
        if data._armor is None:
            raise SerializationError("armor must be provided.")
        writer.add_short(data._armor)
        if data._hat is None:
            raise SerializationError("hat must be provided.")
        writer.add_short(data._hat)
        if data._weapon is None:
            raise SerializationError("weapon must be provided.")
        writer.add_short(data._weapon)
        if data._shield is None:
            raise SerializationError("shield must be provided.")
        writer.add_short(data._shield)

    @staticmethod
    def deserialize(reader: EoReader) -> "EquipmentChange":
        """
        Deserializes an instance of `EquipmentChange` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EquipmentChange: The data to serialize.
        """
        data: EquipmentChange = EquipmentChange()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._boots = reader.get_short()
            data._armor = reader.get_short()
            data._hat = reader.get_short()
            data._weapon = reader.get_short()
            data._shield = 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"EquipmentChange(byte_size={repr(self._byte_size)}, boots={repr(self._boots)}, armor={repr(self._armor)}, hat={repr(self._hat)}, weapon={repr(self._weapon)}, shield={repr(self._shield)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

boots: int property writable

Note
  • Value range is 0-64008.

armor: int property writable

Note
  • Value range is 0-64008.

hat: int property writable

Note
  • Value range is 0-64008.

weapon: int property writable

Note
  • Value range is 0-64008.

shield: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of EquipmentChange to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EquipmentChange

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/equipment_change.py
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
@staticmethod
def serialize(writer: EoWriter, data: "EquipmentChange") -> None:
    """
    Serializes an instance of `EquipmentChange` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EquipmentChange): The data to serialize.
    """
    if data._boots is None:
        raise SerializationError("boots must be provided.")
    writer.add_short(data._boots)
    if data._armor is None:
        raise SerializationError("armor must be provided.")
    writer.add_short(data._armor)
    if data._hat is None:
        raise SerializationError("hat must be provided.")
    writer.add_short(data._hat)
    if data._weapon is None:
        raise SerializationError("weapon must be provided.")
    writer.add_short(data._weapon)
    if data._shield is None:
        raise SerializationError("shield must be provided.")
    writer.add_short(data._shield)

deserialize(reader) staticmethod

Deserializes an instance of EquipmentChange from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EquipmentChange EquipmentChange

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/equipment_change.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
@staticmethod
def deserialize(reader: EoReader) -> "EquipmentChange":
    """
    Deserializes an instance of `EquipmentChange` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EquipmentChange: The data to serialize.
    """
    data: EquipmentChange = EquipmentChange()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._boots = reader.get_short()
        data._armor = reader.get_short()
        data._hat = reader.get_short()
        data._weapon = reader.get_short()
        data._shield = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EmotePlayerServerPacket

Bases: Packet

Nearby player doing an emote

Source code in src/eolib/protocol/_generated/net/server/emote_player_server_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 EmotePlayerServerPacket(Packet):
    """
    Nearby player doing an emote
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _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 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

    @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.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.
        """
        EmotePlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EmotePlayerServerPacket") -> None:
        """
        Serializes an instance of `EmotePlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EmotePlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._emote is None:
            raise SerializationError("emote must be provided.")
        writer.add_char(int(data._emote))

    @staticmethod
    def deserialize(reader: EoReader) -> "EmotePlayerServerPacket":
        """
        Deserializes an instance of `EmotePlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EmotePlayerServerPacket: The data to serialize.
        """
        data: EmotePlayerServerPacket = EmotePlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"EmotePlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/emote_player_server_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.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/server/emote_player_server_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.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/server/emote_player_server_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.
    """
    EmotePlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EmotePlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EmotePlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/emote_player_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "EmotePlayerServerPacket") -> None:
    """
    Serializes an instance of `EmotePlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EmotePlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._emote is None:
        raise SerializationError("emote must be provided.")
    writer.add_char(int(data._emote))

deserialize(reader) staticmethod

Deserializes an instance of EmotePlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EmotePlayerServerPacket EmotePlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/emote_player_server_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) -> "EmotePlayerServerPacket":
    """
    Deserializes an instance of `EmotePlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EmotePlayerServerPacket: The data to serialize.
    """
    data: EmotePlayerServerPacket = EmotePlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        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

EffectUseServerPacket

Bases: Packet

Map effect

Source code in src/eolib/protocol/_generated/net/server/effect_use_server_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
class EffectUseServerPacket(Packet):
    """
    Map effect
    """
    _byte_size: int = 0
    _effect: MapEffect = None # type: ignore [assignment]
    _effect_data: 'EffectUseServerPacket.EffectData' = 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 effect(self) -> MapEffect:
        return self._effect

    @effect.setter
    def effect(self, effect: MapEffect) -> None:
        self._effect = effect

    @property
    def effect_data(self) -> 'EffectUseServerPacket.EffectData':
        """
        EffectUseServerPacket.EffectData: Gets or sets the data associated with the `effect` field.
        """
        return self._effect_data

    @effect_data.setter
    def effect_data(self, effect_data: 'EffectUseServerPacket.EffectData') -> None:
        self._effect_data = effect_data

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Effect

    @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.
        """
        EffectUseServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectUseServerPacket") -> None:
        """
        Serializes an instance of `EffectUseServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectUseServerPacket): The data to serialize.
        """
        if data._effect is None:
            raise SerializationError("effect must be provided.")
        writer.add_char(int(data._effect))
        if data._effect == MapEffect.Quake:
            if not isinstance(data._effect_data, EffectUseServerPacket.EffectDataQuake):
                raise SerializationError("Expected effect_data to be type EffectUseServerPacket.EffectDataQuake for effect " + MapEffect(data._effect).name + ".")
            EffectUseServerPacket.EffectDataQuake.serialize(writer, data._effect_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectUseServerPacket":
        """
        Deserializes an instance of `EffectUseServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectUseServerPacket: The data to serialize.
        """
        data: EffectUseServerPacket = EffectUseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._effect = MapEffect(reader.get_char())
            if data._effect == MapEffect.Quake:
                data._effect_data = EffectUseServerPacket.EffectDataQuake.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"EffectUseServerPacket(byte_size={repr(self._byte_size)}, effect={repr(self._effect)}, effect_data={repr(self._effect_data)})"

    EffectData = Union['EffectUseServerPacket.EffectDataQuake', None]
    EffectData.__doc__ = \
        """
        Data associated with different values of the `effect` field.
        """

    class EffectDataQuake:
        """
        Data associated with effect value MapEffect.Quake
        """
        _byte_size: int = 0
        _quake_strength: 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 quake_strength(self) -> int:
            """
            Note:
              - Value range is 0-252.
            """
            return self._quake_strength

        @quake_strength.setter
        def quake_strength(self, quake_strength: int) -> None:
            """
            Note:
              - Value range is 0-252.
            """
            self._quake_strength = quake_strength

        @staticmethod
        def serialize(writer: EoWriter, data: "EffectUseServerPacket.EffectDataQuake") -> None:
            """
            Serializes an instance of `EffectUseServerPacket.EffectDataQuake` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (EffectUseServerPacket.EffectDataQuake): The data to serialize.
            """
            if data._quake_strength is None:
                raise SerializationError("quake_strength must be provided.")
            writer.add_char(data._quake_strength)

        @staticmethod
        def deserialize(reader: EoReader) -> "EffectUseServerPacket.EffectDataQuake":
            """
            Deserializes an instance of `EffectUseServerPacket.EffectDataQuake` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                EffectUseServerPacket.EffectDataQuake: The data to serialize.
            """
            data: EffectUseServerPacket.EffectDataQuake = EffectUseServerPacket.EffectDataQuake()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._quake_strength = 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"EffectUseServerPacket.EffectDataQuake(byte_size={repr(self._byte_size)}, quake_strength={repr(self._quake_strength)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

effect: MapEffect property writable

effect_data: EffectUseServerPacket.EffectData property writable

EffectUseServerPacket.EffectData: Gets or sets the data associated with the effect field.

EffectData = Union['EffectUseServerPacket.EffectDataQuake', None] class-attribute instance-attribute

EffectDataQuake

Data associated with effect value MapEffect.Quake

Source code in src/eolib/protocol/_generated/net/server/effect_use_server_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
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
class EffectDataQuake:
    """
    Data associated with effect value MapEffect.Quake
    """
    _byte_size: int = 0
    _quake_strength: 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 quake_strength(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._quake_strength

    @quake_strength.setter
    def quake_strength(self, quake_strength: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._quake_strength = quake_strength

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectUseServerPacket.EffectDataQuake") -> None:
        """
        Serializes an instance of `EffectUseServerPacket.EffectDataQuake` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectUseServerPacket.EffectDataQuake): The data to serialize.
        """
        if data._quake_strength is None:
            raise SerializationError("quake_strength must be provided.")
        writer.add_char(data._quake_strength)

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectUseServerPacket.EffectDataQuake":
        """
        Deserializes an instance of `EffectUseServerPacket.EffectDataQuake` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectUseServerPacket.EffectDataQuake: The data to serialize.
        """
        data: EffectUseServerPacket.EffectDataQuake = EffectUseServerPacket.EffectDataQuake()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._quake_strength = 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"EffectUseServerPacket.EffectDataQuake(byte_size={repr(self._byte_size)}, quake_strength={repr(self._quake_strength)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

quake_strength: int property writable

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of EffectUseServerPacket.EffectDataQuake to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EffectDataQuake

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_use_server_packet.py
163
164
165
166
167
168
169
170
171
172
173
174
@staticmethod
def serialize(writer: EoWriter, data: "EffectUseServerPacket.EffectDataQuake") -> None:
    """
    Serializes an instance of `EffectUseServerPacket.EffectDataQuake` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectUseServerPacket.EffectDataQuake): The data to serialize.
    """
    if data._quake_strength is None:
        raise SerializationError("quake_strength must be provided.")
    writer.add_char(data._quake_strength)

deserialize(reader) staticmethod

Deserializes an instance of EffectUseServerPacket.EffectDataQuake from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
EffectDataQuake

EffectUseServerPacket.EffectDataQuake: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_use_server_packet.py
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
@staticmethod
def deserialize(reader: EoReader) -> "EffectUseServerPacket.EffectDataQuake":
    """
    Deserializes an instance of `EffectUseServerPacket.EffectDataQuake` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectUseServerPacket.EffectDataQuake: The data to serialize.
    """
    data: EffectUseServerPacket.EffectDataQuake = EffectUseServerPacket.EffectDataQuake()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._quake_strength = 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/server/effect_use_server_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Effect

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/server/effect_use_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/effect_use_server_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    EffectUseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EffectUseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EffectUseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_use_server_packet.py
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@staticmethod
def serialize(writer: EoWriter, data: "EffectUseServerPacket") -> None:
    """
    Serializes an instance of `EffectUseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectUseServerPacket): The data to serialize.
    """
    if data._effect is None:
        raise SerializationError("effect must be provided.")
    writer.add_char(int(data._effect))
    if data._effect == MapEffect.Quake:
        if not isinstance(data._effect_data, EffectUseServerPacket.EffectDataQuake):
            raise SerializationError("Expected effect_data to be type EffectUseServerPacket.EffectDataQuake for effect " + MapEffect(data._effect).name + ".")
        EffectUseServerPacket.EffectDataQuake.serialize(writer, data._effect_data)

deserialize(reader) staticmethod

Deserializes an instance of EffectUseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EffectUseServerPacket EffectUseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_use_server_packet.py
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "EffectUseServerPacket":
    """
    Deserializes an instance of `EffectUseServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectUseServerPacket: The data to serialize.
    """
    data: EffectUseServerPacket = EffectUseServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._effect = MapEffect(reader.get_char())
        if data._effect == MapEffect.Quake:
            data._effect_data = EffectUseServerPacket.EffectDataQuake.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EffectTargetOtherServerPacket

Bases: Packet

Map drain damage

Source code in src/eolib/protocol/_generated/net/server/effect_target_other_server_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
class EffectTargetOtherServerPacket(Packet):
    """
    Map drain damage
    """
    _byte_size: int = 0
    _damage: int = None # type: ignore [assignment]
    _hp: int = None # type: ignore [assignment]
    _max_hp: int = None # type: ignore [assignment]
    _others: list[MapDrainDamageOther] = 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 damage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._damage = damage

    @property
    def hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

    @hp.setter
    def hp(self, hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp = hp

    @property
    def max_hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_hp

    @max_hp.setter
    def max_hp(self, max_hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_hp = max_hp

    @property
    def others(self) -> list[MapDrainDamageOther]:
        return self._others

    @others.setter
    def others(self, others: list[MapDrainDamageOther]) -> None:
        self._others = others

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Effect

    @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.
        """
        EffectTargetOtherServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectTargetOtherServerPacket") -> None:
        """
        Serializes an instance of `EffectTargetOtherServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectTargetOtherServerPacket): The data to serialize.
        """
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_short(data._damage)
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._others is None:
            raise SerializationError("others must be provided.")
        for i in range(len(data._others)):
            MapDrainDamageOther.serialize(writer, data._others[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectTargetOtherServerPacket":
        """
        Deserializes an instance of `EffectTargetOtherServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectTargetOtherServerPacket: The data to serialize.
        """
        data: EffectTargetOtherServerPacket = EffectTargetOtherServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._damage = reader.get_short()
            data._hp = reader.get_short()
            data._max_hp = reader.get_short()
            others_length = int(reader.remaining / 5)
            data._others = []
            for i in range(others_length):
                data._others.append(MapDrainDamageOther.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"EffectTargetOtherServerPacket(byte_size={repr(self._byte_size)}, damage={repr(self._damage)}, hp={repr(self._hp)}, max_hp={repr(self._max_hp)}, others={repr(self._others)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

damage: int property writable

Note
  • Value range is 0-64008.

hp: int property writable

Note
  • Value range is 0-64008.

max_hp: int property writable

Note
  • Value range is 0-64008.

others: list[MapDrainDamageOther] 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/server/effect_target_other_server_packet.py
91
92
93
94
95
96
97
98
99
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Effect

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/server/effect_target_other_server_packet.py
101
102
103
104
105
106
107
108
109
@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/server/effect_target_other_server_packet.py
111
112
113
114
115
116
117
118
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    EffectTargetOtherServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EffectTargetOtherServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EffectTargetOtherServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_target_other_server_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 serialize(writer: EoWriter, data: "EffectTargetOtherServerPacket") -> None:
    """
    Serializes an instance of `EffectTargetOtherServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectTargetOtherServerPacket): The data to serialize.
    """
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_short(data._damage)
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._others is None:
        raise SerializationError("others must be provided.")
    for i in range(len(data._others)):
        MapDrainDamageOther.serialize(writer, data._others[i])

deserialize(reader) staticmethod

Deserializes an instance of EffectTargetOtherServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EffectTargetOtherServerPacket 'EffectTargetOtherServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_target_other_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "EffectTargetOtherServerPacket":
    """
    Deserializes an instance of `EffectTargetOtherServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectTargetOtherServerPacket: The data to serialize.
    """
    data: EffectTargetOtherServerPacket = EffectTargetOtherServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._damage = reader.get_short()
        data._hp = reader.get_short()
        data._max_hp = reader.get_short()
        others_length = int(reader.remaining / 5)
        data._others = []
        for i in range(others_length):
            data._others.append(MapDrainDamageOther.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EffectSpecServerPacket

Bases: Packet

Taking spike or tp drain damage

Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_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
class EffectSpecServerPacket(Packet):
    """
    Taking spike or tp drain damage
    """
    _byte_size: int = 0
    _map_damage_type: MapDamageType = None # type: ignore [assignment]
    _map_damage_type_data: 'EffectSpecServerPacket.MapDamageTypeData' = 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 map_damage_type(self) -> MapDamageType:
        return self._map_damage_type

    @map_damage_type.setter
    def map_damage_type(self, map_damage_type: MapDamageType) -> None:
        self._map_damage_type = map_damage_type

    @property
    def map_damage_type_data(self) -> 'EffectSpecServerPacket.MapDamageTypeData':
        """
        EffectSpecServerPacket.MapDamageTypeData: Gets or sets the data associated with the `map_damage_type` field.
        """
        return self._map_damage_type_data

    @map_damage_type_data.setter
    def map_damage_type_data(self, map_damage_type_data: 'EffectSpecServerPacket.MapDamageTypeData') -> None:
        self._map_damage_type_data = map_damage_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.Effect

    @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.
        """
        EffectSpecServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectSpecServerPacket") -> None:
        """
        Serializes an instance of `EffectSpecServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectSpecServerPacket): The data to serialize.
        """
        if data._map_damage_type is None:
            raise SerializationError("map_damage_type must be provided.")
        writer.add_char(int(data._map_damage_type))
        if data._map_damage_type == MapDamageType.TpDrain:
            if not isinstance(data._map_damage_type_data, EffectSpecServerPacket.MapDamageTypeDataTpDrain):
                raise SerializationError("Expected map_damage_type_data to be type EffectSpecServerPacket.MapDamageTypeDataTpDrain for map_damage_type " + MapDamageType(data._map_damage_type).name + ".")
            EffectSpecServerPacket.MapDamageTypeDataTpDrain.serialize(writer, data._map_damage_type_data)
        elif data._map_damage_type == MapDamageType.Spikes:
            if not isinstance(data._map_damage_type_data, EffectSpecServerPacket.MapDamageTypeDataSpikes):
                raise SerializationError("Expected map_damage_type_data to be type EffectSpecServerPacket.MapDamageTypeDataSpikes for map_damage_type " + MapDamageType(data._map_damage_type).name + ".")
            EffectSpecServerPacket.MapDamageTypeDataSpikes.serialize(writer, data._map_damage_type_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectSpecServerPacket":
        """
        Deserializes an instance of `EffectSpecServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectSpecServerPacket: The data to serialize.
        """
        data: EffectSpecServerPacket = EffectSpecServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._map_damage_type = MapDamageType(reader.get_char())
            if data._map_damage_type == MapDamageType.TpDrain:
                data._map_damage_type_data = EffectSpecServerPacket.MapDamageTypeDataTpDrain.deserialize(reader)
            elif data._map_damage_type == MapDamageType.Spikes:
                data._map_damage_type_data = EffectSpecServerPacket.MapDamageTypeDataSpikes.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"EffectSpecServerPacket(byte_size={repr(self._byte_size)}, map_damage_type={repr(self._map_damage_type)}, map_damage_type_data={repr(self._map_damage_type_data)})"

    MapDamageTypeData = Union['EffectSpecServerPacket.MapDamageTypeDataTpDrain', 'EffectSpecServerPacket.MapDamageTypeDataSpikes', None]
    MapDamageTypeData.__doc__ = \
        """
        Data associated with different values of the `map_damage_type` field.
        """

    class MapDamageTypeDataTpDrain:
        """
        Data associated with map_damage_type value MapDamageType.TpDrain
        """
        _byte_size: int = 0
        _tp_damage: int = None # type: ignore [assignment]
        _tp: int = None # type: ignore [assignment]
        _max_tp: 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 tp_damage(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._tp_damage

        @tp_damage.setter
        def tp_damage(self, tp_damage: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._tp_damage = tp_damage

        @property
        def tp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._tp

        @tp.setter
        def tp(self, tp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._tp = tp

        @property
        def max_tp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._max_tp

        @max_tp.setter
        def max_tp(self, max_tp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._max_tp = max_tp

        @staticmethod
        def serialize(writer: EoWriter, data: "EffectSpecServerPacket.MapDamageTypeDataTpDrain") -> None:
            """
            Serializes an instance of `EffectSpecServerPacket.MapDamageTypeDataTpDrain` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (EffectSpecServerPacket.MapDamageTypeDataTpDrain): The data to serialize.
            """
            if data._tp_damage is None:
                raise SerializationError("tp_damage must be provided.")
            writer.add_short(data._tp_damage)
            if data._tp is None:
                raise SerializationError("tp must be provided.")
            writer.add_short(data._tp)
            if data._max_tp is None:
                raise SerializationError("max_tp must be provided.")
            writer.add_short(data._max_tp)

        @staticmethod
        def deserialize(reader: EoReader) -> "EffectSpecServerPacket.MapDamageTypeDataTpDrain":
            """
            Deserializes an instance of `EffectSpecServerPacket.MapDamageTypeDataTpDrain` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                EffectSpecServerPacket.MapDamageTypeDataTpDrain: The data to serialize.
            """
            data: EffectSpecServerPacket.MapDamageTypeDataTpDrain = EffectSpecServerPacket.MapDamageTypeDataTpDrain()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._tp_damage = reader.get_short()
                data._tp = reader.get_short()
                data._max_tp = 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"EffectSpecServerPacket.MapDamageTypeDataTpDrain(byte_size={repr(self._byte_size)}, tp_damage={repr(self._tp_damage)}, tp={repr(self._tp)}, max_tp={repr(self._max_tp)})"

    class MapDamageTypeDataSpikes:
        """
        Data associated with map_damage_type value MapDamageType.Spikes
        """
        _byte_size: int = 0
        _hp_damage: int = None # type: ignore [assignment]
        _hp: int = None # type: ignore [assignment]
        _max_hp: 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 hp_damage(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._hp_damage

        @hp_damage.setter
        def hp_damage(self, hp_damage: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._hp_damage = hp_damage

        @property
        def hp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._hp

        @hp.setter
        def hp(self, hp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._hp = hp

        @property
        def max_hp(self) -> int:
            """
            Note:
              - Value range is 0-64008.
            """
            return self._max_hp

        @max_hp.setter
        def max_hp(self, max_hp: int) -> None:
            """
            Note:
              - Value range is 0-64008.
            """
            self._max_hp = max_hp

        @staticmethod
        def serialize(writer: EoWriter, data: "EffectSpecServerPacket.MapDamageTypeDataSpikes") -> None:
            """
            Serializes an instance of `EffectSpecServerPacket.MapDamageTypeDataSpikes` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (EffectSpecServerPacket.MapDamageTypeDataSpikes): The data to serialize.
            """
            if data._hp_damage is None:
                raise SerializationError("hp_damage must be provided.")
            writer.add_short(data._hp_damage)
            if data._hp is None:
                raise SerializationError("hp must be provided.")
            writer.add_short(data._hp)
            if data._max_hp is None:
                raise SerializationError("max_hp must be provided.")
            writer.add_short(data._max_hp)

        @staticmethod
        def deserialize(reader: EoReader) -> "EffectSpecServerPacket.MapDamageTypeDataSpikes":
            """
            Deserializes an instance of `EffectSpecServerPacket.MapDamageTypeDataSpikes` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                EffectSpecServerPacket.MapDamageTypeDataSpikes: The data to serialize.
            """
            data: EffectSpecServerPacket.MapDamageTypeDataSpikes = EffectSpecServerPacket.MapDamageTypeDataSpikes()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._hp_damage = reader.get_short()
                data._hp = reader.get_short()
                data._max_hp = 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"EffectSpecServerPacket.MapDamageTypeDataSpikes(byte_size={repr(self._byte_size)}, hp_damage={repr(self._hp_damage)}, hp={repr(self._hp)}, max_hp={repr(self._max_hp)})"

byte_size: int property

Returns the size 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_damage_type: MapDamageType property writable

map_damage_type_data: EffectSpecServerPacket.MapDamageTypeData property writable

EffectSpecServerPacket.MapDamageTypeData: Gets or sets the data associated with the map_damage_type field.

MapDamageTypeData = Union['EffectSpecServerPacket.MapDamageTypeDataTpDrain', 'EffectSpecServerPacket.MapDamageTypeDataSpikes', None] class-attribute instance-attribute

MapDamageTypeDataTpDrain

Data associated with map_damage_type value MapDamageType.TpDrain

Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_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
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
class MapDamageTypeDataTpDrain:
    """
    Data associated with map_damage_type value MapDamageType.TpDrain
    """
    _byte_size: int = 0
    _tp_damage: int = None # type: ignore [assignment]
    _tp: int = None # type: ignore [assignment]
    _max_tp: 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 tp_damage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._tp_damage

    @tp_damage.setter
    def tp_damage(self, tp_damage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._tp_damage = tp_damage

    @property
    def tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._tp

    @tp.setter
    def tp(self, tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._tp = tp

    @property
    def max_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_tp

    @max_tp.setter
    def max_tp(self, max_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_tp = max_tp

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectSpecServerPacket.MapDamageTypeDataTpDrain") -> None:
        """
        Serializes an instance of `EffectSpecServerPacket.MapDamageTypeDataTpDrain` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectSpecServerPacket.MapDamageTypeDataTpDrain): The data to serialize.
        """
        if data._tp_damage is None:
            raise SerializationError("tp_damage must be provided.")
        writer.add_short(data._tp_damage)
        if data._tp is None:
            raise SerializationError("tp must be provided.")
        writer.add_short(data._tp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectSpecServerPacket.MapDamageTypeDataTpDrain":
        """
        Deserializes an instance of `EffectSpecServerPacket.MapDamageTypeDataTpDrain` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectSpecServerPacket.MapDamageTypeDataTpDrain: The data to serialize.
        """
        data: EffectSpecServerPacket.MapDamageTypeDataTpDrain = EffectSpecServerPacket.MapDamageTypeDataTpDrain()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._tp_damage = reader.get_short()
            data._tp = reader.get_short()
            data._max_tp = 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"EffectSpecServerPacket.MapDamageTypeDataTpDrain(byte_size={repr(self._byte_size)}, tp_damage={repr(self._tp_damage)}, tp={repr(self._tp)}, max_tp={repr(self._max_tp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

tp_damage: int property writable

Note
  • Value range is 0-64008.

tp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of EffectSpecServerPacket.MapDamageTypeDataTpDrain to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MapDamageTypeDataTpDrain

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_packet.py
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
@staticmethod
def serialize(writer: EoWriter, data: "EffectSpecServerPacket.MapDamageTypeDataTpDrain") -> None:
    """
    Serializes an instance of `EffectSpecServerPacket.MapDamageTypeDataTpDrain` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectSpecServerPacket.MapDamageTypeDataTpDrain): The data to serialize.
    """
    if data._tp_damage is None:
        raise SerializationError("tp_damage must be provided.")
    writer.add_short(data._tp_damage)
    if data._tp is None:
        raise SerializationError("tp must be provided.")
    writer.add_short(data._tp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)

deserialize(reader) staticmethod

Deserializes an instance of EffectSpecServerPacket.MapDamageTypeDataTpDrain from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
MapDamageTypeDataTpDrain

EffectSpecServerPacket.MapDamageTypeDataTpDrain: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_packet.py
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
@staticmethod
def deserialize(reader: EoReader) -> "EffectSpecServerPacket.MapDamageTypeDataTpDrain":
    """
    Deserializes an instance of `EffectSpecServerPacket.MapDamageTypeDataTpDrain` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectSpecServerPacket.MapDamageTypeDataTpDrain: The data to serialize.
    """
    data: EffectSpecServerPacket.MapDamageTypeDataTpDrain = EffectSpecServerPacket.MapDamageTypeDataTpDrain()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._tp_damage = reader.get_short()
        data._tp = reader.get_short()
        data._max_tp = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MapDamageTypeDataSpikes

Data associated with map_damage_type value MapDamageType.Spikes

Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_packet.py
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
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
class MapDamageTypeDataSpikes:
    """
    Data associated with map_damage_type value MapDamageType.Spikes
    """
    _byte_size: int = 0
    _hp_damage: int = None # type: ignore [assignment]
    _hp: int = None # type: ignore [assignment]
    _max_hp: 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 hp_damage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp_damage

    @hp_damage.setter
    def hp_damage(self, hp_damage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp_damage = hp_damage

    @property
    def hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

    @hp.setter
    def hp(self, hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp = hp

    @property
    def max_hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_hp

    @max_hp.setter
    def max_hp(self, max_hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_hp = max_hp

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectSpecServerPacket.MapDamageTypeDataSpikes") -> None:
        """
        Serializes an instance of `EffectSpecServerPacket.MapDamageTypeDataSpikes` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectSpecServerPacket.MapDamageTypeDataSpikes): The data to serialize.
        """
        if data._hp_damage is None:
            raise SerializationError("hp_damage must be provided.")
        writer.add_short(data._hp_damage)
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectSpecServerPacket.MapDamageTypeDataSpikes":
        """
        Deserializes an instance of `EffectSpecServerPacket.MapDamageTypeDataSpikes` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectSpecServerPacket.MapDamageTypeDataSpikes: The data to serialize.
        """
        data: EffectSpecServerPacket.MapDamageTypeDataSpikes = EffectSpecServerPacket.MapDamageTypeDataSpikes()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._hp_damage = reader.get_short()
            data._hp = reader.get_short()
            data._max_hp = 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"EffectSpecServerPacket.MapDamageTypeDataSpikes(byte_size={repr(self._byte_size)}, hp_damage={repr(self._hp_damage)}, hp={repr(self._hp)}, max_hp={repr(self._max_hp)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

hp_damage: int property writable

Note
  • Value range is 0-64008.

hp: int property writable

Note
  • Value range is 0-64008.

max_hp: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of EffectSpecServerPacket.MapDamageTypeDataSpikes to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MapDamageTypeDataSpikes

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_packet.py
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
@staticmethod
def serialize(writer: EoWriter, data: "EffectSpecServerPacket.MapDamageTypeDataSpikes") -> None:
    """
    Serializes an instance of `EffectSpecServerPacket.MapDamageTypeDataSpikes` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectSpecServerPacket.MapDamageTypeDataSpikes): The data to serialize.
    """
    if data._hp_damage is None:
        raise SerializationError("hp_damage must be provided.")
    writer.add_short(data._hp_damage)
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)

deserialize(reader) staticmethod

Deserializes an instance of EffectSpecServerPacket.MapDamageTypeDataSpikes from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
MapDamageTypeDataSpikes

EffectSpecServerPacket.MapDamageTypeDataSpikes: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_packet.py
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
@staticmethod
def deserialize(reader: EoReader) -> "EffectSpecServerPacket.MapDamageTypeDataSpikes":
    """
    Deserializes an instance of `EffectSpecServerPacket.MapDamageTypeDataSpikes` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectSpecServerPacket.MapDamageTypeDataSpikes: The data to serialize.
    """
    data: EffectSpecServerPacket.MapDamageTypeDataSpikes = EffectSpecServerPacket.MapDamageTypeDataSpikes()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._hp_damage = reader.get_short()
        data._hp = reader.get_short()
        data._max_hp = 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/server/effect_spec_server_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Effect

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/server/effect_spec_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/effect_spec_server_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    EffectSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EffectSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EffectSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_packet.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def serialize(writer: EoWriter, data: "EffectSpecServerPacket") -> None:
    """
    Serializes an instance of `EffectSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectSpecServerPacket): The data to serialize.
    """
    if data._map_damage_type is None:
        raise SerializationError("map_damage_type must be provided.")
    writer.add_char(int(data._map_damage_type))
    if data._map_damage_type == MapDamageType.TpDrain:
        if not isinstance(data._map_damage_type_data, EffectSpecServerPacket.MapDamageTypeDataTpDrain):
            raise SerializationError("Expected map_damage_type_data to be type EffectSpecServerPacket.MapDamageTypeDataTpDrain for map_damage_type " + MapDamageType(data._map_damage_type).name + ".")
        EffectSpecServerPacket.MapDamageTypeDataTpDrain.serialize(writer, data._map_damage_type_data)
    elif data._map_damage_type == MapDamageType.Spikes:
        if not isinstance(data._map_damage_type_data, EffectSpecServerPacket.MapDamageTypeDataSpikes):
            raise SerializationError("Expected map_damage_type_data to be type EffectSpecServerPacket.MapDamageTypeDataSpikes for map_damage_type " + MapDamageType(data._map_damage_type).name + ".")
        EffectSpecServerPacket.MapDamageTypeDataSpikes.serialize(writer, data._map_damage_type_data)

deserialize(reader) staticmethod

Deserializes an instance of EffectSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EffectSpecServerPacket EffectSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_spec_server_packet.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@staticmethod
def deserialize(reader: EoReader) -> "EffectSpecServerPacket":
    """
    Deserializes an instance of `EffectSpecServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectSpecServerPacket: The data to serialize.
    """
    data: EffectSpecServerPacket = EffectSpecServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._map_damage_type = MapDamageType(reader.get_char())
        if data._map_damage_type == MapDamageType.TpDrain:
            data._map_damage_type_data = EffectSpecServerPacket.MapDamageTypeDataTpDrain.deserialize(reader)
        elif data._map_damage_type == MapDamageType.Spikes:
            data._map_damage_type_data = EffectSpecServerPacket.MapDamageTypeDataSpikes.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EffectReportServerPacket

Bases: Packet

Map spike timer

Source code in src/eolib/protocol/_generated/net/server/effect_report_server_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 EffectReportServerPacket(Packet):
    """
    Map spike timer
    """
    _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.Effect

    @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.
        """
        EffectReportServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectReportServerPacket") -> None:
        """
        Serializes an instance of `EffectReportServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectReportServerPacket): The data to serialize.
        """
        old_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_string("S")

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectReportServerPacket":
        """
        Deserializes an instance of `EffectReportServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectReportServerPacket: The data to serialize.
        """
        data: EffectReportServerPacket = EffectReportServerPacket()
        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"EffectReportServerPacket(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/server/effect_report_server_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.Effect

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/server/effect_report_server_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.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/server/effect_report_server_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.
    """
    EffectReportServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EffectReportServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EffectReportServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_report_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "EffectReportServerPacket") -> None:
    """
    Serializes an instance of `EffectReportServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectReportServerPacket): The data to serialize.
    """
    old_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_string("S")

deserialize(reader) staticmethod

Deserializes an instance of EffectReportServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EffectReportServerPacket EffectReportServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_report_server_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) -> "EffectReportServerPacket":
    """
    Deserializes an instance of `EffectReportServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectReportServerPacket: The data to serialize.
    """
    data: EffectReportServerPacket = EffectReportServerPacket()
    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

EffectPlayerServerPacket

Bases: Packet

Nearby player doing an effect

Source code in src/eolib/protocol/_generated/net/server/effect_player_server_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 EffectPlayerServerPacket(Packet):
    """
    Nearby player doing an effect
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _effect_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

    @property
    def effect_id(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._effect_id

    @effect_id.setter
    def effect_id(self, effect_id: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._effect_id = effect_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Effect

    @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.
        """
        EffectPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectPlayerServerPacket") -> None:
        """
        Serializes an instance of `EffectPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectPlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._effect_id is None:
            raise SerializationError("effect_id must be provided.")
        writer.add_three(data._effect_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectPlayerServerPacket":
        """
        Deserializes an instance of `EffectPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectPlayerServerPacket: The data to serialize.
        """
        data: EffectPlayerServerPacket = EffectPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._effect_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"EffectPlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, effect_id={repr(self._effect_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.

effect_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/server/effect_player_server_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.Effect

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/server/effect_player_server_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.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/server/effect_player_server_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.
    """
    EffectPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EffectPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EffectPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_player_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "EffectPlayerServerPacket") -> None:
    """
    Serializes an instance of `EffectPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectPlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._effect_id is None:
        raise SerializationError("effect_id must be provided.")
    writer.add_three(data._effect_id)

deserialize(reader) staticmethod

Deserializes an instance of EffectPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EffectPlayerServerPacket EffectPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_player_server_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) -> "EffectPlayerServerPacket":
    """
    Deserializes an instance of `EffectPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectPlayerServerPacket: The data to serialize.
    """
    data: EffectPlayerServerPacket = EffectPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._effect_id = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EffectAgreeServerPacket

Bases: Packet

Map tile effect

Source code in src/eolib/protocol/_generated/net/server/effect_agree_server_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 EffectAgreeServerPacket(Packet):
    """
    Map tile effect
    """
    _byte_size: int = 0
    _coords: Coords = None # type: ignore [assignment]
    _effect_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 effect_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._effect_id

    @effect_id.setter
    def effect_id(self, effect_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._effect_id = effect_id

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Effect

    @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.
        """
        EffectAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectAgreeServerPacket") -> None:
        """
        Serializes an instance of `EffectAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectAgreeServerPacket): The data to serialize.
        """
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._effect_id is None:
            raise SerializationError("effect_id must be provided.")
        writer.add_short(data._effect_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectAgreeServerPacket":
        """
        Deserializes an instance of `EffectAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectAgreeServerPacket: The data to serialize.
        """
        data: EffectAgreeServerPacket = EffectAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            data._effect_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"EffectAgreeServerPacket(byte_size={repr(self._byte_size)}, coords={repr(self._coords)}, effect_id={repr(self._effect_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

effect_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/server/effect_agree_server_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.Effect

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/server/effect_agree_server_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/server/effect_agree_server_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.
    """
    EffectAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EffectAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EffectAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_agree_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "EffectAgreeServerPacket") -> None:
    """
    Serializes an instance of `EffectAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectAgreeServerPacket): The data to serialize.
    """
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._effect_id is None:
        raise SerializationError("effect_id must be provided.")
    writer.add_short(data._effect_id)

deserialize(reader) staticmethod

Deserializes an instance of EffectAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EffectAgreeServerPacket EffectAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_agree_server_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) -> "EffectAgreeServerPacket":
    """
    Deserializes an instance of `EffectAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectAgreeServerPacket: The data to serialize.
    """
    data: EffectAgreeServerPacket = EffectAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        data._effect_id = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

EffectAdminServerPacket

Bases: Packet

Nearby character taking spike damage

Source code in src/eolib/protocol/_generated/net/server/effect_admin_server_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
class EffectAdminServerPacket(Packet):
    """
    Nearby character taking spike damage
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _died: bool = None # type: ignore [assignment]
    _damage: 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

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hp_percentage = hp_percentage

    @property
    def died(self) -> bool:
        return self._died

    @died.setter
    def died(self, died: bool) -> None:
        self._died = died

    @property
    def damage(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._damage = damage

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Effect

    @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.
        """
        EffectAdminServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "EffectAdminServerPacket") -> None:
        """
        Serializes an instance of `EffectAdminServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (EffectAdminServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)
        if data._died is None:
            raise SerializationError("died must be provided.")
        writer.add_char(1 if data._died else 0)
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_three(data._damage)

    @staticmethod
    def deserialize(reader: EoReader) -> "EffectAdminServerPacket":
        """
        Deserializes an instance of `EffectAdminServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            EffectAdminServerPacket: The data to serialize.
        """
        data: EffectAdminServerPacket = EffectAdminServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._hp_percentage = reader.get_char()
            data._died = reader.get_char() != 0
            data._damage = 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"EffectAdminServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, hp_percentage={repr(self._hp_percentage)}, died={repr(self._died)}, damage={repr(self._damage)})"

byte_size: int property

Returns the size 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.

hp_percentage: int property writable

Note
  • Value range is 0-252.

died: bool property writable

damage: 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/server/effect_admin_server_packet.py
89
90
91
92
93
94
95
96
97
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Effect

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/server/effect_admin_server_packet.py
 99
100
101
102
103
104
105
106
107
@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/server/effect_admin_server_packet.py
109
110
111
112
113
114
115
116
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    EffectAdminServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of EffectAdminServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data EffectAdminServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/effect_admin_server_packet.py
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
@staticmethod
def serialize(writer: EoWriter, data: "EffectAdminServerPacket") -> None:
    """
    Serializes an instance of `EffectAdminServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (EffectAdminServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)
    if data._died is None:
        raise SerializationError("died must be provided.")
    writer.add_char(1 if data._died else 0)
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_three(data._damage)

deserialize(reader) staticmethod

Deserializes an instance of EffectAdminServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
EffectAdminServerPacket EffectAdminServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/effect_admin_server_packet.py
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
@staticmethod
def deserialize(reader: EoReader) -> "EffectAdminServerPacket":
    """
    Deserializes an instance of `EffectAdminServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        EffectAdminServerPacket: The data to serialize.
    """
    data: EffectAdminServerPacket = EffectAdminServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._hp_percentage = reader.get_char()
        data._died = reader.get_char() != 0
        data._damage = reader.get_three()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

DoorOpenServerPacket

Bases: Packet

Nearby door opening

Source code in src/eolib/protocol/_generated/net/server/door_open_server_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
class DoorOpenServerPacket(Packet):
    """
    Nearby door opening
    """
    _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.
        """
        DoorOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "DoorOpenServerPacket") -> None:
        """
        Serializes an instance of `DoorOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (DoorOpenServerPacket): The data to serialize.
        """
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        writer.add_char(0)

    @staticmethod
    def deserialize(reader: EoReader) -> "DoorOpenServerPacket":
        """
        Deserializes an instance of `DoorOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            DoorOpenServerPacket: The data to serialize.
        """
        data: DoorOpenServerPacket = DoorOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            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"DoorOpenServerPacket(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/server/door_open_server_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/server/door_open_server_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/server/door_open_server_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.
    """
    DoorOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of DoorOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data DoorOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/door_open_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
80
@staticmethod
def serialize(writer: EoWriter, data: "DoorOpenServerPacket") -> None:
    """
    Serializes an instance of `DoorOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (DoorOpenServerPacket): The data to serialize.
    """
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    writer.add_char(0)

deserialize(reader) staticmethod

Deserializes an instance of DoorOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
DoorOpenServerPacket DoorOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/door_open_server_packet.py
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
@staticmethod
def deserialize(reader: EoReader) -> "DoorOpenServerPacket":
    """
    Deserializes an instance of `DoorOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        DoorOpenServerPacket: The data to serialize.
    """
    data: DoorOpenServerPacket = DoorOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

DoorCloseServerPacket

Bases: Packet

Reply to trying to open a locked door

Source code in src/eolib/protocol/_generated/net/server/door_close_server_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 DoorCloseServerPacket(Packet):
    """
    Reply to trying to open a locked door
    """
    _byte_size: int = 0
    _key: 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 key(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._key

    @key.setter
    def key(self, key: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._key = key

    @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.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.
        """
        DoorCloseServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "DoorCloseServerPacket") -> None:
        """
        Serializes an instance of `DoorCloseServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (DoorCloseServerPacket): The data to serialize.
        """
        if data._key is None:
            raise SerializationError("key must be provided.")
        writer.add_char(data._key)

    @staticmethod
    def deserialize(reader: EoReader) -> "DoorCloseServerPacket":
        """
        Deserializes an instance of `DoorCloseServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            DoorCloseServerPacket: The data to serialize.
        """
        data: DoorCloseServerPacket = DoorCloseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._key = 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"DoorCloseServerPacket(byte_size={repr(self._byte_size)}, key={repr(self._key)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

key: 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/server/door_close_server_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.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/server/door_close_server_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.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/server/door_close_server_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.
    """
    DoorCloseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of DoorCloseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data DoorCloseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/door_close_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "DoorCloseServerPacket") -> None:
    """
    Serializes an instance of `DoorCloseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (DoorCloseServerPacket): The data to serialize.
    """
    if data._key is None:
        raise SerializationError("key must be provided.")
    writer.add_char(data._key)

deserialize(reader) staticmethod

Deserializes an instance of DoorCloseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
DoorCloseServerPacket DoorCloseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/door_close_server_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) -> "DoorCloseServerPacket":
    """
    Deserializes an instance of `DoorCloseServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        DoorCloseServerPacket: The data to serialize.
    """
    data: DoorCloseServerPacket = DoorCloseServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._key = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

DialogEntryType

Bases: IntEnum

The type of an entry in a quest dialog

Source code in src/eolib/protocol/_generated/net/server/dialog_entry_type.py
 9
10
11
12
13
14
class DialogEntryType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    The type of an entry in a quest dialog
    """
    Text = 1
    Link = 2

Text = 1 class-attribute instance-attribute

ConnectionPlayerServerPacket

Bases: Packet

Ping request

Source code in src/eolib/protocol/_generated/net/server/connection_player_server_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 ConnectionPlayerServerPacket(Packet):
    """
    Ping request
    """
    _byte_size: int = 0
    _seq1: int = None # type: ignore [assignment]
    _seq2: 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 seq1(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._seq1

    @seq1.setter
    def seq1(self, seq1: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._seq1 = seq1

    @property
    def seq2(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._seq2

    @seq2.setter
    def seq2(self, seq2: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._seq2 = seq2

    @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.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.
        """
        ConnectionPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ConnectionPlayerServerPacket") -> None:
        """
        Serializes an instance of `ConnectionPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ConnectionPlayerServerPacket): The data to serialize.
        """
        if data._seq1 is None:
            raise SerializationError("seq1 must be provided.")
        writer.add_short(data._seq1)
        if data._seq2 is None:
            raise SerializationError("seq2 must be provided.")
        writer.add_char(data._seq2)

    @staticmethod
    def deserialize(reader: EoReader) -> "ConnectionPlayerServerPacket":
        """
        Deserializes an instance of `ConnectionPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ConnectionPlayerServerPacket: The data to serialize.
        """
        data: ConnectionPlayerServerPacket = ConnectionPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._seq1 = reader.get_short()
            data._seq2 = 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"ConnectionPlayerServerPacket(byte_size={repr(self._byte_size)}, seq1={repr(self._seq1)}, seq2={repr(self._seq2)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

seq1: int property writable

Note
  • Value range is 0-64008.

seq2: 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/server/connection_player_server_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.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/server/connection_player_server_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.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/server/connection_player_server_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.
    """
    ConnectionPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ConnectionPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ConnectionPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/connection_player_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "ConnectionPlayerServerPacket") -> None:
    """
    Serializes an instance of `ConnectionPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ConnectionPlayerServerPacket): The data to serialize.
    """
    if data._seq1 is None:
        raise SerializationError("seq1 must be provided.")
    writer.add_short(data._seq1)
    if data._seq2 is None:
        raise SerializationError("seq2 must be provided.")
    writer.add_char(data._seq2)

deserialize(reader) staticmethod

Deserializes an instance of ConnectionPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ConnectionPlayerServerPacket ConnectionPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/connection_player_server_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) -> "ConnectionPlayerServerPacket":
    """
    Deserializes an instance of `ConnectionPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ConnectionPlayerServerPacket: The data to serialize.
    """
    data: ConnectionPlayerServerPacket = ConnectionPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._seq1 = reader.get_short()
        data._seq2 = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenRequestServerPacket

Bases: Packet

Reply to requesting sleeping at an inn

Source code in src/eolib/protocol/_generated/net/server/citizen_request_server_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 CitizenRequestServerPacket(Packet):
    """
    Reply to requesting sleeping at an inn
    """
    _byte_size: int = 0
    _cost: 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 cost(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._cost

    @cost.setter
    def cost(self, cost: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._cost = cost

    @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.
        """
        CitizenRequestServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenRequestServerPacket") -> None:
        """
        Serializes an instance of `CitizenRequestServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenRequestServerPacket): The data to serialize.
        """
        if data._cost is None:
            raise SerializationError("cost must be provided.")
        writer.add_int(data._cost)

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenRequestServerPacket":
        """
        Deserializes an instance of `CitizenRequestServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenRequestServerPacket: The data to serialize.
        """
        data: CitizenRequestServerPacket = CitizenRequestServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._cost = 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"CitizenRequestServerPacket(byte_size={repr(self._byte_size)}, cost={repr(self._cost)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

cost: 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/server/citizen_request_server_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/server/citizen_request_server_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/server/citizen_request_server_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.
    """
    CitizenRequestServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenRequestServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenRequestServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/citizen_request_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "CitizenRequestServerPacket") -> None:
    """
    Serializes an instance of `CitizenRequestServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenRequestServerPacket): The data to serialize.
    """
    if data._cost is None:
        raise SerializationError("cost must be provided.")
    writer.add_int(data._cost)

deserialize(reader) staticmethod

Deserializes an instance of CitizenRequestServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenRequestServerPacket CitizenRequestServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/citizen_request_server_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) -> "CitizenRequestServerPacket":
    """
    Deserializes an instance of `CitizenRequestServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenRequestServerPacket: The data to serialize.
    """
    data: CitizenRequestServerPacket = CitizenRequestServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._cost = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenReplyServerPacket

Bases: Packet

Response to subscribing to a town

Source code in src/eolib/protocol/_generated/net/server/citizen_reply_server_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 CitizenReplyServerPacket(Packet):
    """
    Response to subscribing to a town
    """
    _byte_size: int = 0
    _questions_wrong: 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 questions_wrong(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._questions_wrong

    @questions_wrong.setter
    def questions_wrong(self, questions_wrong: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._questions_wrong = questions_wrong

    @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.
        """
        CitizenReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenReplyServerPacket") -> None:
        """
        Serializes an instance of `CitizenReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenReplyServerPacket): The data to serialize.
        """
        if data._questions_wrong is None:
            raise SerializationError("questions_wrong must be provided.")
        writer.add_char(data._questions_wrong)

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenReplyServerPacket":
        """
        Deserializes an instance of `CitizenReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenReplyServerPacket: The data to serialize.
        """
        data: CitizenReplyServerPacket = CitizenReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._questions_wrong = 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"CitizenReplyServerPacket(byte_size={repr(self._byte_size)}, questions_wrong={repr(self._questions_wrong)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

questions_wrong: 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/server/citizen_reply_server_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/server/citizen_reply_server_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.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/server/citizen_reply_server_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.
    """
    CitizenReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/citizen_reply_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "CitizenReplyServerPacket") -> None:
    """
    Serializes an instance of `CitizenReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenReplyServerPacket): The data to serialize.
    """
    if data._questions_wrong is None:
        raise SerializationError("questions_wrong must be provided.")
    writer.add_char(data._questions_wrong)

deserialize(reader) staticmethod

Deserializes an instance of CitizenReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenReplyServerPacket CitizenReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/citizen_reply_server_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) -> "CitizenReplyServerPacket":
    """
    Deserializes an instance of `CitizenReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenReplyServerPacket: The data to serialize.
    """
    data: CitizenReplyServerPacket = CitizenReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._questions_wrong = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenRemoveServerPacket

Bases: Packet

Response to giving up citizenship of a town

Source code in src/eolib/protocol/_generated/net/server/citizen_remove_server_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 CitizenRemoveServerPacket(Packet):
    """
    Response to giving up citizenship of a town
    """
    _byte_size: int = 0
    _reply_code: InnUnsubscribeReply = 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 reply_code(self) -> InnUnsubscribeReply:
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: InnUnsubscribeReply) -> None:
        self._reply_code = reply_code

    @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.
        """
        CitizenRemoveServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenRemoveServerPacket") -> None:
        """
        Serializes an instance of `CitizenRemoveServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenRemoveServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_char(int(data._reply_code))

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenRemoveServerPacket":
        """
        Deserializes an instance of `CitizenRemoveServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenRemoveServerPacket: The data to serialize.
        """
        data: CitizenRemoveServerPacket = CitizenRemoveServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = InnUnsubscribeReply(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"CitizenRemoveServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

reply_code: InnUnsubscribeReply 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/server/citizen_remove_server_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.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/server/citizen_remove_server_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.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/server/citizen_remove_server_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.
    """
    CitizenRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenRemoveServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/citizen_remove_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "CitizenRemoveServerPacket") -> None:
    """
    Serializes an instance of `CitizenRemoveServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenRemoveServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_char(int(data._reply_code))

deserialize(reader) staticmethod

Deserializes an instance of CitizenRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenRemoveServerPacket CitizenRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/citizen_remove_server_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) -> "CitizenRemoveServerPacket":
    """
    Deserializes an instance of `CitizenRemoveServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenRemoveServerPacket: The data to serialize.
    """
    data: CitizenRemoveServerPacket = CitizenRemoveServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._reply_code = InnUnsubscribeReply(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CitizenOpenServerPacket

Bases: Packet

Response from talking to a citizenship NPC

Source code in src/eolib/protocol/_generated/net/server/citizen_open_server_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 CitizenOpenServerPacket(Packet):
    """
    Response from talking to a citizenship NPC
    """
    _byte_size: int = 0
    _behavior_id: int = None # type: ignore [assignment]
    _current_home_id: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]
    _questions: 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 behavior_id(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._behavior_id

    @behavior_id.setter
    def behavior_id(self, behavior_id: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._behavior_id = behavior_id

    @property
    def current_home_id(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._current_home_id

    @current_home_id.setter
    def current_home_id(self, current_home_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._current_home_id = current_home_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

    @property
    def questions(self) -> list[str]:
        """
        Note:
          - Length must be `3`.
        """
        return self._questions

    @questions.setter
    def questions(self, questions: list[str]) -> None:
        """
        Note:
          - Length must be `3`.
        """
        self._questions = questions

    @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.
        """
        CitizenOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenOpenServerPacket") -> None:
        """
        Serializes an instance of `CitizenOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenOpenServerPacket): The data to serialize.
        """
        if data._behavior_id is None:
            raise SerializationError("behavior_id must be provided.")
        writer.add_three(data._behavior_id)
        if data._current_home_id is None:
            raise SerializationError("current_home_id must be provided.")
        writer.add_char(data._current_home_id)
        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._questions is None:
            raise SerializationError("questions must be provided.")
        if len(data._questions) != 3:
            raise SerializationError(f"Expected length of questions to be exactly 3, got {len(data._questions)}.")
        for i in range(3):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._questions[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenOpenServerPacket":
        """
        Deserializes an instance of `CitizenOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenOpenServerPacket: The data to serialize.
        """
        data: CitizenOpenServerPacket = CitizenOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._behavior_id = reader.get_three()
            data._current_home_id = reader.get_char()
            data._session_id = reader.get_short()
            reader.next_chunk()
            data._questions = []
            for i in range(3):
                data._questions.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"CitizenOpenServerPacket(byte_size={repr(self._byte_size)}, behavior_id={repr(self._behavior_id)}, current_home_id={repr(self._current_home_id)}, session_id={repr(self._session_id)}, questions={repr(self._questions)})"

byte_size: int property

Returns the size 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-16194276.

current_home_id: int property writable

Note
  • Value range is 0-252.

session_id: int property writable

Note
  • Value range is 0-64008.

questions: 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/server/citizen_open_server_packet.py
 98
 99
100
101
102
103
104
105
106
@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/server/citizen_open_server_packet.py
108
109
110
111
112
113
114
115
116
@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/server/citizen_open_server_packet.py
118
119
120
121
122
123
124
125
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CitizenOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/citizen_open_server_packet.py
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
@staticmethod
def serialize(writer: EoWriter, data: "CitizenOpenServerPacket") -> None:
    """
    Serializes an instance of `CitizenOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenOpenServerPacket): The data to serialize.
    """
    if data._behavior_id is None:
        raise SerializationError("behavior_id must be provided.")
    writer.add_three(data._behavior_id)
    if data._current_home_id is None:
        raise SerializationError("current_home_id must be provided.")
    writer.add_char(data._current_home_id)
    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._questions is None:
        raise SerializationError("questions must be provided.")
    if len(data._questions) != 3:
        raise SerializationError(f"Expected length of questions to be exactly 3, got {len(data._questions)}.")
    for i in range(3):
        if i > 0:
            writer.add_byte(0xFF)
        writer.add_string(data._questions[i])

deserialize(reader) staticmethod

Deserializes an instance of CitizenOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenOpenServerPacket 'CitizenOpenServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/citizen_open_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CitizenOpenServerPacket":
    """
    Deserializes an instance of `CitizenOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenOpenServerPacket: The data to serialize.
    """
    data: CitizenOpenServerPacket = CitizenOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._behavior_id = reader.get_three()
        data._current_home_id = reader.get_char()
        data._session_id = reader.get_short()
        reader.next_chunk()
        data._questions = []
        for i in range(3):
            data._questions.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

CitizenAcceptServerPacket

Bases: Packet

Sleeping at an inn

Source code in src/eolib/protocol/_generated/net/server/citizen_accept_server_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 CitizenAcceptServerPacket(Packet):
    """
    Sleeping at an inn
    """
    _byte_size: int = 0
    _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 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.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.
        """
        CitizenAcceptServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CitizenAcceptServerPacket") -> None:
        """
        Serializes an instance of `CitizenAcceptServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CitizenAcceptServerPacket): The data to serialize.
        """
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)

    @staticmethod
    def deserialize(reader: EoReader) -> "CitizenAcceptServerPacket":
        """
        Deserializes an instance of `CitizenAcceptServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CitizenAcceptServerPacket: The data to serialize.
        """
        data: CitizenAcceptServerPacket = CitizenAcceptServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            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"CitizenAcceptServerPacket(byte_size={repr(self._byte_size)}, 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.

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/server/citizen_accept_server_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/server/citizen_accept_server_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/server/citizen_accept_server_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.
    """
    CitizenAcceptServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CitizenAcceptServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CitizenAcceptServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/citizen_accept_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "CitizenAcceptServerPacket") -> None:
    """
    Serializes an instance of `CitizenAcceptServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CitizenAcceptServerPacket): The data to serialize.
    """
    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 CitizenAcceptServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CitizenAcceptServerPacket CitizenAcceptServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/citizen_accept_server_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) -> "CitizenAcceptServerPacket":
    """
    Deserializes an instance of `CitizenAcceptServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CitizenAcceptServerPacket: The data to serialize.
    """
    data: CitizenAcceptServerPacket = CitizenAcceptServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        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

ChestSpecServerPacket

Bases: Packet

Reply to trying to add an item to a full chest

Source code in src/eolib/protocol/_generated/net/server/chest_spec_server_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 ChestSpecServerPacket(Packet):
    """
    Reply to trying to add an item to a full chest
    """
    _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.Chest

    @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.
        """
        ChestSpecServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestSpecServerPacket") -> None:
        """
        Serializes an instance of `ChestSpecServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestSpecServerPacket): The data to serialize.
        """
        old_writer_length: int = len(writer)
        if len(writer) == old_writer_length:
            writer.add_byte(0)

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestSpecServerPacket":
        """
        Deserializes an instance of `ChestSpecServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestSpecServerPacket: The data to serialize.
        """
        data: ChestSpecServerPacket = ChestSpecServerPacket()
        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"ChestSpecServerPacket(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/server/chest_spec_server_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.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/server/chest_spec_server_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.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/server/chest_spec_server_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.
    """
    ChestSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chest_spec_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "ChestSpecServerPacket") -> None:
    """
    Serializes an instance of `ChestSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestSpecServerPacket): The data to serialize.
    """
    old_writer_length: int = len(writer)
    if len(writer) == old_writer_length:
        writer.add_byte(0)

deserialize(reader) staticmethod

Deserializes an instance of ChestSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestSpecServerPacket ChestSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chest_spec_server_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) -> "ChestSpecServerPacket":
    """
    Deserializes an instance of `ChestSpecServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestSpecServerPacket: The data to serialize.
    """
    data: ChestSpecServerPacket = ChestSpecServerPacket()
    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

ChestReplyServerPacket

Bases: Packet

Reply to placing an item in to a chest

Source code in src/eolib/protocol/_generated/net/server/chest_reply_server_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
class ChestReplyServerPacket(Packet):
    """
    Reply to placing an item in to a chest
    """
    _byte_size: int = 0
    _added_item_id: int = None # type: ignore [assignment]
    _remaining_amount: int = None # type: ignore [assignment]
    _weight: Weight = None # type: ignore [assignment]
    _items: list[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 added_item_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._added_item_id

    @added_item_id.setter
    def added_item_id(self, added_item_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._added_item_id = added_item_id

    @property
    def remaining_amount(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._remaining_amount

    @remaining_amount.setter
    def remaining_amount(self, remaining_amount: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._remaining_amount = remaining_amount

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @property
    def items(self) -> list[ThreeItem]:
        return self._items

    @items.setter
    def items(self, items: list[ThreeItem]) -> None:
        self._items = items

    @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.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.
        """
        ChestReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestReplyServerPacket") -> None:
        """
        Serializes an instance of `ChestReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestReplyServerPacket): The data to serialize.
        """
        if data._added_item_id is None:
            raise SerializationError("added_item_id must be provided.")
        writer.add_short(data._added_item_id)
        if data._remaining_amount is None:
            raise SerializationError("remaining_amount must be provided.")
        writer.add_int(data._remaining_amount)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)
        if data._items is None:
            raise SerializationError("items must be provided.")
        for i in range(len(data._items)):
            ThreeItem.serialize(writer, data._items[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestReplyServerPacket":
        """
        Deserializes an instance of `ChestReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestReplyServerPacket: The data to serialize.
        """
        data: ChestReplyServerPacket = ChestReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._added_item_id = reader.get_short()
            data._remaining_amount = reader.get_int()
            data._weight = Weight.deserialize(reader)
            items_length = int(reader.remaining / 5)
            data._items = []
            for i in range(items_length):
                data._items.append(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"ChestReplyServerPacket(byte_size={repr(self._byte_size)}, added_item_id={repr(self._added_item_id)}, remaining_amount={repr(self._remaining_amount)}, weight={repr(self._weight)}, items={repr(self._items)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

added_item_id: int property writable

Note
  • Value range is 0-64008.

remaining_amount: int property writable

Note
  • Value range is 0-4097152080.

weight: Weight property writable

items: list[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/server/chest_reply_server_packet.py
84
85
86
87
88
89
90
91
92
@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/server/chest_reply_server_packet.py
 94
 95
 96
 97
 98
 99
100
101
102
@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/server/chest_reply_server_packet.py
104
105
106
107
108
109
110
111
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChestReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chest_reply_server_packet.py
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: "ChestReplyServerPacket") -> None:
    """
    Serializes an instance of `ChestReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestReplyServerPacket): The data to serialize.
    """
    if data._added_item_id is None:
        raise SerializationError("added_item_id must be provided.")
    writer.add_short(data._added_item_id)
    if data._remaining_amount is None:
        raise SerializationError("remaining_amount must be provided.")
    writer.add_int(data._remaining_amount)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)
    if data._items is None:
        raise SerializationError("items must be provided.")
    for i in range(len(data._items)):
        ThreeItem.serialize(writer, data._items[i])

deserialize(reader) staticmethod

Deserializes an instance of ChestReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestReplyServerPacket 'ChestReplyServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chest_reply_server_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
@staticmethod
def deserialize(reader: EoReader) -> "ChestReplyServerPacket":
    """
    Deserializes an instance of `ChestReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestReplyServerPacket: The data to serialize.
    """
    data: ChestReplyServerPacket = ChestReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._added_item_id = reader.get_short()
        data._remaining_amount = reader.get_int()
        data._weight = Weight.deserialize(reader)
        items_length = int(reader.remaining / 5)
        data._items = []
        for i in range(items_length):
            data._items.append(ThreeItem.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChestOpenServerPacket

Bases: Packet

Reply to opening a chest

Source code in src/eolib/protocol/_generated/net/server/chest_open_server_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
class ChestOpenServerPacket(Packet):
    """
    Reply to opening a chest
    """
    _byte_size: int = 0
    _coords: Coords = None # type: ignore [assignment]
    _items: list[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 items(self) -> list[ThreeItem]:
        return self._items

    @items.setter
    def items(self, items: list[ThreeItem]) -> None:
        self._items = items

    @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.
        """
        ChestOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestOpenServerPacket") -> None:
        """
        Serializes an instance of `ChestOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestOpenServerPacket): The data to serialize.
        """
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._items is None:
            raise SerializationError("items must be provided.")
        for i in range(len(data._items)):
            ThreeItem.serialize(writer, data._items[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestOpenServerPacket":
        """
        Deserializes an instance of `ChestOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestOpenServerPacket: The data to serialize.
        """
        data: ChestOpenServerPacket = ChestOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._coords = Coords.deserialize(reader)
            items_length = int(reader.remaining / 5)
            data._items = []
            for i in range(items_length):
                data._items.append(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"ChestOpenServerPacket(byte_size={repr(self._byte_size)}, coords={repr(self._coords)}, items={repr(self._items)})"

byte_size: int property

Returns the size 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

items: list[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/server/chest_open_server_packet.py
50
51
52
53
54
55
56
57
58
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/chest_open_server_packet.py
60
61
62
63
64
65
66
67
68
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/chest_open_server_packet.py
70
71
72
73
74
75
76
77
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChestOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chest_open_server_packet.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@staticmethod
def serialize(writer: EoWriter, data: "ChestOpenServerPacket") -> None:
    """
    Serializes an instance of `ChestOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestOpenServerPacket): The data to serialize.
    """
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._items is None:
        raise SerializationError("items must be provided.")
    for i in range(len(data._items)):
        ThreeItem.serialize(writer, data._items[i])

deserialize(reader) staticmethod

Deserializes an instance of ChestOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestOpenServerPacket 'ChestOpenServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chest_open_server_packet.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@staticmethod
def deserialize(reader: EoReader) -> "ChestOpenServerPacket":
    """
    Deserializes an instance of `ChestOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestOpenServerPacket: The data to serialize.
    """
    data: ChestOpenServerPacket = ChestOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._coords = Coords.deserialize(reader)
        items_length = int(reader.remaining / 5)
        data._items = []
        for i in range(items_length):
            data._items.append(ThreeItem.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChestGetServerPacket

Bases: Packet

Reply to removing an item from a chest

Source code in src/eolib/protocol/_generated/net/server/chest_get_server_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
class ChestGetServerPacket(Packet):
    """
    Reply to removing an item from a chest
    """
    _byte_size: int = 0
    _taken_item: ThreeItem = None # type: ignore [assignment]
    _weight: Weight = None # type: ignore [assignment]
    _items: list[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 taken_item(self) -> ThreeItem:
        return self._taken_item

    @taken_item.setter
    def taken_item(self, taken_item: ThreeItem) -> None:
        self._taken_item = taken_item

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @property
    def items(self) -> list[ThreeItem]:
        return self._items

    @items.setter
    def items(self, items: list[ThreeItem]) -> None:
        self._items = items

    @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.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.
        """
        ChestGetServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestGetServerPacket") -> None:
        """
        Serializes an instance of `ChestGetServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestGetServerPacket): The data to serialize.
        """
        if data._taken_item is None:
            raise SerializationError("taken_item must be provided.")
        ThreeItem.serialize(writer, data._taken_item)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)
        if data._items is None:
            raise SerializationError("items must be provided.")
        for i in range(len(data._items)):
            ThreeItem.serialize(writer, data._items[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestGetServerPacket":
        """
        Deserializes an instance of `ChestGetServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestGetServerPacket: The data to serialize.
        """
        data: ChestGetServerPacket = ChestGetServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._taken_item = ThreeItem.deserialize(reader)
            data._weight = Weight.deserialize(reader)
            items_length = int(reader.remaining / 5)
            data._items = []
            for i in range(items_length):
                data._items.append(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"ChestGetServerPacket(byte_size={repr(self._byte_size)}, taken_item={repr(self._taken_item)}, weight={repr(self._weight)}, items={repr(self._items)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

taken_item: ThreeItem property writable

weight: Weight property writable

items: list[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/server/chest_get_server_packet.py
59
60
61
62
63
64
65
66
67
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/chest_get_server_packet.py
69
70
71
72
73
74
75
76
77
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/chest_get_server_packet.py
79
80
81
82
83
84
85
86
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChestGetServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestGetServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestGetServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chest_get_server_packet.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "ChestGetServerPacket") -> None:
    """
    Serializes an instance of `ChestGetServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestGetServerPacket): The data to serialize.
    """
    if data._taken_item is None:
        raise SerializationError("taken_item must be provided.")
    ThreeItem.serialize(writer, data._taken_item)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)
    if data._items is None:
        raise SerializationError("items must be provided.")
    for i in range(len(data._items)):
        ThreeItem.serialize(writer, data._items[i])

deserialize(reader) staticmethod

Deserializes an instance of ChestGetServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestGetServerPacket 'ChestGetServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chest_get_server_packet.py
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@staticmethod
def deserialize(reader: EoReader) -> "ChestGetServerPacket":
    """
    Deserializes an instance of `ChestGetServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestGetServerPacket: The data to serialize.
    """
    data: ChestGetServerPacket = ChestGetServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._taken_item = ThreeItem.deserialize(reader)
        data._weight = Weight.deserialize(reader)
        items_length = int(reader.remaining / 5)
        data._items = []
        for i in range(items_length):
            data._items.append(ThreeItem.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChestCloseServerPacket

Bases: Packet

Reply to trying to interact with a locked or "broken" chest. The official client assumes a broken chest if the packet is under 2 bytes in length.

Source code in src/eolib/protocol/_generated/net/server/chest_close_server_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
class ChestCloseServerPacket(Packet):
    """
    Reply to trying to interact with a locked or &quot;broken&quot; chest.
    The official client assumes a broken chest if the packet is under 2 bytes in length.
    """
    _byte_size: int = 0
    _key: Optional[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 key(self) -> Optional[int]:
        """
        Sent if the player is trying to interact with a locked chest

        Note:
          - Value range is 0-64008.
        """
        return self._key

    @key.setter
    def key(self, key: Optional[int]) -> None:
        """
        Sent if the player is trying to interact with a locked chest

        Note:
          - Value range is 0-64008.
        """
        self._key = key

    @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.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.
        """
        ChestCloseServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestCloseServerPacket") -> None:
        """
        Serializes an instance of `ChestCloseServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestCloseServerPacket): The data to serialize.
        """
        reached_missing_optional = data._key is None
        if not reached_missing_optional:
            writer.add_short(cast(int, data._key))
        writer.add_string("N")

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestCloseServerPacket":
        """
        Deserializes an instance of `ChestCloseServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestCloseServerPacket: The data to serialize.
        """
        data: ChestCloseServerPacket = ChestCloseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            if reader.remaining > 0:
                data._key = reader.get_short()
            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"ChestCloseServerPacket(byte_size={repr(self._byte_size)}, key={repr(self._key)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

key: Optional[int] property writable

Sent if the player is trying to interact with a locked chest

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/server/chest_close_server_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Chest

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/chest_close_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/chest_close_server_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChestCloseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestCloseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestCloseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chest_close_server_packet.py
81
82
83
84
85
86
87
88
89
90
91
92
93
@staticmethod
def serialize(writer: EoWriter, data: "ChestCloseServerPacket") -> None:
    """
    Serializes an instance of `ChestCloseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestCloseServerPacket): The data to serialize.
    """
    reached_missing_optional = data._key is None
    if not reached_missing_optional:
        writer.add_short(cast(int, data._key))
    writer.add_string("N")

deserialize(reader) staticmethod

Deserializes an instance of ChestCloseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestCloseServerPacket ChestCloseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chest_close_server_packet.py
 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) -> "ChestCloseServerPacket":
    """
    Deserializes an instance of `ChestCloseServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestCloseServerPacket: The data to serialize.
    """
    data: ChestCloseServerPacket = ChestCloseServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        if reader.remaining > 0:
            data._key = reader.get_short()
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChestAgreeServerPacket

Bases: Packet

Chest contents updating

Source code in src/eolib/protocol/_generated/net/server/chest_agree_server_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
class ChestAgreeServerPacket(Packet):
    """
    Chest contents updating
    """
    _byte_size: int = 0
    _items: list[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 items(self) -> list[ThreeItem]:
        return self._items

    @items.setter
    def items(self, items: list[ThreeItem]) -> None:
        self._items = items

    @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.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.
        """
        ChestAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChestAgreeServerPacket") -> None:
        """
        Serializes an instance of `ChestAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChestAgreeServerPacket): The data to serialize.
        """
        if data._items is None:
            raise SerializationError("items must be provided.")
        for i in range(len(data._items)):
            ThreeItem.serialize(writer, data._items[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "ChestAgreeServerPacket":
        """
        Deserializes an instance of `ChestAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChestAgreeServerPacket: The data to serialize.
        """
        data: ChestAgreeServerPacket = ChestAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            items_length = int(reader.remaining / 5)
            data._items = []
            for i in range(items_length):
                data._items.append(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"ChestAgreeServerPacket(byte_size={repr(self._byte_size)}, items={repr(self._items)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

items: list[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/server/chest_agree_server_packet.py
40
41
42
43
44
45
46
47
48
@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/server/chest_agree_server_packet.py
50
51
52
53
54
55
56
57
58
@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/server/chest_agree_server_packet.py
60
61
62
63
64
65
66
67
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChestAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChestAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChestAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chest_agree_server_packet.py
69
70
71
72
73
74
75
76
77
78
79
80
81
@staticmethod
def serialize(writer: EoWriter, data: "ChestAgreeServerPacket") -> None:
    """
    Serializes an instance of `ChestAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChestAgreeServerPacket): The data to serialize.
    """
    if data._items is None:
        raise SerializationError("items must be provided.")
    for i in range(len(data._items)):
        ThreeItem.serialize(writer, data._items[i])

deserialize(reader) staticmethod

Deserializes an instance of ChestAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChestAgreeServerPacket 'ChestAgreeServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chest_agree_server_packet.py
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
@staticmethod
def deserialize(reader: EoReader) -> "ChestAgreeServerPacket":
    """
    Deserializes an instance of `ChestAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChestAgreeServerPacket: The data to serialize.
    """
    data: ChestAgreeServerPacket = ChestAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        items_length = int(reader.remaining / 5)
        data._items = []
        for i in range(items_length):
            data._items.append(ThreeItem.deserialize(reader))
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterSecondaryStats

The 5 secondary character stats

Source code in src/eolib/protocol/_generated/net/server/character_secondary_stats.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
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
class CharacterSecondaryStats:
    """
    The 5 secondary character stats
    """
    _byte_size: int = 0
    _min_damage: int = None # type: ignore [assignment]
    _max_damage: int = None # type: ignore [assignment]
    _accuracy: int = None # type: ignore [assignment]
    _evade: int = None # type: ignore [assignment]
    _armor: 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 min_damage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._min_damage

    @min_damage.setter
    def min_damage(self, min_damage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._min_damage = min_damage

    @property
    def max_damage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_damage

    @max_damage.setter
    def max_damage(self, max_damage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_damage = max_damage

    @property
    def accuracy(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._accuracy

    @accuracy.setter
    def accuracy(self, accuracy: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._accuracy = accuracy

    @property
    def evade(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._evade

    @evade.setter
    def evade(self, evade: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._evade = evade

    @property
    def armor(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._armor

    @armor.setter
    def armor(self, armor: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._armor = armor

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterSecondaryStats") -> None:
        """
        Serializes an instance of `CharacterSecondaryStats` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterSecondaryStats): The data to serialize.
        """
        if data._min_damage is None:
            raise SerializationError("min_damage must be provided.")
        writer.add_short(data._min_damage)
        if data._max_damage is None:
            raise SerializationError("max_damage must be provided.")
        writer.add_short(data._max_damage)
        if data._accuracy is None:
            raise SerializationError("accuracy must be provided.")
        writer.add_short(data._accuracy)
        if data._evade is None:
            raise SerializationError("evade must be provided.")
        writer.add_short(data._evade)
        if data._armor is None:
            raise SerializationError("armor must be provided.")
        writer.add_short(data._armor)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterSecondaryStats":
        """
        Deserializes an instance of `CharacterSecondaryStats` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterSecondaryStats: The data to serialize.
        """
        data: CharacterSecondaryStats = CharacterSecondaryStats()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._min_damage = reader.get_short()
            data._max_damage = reader.get_short()
            data._accuracy = reader.get_short()
            data._evade = reader.get_short()
            data._armor = 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"CharacterSecondaryStats(byte_size={repr(self._byte_size)}, min_damage={repr(self._min_damage)}, max_damage={repr(self._max_damage)}, accuracy={repr(self._accuracy)}, evade={repr(self._evade)}, armor={repr(self._armor)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

min_damage: int property writable

Note
  • Value range is 0-64008.

max_damage: int property writable

Note
  • Value range is 0-64008.

accuracy: int property writable

Note
  • Value range is 0-64008.

evade: int property writable

Note
  • Value range is 0-64008.

armor: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of CharacterSecondaryStats to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterSecondaryStats

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_secondary_stats.py
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: "CharacterSecondaryStats") -> None:
    """
    Serializes an instance of `CharacterSecondaryStats` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterSecondaryStats): The data to serialize.
    """
    if data._min_damage is None:
        raise SerializationError("min_damage must be provided.")
    writer.add_short(data._min_damage)
    if data._max_damage is None:
        raise SerializationError("max_damage must be provided.")
    writer.add_short(data._max_damage)
    if data._accuracy is None:
        raise SerializationError("accuracy must be provided.")
    writer.add_short(data._accuracy)
    if data._evade is None:
        raise SerializationError("evade must be provided.")
    writer.add_short(data._evade)
    if data._armor is None:
        raise SerializationError("armor must be provided.")
    writer.add_short(data._armor)

deserialize(reader) staticmethod

Deserializes an instance of CharacterSecondaryStats from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterSecondaryStats CharacterSecondaryStats

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_secondary_stats.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 deserialize(reader: EoReader) -> "CharacterSecondaryStats":
    """
    Deserializes an instance of `CharacterSecondaryStats` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterSecondaryStats: The data to serialize.
    """
    data: CharacterSecondaryStats = CharacterSecondaryStats()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._min_damage = reader.get_short()
        data._max_damage = reader.get_short()
        data._accuracy = reader.get_short()
        data._evade = reader.get_short()
        data._armor = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterBaseStatsWelcome

The 6 base character stats. Sent upon selecting a character and entering the game.

Source code in src/eolib/protocol/_generated/net/server/character_base_stats_welcome.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
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
class CharacterBaseStatsWelcome:
    """
    The 6 base character stats.
    Sent upon selecting a character and entering the game.
    """
    _byte_size: int = 0
    _str: int = None # type: ignore [assignment]
    _wis: int = None # type: ignore [assignment]
    _intl: int = None # type: ignore [assignment]
    _agi: int = None # type: ignore [assignment]
    _con: int = None # type: ignore [assignment]
    _cha: 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 str(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._str

    @str.setter
    def str(self, str: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._str = str

    @property
    def wis(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._wis

    @wis.setter
    def wis(self, wis: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._wis = wis

    @property
    def intl(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._intl

    @intl.setter
    def intl(self, intl: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._intl = intl

    @property
    def agi(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._agi

    @agi.setter
    def agi(self, agi: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._agi = agi

    @property
    def con(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._con

    @con.setter
    def con(self, con: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._con = con

    @property
    def cha(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._cha

    @cha.setter
    def cha(self, cha: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._cha = cha

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterBaseStatsWelcome") -> None:
        """
        Serializes an instance of `CharacterBaseStatsWelcome` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterBaseStatsWelcome): The data to serialize.
        """
        if data._str is None:
            raise SerializationError("str must be provided.")
        writer.add_short(data._str)
        if data._wis is None:
            raise SerializationError("wis must be provided.")
        writer.add_short(data._wis)
        if data._intl is None:
            raise SerializationError("intl must be provided.")
        writer.add_short(data._intl)
        if data._agi is None:
            raise SerializationError("agi must be provided.")
        writer.add_short(data._agi)
        if data._con is None:
            raise SerializationError("con must be provided.")
        writer.add_short(data._con)
        if data._cha is None:
            raise SerializationError("cha must be provided.")
        writer.add_short(data._cha)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterBaseStatsWelcome":
        """
        Deserializes an instance of `CharacterBaseStatsWelcome` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterBaseStatsWelcome: The data to serialize.
        """
        data: CharacterBaseStatsWelcome = CharacterBaseStatsWelcome()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._str = reader.get_short()
            data._wis = reader.get_short()
            data._intl = reader.get_short()
            data._agi = reader.get_short()
            data._con = reader.get_short()
            data._cha = 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"CharacterBaseStatsWelcome(byte_size={repr(self._byte_size)}, str={repr(self._str)}, wis={repr(self._wis)}, intl={repr(self._intl)}, agi={repr(self._agi)}, con={repr(self._con)}, cha={repr(self._cha)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

str: int property writable

Note
  • Value range is 0-64008.

wis: int property writable

Note
  • Value range is 0-64008.

intl: int property writable

Note
  • Value range is 0-64008.

agi: int property writable

Note
  • Value range is 0-64008.

con: int property writable

Note
  • Value range is 0-64008.

cha: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of CharacterBaseStatsWelcome to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterBaseStatsWelcome

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_base_stats_welcome.py
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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterBaseStatsWelcome") -> None:
    """
    Serializes an instance of `CharacterBaseStatsWelcome` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterBaseStatsWelcome): The data to serialize.
    """
    if data._str is None:
        raise SerializationError("str must be provided.")
    writer.add_short(data._str)
    if data._wis is None:
        raise SerializationError("wis must be provided.")
    writer.add_short(data._wis)
    if data._intl is None:
        raise SerializationError("intl must be provided.")
    writer.add_short(data._intl)
    if data._agi is None:
        raise SerializationError("agi must be provided.")
    writer.add_short(data._agi)
    if data._con is None:
        raise SerializationError("con must be provided.")
    writer.add_short(data._con)
    if data._cha is None:
        raise SerializationError("cha must be provided.")
    writer.add_short(data._cha)

deserialize(reader) staticmethod

Deserializes an instance of CharacterBaseStatsWelcome from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterBaseStatsWelcome CharacterBaseStatsWelcome

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_base_stats_welcome.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterBaseStatsWelcome":
    """
    Deserializes an instance of `CharacterBaseStatsWelcome` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterBaseStatsWelcome: The data to serialize.
    """
    data: CharacterBaseStatsWelcome = CharacterBaseStatsWelcome()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._str = reader.get_short()
        data._wis = reader.get_short()
        data._intl = reader.get_short()
        data._agi = reader.get_short()
        data._con = reader.get_short()
        data._cha = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterElementalStats

The 6 elemental character stats

Source code in src/eolib/protocol/_generated/net/server/character_elemental_stats.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
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
class CharacterElementalStats:
    """
    The 6 elemental character stats
    """
    _byte_size: int = 0
    _light: int = None # type: ignore [assignment]
    _dark: int = None # type: ignore [assignment]
    _fire: int = None # type: ignore [assignment]
    _water: int = None # type: ignore [assignment]
    _earth: int = None # type: ignore [assignment]
    _wind: 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 light(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._light

    @light.setter
    def light(self, light: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._light = light

    @property
    def dark(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._dark

    @dark.setter
    def dark(self, dark: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._dark = dark

    @property
    def fire(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._fire

    @fire.setter
    def fire(self, fire: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._fire = fire

    @property
    def water(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._water

    @water.setter
    def water(self, water: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._water = water

    @property
    def earth(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._earth

    @earth.setter
    def earth(self, earth: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._earth = earth

    @property
    def wind(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._wind

    @wind.setter
    def wind(self, wind: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._wind = wind

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterElementalStats") -> None:
        """
        Serializes an instance of `CharacterElementalStats` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterElementalStats): The data to serialize.
        """
        if data._light is None:
            raise SerializationError("light must be provided.")
        writer.add_short(data._light)
        if data._dark is None:
            raise SerializationError("dark must be provided.")
        writer.add_short(data._dark)
        if data._fire is None:
            raise SerializationError("fire must be provided.")
        writer.add_short(data._fire)
        if data._water is None:
            raise SerializationError("water must be provided.")
        writer.add_short(data._water)
        if data._earth is None:
            raise SerializationError("earth must be provided.")
        writer.add_short(data._earth)
        if data._wind is None:
            raise SerializationError("wind must be provided.")
        writer.add_short(data._wind)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterElementalStats":
        """
        Deserializes an instance of `CharacterElementalStats` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterElementalStats: The data to serialize.
        """
        data: CharacterElementalStats = CharacterElementalStats()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._light = reader.get_short()
            data._dark = reader.get_short()
            data._fire = reader.get_short()
            data._water = reader.get_short()
            data._earth = reader.get_short()
            data._wind = 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"CharacterElementalStats(byte_size={repr(self._byte_size)}, light={repr(self._light)}, dark={repr(self._dark)}, fire={repr(self._fire)}, water={repr(self._water)}, earth={repr(self._earth)}, wind={repr(self._wind)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

light: int property writable

Note
  • Value range is 0-64008.

dark: int property writable

Note
  • Value range is 0-64008.

fire: int property writable

Note
  • Value range is 0-64008.

water: int property writable

Note
  • Value range is 0-64008.

earth: int property writable

Note
  • Value range is 0-64008.

wind: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of CharacterElementalStats to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterElementalStats

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_elemental_stats.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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterElementalStats") -> None:
    """
    Serializes an instance of `CharacterElementalStats` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterElementalStats): The data to serialize.
    """
    if data._light is None:
        raise SerializationError("light must be provided.")
    writer.add_short(data._light)
    if data._dark is None:
        raise SerializationError("dark must be provided.")
    writer.add_short(data._dark)
    if data._fire is None:
        raise SerializationError("fire must be provided.")
    writer.add_short(data._fire)
    if data._water is None:
        raise SerializationError("water must be provided.")
    writer.add_short(data._water)
    if data._earth is None:
        raise SerializationError("earth must be provided.")
    writer.add_short(data._earth)
    if data._wind is None:
        raise SerializationError("wind must be provided.")
    writer.add_short(data._wind)

deserialize(reader) staticmethod

Deserializes an instance of CharacterElementalStats from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterElementalStats CharacterElementalStats

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_elemental_stats.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterElementalStats":
    """
    Deserializes an instance of `CharacterElementalStats` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterElementalStats: The data to serialize.
    """
    data: CharacterElementalStats = CharacterElementalStats()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._light = reader.get_short()
        data._dark = reader.get_short()
        data._fire = reader.get_short()
        data._water = reader.get_short()
        data._earth = reader.get_short()
        data._wind = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterStatsInfoLookup

Character stats data. Sent with character info lookups.

Source code in src/eolib/protocol/_generated/net/server/character_stats_info_lookup.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
class CharacterStatsInfoLookup:
    """
    Character stats data.
    Sent with character info lookups.
    """
    _byte_size: int = 0
    _hp: int = None # type: ignore [assignment]
    _max_hp: int = None # type: ignore [assignment]
    _tp: int = None # type: ignore [assignment]
    _max_tp: int = None # type: ignore [assignment]
    _base_stats: CharacterBaseStats = None # type: ignore [assignment]
    _secondary_stats: CharacterSecondaryStats = None # type: ignore [assignment]
    _elemental_stats: CharacterElementalStats = 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 hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp

    @hp.setter
    def hp(self, hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp = hp

    @property
    def max_hp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_hp

    @max_hp.setter
    def max_hp(self, max_hp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_hp = max_hp

    @property
    def tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._tp

    @tp.setter
    def tp(self, tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._tp = tp

    @property
    def max_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_tp

    @max_tp.setter
    def max_tp(self, max_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_tp = max_tp

    @property
    def base_stats(self) -> CharacterBaseStats:
        return self._base_stats

    @base_stats.setter
    def base_stats(self, base_stats: CharacterBaseStats) -> None:
        self._base_stats = base_stats

    @property
    def secondary_stats(self) -> CharacterSecondaryStats:
        return self._secondary_stats

    @secondary_stats.setter
    def secondary_stats(self, secondary_stats: CharacterSecondaryStats) -> None:
        self._secondary_stats = secondary_stats

    @property
    def elemental_stats(self) -> CharacterElementalStats:
        return self._elemental_stats

    @elemental_stats.setter
    def elemental_stats(self, elemental_stats: CharacterElementalStats) -> None:
        self._elemental_stats = elemental_stats

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterStatsInfoLookup") -> None:
        """
        Serializes an instance of `CharacterStatsInfoLookup` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterStatsInfoLookup): The data to serialize.
        """
        if data._hp is None:
            raise SerializationError("hp must be provided.")
        writer.add_short(data._hp)
        if data._max_hp is None:
            raise SerializationError("max_hp must be provided.")
        writer.add_short(data._max_hp)
        if data._tp is None:
            raise SerializationError("tp must be provided.")
        writer.add_short(data._tp)
        if data._max_tp is None:
            raise SerializationError("max_tp must be provided.")
        writer.add_short(data._max_tp)
        if data._base_stats is None:
            raise SerializationError("base_stats must be provided.")
        CharacterBaseStats.serialize(writer, data._base_stats)
        if data._secondary_stats is None:
            raise SerializationError("secondary_stats must be provided.")
        CharacterSecondaryStats.serialize(writer, data._secondary_stats)
        if data._elemental_stats is None:
            raise SerializationError("elemental_stats must be provided.")
        CharacterElementalStats.serialize(writer, data._elemental_stats)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterStatsInfoLookup":
        """
        Deserializes an instance of `CharacterStatsInfoLookup` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterStatsInfoLookup: The data to serialize.
        """
        data: CharacterStatsInfoLookup = CharacterStatsInfoLookup()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._hp = reader.get_short()
            data._max_hp = reader.get_short()
            data._tp = reader.get_short()
            data._max_tp = reader.get_short()
            data._base_stats = CharacterBaseStats.deserialize(reader)
            data._secondary_stats = CharacterSecondaryStats.deserialize(reader)
            data._elemental_stats = CharacterElementalStats.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"CharacterStatsInfoLookup(byte_size={repr(self._byte_size)}, hp={repr(self._hp)}, max_hp={repr(self._max_hp)}, tp={repr(self._tp)}, max_tp={repr(self._max_tp)}, base_stats={repr(self._base_stats)}, secondary_stats={repr(self._secondary_stats)}, elemental_stats={repr(self._elemental_stats)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

hp: int property writable

Note
  • Value range is 0-64008.

max_hp: int property writable

Note
  • Value range is 0-64008.

tp: int property writable

Note
  • Value range is 0-64008.

max_tp: int property writable

Note
  • Value range is 0-64008.

base_stats: CharacterBaseStats property writable

secondary_stats: CharacterSecondaryStats property writable

elemental_stats: CharacterElementalStats property writable

serialize(writer, data) staticmethod

Serializes an instance of CharacterStatsInfoLookup to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterStatsInfoLookup

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_stats_info_lookup.py
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
@staticmethod
def serialize(writer: EoWriter, data: "CharacterStatsInfoLookup") -> None:
    """
    Serializes an instance of `CharacterStatsInfoLookup` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterStatsInfoLookup): The data to serialize.
    """
    if data._hp is None:
        raise SerializationError("hp must be provided.")
    writer.add_short(data._hp)
    if data._max_hp is None:
        raise SerializationError("max_hp must be provided.")
    writer.add_short(data._max_hp)
    if data._tp is None:
        raise SerializationError("tp must be provided.")
    writer.add_short(data._tp)
    if data._max_tp is None:
        raise SerializationError("max_tp must be provided.")
    writer.add_short(data._max_tp)
    if data._base_stats is None:
        raise SerializationError("base_stats must be provided.")
    CharacterBaseStats.serialize(writer, data._base_stats)
    if data._secondary_stats is None:
        raise SerializationError("secondary_stats must be provided.")
    CharacterSecondaryStats.serialize(writer, data._secondary_stats)
    if data._elemental_stats is None:
        raise SerializationError("elemental_stats must be provided.")
    CharacterElementalStats.serialize(writer, data._elemental_stats)

deserialize(reader) staticmethod

Deserializes an instance of CharacterStatsInfoLookup from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterStatsInfoLookup CharacterStatsInfoLookup

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_stats_info_lookup.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterStatsInfoLookup":
    """
    Deserializes an instance of `CharacterStatsInfoLookup` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterStatsInfoLookup: The data to serialize.
    """
    data: CharacterStatsInfoLookup = CharacterStatsInfoLookup()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._hp = reader.get_short()
        data._max_hp = reader.get_short()
        data._tp = reader.get_short()
        data._max_tp = reader.get_short()
        data._base_stats = CharacterBaseStats.deserialize(reader)
        data._secondary_stats = CharacterSecondaryStats.deserialize(reader)
        data._elemental_stats = CharacterElementalStats.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterSecondaryStatsInfoLookup

The 5 secondary character stats. Sent with character info lookups.

Source code in src/eolib/protocol/_generated/net/server/character_secondary_stats_info_lookup.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
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
class CharacterSecondaryStatsInfoLookup:
    """
    The 5 secondary character stats.
    Sent with character info lookups.
    """
    _byte_size: int = 0
    _max_damage: int = None # type: ignore [assignment]
    _min_damage: int = None # type: ignore [assignment]
    _accuracy: int = None # type: ignore [assignment]
    _evade: int = None # type: ignore [assignment]
    _armor: 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 max_damage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._max_damage

    @max_damage.setter
    def max_damage(self, max_damage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._max_damage = max_damage

    @property
    def min_damage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._min_damage

    @min_damage.setter
    def min_damage(self, min_damage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._min_damage = min_damage

    @property
    def accuracy(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._accuracy

    @accuracy.setter
    def accuracy(self, accuracy: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._accuracy = accuracy

    @property
    def evade(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._evade

    @evade.setter
    def evade(self, evade: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._evade = evade

    @property
    def armor(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._armor

    @armor.setter
    def armor(self, armor: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._armor = armor

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterSecondaryStatsInfoLookup") -> None:
        """
        Serializes an instance of `CharacterSecondaryStatsInfoLookup` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterSecondaryStatsInfoLookup): The data to serialize.
        """
        if data._max_damage is None:
            raise SerializationError("max_damage must be provided.")
        writer.add_short(data._max_damage)
        if data._min_damage is None:
            raise SerializationError("min_damage must be provided.")
        writer.add_short(data._min_damage)
        if data._accuracy is None:
            raise SerializationError("accuracy must be provided.")
        writer.add_short(data._accuracy)
        if data._evade is None:
            raise SerializationError("evade must be provided.")
        writer.add_short(data._evade)
        if data._armor is None:
            raise SerializationError("armor must be provided.")
        writer.add_short(data._armor)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterSecondaryStatsInfoLookup":
        """
        Deserializes an instance of `CharacterSecondaryStatsInfoLookup` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterSecondaryStatsInfoLookup: The data to serialize.
        """
        data: CharacterSecondaryStatsInfoLookup = CharacterSecondaryStatsInfoLookup()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._max_damage = reader.get_short()
            data._min_damage = reader.get_short()
            data._accuracy = reader.get_short()
            data._evade = reader.get_short()
            data._armor = 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"CharacterSecondaryStatsInfoLookup(byte_size={repr(self._byte_size)}, max_damage={repr(self._max_damage)}, min_damage={repr(self._min_damage)}, accuracy={repr(self._accuracy)}, evade={repr(self._evade)}, armor={repr(self._armor)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

max_damage: int property writable

Note
  • Value range is 0-64008.

min_damage: int property writable

Note
  • Value range is 0-64008.

accuracy: int property writable

Note
  • Value range is 0-64008.

evade: int property writable

Note
  • Value range is 0-64008.

armor: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of CharacterSecondaryStatsInfoLookup to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterSecondaryStatsInfoLookup

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_secondary_stats_info_lookup.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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterSecondaryStatsInfoLookup") -> None:
    """
    Serializes an instance of `CharacterSecondaryStatsInfoLookup` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterSecondaryStatsInfoLookup): The data to serialize.
    """
    if data._max_damage is None:
        raise SerializationError("max_damage must be provided.")
    writer.add_short(data._max_damage)
    if data._min_damage is None:
        raise SerializationError("min_damage must be provided.")
    writer.add_short(data._min_damage)
    if data._accuracy is None:
        raise SerializationError("accuracy must be provided.")
    writer.add_short(data._accuracy)
    if data._evade is None:
        raise SerializationError("evade must be provided.")
    writer.add_short(data._evade)
    if data._armor is None:
        raise SerializationError("armor must be provided.")
    writer.add_short(data._armor)

deserialize(reader) staticmethod

Deserializes an instance of CharacterSecondaryStatsInfoLookup from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterSecondaryStatsInfoLookup CharacterSecondaryStatsInfoLookup

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_secondary_stats_info_lookup.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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterSecondaryStatsInfoLookup":
    """
    Deserializes an instance of `CharacterSecondaryStatsInfoLookup` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterSecondaryStatsInfoLookup: The data to serialize.
    """
    data: CharacterSecondaryStatsInfoLookup = CharacterSecondaryStatsInfoLookup()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._max_damage = reader.get_short()
        data._min_damage = reader.get_short()
        data._accuracy = reader.get_short()
        data._evade = reader.get_short()
        data._armor = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharacterReply

Bases: IntEnum

Reply code sent with CHARACTER_REPLY packet

Source code in src/eolib/protocol/_generated/net/server/character_reply.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class CharacterReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with CHARACTER_REPLY packet
    """
    Exists = 1
    Full = 2
    """
    Only sent in reply to Character_Create packets.
    Displays the same message as CharacterReply.Full3 in the official client.
    """
    Full3 = 3
    """
    Only sent in reply to Character_Request packets.
    Displays the same message as CharacterReply.Full in the official client.
    """
    NotApproved = 4
    Ok = 5
    Deleted = 6

Exists = 1 class-attribute instance-attribute

Full = 2 class-attribute instance-attribute

Only sent in reply to Character_Create packets. Displays the same message as CharacterReply.Full3 in the official client.

Full3 = 3 class-attribute instance-attribute

Only sent in reply to Character_Request packets. Displays the same message as CharacterReply.Full in the official client.

NotApproved = 4 class-attribute instance-attribute

Ok = 5 class-attribute instance-attribute

Deleted = 6 class-attribute instance-attribute

CharacterReplyServerPacket

Bases: Packet

Reply to client Character-family packets

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
class CharacterReplyServerPacket(Packet):
    """
    Reply to client Character-family packets
    """
    _byte_size: int = 0
    _reply_code: CharacterReply = None # type: ignore [assignment]
    _reply_code_data: 'CharacterReplyServerPacket.ReplyCodeData' = 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 reply_code(self) -> CharacterReply:
        """
        Sometimes a CharacterReply code, sometimes a session ID for character creation
        """
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: CharacterReply) -> None:
        """
        Sometimes a CharacterReply code, sometimes a session ID for character creation
        """
        self._reply_code = reply_code

    @property
    def reply_code_data(self) -> 'CharacterReplyServerPacket.ReplyCodeData':
        """
        CharacterReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the `reply_code` field.
        """
        return self._reply_code_data

    @reply_code_data.setter
    def reply_code_data(self, reply_code_data: 'CharacterReplyServerPacket.ReplyCodeData') -> None:
        self._reply_code_data = reply_code_data

    @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.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.
        """
        CharacterReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterReplyServerPacket") -> None:
        """
        Serializes an instance of `CharacterReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_short(int(data._reply_code))
        if data._reply_code == 0:
            if data._reply_code_data is not None:
                raise SerializationError("Expected reply_code_data to be None for reply_code " + CharacterReply(data._reply_code).name + ".")
        elif data._reply_code == CharacterReply.Exists:
            if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataExists):
                raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataExists for reply_code " + CharacterReply(data._reply_code).name + ".")
            CharacterReplyServerPacket.ReplyCodeDataExists.serialize(writer, data._reply_code_data)
        elif data._reply_code == CharacterReply.Full:
            if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataFull):
                raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataFull for reply_code " + CharacterReply(data._reply_code).name + ".")
            CharacterReplyServerPacket.ReplyCodeDataFull.serialize(writer, data._reply_code_data)
        elif data._reply_code == CharacterReply.Full3:
            if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataFull3):
                raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataFull3 for reply_code " + CharacterReply(data._reply_code).name + ".")
            CharacterReplyServerPacket.ReplyCodeDataFull3.serialize(writer, data._reply_code_data)
        elif data._reply_code == CharacterReply.NotApproved:
            if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataNotApproved):
                raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataNotApproved for reply_code " + CharacterReply(data._reply_code).name + ".")
            CharacterReplyServerPacket.ReplyCodeDataNotApproved.serialize(writer, data._reply_code_data)
        elif data._reply_code == CharacterReply.Ok:
            if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataOk):
                raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataOk for reply_code " + CharacterReply(data._reply_code).name + ".")
            CharacterReplyServerPacket.ReplyCodeDataOk.serialize(writer, data._reply_code_data)
        elif data._reply_code == CharacterReply.Deleted:
            if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataDeleted):
                raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataDeleted for reply_code " + CharacterReply(data._reply_code).name + ".")
            CharacterReplyServerPacket.ReplyCodeDataDeleted.serialize(writer, data._reply_code_data)
        elif data._reply_code == 7:
            if data._reply_code_data is not None:
                raise SerializationError("Expected reply_code_data to be None for reply_code " + CharacterReply(data._reply_code).name + ".")
        elif data._reply_code == 8:
            if data._reply_code_data is not None:
                raise SerializationError("Expected reply_code_data to be None for reply_code " + CharacterReply(data._reply_code).name + ".")
        elif data._reply_code == 9:
            if data._reply_code_data is not None:
                raise SerializationError("Expected reply_code_data to be None for reply_code " + CharacterReply(data._reply_code).name + ".")
        else:
            if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataDefault):
                raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataDefault for reply_code " + CharacterReply(data._reply_code).name + ".")
            CharacterReplyServerPacket.ReplyCodeDataDefault.serialize(writer, data._reply_code_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterReplyServerPacket":
        """
        Deserializes an instance of `CharacterReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterReplyServerPacket: The data to serialize.
        """
        data: CharacterReplyServerPacket = CharacterReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._reply_code = CharacterReply(reader.get_short())
            if data._reply_code == 0:
                data._reply_code_data = None
            elif data._reply_code == CharacterReply.Exists:
                data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataExists.deserialize(reader)
            elif data._reply_code == CharacterReply.Full:
                data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataFull.deserialize(reader)
            elif data._reply_code == CharacterReply.Full3:
                data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataFull3.deserialize(reader)
            elif data._reply_code == CharacterReply.NotApproved:
                data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataNotApproved.deserialize(reader)
            elif data._reply_code == CharacterReply.Ok:
                data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataOk.deserialize(reader)
            elif data._reply_code == CharacterReply.Deleted:
                data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataDeleted.deserialize(reader)
            elif data._reply_code == 7:
                data._reply_code_data = None
            elif data._reply_code == 8:
                data._reply_code_data = None
            elif data._reply_code == 9:
                data._reply_code_data = None
            else:
                data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataDefault.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"CharacterReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, reply_code_data={repr(self._reply_code_data)})"

    ReplyCodeData = Union['CharacterReplyServerPacket.ReplyCodeDataExists', 'CharacterReplyServerPacket.ReplyCodeDataFull', 'CharacterReplyServerPacket.ReplyCodeDataFull3', 'CharacterReplyServerPacket.ReplyCodeDataNotApproved', 'CharacterReplyServerPacket.ReplyCodeDataOk', 'CharacterReplyServerPacket.ReplyCodeDataDeleted', 'CharacterReplyServerPacket.ReplyCodeDataDefault', None]
    ReplyCodeData.__doc__ = \
        """
        Data associated with different values of the `reply_code` field.
        """

    class ReplyCodeDataExists:
        """
        Data associated with reply_code value CharacterReply.Exists
        """
        _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataExists") -> None:
            """
            Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataExists` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (CharacterReplyServerPacket.ReplyCodeDataExists): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataExists":
            """
            Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataExists` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                CharacterReplyServerPacket.ReplyCodeDataExists: The data to serialize.
            """
            data: CharacterReplyServerPacket.ReplyCodeDataExists = CharacterReplyServerPacket.ReplyCodeDataExists()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataExists(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataFull:
        """
        Data associated with reply_code value CharacterReply.Full
        """
        _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataFull") -> None:
            """
            Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (CharacterReplyServerPacket.ReplyCodeDataFull): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataFull":
            """
            Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                CharacterReplyServerPacket.ReplyCodeDataFull: The data to serialize.
            """
            data: CharacterReplyServerPacket.ReplyCodeDataFull = CharacterReplyServerPacket.ReplyCodeDataFull()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataFull(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataFull3:
        """
        Data associated with reply_code value CharacterReply.Full3
        """
        _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataFull3") -> None:
            """
            Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull3` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (CharacterReplyServerPacket.ReplyCodeDataFull3): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataFull3":
            """
            Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull3` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                CharacterReplyServerPacket.ReplyCodeDataFull3: The data to serialize.
            """
            data: CharacterReplyServerPacket.ReplyCodeDataFull3 = CharacterReplyServerPacket.ReplyCodeDataFull3()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataFull3(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataNotApproved:
        """
        Data associated with reply_code value CharacterReply.NotApproved
        """
        _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataNotApproved") -> None:
            """
            Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataNotApproved` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (CharacterReplyServerPacket.ReplyCodeDataNotApproved): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataNotApproved":
            """
            Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataNotApproved` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                CharacterReplyServerPacket.ReplyCodeDataNotApproved: The data to serialize.
            """
            data: CharacterReplyServerPacket.ReplyCodeDataNotApproved = CharacterReplyServerPacket.ReplyCodeDataNotApproved()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataNotApproved(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataOk:
        """
        Data associated with reply_code value CharacterReply.Ok
        """
        _byte_size: int = 0
        _characters_count: int = None # type: ignore [assignment]
        _characters: list[CharacterSelectionListEntry] = 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 characters(self) -> list[CharacterSelectionListEntry]:
            """
            Note:
              - Length must be 252 or less.
            """
            return self._characters

        @characters.setter
        def characters(self, characters: list[CharacterSelectionListEntry]) -> None:
            """
            Note:
              - Length must be 252 or less.
            """
            self._characters = characters
            self._characters_count = len(self._characters)

        @staticmethod
        def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataOk") -> None:
            """
            Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (CharacterReplyServerPacket.ReplyCodeDataOk): The data to serialize.
            """
            if data._characters_count is None:
                raise SerializationError("characters_count must be provided.")
            writer.add_char(data._characters_count)
            writer.add_char(0)
            writer.add_byte(0xFF)
            if data._characters is None:
                raise SerializationError("characters must be provided.")
            if len(data._characters) > 252:
                raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
            for i in range(data._characters_count):
                if i > 0:
                    writer.add_byte(0xFF)
                CharacterSelectionListEntry.serialize(writer, data._characters[i])

        @staticmethod
        def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataOk":
            """
            Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                CharacterReplyServerPacket.ReplyCodeDataOk: The data to serialize.
            """
            data: CharacterReplyServerPacket.ReplyCodeDataOk = CharacterReplyServerPacket.ReplyCodeDataOk()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._characters_count = reader.get_char()
                reader.get_char()
                reader.next_chunk()
                data._characters = []
                for i in range(data._characters_count):
                    data._characters.append(CharacterSelectionListEntry.deserialize(reader))
                    if i + 1 < data._characters_count:
                        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"CharacterReplyServerPacket.ReplyCodeDataOk(byte_size={repr(self._byte_size)}, characters={repr(self._characters)})"

    class ReplyCodeDataDeleted:
        """
        Data associated with reply_code value CharacterReply.Deleted
        """
        _byte_size: int = 0
        _characters_count: int = None # type: ignore [assignment]
        _characters: list[CharacterSelectionListEntry] = 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 characters(self) -> list[CharacterSelectionListEntry]:
            """
            Note:
              - Length must be 252 or less.
            """
            return self._characters

        @characters.setter
        def characters(self, characters: list[CharacterSelectionListEntry]) -> None:
            """
            Note:
              - Length must be 252 or less.
            """
            self._characters = characters
            self._characters_count = len(self._characters)

        @staticmethod
        def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataDeleted") -> None:
            """
            Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDeleted` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (CharacterReplyServerPacket.ReplyCodeDataDeleted): The data to serialize.
            """
            if data._characters_count is None:
                raise SerializationError("characters_count must be provided.")
            writer.add_char(data._characters_count)
            writer.add_byte(0xFF)
            if data._characters is None:
                raise SerializationError("characters must be provided.")
            if len(data._characters) > 252:
                raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
            for i in range(data._characters_count):
                if i > 0:
                    writer.add_byte(0xFF)
                CharacterSelectionListEntry.serialize(writer, data._characters[i])

        @staticmethod
        def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataDeleted":
            """
            Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDeleted` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                CharacterReplyServerPacket.ReplyCodeDataDeleted: The data to serialize.
            """
            data: CharacterReplyServerPacket.ReplyCodeDataDeleted = CharacterReplyServerPacket.ReplyCodeDataDeleted()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._characters_count = reader.get_char()
                reader.next_chunk()
                data._characters = []
                for i in range(data._characters_count):
                    data._characters.append(CharacterSelectionListEntry.deserialize(reader))
                    if i + 1 < data._characters_count:
                        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"CharacterReplyServerPacket.ReplyCodeDataDeleted(byte_size={repr(self._byte_size)}, characters={repr(self._characters)})"

    class ReplyCodeDataDefault:
        """
        Default data associated with reply_code

        In this case (reply_code &gt; 9), reply_code is a session ID for character creation
        """
        _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataDefault") -> None:
            """
            Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDefault` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (CharacterReplyServerPacket.ReplyCodeDataDefault): The data to serialize.
            """
            writer.add_string("OK")

        @staticmethod
        def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataDefault":
            """
            Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDefault` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                CharacterReplyServerPacket.ReplyCodeDataDefault: The data to serialize.
            """
            data: CharacterReplyServerPacket.ReplyCodeDataDefault = CharacterReplyServerPacket.ReplyCodeDataDefault()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataDefault(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.

reply_code: CharacterReply property writable

Sometimes a CharacterReply code, sometimes a session ID for character creation

reply_code_data: 'CharacterReplyServerPacket.ReplyCodeData' property writable

CharacterReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the reply_code field.

ReplyCodeData = Union['CharacterReplyServerPacket.ReplyCodeDataExists', 'CharacterReplyServerPacket.ReplyCodeDataFull', 'CharacterReplyServerPacket.ReplyCodeDataFull3', 'CharacterReplyServerPacket.ReplyCodeDataNotApproved', 'CharacterReplyServerPacket.ReplyCodeDataOk', 'CharacterReplyServerPacket.ReplyCodeDataDeleted', 'CharacterReplyServerPacket.ReplyCodeDataDefault', None] class-attribute instance-attribute

ReplyCodeDataExists

Data associated with reply_code value CharacterReply.Exists

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
class ReplyCodeDataExists:
    """
    Data associated with reply_code value CharacterReply.Exists
    """
    _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataExists") -> None:
        """
        Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataExists` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterReplyServerPacket.ReplyCodeDataExists): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataExists":
        """
        Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataExists` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterReplyServerPacket.ReplyCodeDataExists: The data to serialize.
        """
        data: CharacterReplyServerPacket.ReplyCodeDataExists = CharacterReplyServerPacket.ReplyCodeDataExists()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataExists(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.

serialize(writer, data) staticmethod

Serializes an instance of CharacterReplyServerPacket.ReplyCodeDataExists to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataExists

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
213
214
215
216
217
218
219
220
221
222
@staticmethod
def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataExists") -> None:
    """
    Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataExists` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterReplyServerPacket.ReplyCodeDataExists): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of CharacterReplyServerPacket.ReplyCodeDataExists from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'CharacterReplyServerPacket.ReplyCodeDataExists'

CharacterReplyServerPacket.ReplyCodeDataExists: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
@staticmethod
def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataExists":
    """
    Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataExists` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterReplyServerPacket.ReplyCodeDataExists: The data to serialize.
    """
    data: CharacterReplyServerPacket.ReplyCodeDataExists = CharacterReplyServerPacket.ReplyCodeDataExists()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataFull

Data associated with reply_code value CharacterReply.Full

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
class ReplyCodeDataFull:
    """
    Data associated with reply_code value CharacterReply.Full
    """
    _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataFull") -> None:
        """
        Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterReplyServerPacket.ReplyCodeDataFull): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataFull":
        """
        Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterReplyServerPacket.ReplyCodeDataFull: The data to serialize.
        """
        data: CharacterReplyServerPacket.ReplyCodeDataFull = CharacterReplyServerPacket.ReplyCodeDataFull()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataFull(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.

serialize(writer, data) staticmethod

Serializes an instance of CharacterReplyServerPacket.ReplyCodeDataFull to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataFull

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
265
266
267
268
269
270
271
272
273
274
@staticmethod
def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataFull") -> None:
    """
    Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterReplyServerPacket.ReplyCodeDataFull): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of CharacterReplyServerPacket.ReplyCodeDataFull from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'CharacterReplyServerPacket.ReplyCodeDataFull'

CharacterReplyServerPacket.ReplyCodeDataFull: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
@staticmethod
def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataFull":
    """
    Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterReplyServerPacket.ReplyCodeDataFull: The data to serialize.
    """
    data: CharacterReplyServerPacket.ReplyCodeDataFull = CharacterReplyServerPacket.ReplyCodeDataFull()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataFull3

Data associated with reply_code value CharacterReply.Full3

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
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
class ReplyCodeDataFull3:
    """
    Data associated with reply_code value CharacterReply.Full3
    """
    _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataFull3") -> None:
        """
        Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull3` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterReplyServerPacket.ReplyCodeDataFull3): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataFull3":
        """
        Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull3` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterReplyServerPacket.ReplyCodeDataFull3: The data to serialize.
        """
        data: CharacterReplyServerPacket.ReplyCodeDataFull3 = CharacterReplyServerPacket.ReplyCodeDataFull3()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataFull3(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.

serialize(writer, data) staticmethod

Serializes an instance of CharacterReplyServerPacket.ReplyCodeDataFull3 to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataFull3

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
317
318
319
320
321
322
323
324
325
326
@staticmethod
def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataFull3") -> None:
    """
    Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull3` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterReplyServerPacket.ReplyCodeDataFull3): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of CharacterReplyServerPacket.ReplyCodeDataFull3 from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'CharacterReplyServerPacket.ReplyCodeDataFull3'

CharacterReplyServerPacket.ReplyCodeDataFull3: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
@staticmethod
def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataFull3":
    """
    Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataFull3` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterReplyServerPacket.ReplyCodeDataFull3: The data to serialize.
    """
    data: CharacterReplyServerPacket.ReplyCodeDataFull3 = CharacterReplyServerPacket.ReplyCodeDataFull3()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataNotApproved

Data associated with reply_code value CharacterReply.NotApproved

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
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
class ReplyCodeDataNotApproved:
    """
    Data associated with reply_code value CharacterReply.NotApproved
    """
    _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataNotApproved") -> None:
        """
        Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataNotApproved` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterReplyServerPacket.ReplyCodeDataNotApproved): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataNotApproved":
        """
        Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataNotApproved` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterReplyServerPacket.ReplyCodeDataNotApproved: The data to serialize.
        """
        data: CharacterReplyServerPacket.ReplyCodeDataNotApproved = CharacterReplyServerPacket.ReplyCodeDataNotApproved()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataNotApproved(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.

serialize(writer, data) staticmethod

Serializes an instance of CharacterReplyServerPacket.ReplyCodeDataNotApproved to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataNotApproved

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
369
370
371
372
373
374
375
376
377
378
@staticmethod
def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataNotApproved") -> None:
    """
    Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataNotApproved` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterReplyServerPacket.ReplyCodeDataNotApproved): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of CharacterReplyServerPacket.ReplyCodeDataNotApproved from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'CharacterReplyServerPacket.ReplyCodeDataNotApproved'

CharacterReplyServerPacket.ReplyCodeDataNotApproved: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
@staticmethod
def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataNotApproved":
    """
    Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataNotApproved` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterReplyServerPacket.ReplyCodeDataNotApproved: The data to serialize.
    """
    data: CharacterReplyServerPacket.ReplyCodeDataNotApproved = CharacterReplyServerPacket.ReplyCodeDataNotApproved()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataOk

Data associated with reply_code value CharacterReply.Ok

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
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
class ReplyCodeDataOk:
    """
    Data associated with reply_code value CharacterReply.Ok
    """
    _byte_size: int = 0
    _characters_count: int = None # type: ignore [assignment]
    _characters: list[CharacterSelectionListEntry] = 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 characters(self) -> list[CharacterSelectionListEntry]:
        """
        Note:
          - Length must be 252 or less.
        """
        return self._characters

    @characters.setter
    def characters(self, characters: list[CharacterSelectionListEntry]) -> None:
        """
        Note:
          - Length must be 252 or less.
        """
        self._characters = characters
        self._characters_count = len(self._characters)

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataOk") -> None:
        """
        Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterReplyServerPacket.ReplyCodeDataOk): The data to serialize.
        """
        if data._characters_count is None:
            raise SerializationError("characters_count must be provided.")
        writer.add_char(data._characters_count)
        writer.add_char(0)
        writer.add_byte(0xFF)
        if data._characters is None:
            raise SerializationError("characters must be provided.")
        if len(data._characters) > 252:
            raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
        for i in range(data._characters_count):
            if i > 0:
                writer.add_byte(0xFF)
            CharacterSelectionListEntry.serialize(writer, data._characters[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataOk":
        """
        Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterReplyServerPacket.ReplyCodeDataOk: The data to serialize.
        """
        data: CharacterReplyServerPacket.ReplyCodeDataOk = CharacterReplyServerPacket.ReplyCodeDataOk()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._characters_count = reader.get_char()
            reader.get_char()
            reader.next_chunk()
            data._characters = []
            for i in range(data._characters_count):
                data._characters.append(CharacterSelectionListEntry.deserialize(reader))
                if i + 1 < data._characters_count:
                    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"CharacterReplyServerPacket.ReplyCodeDataOk(byte_size={repr(self._byte_size)}, characters={repr(self._characters)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

characters: list[CharacterSelectionListEntry] property writable

Note
  • Length must be 252 or less.

serialize(writer, data) staticmethod

Serializes an instance of CharacterReplyServerPacket.ReplyCodeDataOk to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataOk

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
@staticmethod
def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataOk") -> None:
    """
    Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataOk` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterReplyServerPacket.ReplyCodeDataOk): The data to serialize.
    """
    if data._characters_count is None:
        raise SerializationError("characters_count must be provided.")
    writer.add_char(data._characters_count)
    writer.add_char(0)
    writer.add_byte(0xFF)
    if data._characters is None:
        raise SerializationError("characters must be provided.")
    if len(data._characters) > 252:
        raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
    for i in range(data._characters_count):
        if i > 0:
            writer.add_byte(0xFF)
        CharacterSelectionListEntry.serialize(writer, data._characters[i])

deserialize(reader) staticmethod

Deserializes an instance of CharacterReplyServerPacket.ReplyCodeDataOk from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'CharacterReplyServerPacket.ReplyCodeDataOk'

CharacterReplyServerPacket.ReplyCodeDataOk: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataOk":
    """
    Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataOk` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterReplyServerPacket.ReplyCodeDataOk: The data to serialize.
    """
    data: CharacterReplyServerPacket.ReplyCodeDataOk = CharacterReplyServerPacket.ReplyCodeDataOk()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._characters_count = reader.get_char()
        reader.get_char()
        reader.next_chunk()
        data._characters = []
        for i in range(data._characters_count):
            data._characters.append(CharacterSelectionListEntry.deserialize(reader))
            if i + 1 < data._characters_count:
                reader.next_chunk()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataDeleted

Data associated with reply_code value CharacterReply.Deleted

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
class ReplyCodeDataDeleted:
    """
    Data associated with reply_code value CharacterReply.Deleted
    """
    _byte_size: int = 0
    _characters_count: int = None # type: ignore [assignment]
    _characters: list[CharacterSelectionListEntry] = 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 characters(self) -> list[CharacterSelectionListEntry]:
        """
        Note:
          - Length must be 252 or less.
        """
        return self._characters

    @characters.setter
    def characters(self, characters: list[CharacterSelectionListEntry]) -> None:
        """
        Note:
          - Length must be 252 or less.
        """
        self._characters = characters
        self._characters_count = len(self._characters)

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataDeleted") -> None:
        """
        Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDeleted` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterReplyServerPacket.ReplyCodeDataDeleted): The data to serialize.
        """
        if data._characters_count is None:
            raise SerializationError("characters_count must be provided.")
        writer.add_char(data._characters_count)
        writer.add_byte(0xFF)
        if data._characters is None:
            raise SerializationError("characters must be provided.")
        if len(data._characters) > 252:
            raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
        for i in range(data._characters_count):
            if i > 0:
                writer.add_byte(0xFF)
            CharacterSelectionListEntry.serialize(writer, data._characters[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataDeleted":
        """
        Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDeleted` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterReplyServerPacket.ReplyCodeDataDeleted: The data to serialize.
        """
        data: CharacterReplyServerPacket.ReplyCodeDataDeleted = CharacterReplyServerPacket.ReplyCodeDataDeleted()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._characters_count = reader.get_char()
            reader.next_chunk()
            data._characters = []
            for i in range(data._characters_count):
                data._characters.append(CharacterSelectionListEntry.deserialize(reader))
                if i + 1 < data._characters_count:
                    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"CharacterReplyServerPacket.ReplyCodeDataDeleted(byte_size={repr(self._byte_size)}, characters={repr(self._characters)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

characters: list[CharacterSelectionListEntry] property writable

Note
  • Length must be 252 or less.

serialize(writer, data) staticmethod

Serializes an instance of CharacterReplyServerPacket.ReplyCodeDataDeleted to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataDeleted

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
@staticmethod
def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataDeleted") -> None:
    """
    Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDeleted` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterReplyServerPacket.ReplyCodeDataDeleted): The data to serialize.
    """
    if data._characters_count is None:
        raise SerializationError("characters_count must be provided.")
    writer.add_char(data._characters_count)
    writer.add_byte(0xFF)
    if data._characters is None:
        raise SerializationError("characters must be provided.")
    if len(data._characters) > 252:
        raise SerializationError(f"Expected length of characters to be 252 or less, got {len(data._characters)}.")
    for i in range(data._characters_count):
        if i > 0:
            writer.add_byte(0xFF)
        CharacterSelectionListEntry.serialize(writer, data._characters[i])

deserialize(reader) staticmethod

Deserializes an instance of CharacterReplyServerPacket.ReplyCodeDataDeleted from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'CharacterReplyServerPacket.ReplyCodeDataDeleted'

CharacterReplyServerPacket.ReplyCodeDataDeleted: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
@staticmethod
def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataDeleted":
    """
    Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDeleted` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterReplyServerPacket.ReplyCodeDataDeleted: The data to serialize.
    """
    data: CharacterReplyServerPacket.ReplyCodeDataDeleted = CharacterReplyServerPacket.ReplyCodeDataDeleted()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._characters_count = reader.get_char()
        reader.next_chunk()
        data._characters = []
        for i in range(data._characters_count):
            data._characters.append(CharacterSelectionListEntry.deserialize(reader))
            if i + 1 < data._characters_count:
                reader.next_chunk()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataDefault

Default data associated with reply_code

In this case (reply_code > 9), reply_code is a session ID for character creation

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
class ReplyCodeDataDefault:
    """
    Default data associated with reply_code

    In this case (reply_code &gt; 9), reply_code is a session ID for character creation
    """
    _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 serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataDefault") -> None:
        """
        Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDefault` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterReplyServerPacket.ReplyCodeDataDefault): The data to serialize.
        """
        writer.add_string("OK")

    @staticmethod
    def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataDefault":
        """
        Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDefault` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterReplyServerPacket.ReplyCodeDataDefault: The data to serialize.
        """
        data: CharacterReplyServerPacket.ReplyCodeDataDefault = CharacterReplyServerPacket.ReplyCodeDataDefault()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"CharacterReplyServerPacket.ReplyCodeDataDefault(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.

serialize(writer, data) staticmethod

Serializes an instance of CharacterReplyServerPacket.ReplyCodeDataDefault to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataDefault

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
599
600
601
602
603
604
605
606
607
608
@staticmethod
def serialize(writer: EoWriter, data: "CharacterReplyServerPacket.ReplyCodeDataDefault") -> None:
    """
    Serializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDefault` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterReplyServerPacket.ReplyCodeDataDefault): The data to serialize.
    """
    writer.add_string("OK")

deserialize(reader) staticmethod

Deserializes an instance of CharacterReplyServerPacket.ReplyCodeDataDefault from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
'CharacterReplyServerPacket.ReplyCodeDataDefault'

CharacterReplyServerPacket.ReplyCodeDataDefault: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
@staticmethod
def deserialize(reader: EoReader) -> "CharacterReplyServerPacket.ReplyCodeDataDefault":
    """
    Deserializes an instance of `CharacterReplyServerPacket.ReplyCodeDataDefault` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterReplyServerPacket.ReplyCodeDataDefault: The data to serialize.
    """
    data: CharacterReplyServerPacket.ReplyCodeDataDefault = CharacterReplyServerPacket.ReplyCodeDataDefault()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        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/server/character_reply_server_packet.py
60
61
62
63
64
65
66
67
68
@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/server/character_reply_server_packet.py
70
71
72
73
74
75
76
77
78
@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/server/character_reply_server_packet.py
80
81
82
83
84
85
86
87
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CharacterReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CharacterReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
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
@staticmethod
def serialize(writer: EoWriter, data: "CharacterReplyServerPacket") -> None:
    """
    Serializes an instance of `CharacterReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_short(int(data._reply_code))
    if data._reply_code == 0:
        if data._reply_code_data is not None:
            raise SerializationError("Expected reply_code_data to be None for reply_code " + CharacterReply(data._reply_code).name + ".")
    elif data._reply_code == CharacterReply.Exists:
        if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataExists):
            raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataExists for reply_code " + CharacterReply(data._reply_code).name + ".")
        CharacterReplyServerPacket.ReplyCodeDataExists.serialize(writer, data._reply_code_data)
    elif data._reply_code == CharacterReply.Full:
        if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataFull):
            raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataFull for reply_code " + CharacterReply(data._reply_code).name + ".")
        CharacterReplyServerPacket.ReplyCodeDataFull.serialize(writer, data._reply_code_data)
    elif data._reply_code == CharacterReply.Full3:
        if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataFull3):
            raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataFull3 for reply_code " + CharacterReply(data._reply_code).name + ".")
        CharacterReplyServerPacket.ReplyCodeDataFull3.serialize(writer, data._reply_code_data)
    elif data._reply_code == CharacterReply.NotApproved:
        if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataNotApproved):
            raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataNotApproved for reply_code " + CharacterReply(data._reply_code).name + ".")
        CharacterReplyServerPacket.ReplyCodeDataNotApproved.serialize(writer, data._reply_code_data)
    elif data._reply_code == CharacterReply.Ok:
        if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataOk):
            raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataOk for reply_code " + CharacterReply(data._reply_code).name + ".")
        CharacterReplyServerPacket.ReplyCodeDataOk.serialize(writer, data._reply_code_data)
    elif data._reply_code == CharacterReply.Deleted:
        if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataDeleted):
            raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataDeleted for reply_code " + CharacterReply(data._reply_code).name + ".")
        CharacterReplyServerPacket.ReplyCodeDataDeleted.serialize(writer, data._reply_code_data)
    elif data._reply_code == 7:
        if data._reply_code_data is not None:
            raise SerializationError("Expected reply_code_data to be None for reply_code " + CharacterReply(data._reply_code).name + ".")
    elif data._reply_code == 8:
        if data._reply_code_data is not None:
            raise SerializationError("Expected reply_code_data to be None for reply_code " + CharacterReply(data._reply_code).name + ".")
    elif data._reply_code == 9:
        if data._reply_code_data is not None:
            raise SerializationError("Expected reply_code_data to be None for reply_code " + CharacterReply(data._reply_code).name + ".")
    else:
        if not isinstance(data._reply_code_data, CharacterReplyServerPacket.ReplyCodeDataDefault):
            raise SerializationError("Expected reply_code_data to be type CharacterReplyServerPacket.ReplyCodeDataDefault for reply_code " + CharacterReply(data._reply_code).name + ".")
        CharacterReplyServerPacket.ReplyCodeDataDefault.serialize(writer, data._reply_code_data)

deserialize(reader) staticmethod

Deserializes an instance of CharacterReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterReplyServerPacket 'CharacterReplyServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CharacterReplyServerPacket":
    """
    Deserializes an instance of `CharacterReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterReplyServerPacket: The data to serialize.
    """
    data: CharacterReplyServerPacket = CharacterReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._reply_code = CharacterReply(reader.get_short())
        if data._reply_code == 0:
            data._reply_code_data = None
        elif data._reply_code == CharacterReply.Exists:
            data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataExists.deserialize(reader)
        elif data._reply_code == CharacterReply.Full:
            data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataFull.deserialize(reader)
        elif data._reply_code == CharacterReply.Full3:
            data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataFull3.deserialize(reader)
        elif data._reply_code == CharacterReply.NotApproved:
            data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataNotApproved.deserialize(reader)
        elif data._reply_code == CharacterReply.Ok:
            data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataOk.deserialize(reader)
        elif data._reply_code == CharacterReply.Deleted:
            data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataDeleted.deserialize(reader)
        elif data._reply_code == 7:
            data._reply_code_data = None
        elif data._reply_code == 8:
            data._reply_code_data = None
        elif data._reply_code == 9:
            data._reply_code_data = None
        else:
            data._reply_code_data = CharacterReplyServerPacket.ReplyCodeDataDefault.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

CharacterPlayerServerPacket

Bases: Packet

Reply to client request to delete a character from the account (Character_Take)

Source code in src/eolib/protocol/_generated/net/server/character_player_server_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 CharacterPlayerServerPacket(Packet):
    """
    Reply to client request to delete a character from the account (Character_Take)
    """
    _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.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.
        """
        CharacterPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CharacterPlayerServerPacket") -> None:
        """
        Serializes an instance of `CharacterPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharacterPlayerServerPacket): 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) -> "CharacterPlayerServerPacket":
        """
        Deserializes an instance of `CharacterPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharacterPlayerServerPacket: The data to serialize.
        """
        data: CharacterPlayerServerPacket = CharacterPlayerServerPacket()
        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"CharacterPlayerServerPacket(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/server/character_player_server_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/server/character_player_server_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.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/server/character_player_server_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.
    """
    CharacterPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CharacterPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharacterPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/character_player_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "CharacterPlayerServerPacket") -> None:
    """
    Serializes an instance of `CharacterPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharacterPlayerServerPacket): 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 CharacterPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharacterPlayerServerPacket CharacterPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/character_player_server_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) -> "CharacterPlayerServerPacket":
    """
    Deserializes an instance of `CharacterPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharacterPlayerServerPacket: The data to serialize.
    """
    data: CharacterPlayerServerPacket = CharacterPlayerServerPacket()
    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

BigCoords

Map coordinates with 2-byte values

Source code in src/eolib/protocol/_generated/net/server/big_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 BigCoords:
    """
    Map coordinates with 2-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-64008.
        """
        return self._x

    @x.setter
    def x(self, x: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._x = x

    @property
    def y(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._y

    @y.setter
    def y(self, y: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._y = y

    @staticmethod
    def serialize(writer: EoWriter, data: "BigCoords") -> None:
        """
        Serializes an instance of `BigCoords` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BigCoords): The data to serialize.
        """
        if data._x is None:
            raise SerializationError("x must be provided.")
        writer.add_short(data._x)
        if data._y is None:
            raise SerializationError("y must be provided.")
        writer.add_short(data._y)

    @staticmethod
    def deserialize(reader: EoReader) -> "BigCoords":
        """
        Deserializes an instance of `BigCoords` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BigCoords: The data to serialize.
        """
        data: BigCoords = BigCoords()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._x = reader.get_short()
            data._y = 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"BigCoords(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-64008.

y: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of BigCoords to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BigCoords

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/big_coords.py
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@staticmethod
def serialize(writer: EoWriter, data: "BigCoords") -> None:
    """
    Serializes an instance of `BigCoords` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BigCoords): The data to serialize.
    """
    if data._x is None:
        raise SerializationError("x must be provided.")
    writer.add_short(data._x)
    if data._y is None:
        raise SerializationError("y must be provided.")
    writer.add_short(data._y)

deserialize(reader) staticmethod

Deserializes an instance of BigCoords from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BigCoords BigCoords

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/big_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) -> "BigCoords":
    """
    Deserializes an instance of `BigCoords` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BigCoords: The data to serialize.
    """
    data: BigCoords = BigCoords()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._x = reader.get_short()
        data._y = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChairReplyServerPacket

Bases: Packet

Your character sitting on a chair

Source code in src/eolib/protocol/_generated/net/server/chair_reply_server_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class ChairReplyServerPacket(Packet):
    """
    Your character sitting on a chair
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _coords: Coords = None # type: ignore [assignment]
    _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 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

    @property
    def coords(self) -> Coords:
        return self._coords

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = coords

    @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.Chair

    @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.
        """
        ChairReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChairReplyServerPacket") -> None:
        """
        Serializes an instance of `ChairReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChairReplyServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

    @staticmethod
    def deserialize(reader: EoReader) -> "ChairReplyServerPacket":
        """
        Deserializes an instance of `ChairReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChairReplyServerPacket: The data to serialize.
        """
        data: ChairReplyServerPacket = ChairReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._coords = Coords.deserialize(reader)
            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"ChairReplyServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, coords={repr(self._coords)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

coords: Coords property writable

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/server/chair_reply_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/chair_reply_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/chair_reply_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChairReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChairReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChairReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chair_reply_server_packet.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "ChairReplyServerPacket") -> None:
    """
    Serializes an instance of `ChairReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChairReplyServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

deserialize(reader) staticmethod

Deserializes an instance of ChairReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChairReplyServerPacket ChairReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chair_reply_server_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@staticmethod
def deserialize(reader: EoReader) -> "ChairReplyServerPacket":
    """
    Deserializes an instance of `ChairReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChairReplyServerPacket: The data to serialize.
    """
    data: ChairReplyServerPacket = ChairReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        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

ChairRemoveServerPacket

Bases: Packet

Nearby player standing up from a chair

Source code in src/eolib/protocol/_generated/net/server/chair_remove_server_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 ChairRemoveServerPacket(Packet):
    """
    Nearby player standing up from a chair
    """
    _byte_size: int = 0
    _player_id: 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 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

    @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.Chair

    @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.
        """
        ChairRemoveServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChairRemoveServerPacket") -> None:
        """
        Serializes an instance of `ChairRemoveServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChairRemoveServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

    @staticmethod
    def deserialize(reader: EoReader) -> "ChairRemoveServerPacket":
        """
        Deserializes an instance of `ChairRemoveServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChairRemoveServerPacket: The data to serialize.
        """
        data: ChairRemoveServerPacket = ChairRemoveServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"ChairRemoveServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/chair_remove_server_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Chair

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/chair_remove_server_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.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/server/chair_remove_server_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.
    """
    ChairRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChairRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChairRemoveServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chair_remove_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "ChairRemoveServerPacket") -> None:
    """
    Serializes an instance of `ChairRemoveServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChairRemoveServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

deserialize(reader) staticmethod

Deserializes an instance of ChairRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChairRemoveServerPacket ChairRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chair_remove_server_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) -> "ChairRemoveServerPacket":
    """
    Deserializes an instance of `ChairRemoveServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChairRemoveServerPacket: The data to serialize.
    """
    data: ChairRemoveServerPacket = ChairRemoveServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ChairPlayerServerPacket

Bases: Packet

Nearby player sitting on a chair

Source code in src/eolib/protocol/_generated/net/server/chair_player_server_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class ChairPlayerServerPacket(Packet):
    """
    Nearby player sitting on a chair
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _coords: Coords = None # type: ignore [assignment]
    _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 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

    @property
    def coords(self) -> Coords:
        return self._coords

    @coords.setter
    def coords(self, coords: Coords) -> None:
        self._coords = coords

    @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.Chair

    @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.
        """
        ChairPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChairPlayerServerPacket") -> None:
        """
        Serializes an instance of `ChairPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChairPlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

    @staticmethod
    def deserialize(reader: EoReader) -> "ChairPlayerServerPacket":
        """
        Deserializes an instance of `ChairPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChairPlayerServerPacket: The data to serialize.
        """
        data: ChairPlayerServerPacket = ChairPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._coords = Coords.deserialize(reader)
            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"ChairPlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, coords={repr(self._coords)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

coords: Coords property writable

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/server/chair_player_server_packet.py
66
67
68
69
70
71
72
73
74
@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/server/chair_player_server_packet.py
76
77
78
79
80
81
82
83
84
@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/server/chair_player_server_packet.py
86
87
88
89
90
91
92
93
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ChairPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChairPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChairPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chair_player_server_packet.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@staticmethod
def serialize(writer: EoWriter, data: "ChairPlayerServerPacket") -> None:
    """
    Serializes an instance of `ChairPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChairPlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

deserialize(reader) staticmethod

Deserializes an instance of ChairPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChairPlayerServerPacket ChairPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chair_player_server_packet.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@staticmethod
def deserialize(reader: EoReader) -> "ChairPlayerServerPacket":
    """
    Deserializes an instance of `ChairPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChairPlayerServerPacket: The data to serialize.
    """
    data: ChairPlayerServerPacket = ChairPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        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

ChairCloseServerPacket

Bases: Packet

Your character standing up from a chair

Source code in src/eolib/protocol/_generated/net/server/chair_close_server_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 ChairCloseServerPacket(Packet):
    """
    Your character standing up from a chair
    """
    _byte_size: int = 0
    _player_id: 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 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

    @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.Chair

    @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.
        """
        ChairCloseServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ChairCloseServerPacket") -> None:
        """
        Serializes an instance of `ChairCloseServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ChairCloseServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._coords is None:
            raise SerializationError("coords must be provided.")
        Coords.serialize(writer, data._coords)

    @staticmethod
    def deserialize(reader: EoReader) -> "ChairCloseServerPacket":
        """
        Deserializes an instance of `ChairCloseServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ChairCloseServerPacket: The data to serialize.
        """
        data: ChairCloseServerPacket = ChairCloseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"ChairCloseServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/chair_close_server_packet.py
56
57
58
59
60
61
62
63
64
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Chair

action() staticmethod

Returns the packet action associated with this packet.

Returns:

Name Type Description
PacketAction PacketAction

The packet action associated with this packet.

Source code in src/eolib/protocol/_generated/net/server/chair_close_server_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.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/server/chair_close_server_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.
    """
    ChairCloseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ChairCloseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ChairCloseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/chair_close_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "ChairCloseServerPacket") -> None:
    """
    Serializes an instance of `ChairCloseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ChairCloseServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._coords is None:
        raise SerializationError("coords must be provided.")
    Coords.serialize(writer, data._coords)

deserialize(reader) staticmethod

Deserializes an instance of ChairCloseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ChairCloseServerPacket ChairCloseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/chair_close_server_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) -> "ChairCloseServerPacket":
    """
    Deserializes an instance of `ChairCloseServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ChairCloseServerPacket: The data to serialize.
    """
    data: ChairCloseServerPacket = ChairCloseServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._coords = Coords.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CastSpecServerPacket

Bases: Packet

Nearby NPC killed by player spell

Source code in src/eolib/protocol/_generated/net/server/cast_spec_server_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
class CastSpecServerPacket(Packet):
    """
    Nearby NPC killed by player spell
    """
    _byte_size: int = 0
    _spell_id: int = None # type: ignore [assignment]
    _npc_killed_data: NpcKilledData = None # type: ignore [assignment]
    _caster_tp: int = None # type: ignore [assignment]
    _experience: Optional[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 npc_killed_data(self) -> NpcKilledData:
        return self._npc_killed_data

    @npc_killed_data.setter
    def npc_killed_data(self, npc_killed_data: NpcKilledData) -> None:
        self._npc_killed_data = npc_killed_data

    @property
    def caster_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._caster_tp

    @caster_tp.setter
    def caster_tp(self, caster_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._caster_tp = caster_tp

    @property
    def experience(self) -> Optional[int]:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._experience

    @experience.setter
    def experience(self, experience: Optional[int]) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._experience = experience

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Cast

    @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.
        """
        CastSpecServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CastSpecServerPacket") -> None:
        """
        Serializes an instance of `CastSpecServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CastSpecServerPacket): 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._npc_killed_data is None:
            raise SerializationError("npc_killed_data must be provided.")
        NpcKilledData.serialize(writer, data._npc_killed_data)
        if data._caster_tp is None:
            raise SerializationError("caster_tp must be provided.")
        writer.add_short(data._caster_tp)
        reached_missing_optional = data._experience is None
        if not reached_missing_optional:
            writer.add_int(cast(int, data._experience))

    @staticmethod
    def deserialize(reader: EoReader) -> "CastSpecServerPacket":
        """
        Deserializes an instance of `CastSpecServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CastSpecServerPacket: The data to serialize.
        """
        data: CastSpecServerPacket = CastSpecServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._spell_id = reader.get_short()
            data._npc_killed_data = NpcKilledData.deserialize(reader)
            data._caster_tp = reader.get_short()
            if reader.remaining > 0:
                data._experience = 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"CastSpecServerPacket(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_id)}, npc_killed_data={repr(self._npc_killed_data)}, caster_tp={repr(self._caster_tp)}, experience={repr(self._experience)})"

byte_size: int property

Returns the size 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.

npc_killed_data: NpcKilledData property writable

caster_tp: int property writable

Note
  • Value range is 0-64008.

experience: Optional[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/server/cast_spec_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Cast

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/server/cast_spec_server_packet.py
102
103
104
105
106
107
108
109
110
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/cast_spec_server_packet.py
112
113
114
115
116
117
118
119
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CastSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CastSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CastSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/cast_spec_server_packet.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@staticmethod
def serialize(writer: EoWriter, data: "CastSpecServerPacket") -> None:
    """
    Serializes an instance of `CastSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CastSpecServerPacket): 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._npc_killed_data is None:
        raise SerializationError("npc_killed_data must be provided.")
    NpcKilledData.serialize(writer, data._npc_killed_data)
    if data._caster_tp is None:
        raise SerializationError("caster_tp must be provided.")
    writer.add_short(data._caster_tp)
    reached_missing_optional = data._experience is None
    if not reached_missing_optional:
        writer.add_int(cast(int, data._experience))

deserialize(reader) staticmethod

Deserializes an instance of CastSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CastSpecServerPacket CastSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/cast_spec_server_packet.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
@staticmethod
def deserialize(reader: EoReader) -> "CastSpecServerPacket":
    """
    Deserializes an instance of `CastSpecServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CastSpecServerPacket: The data to serialize.
    """
    data: CastSpecServerPacket = CastSpecServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._spell_id = reader.get_short()
        data._npc_killed_data = NpcKilledData.deserialize(reader)
        data._caster_tp = reader.get_short()
        if reader.remaining > 0:
            data._experience = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CastReplyServerPacket

Bases: Packet

Nearby NPC hit by a spell from a player

Source code in src/eolib/protocol/_generated/net/server/cast_reply_server_packet.py
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
class CastReplyServerPacket(Packet):
    """
    Nearby NPC hit by a spell from a player
    """
    _byte_size: int = 0
    _spell_id: int = None # type: ignore [assignment]
    _caster_id: int = None # type: ignore [assignment]
    _caster_direction: Direction = None # type: ignore [assignment]
    _npc_index: int = None # type: ignore [assignment]
    _damage: int = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _caster_tp: int = None # type: ignore [assignment]
    _kill_steal_protection: Optional[NpcKillStealProtectionState] = 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 caster_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._caster_id

    @caster_id.setter
    def caster_id(self, caster_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._caster_id = caster_id

    @property
    def caster_direction(self) -> Direction:
        return self._caster_direction

    @caster_direction.setter
    def caster_direction(self, caster_direction: Direction) -> None:
        self._caster_direction = caster_direction

    @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 damage(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._damage = damage

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._hp_percentage = hp_percentage

    @property
    def caster_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._caster_tp

    @caster_tp.setter
    def caster_tp(self, caster_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._caster_tp = caster_tp

    @property
    def kill_steal_protection(self) -> Optional[NpcKillStealProtectionState]:
        return self._kill_steal_protection

    @kill_steal_protection.setter
    def kill_steal_protection(self, kill_steal_protection: Optional[NpcKillStealProtectionState]) -> None:
        self._kill_steal_protection = kill_steal_protection

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Cast

    @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.
        """
        CastReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CastReplyServerPacket") -> None:
        """
        Serializes an instance of `CastReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CastReplyServerPacket): 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._caster_id is None:
            raise SerializationError("caster_id must be provided.")
        writer.add_short(data._caster_id)
        if data._caster_direction is None:
            raise SerializationError("caster_direction must be provided.")
        writer.add_char(int(data._caster_direction))
        if data._npc_index is None:
            raise SerializationError("npc_index must be provided.")
        writer.add_short(data._npc_index)
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_three(data._damage)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_short(data._hp_percentage)
        if data._caster_tp is None:
            raise SerializationError("caster_tp must be provided.")
        writer.add_short(data._caster_tp)
        reached_missing_optional = data._kill_steal_protection is None
        if not reached_missing_optional:
            writer.add_char(int(cast(NpcKillStealProtectionState, data._kill_steal_protection)))

    @staticmethod
    def deserialize(reader: EoReader) -> "CastReplyServerPacket":
        """
        Deserializes an instance of `CastReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CastReplyServerPacket: The data to serialize.
        """
        data: CastReplyServerPacket = CastReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._spell_id = reader.get_short()
            data._caster_id = reader.get_short()
            data._caster_direction = Direction(reader.get_char())
            data._npc_index = reader.get_short()
            data._damage = reader.get_three()
            data._hp_percentage = reader.get_short()
            data._caster_tp = reader.get_short()
            if reader.remaining > 0:
                data._kill_steal_protection = NpcKillStealProtectionState(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"CastReplyServerPacket(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_id)}, caster_id={repr(self._caster_id)}, caster_direction={repr(self._caster_direction)}, npc_index={repr(self._npc_index)}, damage={repr(self._damage)}, hp_percentage={repr(self._hp_percentage)}, caster_tp={repr(self._caster_tp)}, kill_steal_protection={repr(self._kill_steal_protection)})"

byte_size: int property

Returns the size 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.

caster_id: int property writable

Note
  • Value range is 0-64008.

caster_direction: Direction property writable

npc_index: int property writable

Note
  • Value range is 0-64008.

damage: int property writable

Note
  • Value range is 0-16194276.

hp_percentage: int property writable

Note
  • Value range is 0-64008.

caster_tp: int property writable

Note
  • Value range is 0-64008.

kill_steal_protection: Optional[NpcKillStealProtectionState] 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/server/cast_reply_server_packet.py
153
154
155
156
157
158
159
160
161
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Cast

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/server/cast_reply_server_packet.py
163
164
165
166
167
168
169
170
171
@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/server/cast_reply_server_packet.py
173
174
175
176
177
178
179
180
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CastReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CastReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CastReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/cast_reply_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "CastReplyServerPacket") -> None:
    """
    Serializes an instance of `CastReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CastReplyServerPacket): 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._caster_id is None:
        raise SerializationError("caster_id must be provided.")
    writer.add_short(data._caster_id)
    if data._caster_direction is None:
        raise SerializationError("caster_direction must be provided.")
    writer.add_char(int(data._caster_direction))
    if data._npc_index is None:
        raise SerializationError("npc_index must be provided.")
    writer.add_short(data._npc_index)
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_three(data._damage)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_short(data._hp_percentage)
    if data._caster_tp is None:
        raise SerializationError("caster_tp must be provided.")
    writer.add_short(data._caster_tp)
    reached_missing_optional = data._kill_steal_protection is None
    if not reached_missing_optional:
        writer.add_char(int(cast(NpcKillStealProtectionState, data._kill_steal_protection)))

deserialize(reader) staticmethod

Deserializes an instance of CastReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CastReplyServerPacket CastReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/cast_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "CastReplyServerPacket":
    """
    Deserializes an instance of `CastReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CastReplyServerPacket: The data to serialize.
    """
    data: CastReplyServerPacket = CastReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._spell_id = reader.get_short()
        data._caster_id = reader.get_short()
        data._caster_direction = Direction(reader.get_char())
        data._npc_index = reader.get_short()
        data._damage = reader.get_three()
        data._hp_percentage = reader.get_short()
        data._caster_tp = reader.get_short()
        if reader.remaining > 0:
            data._kill_steal_protection = NpcKillStealProtectionState(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CastAcceptServerPacket

Bases: Packet

Nearby NPC killed by player spell and you leveled up

Source code in src/eolib/protocol/_generated/net/server/cast_accept_server_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
class CastAcceptServerPacket(Packet):
    """
    Nearby NPC killed by player spell and you leveled up
    """
    _byte_size: int = 0
    _spell_id: int = None # type: ignore [assignment]
    _npc_killed_data: NpcKilledData = None # type: ignore [assignment]
    _caster_tp: int = None # type: ignore [assignment]
    _experience: int = None # type: ignore [assignment]
    _level_up: LevelUpStats = 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 npc_killed_data(self) -> NpcKilledData:
        return self._npc_killed_data

    @npc_killed_data.setter
    def npc_killed_data(self, npc_killed_data: NpcKilledData) -> None:
        self._npc_killed_data = npc_killed_data

    @property
    def caster_tp(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._caster_tp

    @caster_tp.setter
    def caster_tp(self, caster_tp: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._caster_tp = caster_tp

    @property
    def experience(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._experience

    @experience.setter
    def experience(self, experience: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._experience = experience

    @property
    def level_up(self) -> LevelUpStats:
        return self._level_up

    @level_up.setter
    def level_up(self, level_up: LevelUpStats) -> None:
        self._level_up = level_up

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Cast

    @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.
        """
        CastAcceptServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "CastAcceptServerPacket") -> None:
        """
        Serializes an instance of `CastAcceptServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CastAcceptServerPacket): 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._npc_killed_data is None:
            raise SerializationError("npc_killed_data must be provided.")
        NpcKilledData.serialize(writer, data._npc_killed_data)
        if data._caster_tp is None:
            raise SerializationError("caster_tp must be provided.")
        writer.add_short(data._caster_tp)
        if data._experience is None:
            raise SerializationError("experience must be provided.")
        writer.add_int(data._experience)
        if data._level_up is None:
            raise SerializationError("level_up must be provided.")
        LevelUpStats.serialize(writer, data._level_up)

    @staticmethod
    def deserialize(reader: EoReader) -> "CastAcceptServerPacket":
        """
        Deserializes an instance of `CastAcceptServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CastAcceptServerPacket: The data to serialize.
        """
        data: CastAcceptServerPacket = CastAcceptServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._spell_id = reader.get_short()
            data._npc_killed_data = NpcKilledData.deserialize(reader)
            data._caster_tp = reader.get_short()
            data._experience = reader.get_int()
            data._level_up = LevelUpStats.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"CastAcceptServerPacket(byte_size={repr(self._byte_size)}, spell_id={repr(self._spell_id)}, npc_killed_data={repr(self._npc_killed_data)}, caster_tp={repr(self._caster_tp)}, experience={repr(self._experience)}, level_up={repr(self._level_up)})"

byte_size: int property

Returns the size 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.

npc_killed_data: NpcKilledData property writable

caster_tp: int property writable

Note
  • Value range is 0-64008.

experience: int property writable

Note
  • Value range is 0-4097152080.

level_up: LevelUpStats 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/server/cast_accept_server_packet.py
100
101
102
103
104
105
106
107
108
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Cast

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/server/cast_accept_server_packet.py
110
111
112
113
114
115
116
117
118
@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/server/cast_accept_server_packet.py
120
121
122
123
124
125
126
127
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    CastAcceptServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of CastAcceptServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CastAcceptServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/cast_accept_server_packet.py
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
@staticmethod
def serialize(writer: EoWriter, data: "CastAcceptServerPacket") -> None:
    """
    Serializes an instance of `CastAcceptServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CastAcceptServerPacket): 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._npc_killed_data is None:
        raise SerializationError("npc_killed_data must be provided.")
    NpcKilledData.serialize(writer, data._npc_killed_data)
    if data._caster_tp is None:
        raise SerializationError("caster_tp must be provided.")
    writer.add_short(data._caster_tp)
    if data._experience is None:
        raise SerializationError("experience must be provided.")
    writer.add_int(data._experience)
    if data._level_up is None:
        raise SerializationError("level_up must be provided.")
    LevelUpStats.serialize(writer, data._level_up)

deserialize(reader) staticmethod

Deserializes an instance of CastAcceptServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CastAcceptServerPacket CastAcceptServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/cast_accept_server_packet.py
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
@staticmethod
def deserialize(reader: EoReader) -> "CastAcceptServerPacket":
    """
    Deserializes an instance of `CastAcceptServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CastAcceptServerPacket: The data to serialize.
    """
    data: CastAcceptServerPacket = CastAcceptServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._spell_id = reader.get_short()
        data._npc_killed_data = NpcKilledData.deserialize(reader)
        data._caster_tp = reader.get_short()
        data._experience = reader.get_int()
        data._level_up = LevelUpStats.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BookReplyServerPacket

Bases: Packet

Reply to requesting a book

Source code in src/eolib/protocol/_generated/net/server/book_reply_server_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
class BookReplyServerPacket(Packet):
    """
    Reply to requesting a book
    """
    _byte_size: int = 0
    _details: CharacterDetails = None # type: ignore [assignment]
    _icon: CharacterIcon = None # type: ignore [assignment]
    _quest_names: 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 details(self) -> CharacterDetails:
        return self._details

    @details.setter
    def details(self, details: CharacterDetails) -> None:
        self._details = details

    @property
    def icon(self) -> CharacterIcon:
        return self._icon

    @icon.setter
    def icon(self, icon: CharacterIcon) -> None:
        self._icon = icon

    @property
    def quest_names(self) -> list[str]:
        return self._quest_names

    @quest_names.setter
    def quest_names(self, quest_names: list[str]) -> None:
        self._quest_names = quest_names

    @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.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.
        """
        BookReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BookReplyServerPacket") -> None:
        """
        Serializes an instance of `BookReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BookReplyServerPacket): The data to serialize.
        """
        if data._details is None:
            raise SerializationError("details must be provided.")
        CharacterDetails.serialize(writer, data._details)
        if data._icon is None:
            raise SerializationError("icon must be provided.")
        writer.add_char(int(data._icon))
        writer.add_byte(0xFF)
        if data._quest_names is None:
            raise SerializationError("quest_names must be provided.")
        for i in range(len(data._quest_names)):
            if i > 0:
                writer.add_byte(0xFF)
            writer.add_string(data._quest_names[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "BookReplyServerPacket":
        """
        Deserializes an instance of `BookReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BookReplyServerPacket: The data to serialize.
        """
        data: BookReplyServerPacket = BookReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._details = CharacterDetails.deserialize(reader)
            data._icon = CharacterIcon(reader.get_char())
            reader.next_chunk()
            data._quest_names = []
            while reader.remaining > 0:
                data._quest_names.append(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"BookReplyServerPacket(byte_size={repr(self._byte_size)}, details={repr(self._details)}, icon={repr(self._icon)}, quest_names={repr(self._quest_names)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

details: CharacterDetails property writable

icon: CharacterIcon property writable

quest_names: list[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/server/book_reply_server_packet.py
59
60
61
62
63
64
65
66
67
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/book_reply_server_packet.py
69
70
71
72
73
74
75
76
77
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.Reply

write(writer)

Serializes and writes this packet to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

the writer that this packet will be written to.

required
Source code in src/eolib/protocol/_generated/net/server/book_reply_server_packet.py
79
80
81
82
83
84
85
86
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    BookReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BookReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BookReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/book_reply_server_packet.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@staticmethod
def serialize(writer: EoWriter, data: "BookReplyServerPacket") -> None:
    """
    Serializes an instance of `BookReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BookReplyServerPacket): The data to serialize.
    """
    if data._details is None:
        raise SerializationError("details must be provided.")
    CharacterDetails.serialize(writer, data._details)
    if data._icon is None:
        raise SerializationError("icon must be provided.")
    writer.add_char(int(data._icon))
    writer.add_byte(0xFF)
    if data._quest_names is None:
        raise SerializationError("quest_names must be provided.")
    for i in range(len(data._quest_names)):
        if i > 0:
            writer.add_byte(0xFF)
        writer.add_string(data._quest_names[i])

deserialize(reader) staticmethod

Deserializes an instance of BookReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BookReplyServerPacket 'BookReplyServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/book_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "BookReplyServerPacket":
    """
    Deserializes an instance of `BookReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BookReplyServerPacket: The data to serialize.
    """
    data: BookReplyServerPacket = BookReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._details = CharacterDetails.deserialize(reader)
        data._icon = CharacterIcon(reader.get_char())
        reader.next_chunk()
        data._quest_names = []
        while reader.remaining > 0:
            data._quest_names.append(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

BoardPostListing

An entry in the list of town board posts

Source code in src/eolib/protocol/_generated/net/server/board_post_listing.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
class BoardPostListing:
    """
    An entry in the list of town board posts
    """
    _byte_size: int = 0
    _post_id: int = None # type: ignore [assignment]
    _author: str = None # type: ignore [assignment]
    _subject: 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 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

    @property
    def author(self) -> str:
        return self._author

    @author.setter
    def author(self, author: str) -> None:
        self._author = author

    @property
    def subject(self) -> str:
        return self._subject

    @subject.setter
    def subject(self, subject: str) -> None:
        self._subject = subject

    @staticmethod
    def serialize(writer: EoWriter, data: "BoardPostListing") -> None:
        """
        Serializes an instance of `BoardPostListing` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BoardPostListing): The data to serialize.
        """
        if data._post_id is None:
            raise SerializationError("post_id must be provided.")
        writer.add_short(data._post_id)
        writer.add_byte(0xFF)
        if data._author is None:
            raise SerializationError("author must be provided.")
        writer.add_string(data._author)
        writer.add_byte(0xFF)
        if data._subject is None:
            raise SerializationError("subject must be provided.")
        writer.add_string(data._subject)

    @staticmethod
    def deserialize(reader: EoReader) -> "BoardPostListing":
        """
        Deserializes an instance of `BoardPostListing` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BoardPostListing: The data to serialize.
        """
        data: BoardPostListing = BoardPostListing()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._post_id = reader.get_short()
            reader.next_chunk()
            data._author = reader.get_string()
            reader.next_chunk()
            data._subject = 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"BoardPostListing(byte_size={repr(self._byte_size)}, post_id={repr(self._post_id)}, author={repr(self._author)}, subject={repr(self._subject)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

post_id: int property writable

Note
  • Value range is 0-64008.

author: str property writable

subject: str property writable

serialize(writer, data) staticmethod

Serializes an instance of BoardPostListing to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BoardPostListing

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/board_post_listing.py
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@staticmethod
def serialize(writer: EoWriter, data: "BoardPostListing") -> None:
    """
    Serializes an instance of `BoardPostListing` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BoardPostListing): The data to serialize.
    """
    if data._post_id is None:
        raise SerializationError("post_id must be provided.")
    writer.add_short(data._post_id)
    writer.add_byte(0xFF)
    if data._author is None:
        raise SerializationError("author must be provided.")
    writer.add_string(data._author)
    writer.add_byte(0xFF)
    if data._subject is None:
        raise SerializationError("subject must be provided.")
    writer.add_string(data._subject)

deserialize(reader) staticmethod

Deserializes an instance of BoardPostListing from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BoardPostListing BoardPostListing

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/board_post_listing.py
 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
@staticmethod
def deserialize(reader: EoReader) -> "BoardPostListing":
    """
    Deserializes an instance of `BoardPostListing` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BoardPostListing: The data to serialize.
    """
    data: BoardPostListing = BoardPostListing()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._post_id = reader.get_short()
        reader.next_chunk()
        data._author = reader.get_string()
        reader.next_chunk()
        data._subject = 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

BoardPlayerServerPacket

Bases: Packet

Reply to reading a post on a town board

Source code in src/eolib/protocol/_generated/net/server/board_player_server_packet.py
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
class BoardPlayerServerPacket(Packet):
    """
    Reply to reading a post on a town board
    """
    _byte_size: int = 0
    _post_id: int = 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 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

    @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.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.
        """
        BoardPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BoardPlayerServerPacket") -> None:
        """
        Serializes an instance of `BoardPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BoardPlayerServerPacket): The data to serialize.
        """
        if data._post_id is None:
            raise SerializationError("post_id must be provided.")
        writer.add_short(data._post_id)
        if data._post_body is None:
            raise SerializationError("post_body must be provided.")
        writer.add_string(data._post_body)

    @staticmethod
    def deserialize(reader: EoReader) -> "BoardPlayerServerPacket":
        """
        Deserializes an instance of `BoardPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BoardPlayerServerPacket: The data to serialize.
        """
        data: BoardPlayerServerPacket = BoardPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._post_id = reader.get_short()
            data._post_body = 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"BoardPlayerServerPacket(byte_size={repr(self._byte_size)}, post_id={repr(self._post_id)}, 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.

post_id: int property writable

Note
  • Value range is 0-64008.

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/server/board_player_server_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.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/server/board_player_server_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.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/server/board_player_server_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.
    """
    BoardPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BoardPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BoardPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/board_player_server_packet.py
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@staticmethod
def serialize(writer: EoWriter, data: "BoardPlayerServerPacket") -> None:
    """
    Serializes an instance of `BoardPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BoardPlayerServerPacket): The data to serialize.
    """
    if data._post_id is None:
        raise SerializationError("post_id must be provided.")
    writer.add_short(data._post_id)
    if data._post_body is None:
        raise SerializationError("post_body must be provided.")
    writer.add_string(data._post_body)

deserialize(reader) staticmethod

Deserializes an instance of BoardPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BoardPlayerServerPacket BoardPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/board_player_server_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
@staticmethod
def deserialize(reader: EoReader) -> "BoardPlayerServerPacket":
    """
    Deserializes an instance of `BoardPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BoardPlayerServerPacket: The data to serialize.
    """
    data: BoardPlayerServerPacket = BoardPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._post_id = reader.get_short()
        data._post_body = 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

BoardOpenServerPacket

Bases: Packet

Reply to opening a town board

Source code in src/eolib/protocol/_generated/net/server/board_open_server_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
class BoardOpenServerPacket(Packet):
    """
    Reply to opening a town board
    """
    _byte_size: int = 0
    _board_id: int = None # type: ignore [assignment]
    _posts_count: int = None # type: ignore [assignment]
    _posts: list[BoardPostListing] = 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-252.
        """
        return self._board_id

    @board_id.setter
    def board_id(self, board_id: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._board_id = board_id

    @property
    def posts(self) -> list[BoardPostListing]:
        """
        Note:
          - Length must be 252 or less.
        """
        return self._posts

    @posts.setter
    def posts(self, posts: list[BoardPostListing]) -> None:
        """
        Note:
          - Length must be 252 or less.
        """
        self._posts = posts
        self._posts_count = len(self._posts)

    @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.
        """
        BoardOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BoardOpenServerPacket") -> None:
        """
        Serializes an instance of `BoardOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BoardOpenServerPacket): The data to serialize.
        """
        if data._board_id is None:
            raise SerializationError("board_id must be provided.")
        writer.add_char(data._board_id)
        if data._posts_count is None:
            raise SerializationError("posts_count must be provided.")
        writer.add_char(data._posts_count)
        if data._posts is None:
            raise SerializationError("posts must be provided.")
        if len(data._posts) > 252:
            raise SerializationError(f"Expected length of posts to be 252 or less, got {len(data._posts)}.")
        for i in range(data._posts_count):
            if i > 0:
                writer.add_byte(0xFF)
            BoardPostListing.serialize(writer, data._posts[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "BoardOpenServerPacket":
        """
        Deserializes an instance of `BoardOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BoardOpenServerPacket: The data to serialize.
        """
        data: BoardOpenServerPacket = BoardOpenServerPacket()
        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_char()
            data._posts_count = reader.get_char()
            data._posts = []
            for i in range(data._posts_count):
                data._posts.append(BoardPostListing.deserialize(reader))
                if i + 1 < data._posts_count:
                    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"BoardOpenServerPacket(byte_size={repr(self._byte_size)}, board_id={repr(self._board_id)}, posts={repr(self._posts)})"

byte_size: int property

Returns the size 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-252.

posts: list[BoardPostListing] 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/server/board_open_server_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.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/server/board_open_server_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.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/server/board_open_server_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.
    """
    BoardOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BoardOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BoardOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/board_open_server_packet.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@staticmethod
def serialize(writer: EoWriter, data: "BoardOpenServerPacket") -> None:
    """
    Serializes an instance of `BoardOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BoardOpenServerPacket): The data to serialize.
    """
    if data._board_id is None:
        raise SerializationError("board_id must be provided.")
    writer.add_char(data._board_id)
    if data._posts_count is None:
        raise SerializationError("posts_count must be provided.")
    writer.add_char(data._posts_count)
    if data._posts is None:
        raise SerializationError("posts must be provided.")
    if len(data._posts) > 252:
        raise SerializationError(f"Expected length of posts to be 252 or less, got {len(data._posts)}.")
    for i in range(data._posts_count):
        if i > 0:
            writer.add_byte(0xFF)
        BoardPostListing.serialize(writer, data._posts[i])

deserialize(reader) staticmethod

Deserializes an instance of BoardOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BoardOpenServerPacket 'BoardOpenServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/board_open_server_packet.py
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@staticmethod
def deserialize(reader: EoReader) -> "BoardOpenServerPacket":
    """
    Deserializes an instance of `BoardOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BoardOpenServerPacket: The data to serialize.
    """
    data: BoardOpenServerPacket = BoardOpenServerPacket()
    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_char()
        data._posts_count = reader.get_char()
        data._posts = []
        for i in range(data._posts_count):
            data._posts.append(BoardPostListing.deserialize(reader))
            if i + 1 < data._posts_count:
                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

BarberOpenServerPacket

Bases: Packet

Response from talking to a barber NPC

Source code in src/eolib/protocol/_generated/net/server/barber_open_server_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 BarberOpenServerPacket(Packet):
    """
    Response from talking to a barber NPC
    """
    _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.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.
        """
        BarberOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BarberOpenServerPacket") -> None:
        """
        Serializes an instance of `BarberOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BarberOpenServerPacket): 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) -> "BarberOpenServerPacket":
        """
        Deserializes an instance of `BarberOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BarberOpenServerPacket: The data to serialize.
        """
        data: BarberOpenServerPacket = BarberOpenServerPacket()
        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"BarberOpenServerPacket(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/server/barber_open_server_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/server/barber_open_server_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/server/barber_open_server_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.
    """
    BarberOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BarberOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BarberOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/barber_open_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "BarberOpenServerPacket") -> None:
    """
    Serializes an instance of `BarberOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BarberOpenServerPacket): 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 BarberOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BarberOpenServerPacket BarberOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/barber_open_server_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) -> "BarberOpenServerPacket":
    """
    Deserializes an instance of `BarberOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BarberOpenServerPacket: The data to serialize.
    """
    data: BarberOpenServerPacket = BarberOpenServerPacket()
    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

BarberAgreeServerPacket

Bases: Packet

Purchasing a new hair style

Source code in src/eolib/protocol/_generated/net/server/barber_agree_server_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 BarberAgreeServerPacket(Packet):
    """
    Purchasing a new hair style
    """
    _byte_size: int = 0
    _gold_amount: int = None # type: ignore [assignment]
    _change: AvatarChange = 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 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

    @property
    def change(self) -> AvatarChange:
        return self._change

    @change.setter
    def change(self, change: AvatarChange) -> None:
        self._change = change

    @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.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.
        """
        BarberAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BarberAgreeServerPacket") -> None:
        """
        Serializes an instance of `BarberAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BarberAgreeServerPacket): The data to serialize.
        """
        if data._gold_amount is None:
            raise SerializationError("gold_amount must be provided.")
        writer.add_int(data._gold_amount)
        if data._change is None:
            raise SerializationError("change must be provided.")
        AvatarChange.serialize(writer, data._change)

    @staticmethod
    def deserialize(reader: EoReader) -> "BarberAgreeServerPacket":
        """
        Deserializes an instance of `BarberAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BarberAgreeServerPacket: The data to serialize.
        """
        data: BarberAgreeServerPacket = BarberAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._gold_amount = reader.get_int()
            data._change = AvatarChange.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"BarberAgreeServerPacket(byte_size={repr(self._byte_size)}, gold_amount={repr(self._gold_amount)}, change={repr(self._change)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

gold_amount: int property writable

Note
  • Value range is 0-4097152080.

change: AvatarChange 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/server/barber_agree_server_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.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/server/barber_agree_server_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/server/barber_agree_server_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.
    """
    BarberAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BarberAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BarberAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/barber_agree_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "BarberAgreeServerPacket") -> None:
    """
    Serializes an instance of `BarberAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BarberAgreeServerPacket): The data to serialize.
    """
    if data._gold_amount is None:
        raise SerializationError("gold_amount must be provided.")
    writer.add_int(data._gold_amount)
    if data._change is None:
        raise SerializationError("change must be provided.")
    AvatarChange.serialize(writer, data._change)

deserialize(reader) staticmethod

Deserializes an instance of BarberAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BarberAgreeServerPacket BarberAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/barber_agree_server_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) -> "BarberAgreeServerPacket":
    """
    Deserializes an instance of `BarberAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BarberAgreeServerPacket: The data to serialize.
    """
    data: BarberAgreeServerPacket = BarberAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._gold_amount = reader.get_int()
        data._change = AvatarChange.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BankReplyServerPacket

Bases: Packet

Update gold counts after deposit/withdraw

Source code in src/eolib/protocol/_generated/net/server/bank_reply_server_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 BankReplyServerPacket(Packet):
    """
    Update gold counts after deposit/withdraw
    """
    _byte_size: int = 0
    _gold_inventory: int = None # type: ignore [assignment]
    _gold_bank: 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 gold_inventory(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._gold_inventory

    @gold_inventory.setter
    def gold_inventory(self, gold_inventory: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._gold_inventory = gold_inventory

    @property
    def gold_bank(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._gold_bank

    @gold_bank.setter
    def gold_bank(self, gold_bank: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._gold_bank = gold_bank

    @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.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.
        """
        BankReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BankReplyServerPacket") -> None:
        """
        Serializes an instance of `BankReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BankReplyServerPacket): The data to serialize.
        """
        if data._gold_inventory is None:
            raise SerializationError("gold_inventory must be provided.")
        writer.add_int(data._gold_inventory)
        if data._gold_bank is None:
            raise SerializationError("gold_bank must be provided.")
        writer.add_int(data._gold_bank)

    @staticmethod
    def deserialize(reader: EoReader) -> "BankReplyServerPacket":
        """
        Deserializes an instance of `BankReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BankReplyServerPacket: The data to serialize.
        """
        data: BankReplyServerPacket = BankReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._gold_inventory = reader.get_int()
            data._gold_bank = 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"BankReplyServerPacket(byte_size={repr(self._byte_size)}, gold_inventory={repr(self._gold_inventory)}, gold_bank={repr(self._gold_bank)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

gold_inventory: int property writable

Note
  • Value range is 0-4097152080.

gold_bank: 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/server/bank_reply_server_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/server/bank_reply_server_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.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/server/bank_reply_server_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.
    """
    BankReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BankReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BankReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/bank_reply_server_packet.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@staticmethod
def serialize(writer: EoWriter, data: "BankReplyServerPacket") -> None:
    """
    Serializes an instance of `BankReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BankReplyServerPacket): The data to serialize.
    """
    if data._gold_inventory is None:
        raise SerializationError("gold_inventory must be provided.")
    writer.add_int(data._gold_inventory)
    if data._gold_bank is None:
        raise SerializationError("gold_bank must be provided.")
    writer.add_int(data._gold_bank)

deserialize(reader) staticmethod

Deserializes an instance of BankReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BankReplyServerPacket BankReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/bank_reply_server_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) -> "BankReplyServerPacket":
    """
    Deserializes an instance of `BankReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BankReplyServerPacket: The data to serialize.
    """
    data: BankReplyServerPacket = BankReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._gold_inventory = reader.get_int()
        data._gold_bank = reader.get_int()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

BankOpenServerPacket

Bases: Packet

Open banker NPC interface

Source code in src/eolib/protocol/_generated/net/server/bank_open_server_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 BankOpenServerPacket(Packet):
    """
    Open banker NPC interface
    """
    _byte_size: int = 0
    _gold_bank: int = None # type: ignore [assignment]
    _session_id: int = None # type: ignore [assignment]
    _locker_upgrades: 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 gold_bank(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._gold_bank

    @gold_bank.setter
    def gold_bank(self, gold_bank: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._gold_bank = gold_bank

    @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 locker_upgrades(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._locker_upgrades

    @locker_upgrades.setter
    def locker_upgrades(self, locker_upgrades: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._locker_upgrades = locker_upgrades

    @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.
        """
        BankOpenServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "BankOpenServerPacket") -> None:
        """
        Serializes an instance of `BankOpenServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (BankOpenServerPacket): The data to serialize.
        """
        if data._gold_bank is None:
            raise SerializationError("gold_bank must be provided.")
        writer.add_int(data._gold_bank)
        if data._session_id is None:
            raise SerializationError("session_id must be provided.")
        writer.add_three(data._session_id)
        if data._locker_upgrades is None:
            raise SerializationError("locker_upgrades must be provided.")
        writer.add_char(data._locker_upgrades)

    @staticmethod
    def deserialize(reader: EoReader) -> "BankOpenServerPacket":
        """
        Deserializes an instance of `BankOpenServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            BankOpenServerPacket: The data to serialize.
        """
        data: BankOpenServerPacket = BankOpenServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._gold_bank = reader.get_int()
            data._session_id = reader.get_three()
            data._locker_upgrades = 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"BankOpenServerPacket(byte_size={repr(self._byte_size)}, gold_bank={repr(self._gold_bank)}, session_id={repr(self._session_id)}, locker_upgrades={repr(self._locker_upgrades)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

gold_bank: int property writable

Note
  • Value range is 0-4097152080.

session_id: int property writable

Note
  • Value range is 0-16194276.

locker_upgrades: 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/server/bank_open_server_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.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/server/bank_open_server_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.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/server/bank_open_server_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.
    """
    BankOpenServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of BankOpenServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data BankOpenServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/bank_open_server_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: "BankOpenServerPacket") -> None:
    """
    Serializes an instance of `BankOpenServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (BankOpenServerPacket): The data to serialize.
    """
    if data._gold_bank is None:
        raise SerializationError("gold_bank must be provided.")
    writer.add_int(data._gold_bank)
    if data._session_id is None:
        raise SerializationError("session_id must be provided.")
    writer.add_three(data._session_id)
    if data._locker_upgrades is None:
        raise SerializationError("locker_upgrades must be provided.")
    writer.add_char(data._locker_upgrades)

deserialize(reader) staticmethod

Deserializes an instance of BankOpenServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
BankOpenServerPacket BankOpenServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/bank_open_server_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) -> "BankOpenServerPacket":
    """
    Deserializes an instance of `BankOpenServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        BankOpenServerPacket: The data to serialize.
    """
    data: BankOpenServerPacket = BankOpenServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._gold_bank = reader.get_int()
        data._session_id = reader.get_three()
        data._locker_upgrades = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AvatarReplyServerPacket

Bases: Packet

Nearby player hit by another player

Source code in src/eolib/protocol/_generated/net/server/avatar_reply_server_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
class AvatarReplyServerPacket(Packet):
    """
    Nearby player hit by another player
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _victim_id: int = None # type: ignore [assignment]
    _damage: int = None # type: ignore [assignment]
    _direction: Direction = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _dead: 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 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

    @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 damage(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._damage = damage

    @property
    def direction(self) -> Direction:
        return self._direction

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hp_percentage = hp_percentage

    @property
    def dead(self) -> bool:
        return self._dead

    @dead.setter
    def dead(self, dead: bool) -> None:
        self._dead = dead

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Avatar

    @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.
        """
        AvatarReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AvatarReplyServerPacket") -> None:
        """
        Serializes an instance of `AvatarReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AvatarReplyServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._victim_id is None:
            raise SerializationError("victim_id must be provided.")
        writer.add_short(data._victim_id)
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_three(data._damage)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)
        if data._dead is None:
            raise SerializationError("dead must be provided.")
        writer.add_char(1 if data._dead else 0)

    @staticmethod
    def deserialize(reader: EoReader) -> "AvatarReplyServerPacket":
        """
        Deserializes an instance of `AvatarReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AvatarReplyServerPacket: The data to serialize.
        """
        data: AvatarReplyServerPacket = AvatarReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            data._victim_id = reader.get_short()
            data._damage = reader.get_three()
            data._direction = Direction(reader.get_char())
            data._hp_percentage = reader.get_char()
            data._dead = 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"AvatarReplyServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, victim_id={repr(self._victim_id)}, damage={repr(self._damage)}, direction={repr(self._direction)}, hp_percentage={repr(self._hp_percentage)}, dead={repr(self._dead)})"

byte_size: int property

Returns the size 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.

victim_id: int property writable

Note
  • Value range is 0-64008.

damage: int property writable

Note
  • Value range is 0-16194276.

direction: Direction property writable

hp_percentage: int property writable

Note
  • Value range is 0-252.

dead: 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/server/avatar_reply_server_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.Avatar

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/server/avatar_reply_server_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.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/server/avatar_reply_server_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.
    """
    AvatarReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AvatarReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AvatarReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/avatar_reply_server_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
@staticmethod
def serialize(writer: EoWriter, data: "AvatarReplyServerPacket") -> None:
    """
    Serializes an instance of `AvatarReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AvatarReplyServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._victim_id is None:
        raise SerializationError("victim_id must be provided.")
    writer.add_short(data._victim_id)
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_three(data._damage)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)
    if data._dead is None:
        raise SerializationError("dead must be provided.")
    writer.add_char(1 if data._dead else 0)

deserialize(reader) staticmethod

Deserializes an instance of AvatarReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AvatarReplyServerPacket AvatarReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/avatar_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "AvatarReplyServerPacket":
    """
    Deserializes an instance of `AvatarReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AvatarReplyServerPacket: The data to serialize.
    """
    data: AvatarReplyServerPacket = AvatarReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        data._victim_id = reader.get_short()
        data._damage = reader.get_three()
        data._direction = Direction(reader.get_char())
        data._hp_percentage = reader.get_char()
        data._dead = reader.get_char() != 0
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AvatarRemoveServerPacket

Bases: Packet

Nearby player has disappeared from view

Source code in src/eolib/protocol/_generated/net/server/avatar_remove_server_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
class AvatarRemoveServerPacket(Packet):
    """
    Nearby player has disappeared from view
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _warp_effect: Optional[WarpEffect] = 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

    @property
    def warp_effect(self) -> Optional[WarpEffect]:
        return self._warp_effect

    @warp_effect.setter
    def warp_effect(self, warp_effect: Optional[WarpEffect]) -> None:
        self._warp_effect = warp_effect

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Avatar

    @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.
        """
        AvatarRemoveServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AvatarRemoveServerPacket") -> None:
        """
        Serializes an instance of `AvatarRemoveServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AvatarRemoveServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        reached_missing_optional = data._warp_effect is None
        if not reached_missing_optional:
            writer.add_char(int(cast(WarpEffect, data._warp_effect)))

    @staticmethod
    def deserialize(reader: EoReader) -> "AvatarRemoveServerPacket":
        """
        Deserializes an instance of `AvatarRemoveServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AvatarRemoveServerPacket: The data to serialize.
        """
        data: AvatarRemoveServerPacket = AvatarRemoveServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            if reader.remaining > 0:
                data._warp_effect = WarpEffect(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"AvatarRemoveServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, warp_effect={repr(self._warp_effect)})"

byte_size: int property

Returns the size 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.

warp_effect: Optional[WarpEffect] 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/server/avatar_remove_server_packet.py
58
59
60
61
62
63
64
65
66
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Avatar

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/server/avatar_remove_server_packet.py
68
69
70
71
72
73
74
75
76
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/avatar_remove_server_packet.py
78
79
80
81
82
83
84
85
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AvatarRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AvatarRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AvatarRemoveServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/avatar_remove_server_packet.py
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@staticmethod
def serialize(writer: EoWriter, data: "AvatarRemoveServerPacket") -> None:
    """
    Serializes an instance of `AvatarRemoveServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AvatarRemoveServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    reached_missing_optional = data._warp_effect is None
    if not reached_missing_optional:
        writer.add_char(int(cast(WarpEffect, data._warp_effect)))

deserialize(reader) staticmethod

Deserializes an instance of AvatarRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AvatarRemoveServerPacket AvatarRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/avatar_remove_server_packet.py
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) -> "AvatarRemoveServerPacket":
    """
    Deserializes an instance of `AvatarRemoveServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AvatarRemoveServerPacket: The data to serialize.
    """
    data: AvatarRemoveServerPacket = AvatarRemoveServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        if reader.remaining > 0:
            data._warp_effect = WarpEffect(reader.get_char())
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AvatarChangeType

Bases: IntEnum

How a player's appearance is changing

Source code in src/eolib/protocol/_generated/net/server/avatar_change_type.py
 9
10
11
12
13
14
15
class AvatarChangeType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    How a player&#x27;s appearance is changing
    """
    Equipment = 1
    Hair = 2
    HairColor = 3

Equipment = 1 class-attribute instance-attribute

Hair = 2 class-attribute instance-attribute

HairColor = 3 class-attribute instance-attribute

AvatarAgreeServerPacket

Bases: Packet

Nearby player changed appearance

Source code in src/eolib/protocol/_generated/net/server/avatar_agree_server_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 AvatarAgreeServerPacket(Packet):
    """
    Nearby player changed appearance
    """
    _byte_size: int = 0
    _change: AvatarChange = 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 change(self) -> AvatarChange:
        return self._change

    @change.setter
    def change(self, change: AvatarChange) -> None:
        self._change = change

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Avatar

    @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.
        """
        AvatarAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AvatarAgreeServerPacket") -> None:
        """
        Serializes an instance of `AvatarAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AvatarAgreeServerPacket): The data to serialize.
        """
        if data._change is None:
            raise SerializationError("change must be provided.")
        AvatarChange.serialize(writer, data._change)

    @staticmethod
    def deserialize(reader: EoReader) -> "AvatarAgreeServerPacket":
        """
        Deserializes an instance of `AvatarAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AvatarAgreeServerPacket: The data to serialize.
        """
        data: AvatarAgreeServerPacket = AvatarAgreeServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._change = AvatarChange.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"AvatarAgreeServerPacket(byte_size={repr(self._byte_size)}, change={repr(self._change)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

change: AvatarChange 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/server/avatar_agree_server_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.Avatar

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/server/avatar_agree_server_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.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/server/avatar_agree_server_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.
    """
    AvatarAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AvatarAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AvatarAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/avatar_agree_server_packet.py
68
69
70
71
72
73
74
75
76
77
78
79
@staticmethod
def serialize(writer: EoWriter, data: "AvatarAgreeServerPacket") -> None:
    """
    Serializes an instance of `AvatarAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AvatarAgreeServerPacket): The data to serialize.
    """
    if data._change is None:
        raise SerializationError("change must be provided.")
    AvatarChange.serialize(writer, data._change)

deserialize(reader) staticmethod

Deserializes an instance of AvatarAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AvatarAgreeServerPacket AvatarAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/avatar_agree_server_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) -> "AvatarAgreeServerPacket":
    """
    Deserializes an instance of `AvatarAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AvatarAgreeServerPacket: The data to serialize.
    """
    data: AvatarAgreeServerPacket = AvatarAgreeServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._change = AvatarChange.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

AvatarAdminServerPacket

Bases: Packet

Nearby player hit by a damage spell from a player

Source code in src/eolib/protocol/_generated/net/server/avatar_admin_server_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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
class AvatarAdminServerPacket(Packet):
    """
    Nearby player hit by a damage spell from a player
    """
    _byte_size: int = 0
    _caster_id: int = None # type: ignore [assignment]
    _victim_id: int = None # type: ignore [assignment]
    _caster_direction: Direction = None # type: ignore [assignment]
    _damage: int = None # type: ignore [assignment]
    _hp_percentage: int = None # type: ignore [assignment]
    _victim_died: bool = 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 caster_id(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._caster_id

    @caster_id.setter
    def caster_id(self, caster_id: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._caster_id = caster_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 caster_direction(self) -> Direction:
        return self._caster_direction

    @caster_direction.setter
    def caster_direction(self, caster_direction: Direction) -> None:
        self._caster_direction = caster_direction

    @property
    def damage(self) -> int:
        """
        Note:
          - Value range is 0-16194276.
        """
        return self._damage

    @damage.setter
    def damage(self, damage: int) -> None:
        """
        Note:
          - Value range is 0-16194276.
        """
        self._damage = damage

    @property
    def hp_percentage(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._hp_percentage

    @hp_percentage.setter
    def hp_percentage(self, hp_percentage: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._hp_percentage = hp_percentage

    @property
    def victim_died(self) -> bool:
        return self._victim_died

    @victim_died.setter
    def victim_died(self, victim_died: bool) -> None:
        self._victim_died = victim_died

    @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.Avatar

    @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.
        """
        AvatarAdminServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AvatarAdminServerPacket") -> None:
        """
        Serializes an instance of `AvatarAdminServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AvatarAdminServerPacket): The data to serialize.
        """
        if data._caster_id is None:
            raise SerializationError("caster_id must be provided.")
        writer.add_short(data._caster_id)
        if data._victim_id is None:
            raise SerializationError("victim_id must be provided.")
        writer.add_short(data._victim_id)
        if data._caster_direction is None:
            raise SerializationError("caster_direction must be provided.")
        writer.add_char(int(data._caster_direction))
        if data._damage is None:
            raise SerializationError("damage must be provided.")
        writer.add_three(data._damage)
        if data._hp_percentage is None:
            raise SerializationError("hp_percentage must be provided.")
        writer.add_char(data._hp_percentage)
        if data._victim_died is None:
            raise SerializationError("victim_died must be provided.")
        writer.add_char(1 if data._victim_died else 0)
        if data._spell_id is None:
            raise SerializationError("spell_id must be provided.")
        writer.add_short(data._spell_id)

    @staticmethod
    def deserialize(reader: EoReader) -> "AvatarAdminServerPacket":
        """
        Deserializes an instance of `AvatarAdminServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AvatarAdminServerPacket: The data to serialize.
        """
        data: AvatarAdminServerPacket = AvatarAdminServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._caster_id = reader.get_short()
            data._victim_id = reader.get_short()
            data._caster_direction = Direction(reader.get_char())
            data._damage = reader.get_three()
            data._hp_percentage = reader.get_char()
            data._victim_died = reader.get_char() != 0
            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"AvatarAdminServerPacket(byte_size={repr(self._byte_size)}, caster_id={repr(self._caster_id)}, victim_id={repr(self._victim_id)}, caster_direction={repr(self._caster_direction)}, damage={repr(self._damage)}, hp_percentage={repr(self._hp_percentage)}, victim_died={repr(self._victim_died)}, 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.

caster_id: int property writable

Note
  • Value range is 0-64008.

victim_id: int property writable

Note
  • Value range is 0-64008.

caster_direction: Direction property writable

damage: int property writable

Note
  • Value range is 0-16194276.

hp_percentage: int property writable

Note
  • Value range is 0-252.

victim_died: bool property writable

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/server/avatar_admin_server_packet.py
133
134
135
136
137
138
139
140
141
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Avatar

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/server/avatar_admin_server_packet.py
143
144
145
146
147
148
149
150
151
@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/server/avatar_admin_server_packet.py
153
154
155
156
157
158
159
160
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AvatarAdminServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AvatarAdminServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AvatarAdminServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/avatar_admin_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "AvatarAdminServerPacket") -> None:
    """
    Serializes an instance of `AvatarAdminServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AvatarAdminServerPacket): The data to serialize.
    """
    if data._caster_id is None:
        raise SerializationError("caster_id must be provided.")
    writer.add_short(data._caster_id)
    if data._victim_id is None:
        raise SerializationError("victim_id must be provided.")
    writer.add_short(data._victim_id)
    if data._caster_direction is None:
        raise SerializationError("caster_direction must be provided.")
    writer.add_char(int(data._caster_direction))
    if data._damage is None:
        raise SerializationError("damage must be provided.")
    writer.add_three(data._damage)
    if data._hp_percentage is None:
        raise SerializationError("hp_percentage must be provided.")
    writer.add_char(data._hp_percentage)
    if data._victim_died is None:
        raise SerializationError("victim_died must be provided.")
    writer.add_char(1 if data._victim_died else 0)
    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 AvatarAdminServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AvatarAdminServerPacket AvatarAdminServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/avatar_admin_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "AvatarAdminServerPacket":
    """
    Deserializes an instance of `AvatarAdminServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AvatarAdminServerPacket: The data to serialize.
    """
    data: AvatarAdminServerPacket = AvatarAdminServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._caster_id = reader.get_short()
        data._victim_id = reader.get_short()
        data._caster_direction = Direction(reader.get_char())
        data._damage = reader.get_three()
        data._hp_percentage = reader.get_char()
        data._victim_died = reader.get_char() != 0
        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

AttackPlayerServerPacket

Bases: Packet

Nearby player attacking

Source code in src/eolib/protocol/_generated/net/server/attack_player_server_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 AttackPlayerServerPacket(Packet):
    """
    Nearby player attacking
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _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 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

    @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.Attack

    @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.
        """
        AttackPlayerServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AttackPlayerServerPacket") -> None:
        """
        Serializes an instance of `AttackPlayerServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AttackPlayerServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))

    @staticmethod
    def deserialize(reader: EoReader) -> "AttackPlayerServerPacket":
        """
        Deserializes an instance of `AttackPlayerServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AttackPlayerServerPacket: The data to serialize.
        """
        data: AttackPlayerServerPacket = AttackPlayerServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_id = reader.get_short()
            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"AttackPlayerServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, 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.

player_id: int property writable

Note
  • Value range is 0-64008.

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/server/attack_player_server_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/server/attack_player_server_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.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/server/attack_player_server_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.
    """
    AttackPlayerServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AttackPlayerServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AttackPlayerServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/attack_player_server_packet.py
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@staticmethod
def serialize(writer: EoWriter, data: "AttackPlayerServerPacket") -> None:
    """
    Serializes an instance of `AttackPlayerServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AttackPlayerServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))

deserialize(reader) staticmethod

Deserializes an instance of AttackPlayerServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AttackPlayerServerPacket AttackPlayerServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/attack_player_server_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) -> "AttackPlayerServerPacket":
    """
    Deserializes an instance of `AttackPlayerServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AttackPlayerServerPacket: The data to serialize.
    """
    data: AttackPlayerServerPacket = AttackPlayerServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_id = reader.get_short()
        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

AttackErrorServerPacket

Bases: Packet

Show flood protection message (vestigial)

Source code in src/eolib/protocol/_generated/net/server/attack_error_server_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 AttackErrorServerPacket(Packet):
    """
    Show flood protection message (vestigial)
    """
    _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.Attack

    @staticmethod
    def action() -> PacketAction:
        """
        Returns the packet action associated with this packet.

        Returns:
            PacketAction: The packet action associated with this packet.
        """
        return PacketAction.Error

    def write(self, writer):
        """
        Serializes and writes this packet to the provided EoWriter.

        Args:
            writer (EoWriter): the writer that this packet will be written to.
        """
        AttackErrorServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AttackErrorServerPacket") -> None:
        """
        Serializes an instance of `AttackErrorServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AttackErrorServerPacket): 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) -> "AttackErrorServerPacket":
        """
        Deserializes an instance of `AttackErrorServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AttackErrorServerPacket: The data to serialize.
        """
        data: AttackErrorServerPacket = AttackErrorServerPacket()
        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"AttackErrorServerPacket(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/server/attack_error_server_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.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/server/attack_error_server_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.Error

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/server/attack_error_server_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.
    """
    AttackErrorServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AttackErrorServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AttackErrorServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/attack_error_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "AttackErrorServerPacket") -> None:
    """
    Serializes an instance of `AttackErrorServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AttackErrorServerPacket): 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 AttackErrorServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AttackErrorServerPacket AttackErrorServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/attack_error_server_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) -> "AttackErrorServerPacket":
    """
    Deserializes an instance of `AttackErrorServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AttackErrorServerPacket: The data to serialize.
    """
    data: AttackErrorServerPacket = AttackErrorServerPacket()
    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

ArenaUseServerPacket

Bases: Packet

Arena start message

Source code in src/eolib/protocol/_generated/net/server/arena_use_server_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 ArenaUseServerPacket(Packet):
    """
    Arena start message
    """
    _byte_size: int = 0
    _players_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 players_count(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._players_count

    @players_count.setter
    def players_count(self, players_count: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._players_count = players_count

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Arena

    @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.
        """
        ArenaUseServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ArenaUseServerPacket") -> None:
        """
        Serializes an instance of `ArenaUseServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ArenaUseServerPacket): The data to serialize.
        """
        if data._players_count is None:
            raise SerializationError("players_count must be provided.")
        writer.add_char(data._players_count)

    @staticmethod
    def deserialize(reader: EoReader) -> "ArenaUseServerPacket":
        """
        Deserializes an instance of `ArenaUseServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ArenaUseServerPacket: The data to serialize.
        """
        data: ArenaUseServerPacket = ArenaUseServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._players_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"ArenaUseServerPacket(byte_size={repr(self._byte_size)}, players_count={repr(self._players_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.

players_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/server/arena_use_server_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.Arena

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/server/arena_use_server_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/server/arena_use_server_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.
    """
    ArenaUseServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ArenaUseServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ArenaUseServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/arena_use_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "ArenaUseServerPacket") -> None:
    """
    Serializes an instance of `ArenaUseServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ArenaUseServerPacket): The data to serialize.
    """
    if data._players_count is None:
        raise SerializationError("players_count must be provided.")
    writer.add_char(data._players_count)

deserialize(reader) staticmethod

Deserializes an instance of ArenaUseServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ArenaUseServerPacket ArenaUseServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/arena_use_server_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) -> "ArenaUseServerPacket":
    """
    Deserializes an instance of `ArenaUseServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ArenaUseServerPacket: The data to serialize.
    """
    data: ArenaUseServerPacket = ArenaUseServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._players_count = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ArenaSpecServerPacket

Bases: Packet

Arena kill message

Source code in src/eolib/protocol/_generated/net/server/arena_spec_server_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
class ArenaSpecServerPacket(Packet):
    """
    Arena kill message
    """
    _byte_size: int = 0
    _player_id: int = None # type: ignore [assignment]
    _direction: Direction = None # type: ignore [assignment]
    _kills_count: int = None # type: ignore [assignment]
    _killer_name: str = None # type: ignore [assignment]
    _victim_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 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

    @property
    def direction(self) -> Direction:
        return self._direction

    @direction.setter
    def direction(self, direction: Direction) -> None:
        self._direction = direction

    @property
    def kills_count(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._kills_count

    @kills_count.setter
    def kills_count(self, kills_count: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._kills_count = kills_count

    @property
    def killer_name(self) -> str:
        return self._killer_name

    @killer_name.setter
    def killer_name(self, killer_name: str) -> None:
        self._killer_name = killer_name

    @property
    def victim_name(self) -> str:
        return self._victim_name

    @victim_name.setter
    def victim_name(self, victim_name: str) -> None:
        self._victim_name = victim_name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Arena

    @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.
        """
        ArenaSpecServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ArenaSpecServerPacket") -> None:
        """
        Serializes an instance of `ArenaSpecServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ArenaSpecServerPacket): The data to serialize.
        """
        if data._player_id is None:
            raise SerializationError("player_id must be provided.")
        writer.add_short(data._player_id)
        writer.add_byte(0xFF)
        if data._direction is None:
            raise SerializationError("direction must be provided.")
        writer.add_char(int(data._direction))
        writer.add_byte(0xFF)
        if data._kills_count is None:
            raise SerializationError("kills_count must be provided.")
        writer.add_int(data._kills_count)
        writer.add_byte(0xFF)
        if data._killer_name is None:
            raise SerializationError("killer_name must be provided.")
        writer.add_string(data._killer_name)
        writer.add_byte(0xFF)
        if data._victim_name is None:
            raise SerializationError("victim_name must be provided.")
        writer.add_string(data._victim_name)

    @staticmethod
    def deserialize(reader: EoReader) -> "ArenaSpecServerPacket":
        """
        Deserializes an instance of `ArenaSpecServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ArenaSpecServerPacket: The data to serialize.
        """
        data: ArenaSpecServerPacket = ArenaSpecServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._player_id = reader.get_short()
            reader.next_chunk()
            data._direction = Direction(reader.get_char())
            reader.next_chunk()
            data._kills_count = reader.get_int()
            reader.next_chunk()
            data._killer_name = reader.get_string()
            reader.next_chunk()
            data._victim_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"ArenaSpecServerPacket(byte_size={repr(self._byte_size)}, player_id={repr(self._player_id)}, direction={repr(self._direction)}, kills_count={repr(self._kills_count)}, killer_name={repr(self._killer_name)}, victim_name={repr(self._victim_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.

player_id: int property writable

Note
  • Value range is 0-64008.

direction: Direction property writable

kills_count: int property writable

Note
  • Value range is 0-4097152080.

killer_name: str property writable

victim_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/server/arena_spec_server_packet.py
91
92
93
94
95
96
97
98
99
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.Arena

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/server/arena_spec_server_packet.py
101
102
103
104
105
106
107
108
109
@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/server/arena_spec_server_packet.py
111
112
113
114
115
116
117
118
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    ArenaSpecServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ArenaSpecServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ArenaSpecServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/arena_spec_server_packet.py
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@staticmethod
def serialize(writer: EoWriter, data: "ArenaSpecServerPacket") -> None:
    """
    Serializes an instance of `ArenaSpecServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ArenaSpecServerPacket): The data to serialize.
    """
    if data._player_id is None:
        raise SerializationError("player_id must be provided.")
    writer.add_short(data._player_id)
    writer.add_byte(0xFF)
    if data._direction is None:
        raise SerializationError("direction must be provided.")
    writer.add_char(int(data._direction))
    writer.add_byte(0xFF)
    if data._kills_count is None:
        raise SerializationError("kills_count must be provided.")
    writer.add_int(data._kills_count)
    writer.add_byte(0xFF)
    if data._killer_name is None:
        raise SerializationError("killer_name must be provided.")
    writer.add_string(data._killer_name)
    writer.add_byte(0xFF)
    if data._victim_name is None:
        raise SerializationError("victim_name must be provided.")
    writer.add_string(data._victim_name)

deserialize(reader) staticmethod

Deserializes an instance of ArenaSpecServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ArenaSpecServerPacket ArenaSpecServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/arena_spec_server_packet.py
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
@staticmethod
def deserialize(reader: EoReader) -> "ArenaSpecServerPacket":
    """
    Deserializes an instance of `ArenaSpecServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ArenaSpecServerPacket: The data to serialize.
    """
    data: ArenaSpecServerPacket = ArenaSpecServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._player_id = reader.get_short()
        reader.next_chunk()
        data._direction = Direction(reader.get_char())
        reader.next_chunk()
        data._kills_count = reader.get_int()
        reader.next_chunk()
        data._killer_name = reader.get_string()
        reader.next_chunk()
        data._victim_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

ArenaDropServerPacket

Bases: Packet

"Arena is blocked" message

Source code in src/eolib/protocol/_generated/net/server/arena_drop_server_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 ArenaDropServerPacket(Packet):
    """
    &quot;Arena is blocked&quot; message
    """
    _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.Arena

    @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.
        """
        ArenaDropServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ArenaDropServerPacket") -> None:
        """
        Serializes an instance of `ArenaDropServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ArenaDropServerPacket): 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) -> "ArenaDropServerPacket":
        """
        Deserializes an instance of `ArenaDropServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ArenaDropServerPacket: The data to serialize.
        """
        data: ArenaDropServerPacket = ArenaDropServerPacket()
        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"ArenaDropServerPacket(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/server/arena_drop_server_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.Arena

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/server/arena_drop_server_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.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/server/arena_drop_server_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.
    """
    ArenaDropServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ArenaDropServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ArenaDropServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/arena_drop_server_packet.py
57
58
59
60
61
62
63
64
65
66
67
68
@staticmethod
def serialize(writer: EoWriter, data: "ArenaDropServerPacket") -> None:
    """
    Serializes an instance of `ArenaDropServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ArenaDropServerPacket): 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 ArenaDropServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ArenaDropServerPacket ArenaDropServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/arena_drop_server_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) -> "ArenaDropServerPacket":
    """
    Deserializes an instance of `ArenaDropServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ArenaDropServerPacket: The data to serialize.
    """
    data: ArenaDropServerPacket = ArenaDropServerPacket()
    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

ArenaAcceptServerPacket

Bases: Packet

Arena win message

Source code in src/eolib/protocol/_generated/net/server/arena_accept_server_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
class ArenaAcceptServerPacket(Packet):
    """
    Arena win message
    """
    _byte_size: int = 0
    _winner_name: str = None # type: ignore [assignment]
    _kills_count: int = None # type: ignore [assignment]
    _killer_name: str = None # type: ignore [assignment]
    _victim_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 winner_name(self) -> str:
        return self._winner_name

    @winner_name.setter
    def winner_name(self, winner_name: str) -> None:
        self._winner_name = winner_name

    @property
    def kills_count(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._kills_count

    @kills_count.setter
    def kills_count(self, kills_count: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._kills_count = kills_count

    @property
    def killer_name(self) -> str:
        return self._killer_name

    @killer_name.setter
    def killer_name(self, killer_name: str) -> None:
        self._killer_name = killer_name

    @property
    def victim_name(self) -> str:
        return self._victim_name

    @victim_name.setter
    def victim_name(self, victim_name: str) -> None:
        self._victim_name = victim_name

    @staticmethod
    def family() -> PacketFamily:
        """
        Returns the packet family associated with this packet.

        Returns:
            PacketFamily: The packet family associated with this packet.
        """
        return PacketFamily.Arena

    @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.
        """
        ArenaAcceptServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "ArenaAcceptServerPacket") -> None:
        """
        Serializes an instance of `ArenaAcceptServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (ArenaAcceptServerPacket): The data to serialize.
        """
        if data._winner_name is None:
            raise SerializationError("winner_name must be provided.")
        writer.add_string(data._winner_name)
        writer.add_byte(0xFF)
        if data._kills_count is None:
            raise SerializationError("kills_count must be provided.")
        writer.add_int(data._kills_count)
        writer.add_byte(0xFF)
        if data._killer_name is None:
            raise SerializationError("killer_name must be provided.")
        writer.add_string(data._killer_name)
        writer.add_byte(0xFF)
        if data._victim_name is None:
            raise SerializationError("victim_name must be provided.")
        writer.add_string(data._victim_name)

    @staticmethod
    def deserialize(reader: EoReader) -> "ArenaAcceptServerPacket":
        """
        Deserializes an instance of `ArenaAcceptServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            ArenaAcceptServerPacket: The data to serialize.
        """
        data: ArenaAcceptServerPacket = ArenaAcceptServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._winner_name = reader.get_string()
            reader.next_chunk()
            data._kills_count = reader.get_int()
            reader.next_chunk()
            data._killer_name = reader.get_string()
            reader.next_chunk()
            data._victim_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"ArenaAcceptServerPacket(byte_size={repr(self._byte_size)}, winner_name={repr(self._winner_name)}, kills_count={repr(self._kills_count)}, killer_name={repr(self._killer_name)}, victim_name={repr(self._victim_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.

winner_name: str property writable

kills_count: int property writable

Note
  • Value range is 0-4097152080.

killer_name: str property writable

victim_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/server/arena_accept_server_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.Arena

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/server/arena_accept_server_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.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/server/arena_accept_server_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.
    """
    ArenaAcceptServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of ArenaAcceptServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ArenaAcceptServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/arena_accept_server_packet.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@staticmethod
def serialize(writer: EoWriter, data: "ArenaAcceptServerPacket") -> None:
    """
    Serializes an instance of `ArenaAcceptServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (ArenaAcceptServerPacket): The data to serialize.
    """
    if data._winner_name is None:
        raise SerializationError("winner_name must be provided.")
    writer.add_string(data._winner_name)
    writer.add_byte(0xFF)
    if data._kills_count is None:
        raise SerializationError("kills_count must be provided.")
    writer.add_int(data._kills_count)
    writer.add_byte(0xFF)
    if data._killer_name is None:
        raise SerializationError("killer_name must be provided.")
    writer.add_string(data._killer_name)
    writer.add_byte(0xFF)
    if data._victim_name is None:
        raise SerializationError("victim_name must be provided.")
    writer.add_string(data._victim_name)

deserialize(reader) staticmethod

Deserializes an instance of ArenaAcceptServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
ArenaAcceptServerPacket ArenaAcceptServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/arena_accept_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "ArenaAcceptServerPacket":
    """
    Deserializes an instance of `ArenaAcceptServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        ArenaAcceptServerPacket: The data to serialize.
    """
    data: ArenaAcceptServerPacket = ArenaAcceptServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._winner_name = reader.get_string()
        reader.next_chunk()
        data._kills_count = reader.get_int()
        reader.next_chunk()
        data._killer_name = reader.get_string()
        reader.next_chunk()
        data._victim_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

AdminMessageType

Bases: IntEnum

Type of message sent to admins via the Help menu

Source code in src/eolib/protocol/_generated/net/server/admin_message_type.py
 9
10
11
12
13
14
class AdminMessageType(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Type of message sent to admins via the Help menu
    """
    Message = 1
    Report = 2

Message = 1 class-attribute instance-attribute

Report = 2 class-attribute instance-attribute

AdminInteractTellServerPacket

Bases: Packet

Admin character info lookup

Source code in src/eolib/protocol/_generated/net/server/admin_interact_tell_server_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
class AdminInteractTellServerPacket(Packet):
    """
    Admin character info lookup
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _usage: int = None # type: ignore [assignment]
    _exp: int = None # type: ignore [assignment]
    _level: int = None # type: ignore [assignment]
    _map_id: int = None # type: ignore [assignment]
    _map_coords: BigCoords = None # type: ignore [assignment]
    _stats: CharacterStatsInfoLookup = None # type: ignore [assignment]
    _weight: Weight = 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 usage(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._usage

    @usage.setter
    def usage(self, usage: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._usage = usage

    @property
    def exp(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._exp

    @exp.setter
    def exp(self, exp: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._exp = exp

    @property
    def level(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._level

    @level.setter
    def level(self, level: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._level = level

    @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 map_coords(self) -> BigCoords:
        return self._map_coords

    @map_coords.setter
    def map_coords(self, map_coords: BigCoords) -> None:
        self._map_coords = map_coords

    @property
    def stats(self) -> CharacterStatsInfoLookup:
        return self._stats

    @stats.setter
    def stats(self, stats: CharacterStatsInfoLookup) -> None:
        self._stats = stats

    @property
    def weight(self) -> Weight:
        return self._weight

    @weight.setter
    def weight(self, weight: Weight) -> None:
        self._weight = weight

    @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.
        """
        AdminInteractTellServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractTellServerPacket") -> None:
        """
        Serializes an instance of `AdminInteractTellServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractTellServerPacket): 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._usage is None:
            raise SerializationError("usage must be provided.")
        writer.add_int(data._usage)
        writer.add_byte(0xFF)
        writer.add_byte(0xFF)
        if data._exp is None:
            raise SerializationError("exp must be provided.")
        writer.add_int(data._exp)
        if data._level is None:
            raise SerializationError("level must be provided.")
        writer.add_char(data._level)
        if data._map_id is None:
            raise SerializationError("map_id must be provided.")
        writer.add_short(data._map_id)
        if data._map_coords is None:
            raise SerializationError("map_coords must be provided.")
        BigCoords.serialize(writer, data._map_coords)
        if data._stats is None:
            raise SerializationError("stats must be provided.")
        CharacterStatsInfoLookup.serialize(writer, data._stats)
        if data._weight is None:
            raise SerializationError("weight must be provided.")
        Weight.serialize(writer, data._weight)

    @staticmethod
    def deserialize(reader: EoReader) -> "AdminInteractTellServerPacket":
        """
        Deserializes an instance of `AdminInteractTellServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractTellServerPacket: The data to serialize.
        """
        data: AdminInteractTellServerPacket = AdminInteractTellServerPacket()
        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._usage = reader.get_int()
            reader.next_chunk()
            reader.next_chunk()
            data._exp = reader.get_int()
            data._level = reader.get_char()
            data._map_id = reader.get_short()
            data._map_coords = BigCoords.deserialize(reader)
            data._stats = CharacterStatsInfoLookup.deserialize(reader)
            data._weight = Weight.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"AdminInteractTellServerPacket(byte_size={repr(self._byte_size)}, name={repr(self._name)}, usage={repr(self._usage)}, exp={repr(self._exp)}, level={repr(self._level)}, map_id={repr(self._map_id)}, map_coords={repr(self._map_coords)}, stats={repr(self._stats)}, weight={repr(self._weight)})"

byte_size: int property

Returns the size 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

usage: int property writable

Note
  • Value range is 0-4097152080.

exp: int property writable

Note
  • Value range is 0-4097152080.

level: int property writable

Note
  • Value range is 0-252.

map_id: int property writable

Note
  • Value range is 0-64008.

map_coords: BigCoords property writable

stats: CharacterStatsInfoLookup property writable

weight: Weight 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/server/admin_interact_tell_server_packet.py
136
137
138
139
140
141
142
143
144
@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/server/admin_interact_tell_server_packet.py
146
147
148
149
150
151
152
153
154
@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/server/admin_interact_tell_server_packet.py
156
157
158
159
160
161
162
163
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AdminInteractTellServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractTellServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AdminInteractTellServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/admin_interact_tell_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractTellServerPacket") -> None:
    """
    Serializes an instance of `AdminInteractTellServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractTellServerPacket): 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._usage is None:
        raise SerializationError("usage must be provided.")
    writer.add_int(data._usage)
    writer.add_byte(0xFF)
    writer.add_byte(0xFF)
    if data._exp is None:
        raise SerializationError("exp must be provided.")
    writer.add_int(data._exp)
    if data._level is None:
        raise SerializationError("level must be provided.")
    writer.add_char(data._level)
    if data._map_id is None:
        raise SerializationError("map_id must be provided.")
    writer.add_short(data._map_id)
    if data._map_coords is None:
        raise SerializationError("map_coords must be provided.")
    BigCoords.serialize(writer, data._map_coords)
    if data._stats is None:
        raise SerializationError("stats must be provided.")
    CharacterStatsInfoLookup.serialize(writer, data._stats)
    if data._weight is None:
        raise SerializationError("weight must be provided.")
    Weight.serialize(writer, data._weight)

deserialize(reader) staticmethod

Deserializes an instance of AdminInteractTellServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AdminInteractTellServerPacket AdminInteractTellServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/admin_interact_tell_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "AdminInteractTellServerPacket":
    """
    Deserializes an instance of `AdminInteractTellServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractTellServerPacket: The data to serialize.
    """
    data: AdminInteractTellServerPacket = AdminInteractTellServerPacket()
    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._usage = reader.get_int()
        reader.next_chunk()
        reader.next_chunk()
        data._exp = reader.get_int()
        data._level = reader.get_char()
        data._map_id = reader.get_short()
        data._map_coords = BigCoords.deserialize(reader)
        data._stats = CharacterStatsInfoLookup.deserialize(reader)
        data._weight = Weight.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

AdminInteractReplyServerPacket

Bases: Packet

Incoming admin message

Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_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
class AdminInteractReplyServerPacket(Packet):
    """
    Incoming admin message
    """
    _byte_size: int = 0
    _message_type: AdminMessageType = None # type: ignore [assignment]
    _message_type_data: 'AdminInteractReplyServerPacket.MessageTypeData' = 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 message_type(self) -> AdminMessageType:
        return self._message_type

    @message_type.setter
    def message_type(self, message_type: AdminMessageType) -> None:
        self._message_type = message_type

    @property
    def message_type_data(self) -> 'AdminInteractReplyServerPacket.MessageTypeData':
        """
        AdminInteractReplyServerPacket.MessageTypeData: Gets or sets the data associated with the `message_type` field.
        """
        return self._message_type_data

    @message_type_data.setter
    def message_type_data(self, message_type_data: 'AdminInteractReplyServerPacket.MessageTypeData') -> None:
        self._message_type_data = message_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.AdminInteract

    @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.
        """
        AdminInteractReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractReplyServerPacket") -> None:
        """
        Serializes an instance of `AdminInteractReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractReplyServerPacket): The data to serialize.
        """
        if data._message_type is None:
            raise SerializationError("message_type must be provided.")
        writer.add_char(int(data._message_type))
        writer.add_byte(0xFF)
        if data._message_type == AdminMessageType.Message:
            if not isinstance(data._message_type_data, AdminInteractReplyServerPacket.MessageTypeDataMessage):
                raise SerializationError("Expected message_type_data to be type AdminInteractReplyServerPacket.MessageTypeDataMessage for message_type " + AdminMessageType(data._message_type).name + ".")
            AdminInteractReplyServerPacket.MessageTypeDataMessage.serialize(writer, data._message_type_data)
        elif data._message_type == AdminMessageType.Report:
            if not isinstance(data._message_type_data, AdminInteractReplyServerPacket.MessageTypeDataReport):
                raise SerializationError("Expected message_type_data to be type AdminInteractReplyServerPacket.MessageTypeDataReport for message_type " + AdminMessageType(data._message_type).name + ".")
            AdminInteractReplyServerPacket.MessageTypeDataReport.serialize(writer, data._message_type_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "AdminInteractReplyServerPacket":
        """
        Deserializes an instance of `AdminInteractReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractReplyServerPacket: The data to serialize.
        """
        data: AdminInteractReplyServerPacket = AdminInteractReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            reader.chunked_reading_mode = True
            data._message_type = AdminMessageType(reader.get_char())
            reader.next_chunk()
            if data._message_type == AdminMessageType.Message:
                data._message_type_data = AdminInteractReplyServerPacket.MessageTypeDataMessage.deserialize(reader)
            elif data._message_type == AdminMessageType.Report:
                data._message_type_data = AdminInteractReplyServerPacket.MessageTypeDataReport.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"AdminInteractReplyServerPacket(byte_size={repr(self._byte_size)}, message_type={repr(self._message_type)}, message_type_data={repr(self._message_type_data)})"

    MessageTypeData = Union['AdminInteractReplyServerPacket.MessageTypeDataMessage', 'AdminInteractReplyServerPacket.MessageTypeDataReport', None]
    MessageTypeData.__doc__ = \
        """
        Data associated with different values of the `message_type` field.
        """

    class MessageTypeDataMessage:
        """
        Data associated with message_type value AdminMessageType.Message
        """
        _byte_size: int = 0
        _player_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 player_name(self) -> str:
            return self._player_name

        @player_name.setter
        def player_name(self, player_name: str) -> None:
            self._player_name = player_name

        @property
        def message(self) -> str:
            return self._message

        @message.setter
        def message(self, message: str) -> None:
            self._message = message

        @staticmethod
        def serialize(writer: EoWriter, data: "AdminInteractReplyServerPacket.MessageTypeDataMessage") -> None:
            """
            Serializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataMessage` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AdminInteractReplyServerPacket.MessageTypeDataMessage): The data to serialize.
            """
            if data._player_name is None:
                raise SerializationError("player_name must be provided.")
            writer.add_string(data._player_name)
            writer.add_byte(0xFF)
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
            writer.add_byte(0xFF)

        @staticmethod
        def deserialize(reader: EoReader) -> "AdminInteractReplyServerPacket.MessageTypeDataMessage":
            """
            Deserializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataMessage` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AdminInteractReplyServerPacket.MessageTypeDataMessage: The data to serialize.
            """
            data: AdminInteractReplyServerPacket.MessageTypeDataMessage = AdminInteractReplyServerPacket.MessageTypeDataMessage()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._player_name = reader.get_string()
                reader.next_chunk()
                data._message = reader.get_string()
                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"AdminInteractReplyServerPacket.MessageTypeDataMessage(byte_size={repr(self._byte_size)}, player_name={repr(self._player_name)}, message={repr(self._message)})"

    class MessageTypeDataReport:
        """
        Data associated with message_type value AdminMessageType.Report
        """
        _byte_size: int = 0
        _player_name: str = None # type: ignore [assignment]
        _message: str = None # type: ignore [assignment]
        _reportee_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 player_name(self) -> str:
            return self._player_name

        @player_name.setter
        def player_name(self, player_name: str) -> None:
            self._player_name = player_name

        @property
        def message(self) -> str:
            return self._message

        @message.setter
        def message(self, message: str) -> None:
            self._message = message

        @property
        def reportee_name(self) -> str:
            return self._reportee_name

        @reportee_name.setter
        def reportee_name(self, reportee_name: str) -> None:
            self._reportee_name = reportee_name

        @staticmethod
        def serialize(writer: EoWriter, data: "AdminInteractReplyServerPacket.MessageTypeDataReport") -> None:
            """
            Serializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataReport` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AdminInteractReplyServerPacket.MessageTypeDataReport): The data to serialize.
            """
            if data._player_name is None:
                raise SerializationError("player_name must be provided.")
            writer.add_string(data._player_name)
            writer.add_byte(0xFF)
            if data._message is None:
                raise SerializationError("message must be provided.")
            writer.add_string(data._message)
            writer.add_byte(0xFF)
            if data._reportee_name is None:
                raise SerializationError("reportee_name must be provided.")
            writer.add_string(data._reportee_name)
            writer.add_byte(0xFF)

        @staticmethod
        def deserialize(reader: EoReader) -> "AdminInteractReplyServerPacket.MessageTypeDataReport":
            """
            Deserializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataReport` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AdminInteractReplyServerPacket.MessageTypeDataReport: The data to serialize.
            """
            data: AdminInteractReplyServerPacket.MessageTypeDataReport = AdminInteractReplyServerPacket.MessageTypeDataReport()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._player_name = reader.get_string()
                reader.next_chunk()
                data._message = reader.get_string()
                reader.next_chunk()
                data._reportee_name = reader.get_string()
                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"AdminInteractReplyServerPacket.MessageTypeDataReport(byte_size={repr(self._byte_size)}, player_name={repr(self._player_name)}, message={repr(self._message)}, reportee_name={repr(self._reportee_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.

message_type: AdminMessageType property writable

message_type_data: AdminInteractReplyServerPacket.MessageTypeData property writable

AdminInteractReplyServerPacket.MessageTypeData: Gets or sets the data associated with the message_type field.

MessageTypeData = Union['AdminInteractReplyServerPacket.MessageTypeDataMessage', 'AdminInteractReplyServerPacket.MessageTypeDataReport', None] class-attribute instance-attribute

MessageTypeDataMessage

Data associated with message_type value AdminMessageType.Message

Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_packet.py
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
class MessageTypeDataMessage:
    """
    Data associated with message_type value AdminMessageType.Message
    """
    _byte_size: int = 0
    _player_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_name

    @property
    def message(self) -> str:
        return self._message

    @message.setter
    def message(self, message: str) -> None:
        self._message = message

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractReplyServerPacket.MessageTypeDataMessage") -> None:
        """
        Serializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataMessage` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractReplyServerPacket.MessageTypeDataMessage): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_name)
        writer.add_byte(0xFF)
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
        writer.add_byte(0xFF)

    @staticmethod
    def deserialize(reader: EoReader) -> "AdminInteractReplyServerPacket.MessageTypeDataMessage":
        """
        Deserializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataMessage` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractReplyServerPacket.MessageTypeDataMessage: The data to serialize.
        """
        data: AdminInteractReplyServerPacket.MessageTypeDataMessage = AdminInteractReplyServerPacket.MessageTypeDataMessage()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_name = reader.get_string()
            reader.next_chunk()
            data._message = reader.get_string()
            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"AdminInteractReplyServerPacket.MessageTypeDataMessage(byte_size={repr(self._byte_size)}, player_name={repr(self._player_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.

player_name: str property writable

message: str property writable

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractReplyServerPacket.MessageTypeDataMessage to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MessageTypeDataMessage

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_packet.py
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractReplyServerPacket.MessageTypeDataMessage") -> None:
    """
    Serializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataMessage` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractReplyServerPacket.MessageTypeDataMessage): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_name)
    writer.add_byte(0xFF)
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)
    writer.add_byte(0xFF)

deserialize(reader) staticmethod

Deserializes an instance of AdminInteractReplyServerPacket.MessageTypeDataMessage from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
MessageTypeDataMessage

AdminInteractReplyServerPacket.MessageTypeDataMessage: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_packet.py
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
@staticmethod
def deserialize(reader: EoReader) -> "AdminInteractReplyServerPacket.MessageTypeDataMessage":
    """
    Deserializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataMessage` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractReplyServerPacket.MessageTypeDataMessage: The data to serialize.
    """
    data: AdminInteractReplyServerPacket.MessageTypeDataMessage = AdminInteractReplyServerPacket.MessageTypeDataMessage()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_name = reader.get_string()
        reader.next_chunk()
        data._message = reader.get_string()
        reader.next_chunk()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

MessageTypeDataReport

Data associated with message_type value AdminMessageType.Report

Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_packet.py
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
class MessageTypeDataReport:
    """
    Data associated with message_type value AdminMessageType.Report
    """
    _byte_size: int = 0
    _player_name: str = None # type: ignore [assignment]
    _message: str = None # type: ignore [assignment]
    _reportee_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 player_name(self) -> str:
        return self._player_name

    @player_name.setter
    def player_name(self, player_name: str) -> None:
        self._player_name = player_name

    @property
    def message(self) -> str:
        return self._message

    @message.setter
    def message(self, message: str) -> None:
        self._message = message

    @property
    def reportee_name(self) -> str:
        return self._reportee_name

    @reportee_name.setter
    def reportee_name(self, reportee_name: str) -> None:
        self._reportee_name = reportee_name

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractReplyServerPacket.MessageTypeDataReport") -> None:
        """
        Serializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataReport` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractReplyServerPacket.MessageTypeDataReport): The data to serialize.
        """
        if data._player_name is None:
            raise SerializationError("player_name must be provided.")
        writer.add_string(data._player_name)
        writer.add_byte(0xFF)
        if data._message is None:
            raise SerializationError("message must be provided.")
        writer.add_string(data._message)
        writer.add_byte(0xFF)
        if data._reportee_name is None:
            raise SerializationError("reportee_name must be provided.")
        writer.add_string(data._reportee_name)
        writer.add_byte(0xFF)

    @staticmethod
    def deserialize(reader: EoReader) -> "AdminInteractReplyServerPacket.MessageTypeDataReport":
        """
        Deserializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataReport` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractReplyServerPacket.MessageTypeDataReport: The data to serialize.
        """
        data: AdminInteractReplyServerPacket.MessageTypeDataReport = AdminInteractReplyServerPacket.MessageTypeDataReport()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._player_name = reader.get_string()
            reader.next_chunk()
            data._message = reader.get_string()
            reader.next_chunk()
            data._reportee_name = reader.get_string()
            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"AdminInteractReplyServerPacket.MessageTypeDataReport(byte_size={repr(self._byte_size)}, player_name={repr(self._player_name)}, message={repr(self._message)}, reportee_name={repr(self._reportee_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.

player_name: str property writable

message: str property writable

reportee_name: str property writable

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractReplyServerPacket.MessageTypeDataReport to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data MessageTypeDataReport

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_packet.py
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractReplyServerPacket.MessageTypeDataReport") -> None:
    """
    Serializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataReport` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractReplyServerPacket.MessageTypeDataReport): The data to serialize.
    """
    if data._player_name is None:
        raise SerializationError("player_name must be provided.")
    writer.add_string(data._player_name)
    writer.add_byte(0xFF)
    if data._message is None:
        raise SerializationError("message must be provided.")
    writer.add_string(data._message)
    writer.add_byte(0xFF)
    if data._reportee_name is None:
        raise SerializationError("reportee_name must be provided.")
    writer.add_string(data._reportee_name)
    writer.add_byte(0xFF)

deserialize(reader) staticmethod

Deserializes an instance of AdminInteractReplyServerPacket.MessageTypeDataReport from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
MessageTypeDataReport

AdminInteractReplyServerPacket.MessageTypeDataReport: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "AdminInteractReplyServerPacket.MessageTypeDataReport":
    """
    Deserializes an instance of `AdminInteractReplyServerPacket.MessageTypeDataReport` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractReplyServerPacket.MessageTypeDataReport: The data to serialize.
    """
    data: AdminInteractReplyServerPacket.MessageTypeDataReport = AdminInteractReplyServerPacket.MessageTypeDataReport()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._player_name = reader.get_string()
        reader.next_chunk()
        data._message = reader.get_string()
        reader.next_chunk()
        data._reportee_name = reader.get_string()
        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/server/admin_interact_reply_server_packet.py
52
53
54
55
56
57
58
59
60
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/admin_interact_reply_server_packet.py
62
63
64
65
66
67
68
69
70
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/admin_interact_reply_server_packet.py
72
73
74
75
76
77
78
79
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AdminInteractReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AdminInteractReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_packet.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractReplyServerPacket") -> None:
    """
    Serializes an instance of `AdminInteractReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractReplyServerPacket): The data to serialize.
    """
    if data._message_type is None:
        raise SerializationError("message_type must be provided.")
    writer.add_char(int(data._message_type))
    writer.add_byte(0xFF)
    if data._message_type == AdminMessageType.Message:
        if not isinstance(data._message_type_data, AdminInteractReplyServerPacket.MessageTypeDataMessage):
            raise SerializationError("Expected message_type_data to be type AdminInteractReplyServerPacket.MessageTypeDataMessage for message_type " + AdminMessageType(data._message_type).name + ".")
        AdminInteractReplyServerPacket.MessageTypeDataMessage.serialize(writer, data._message_type_data)
    elif data._message_type == AdminMessageType.Report:
        if not isinstance(data._message_type_data, AdminInteractReplyServerPacket.MessageTypeDataReport):
            raise SerializationError("Expected message_type_data to be type AdminInteractReplyServerPacket.MessageTypeDataReport for message_type " + AdminMessageType(data._message_type).name + ".")
        AdminInteractReplyServerPacket.MessageTypeDataReport.serialize(writer, data._message_type_data)

deserialize(reader) staticmethod

Deserializes an instance of AdminInteractReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AdminInteractReplyServerPacket AdminInteractReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/admin_interact_reply_server_packet.py
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
@staticmethod
def deserialize(reader: EoReader) -> "AdminInteractReplyServerPacket":
    """
    Deserializes an instance of `AdminInteractReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractReplyServerPacket: The data to serialize.
    """
    data: AdminInteractReplyServerPacket = AdminInteractReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.chunked_reading_mode = True
        data._message_type = AdminMessageType(reader.get_char())
        reader.next_chunk()
        if data._message_type == AdminMessageType.Message:
            data._message_type_data = AdminInteractReplyServerPacket.MessageTypeDataMessage.deserialize(reader)
        elif data._message_type == AdminMessageType.Report:
            data._message_type_data = AdminInteractReplyServerPacket.MessageTypeDataReport.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

AdminInteractRemoveServerPacket

Bases: Packet

Nearby player disappearing (admin hide)

Source code in src/eolib/protocol/_generated/net/server/admin_interact_remove_server_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 AdminInteractRemoveServerPacket(Packet):
    """
    Nearby player disappearing (admin hide)
    """
    _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.AdminInteract

    @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.
        """
        AdminInteractRemoveServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractRemoveServerPacket") -> None:
        """
        Serializes an instance of `AdminInteractRemoveServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractRemoveServerPacket): 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) -> "AdminInteractRemoveServerPacket":
        """
        Deserializes an instance of `AdminInteractRemoveServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractRemoveServerPacket: The data to serialize.
        """
        data: AdminInteractRemoveServerPacket = AdminInteractRemoveServerPacket()
        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"AdminInteractRemoveServerPacket(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/server/admin_interact_remove_server_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.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/server/admin_interact_remove_server_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/server/admin_interact_remove_server_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.
    """
    AdminInteractRemoveServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractRemoveServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AdminInteractRemoveServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/admin_interact_remove_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractRemoveServerPacket") -> None:
    """
    Serializes an instance of `AdminInteractRemoveServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractRemoveServerPacket): 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 AdminInteractRemoveServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AdminInteractRemoveServerPacket AdminInteractRemoveServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/admin_interact_remove_server_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) -> "AdminInteractRemoveServerPacket":
    """
    Deserializes an instance of `AdminInteractRemoveServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractRemoveServerPacket: The data to serialize.
    """
    data: AdminInteractRemoveServerPacket = AdminInteractRemoveServerPacket()
    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

AdminInteractListServerPacket

Bases: Packet

Admin character inventory popup

Source code in src/eolib/protocol/_generated/net/server/admin_interact_list_server_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 AdminInteractListServerPacket(Packet):
    """
    Admin character inventory popup
    """
    _byte_size: int = 0
    _name: str = None # type: ignore [assignment]
    _usage: int = None # type: ignore [assignment]
    _gold_bank: int = None # type: ignore [assignment]
    _inventory: list[Item] = None # type: ignore [assignment]
    _bank: list[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 name(self) -> str:
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        self._name = name

    @property
    def usage(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._usage

    @usage.setter
    def usage(self, usage: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._usage = usage

    @property
    def gold_bank(self) -> int:
        """
        Note:
          - Value range is 0-4097152080.
        """
        return self._gold_bank

    @gold_bank.setter
    def gold_bank(self, gold_bank: int) -> None:
        """
        Note:
          - Value range is 0-4097152080.
        """
        self._gold_bank = gold_bank

    @property
    def inventory(self) -> list[Item]:
        return self._inventory

    @inventory.setter
    def inventory(self, inventory: list[Item]) -> None:
        self._inventory = inventory

    @property
    def bank(self) -> list[ThreeItem]:
        return self._bank

    @bank.setter
    def bank(self, bank: list[ThreeItem]) -> None:
        self._bank = bank

    @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.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.
        """
        AdminInteractListServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractListServerPacket") -> None:
        """
        Serializes an instance of `AdminInteractListServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractListServerPacket): 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._usage is None:
            raise SerializationError("usage must be provided.")
        writer.add_int(data._usage)
        writer.add_byte(0xFF)
        if data._gold_bank is None:
            raise SerializationError("gold_bank must be provided.")
        writer.add_int(data._gold_bank)
        writer.add_byte(0xFF)
        if data._inventory is None:
            raise SerializationError("inventory must be provided.")
        for i in range(len(data._inventory)):
            Item.serialize(writer, data._inventory[i])
        writer.add_byte(0xFF)
        if data._bank is None:
            raise SerializationError("bank must be provided.")
        for i in range(len(data._bank)):
            ThreeItem.serialize(writer, data._bank[i])

    @staticmethod
    def deserialize(reader: EoReader) -> "AdminInteractListServerPacket":
        """
        Deserializes an instance of `AdminInteractListServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractListServerPacket: The data to serialize.
        """
        data: AdminInteractListServerPacket = AdminInteractListServerPacket()
        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._usage = reader.get_int()
            reader.next_chunk()
            data._gold_bank = reader.get_int()
            reader.next_chunk()
            inventory_length = int(reader.remaining / 6)
            data._inventory = []
            for i in range(inventory_length):
                data._inventory.append(Item.deserialize(reader))
            reader.next_chunk()
            bank_length = int(reader.remaining / 5)
            data._bank = []
            for i in range(bank_length):
                data._bank.append(ThreeItem.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"AdminInteractListServerPacket(byte_size={repr(self._byte_size)}, name={repr(self._name)}, usage={repr(self._usage)}, gold_bank={repr(self._gold_bank)}, inventory={repr(self._inventory)}, bank={repr(self._bank)})"

byte_size: int property

Returns the size 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

usage: int property writable

Note
  • Value range is 0-4097152080.

gold_bank: int property writable

Note
  • Value range is 0-4097152080.

inventory: list[Item] property writable

bank: list[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/server/admin_interact_list_server_packet.py
 93
 94
 95
 96
 97
 98
 99
100
101
@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/server/admin_interact_list_server_packet.py
103
104
105
106
107
108
109
110
111
@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/server/admin_interact_list_server_packet.py
113
114
115
116
117
118
119
120
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AdminInteractListServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractListServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AdminInteractListServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/admin_interact_list_server_packet.py
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
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractListServerPacket") -> None:
    """
    Serializes an instance of `AdminInteractListServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractListServerPacket): 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._usage is None:
        raise SerializationError("usage must be provided.")
    writer.add_int(data._usage)
    writer.add_byte(0xFF)
    if data._gold_bank is None:
        raise SerializationError("gold_bank must be provided.")
    writer.add_int(data._gold_bank)
    writer.add_byte(0xFF)
    if data._inventory is None:
        raise SerializationError("inventory must be provided.")
    for i in range(len(data._inventory)):
        Item.serialize(writer, data._inventory[i])
    writer.add_byte(0xFF)
    if data._bank is None:
        raise SerializationError("bank must be provided.")
    for i in range(len(data._bank)):
        ThreeItem.serialize(writer, data._bank[i])

deserialize(reader) staticmethod

Deserializes an instance of AdminInteractListServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AdminInteractListServerPacket 'AdminInteractListServerPacket'

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/admin_interact_list_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "AdminInteractListServerPacket":
    """
    Deserializes an instance of `AdminInteractListServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractListServerPacket: The data to serialize.
    """
    data: AdminInteractListServerPacket = AdminInteractListServerPacket()
    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._usage = reader.get_int()
        reader.next_chunk()
        data._gold_bank = reader.get_int()
        reader.next_chunk()
        inventory_length = int(reader.remaining / 6)
        data._inventory = []
        for i in range(inventory_length):
            data._inventory.append(Item.deserialize(reader))
        reader.next_chunk()
        bank_length = int(reader.remaining / 5)
        data._bank = []
        for i in range(bank_length):
            data._bank.append(ThreeItem.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

AdminInteractAgreeServerPacket

Bases: Packet

Nearby player appearing (admin un-hide)

Source code in src/eolib/protocol/_generated/net/server/admin_interact_agree_server_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 AdminInteractAgreeServerPacket(Packet):
    """
    Nearby player appearing (admin un-hide)
    """
    _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.AdminInteract

    @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.
        """
        AdminInteractAgreeServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AdminInteractAgreeServerPacket") -> None:
        """
        Serializes an instance of `AdminInteractAgreeServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AdminInteractAgreeServerPacket): 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) -> "AdminInteractAgreeServerPacket":
        """
        Deserializes an instance of `AdminInteractAgreeServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AdminInteractAgreeServerPacket: The data to serialize.
        """
        data: AdminInteractAgreeServerPacket = AdminInteractAgreeServerPacket()
        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"AdminInteractAgreeServerPacket(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/server/admin_interact_agree_server_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.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/server/admin_interact_agree_server_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.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/server/admin_interact_agree_server_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.
    """
    AdminInteractAgreeServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AdminInteractAgreeServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AdminInteractAgreeServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/admin_interact_agree_server_packet.py
75
76
77
78
79
80
81
82
83
84
85
86
@staticmethod
def serialize(writer: EoWriter, data: "AdminInteractAgreeServerPacket") -> None:
    """
    Serializes an instance of `AdminInteractAgreeServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AdminInteractAgreeServerPacket): 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 AdminInteractAgreeServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AdminInteractAgreeServerPacket AdminInteractAgreeServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/admin_interact_agree_server_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) -> "AdminInteractAgreeServerPacket":
    """
    Deserializes an instance of `AdminInteractAgreeServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AdminInteractAgreeServerPacket: The data to serialize.
    """
    data: AdminInteractAgreeServerPacket = AdminInteractAgreeServerPacket()
    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

AccountReply

Bases: IntEnum

Reply code sent with ACCOUNT_REPLY packet

Source code in src/eolib/protocol/_generated/net/server/account_reply.py
 9
10
11
12
13
14
15
16
17
18
class AccountReply(IntEnum, metaclass=ProtocolEnumMeta):
    """
    Reply code sent with ACCOUNT_REPLY packet
    """
    Exists = 1
    NotApproved = 2
    Created = 3
    ChangeFailed = 5
    Changed = 6
    RequestDenied = 7

Exists = 1 class-attribute instance-attribute

NotApproved = 2 class-attribute instance-attribute

Created = 3 class-attribute instance-attribute

ChangeFailed = 5 class-attribute instance-attribute

Changed = 6 class-attribute instance-attribute

RequestDenied = 7 class-attribute instance-attribute

AccountReplyServerPacket

Bases: Packet

Reply to client Account-family packets

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
class AccountReplyServerPacket(Packet):
    """
    Reply to client Account-family packets
    """
    _byte_size: int = 0
    _reply_code: AccountReply = None # type: ignore [assignment]
    _reply_code_data: 'AccountReplyServerPacket.ReplyCodeData' = 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 reply_code(self) -> AccountReply:
        """
        Sometimes an AccountReply code, sometimes a session ID for account creation
        """
        return self._reply_code

    @reply_code.setter
    def reply_code(self, reply_code: AccountReply) -> None:
        """
        Sometimes an AccountReply code, sometimes a session ID for account creation
        """
        self._reply_code = reply_code

    @property
    def reply_code_data(self) -> 'AccountReplyServerPacket.ReplyCodeData':
        """
        AccountReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the `reply_code` field.
        """
        return self._reply_code_data

    @reply_code_data.setter
    def reply_code_data(self, reply_code_data: 'AccountReplyServerPacket.ReplyCodeData') -> None:
        self._reply_code_data = reply_code_data

    @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.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.
        """
        AccountReplyServerPacket.serialize(writer, self)

    @staticmethod
    def serialize(writer: EoWriter, data: "AccountReplyServerPacket") -> None:
        """
        Serializes an instance of `AccountReplyServerPacket` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountReplyServerPacket): The data to serialize.
        """
        if data._reply_code is None:
            raise SerializationError("reply_code must be provided.")
        writer.add_short(int(data._reply_code))
        if data._reply_code == 0:
            if data._reply_code_data is not None:
                raise SerializationError("Expected reply_code_data to be None for reply_code " + AccountReply(data._reply_code).name + ".")
        elif data._reply_code == AccountReply.Exists:
            if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataExists):
                raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataExists for reply_code " + AccountReply(data._reply_code).name + ".")
            AccountReplyServerPacket.ReplyCodeDataExists.serialize(writer, data._reply_code_data)
        elif data._reply_code == AccountReply.NotApproved:
            if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataNotApproved):
                raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataNotApproved for reply_code " + AccountReply(data._reply_code).name + ".")
            AccountReplyServerPacket.ReplyCodeDataNotApproved.serialize(writer, data._reply_code_data)
        elif data._reply_code == AccountReply.Created:
            if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataCreated):
                raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataCreated for reply_code " + AccountReply(data._reply_code).name + ".")
            AccountReplyServerPacket.ReplyCodeDataCreated.serialize(writer, data._reply_code_data)
        elif data._reply_code == 4:
            if data._reply_code_data is not None:
                raise SerializationError("Expected reply_code_data to be None for reply_code " + AccountReply(data._reply_code).name + ".")
        elif data._reply_code == AccountReply.ChangeFailed:
            if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataChangeFailed):
                raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataChangeFailed for reply_code " + AccountReply(data._reply_code).name + ".")
            AccountReplyServerPacket.ReplyCodeDataChangeFailed.serialize(writer, data._reply_code_data)
        elif data._reply_code == AccountReply.Changed:
            if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataChanged):
                raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataChanged for reply_code " + AccountReply(data._reply_code).name + ".")
            AccountReplyServerPacket.ReplyCodeDataChanged.serialize(writer, data._reply_code_data)
        elif data._reply_code == AccountReply.RequestDenied:
            if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataRequestDenied):
                raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataRequestDenied for reply_code " + AccountReply(data._reply_code).name + ".")
            AccountReplyServerPacket.ReplyCodeDataRequestDenied.serialize(writer, data._reply_code_data)
        elif data._reply_code == 8:
            if data._reply_code_data is not None:
                raise SerializationError("Expected reply_code_data to be None for reply_code " + AccountReply(data._reply_code).name + ".")
        elif data._reply_code == 9:
            if data._reply_code_data is not None:
                raise SerializationError("Expected reply_code_data to be None for reply_code " + AccountReply(data._reply_code).name + ".")
        else:
            if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataDefault):
                raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataDefault for reply_code " + AccountReply(data._reply_code).name + ".")
            AccountReplyServerPacket.ReplyCodeDataDefault.serialize(writer, data._reply_code_data)

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountReplyServerPacket":
        """
        Deserializes an instance of `AccountReplyServerPacket` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountReplyServerPacket: The data to serialize.
        """
        data: AccountReplyServerPacket = AccountReplyServerPacket()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._reply_code = AccountReply(reader.get_short())
            if data._reply_code == 0:
                data._reply_code_data = None
            elif data._reply_code == AccountReply.Exists:
                data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataExists.deserialize(reader)
            elif data._reply_code == AccountReply.NotApproved:
                data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataNotApproved.deserialize(reader)
            elif data._reply_code == AccountReply.Created:
                data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataCreated.deserialize(reader)
            elif data._reply_code == 4:
                data._reply_code_data = None
            elif data._reply_code == AccountReply.ChangeFailed:
                data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataChangeFailed.deserialize(reader)
            elif data._reply_code == AccountReply.Changed:
                data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataChanged.deserialize(reader)
            elif data._reply_code == AccountReply.RequestDenied:
                data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataRequestDenied.deserialize(reader)
            elif data._reply_code == 8:
                data._reply_code_data = None
            elif data._reply_code == 9:
                data._reply_code_data = None
            else:
                data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataDefault.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"AccountReplyServerPacket(byte_size={repr(self._byte_size)}, reply_code={repr(self._reply_code)}, reply_code_data={repr(self._reply_code_data)})"

    ReplyCodeData = Union['AccountReplyServerPacket.ReplyCodeDataExists', 'AccountReplyServerPacket.ReplyCodeDataNotApproved', 'AccountReplyServerPacket.ReplyCodeDataCreated', 'AccountReplyServerPacket.ReplyCodeDataChangeFailed', 'AccountReplyServerPacket.ReplyCodeDataChanged', 'AccountReplyServerPacket.ReplyCodeDataRequestDenied', 'AccountReplyServerPacket.ReplyCodeDataDefault', None]
    ReplyCodeData.__doc__ = \
        """
        Data associated with different values of the `reply_code` field.
        """

    class ReplyCodeDataExists:
        """
        Data associated with reply_code value AccountReply.Exists
        """
        _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataExists") -> None:
            """
            Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataExists` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AccountReplyServerPacket.ReplyCodeDataExists): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataExists":
            """
            Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataExists` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AccountReplyServerPacket.ReplyCodeDataExists: The data to serialize.
            """
            data: AccountReplyServerPacket.ReplyCodeDataExists = AccountReplyServerPacket.ReplyCodeDataExists()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataExists(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataNotApproved:
        """
        Data associated with reply_code value AccountReply.NotApproved
        """
        _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataNotApproved") -> None:
            """
            Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataNotApproved` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AccountReplyServerPacket.ReplyCodeDataNotApproved): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataNotApproved":
            """
            Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataNotApproved` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AccountReplyServerPacket.ReplyCodeDataNotApproved: The data to serialize.
            """
            data: AccountReplyServerPacket.ReplyCodeDataNotApproved = AccountReplyServerPacket.ReplyCodeDataNotApproved()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataNotApproved(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataCreated:
        """
        Data associated with reply_code value AccountReply.Created
        """
        _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataCreated") -> None:
            """
            Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataCreated` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AccountReplyServerPacket.ReplyCodeDataCreated): The data to serialize.
            """
            writer.add_string("GO")

        @staticmethod
        def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataCreated":
            """
            Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataCreated` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AccountReplyServerPacket.ReplyCodeDataCreated: The data to serialize.
            """
            data: AccountReplyServerPacket.ReplyCodeDataCreated = AccountReplyServerPacket.ReplyCodeDataCreated()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataCreated(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataChangeFailed:
        """
        Data associated with reply_code value AccountReply.ChangeFailed
        """
        _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataChangeFailed") -> None:
            """
            Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataChangeFailed` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AccountReplyServerPacket.ReplyCodeDataChangeFailed): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataChangeFailed":
            """
            Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataChangeFailed` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AccountReplyServerPacket.ReplyCodeDataChangeFailed: The data to serialize.
            """
            data: AccountReplyServerPacket.ReplyCodeDataChangeFailed = AccountReplyServerPacket.ReplyCodeDataChangeFailed()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataChangeFailed(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataChanged:
        """
        Data associated with reply_code value AccountReply.Changed
        """
        _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataChanged") -> None:
            """
            Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataChanged` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AccountReplyServerPacket.ReplyCodeDataChanged): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataChanged":
            """
            Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataChanged` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AccountReplyServerPacket.ReplyCodeDataChanged: The data to serialize.
            """
            data: AccountReplyServerPacket.ReplyCodeDataChanged = AccountReplyServerPacket.ReplyCodeDataChanged()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataChanged(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataRequestDenied:
        """
        Data associated with reply_code value AccountReply.RequestDenied
        """
        _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataRequestDenied") -> None:
            """
            Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataRequestDenied` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AccountReplyServerPacket.ReplyCodeDataRequestDenied): The data to serialize.
            """
            writer.add_string("NO")

        @staticmethod
        def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataRequestDenied":
            """
            Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataRequestDenied` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AccountReplyServerPacket.ReplyCodeDataRequestDenied: The data to serialize.
            """
            data: AccountReplyServerPacket.ReplyCodeDataRequestDenied = AccountReplyServerPacket.ReplyCodeDataRequestDenied()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataRequestDenied(byte_size={repr(self._byte_size)})"

    class ReplyCodeDataDefault:
        """
        Default data associated with reply_code

        In this case (reply_code &gt; 9), reply_code is a session ID for account creation
        """
        _byte_size: int = 0
        _sequence_start: 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 sequence_start(self) -> int:
            """
            Note:
              - Value range is 0-252.
            """
            return self._sequence_start

        @sequence_start.setter
        def sequence_start(self, sequence_start: int) -> None:
            """
            Note:
              - Value range is 0-252.
            """
            self._sequence_start = sequence_start

        @staticmethod
        def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataDefault") -> None:
            """
            Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataDefault` to the provided `EoWriter`.

            Args:
                writer (EoWriter): The writer that the data will be serialized to.
                data (AccountReplyServerPacket.ReplyCodeDataDefault): The data to serialize.
            """
            if data._sequence_start is None:
                raise SerializationError("sequence_start must be provided.")
            writer.add_char(data._sequence_start)
            writer.add_string("OK")

        @staticmethod
        def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataDefault":
            """
            Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataDefault` from the provided `EoReader`.

            Args:
                reader (EoReader): The writer that the data will be serialized to.

            Returns:
                AccountReplyServerPacket.ReplyCodeDataDefault: The data to serialize.
            """
            data: AccountReplyServerPacket.ReplyCodeDataDefault = AccountReplyServerPacket.ReplyCodeDataDefault()
            old_chunked_reading_mode: bool = reader.chunked_reading_mode
            try:
                reader_start_position: int = reader.position
                data._sequence_start = reader.get_char()
                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"AccountReplyServerPacket.ReplyCodeDataDefault(byte_size={repr(self._byte_size)}, sequence_start={repr(self._sequence_start)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

reply_code: AccountReply property writable

Sometimes an AccountReply code, sometimes a session ID for account creation

reply_code_data: AccountReplyServerPacket.ReplyCodeData property writable

AccountReplyServerPacket.ReplyCodeData: Gets or sets the data associated with the reply_code field.

ReplyCodeData = Union['AccountReplyServerPacket.ReplyCodeDataExists', 'AccountReplyServerPacket.ReplyCodeDataNotApproved', 'AccountReplyServerPacket.ReplyCodeDataCreated', 'AccountReplyServerPacket.ReplyCodeDataChangeFailed', 'AccountReplyServerPacket.ReplyCodeDataChanged', 'AccountReplyServerPacket.ReplyCodeDataRequestDenied', 'AccountReplyServerPacket.ReplyCodeDataDefault', None] class-attribute instance-attribute

ReplyCodeDataExists

Data associated with reply_code value AccountReply.Exists

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
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
class ReplyCodeDataExists:
    """
    Data associated with reply_code value AccountReply.Exists
    """
    _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataExists") -> None:
        """
        Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataExists` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountReplyServerPacket.ReplyCodeDataExists): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataExists":
        """
        Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataExists` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountReplyServerPacket.ReplyCodeDataExists: The data to serialize.
        """
        data: AccountReplyServerPacket.ReplyCodeDataExists = AccountReplyServerPacket.ReplyCodeDataExists()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataExists(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.

serialize(writer, data) staticmethod

Serializes an instance of AccountReplyServerPacket.ReplyCodeDataExists to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataExists

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
209
210
211
212
213
214
215
216
217
218
@staticmethod
def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataExists") -> None:
    """
    Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataExists` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountReplyServerPacket.ReplyCodeDataExists): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of AccountReplyServerPacket.ReplyCodeDataExists from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataExists

AccountReplyServerPacket.ReplyCodeDataExists: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
@staticmethod
def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataExists":
    """
    Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataExists` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountReplyServerPacket.ReplyCodeDataExists: The data to serialize.
    """
    data: AccountReplyServerPacket.ReplyCodeDataExists = AccountReplyServerPacket.ReplyCodeDataExists()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataNotApproved

Data associated with reply_code value AccountReply.NotApproved

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
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
class ReplyCodeDataNotApproved:
    """
    Data associated with reply_code value AccountReply.NotApproved
    """
    _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataNotApproved") -> None:
        """
        Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataNotApproved` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountReplyServerPacket.ReplyCodeDataNotApproved): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataNotApproved":
        """
        Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataNotApproved` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountReplyServerPacket.ReplyCodeDataNotApproved: The data to serialize.
        """
        data: AccountReplyServerPacket.ReplyCodeDataNotApproved = AccountReplyServerPacket.ReplyCodeDataNotApproved()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataNotApproved(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.

serialize(writer, data) staticmethod

Serializes an instance of AccountReplyServerPacket.ReplyCodeDataNotApproved to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataNotApproved

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
261
262
263
264
265
266
267
268
269
270
@staticmethod
def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataNotApproved") -> None:
    """
    Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataNotApproved` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountReplyServerPacket.ReplyCodeDataNotApproved): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of AccountReplyServerPacket.ReplyCodeDataNotApproved from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataNotApproved

AccountReplyServerPacket.ReplyCodeDataNotApproved: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
@staticmethod
def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataNotApproved":
    """
    Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataNotApproved` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountReplyServerPacket.ReplyCodeDataNotApproved: The data to serialize.
    """
    data: AccountReplyServerPacket.ReplyCodeDataNotApproved = AccountReplyServerPacket.ReplyCodeDataNotApproved()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataCreated

Data associated with reply_code value AccountReply.Created

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
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
class ReplyCodeDataCreated:
    """
    Data associated with reply_code value AccountReply.Created
    """
    _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataCreated") -> None:
        """
        Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataCreated` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountReplyServerPacket.ReplyCodeDataCreated): The data to serialize.
        """
        writer.add_string("GO")

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataCreated":
        """
        Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataCreated` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountReplyServerPacket.ReplyCodeDataCreated: The data to serialize.
        """
        data: AccountReplyServerPacket.ReplyCodeDataCreated = AccountReplyServerPacket.ReplyCodeDataCreated()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataCreated(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.

serialize(writer, data) staticmethod

Serializes an instance of AccountReplyServerPacket.ReplyCodeDataCreated to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataCreated

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
313
314
315
316
317
318
319
320
321
322
@staticmethod
def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataCreated") -> None:
    """
    Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataCreated` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountReplyServerPacket.ReplyCodeDataCreated): The data to serialize.
    """
    writer.add_string("GO")

deserialize(reader) staticmethod

Deserializes an instance of AccountReplyServerPacket.ReplyCodeDataCreated from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataCreated

AccountReplyServerPacket.ReplyCodeDataCreated: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
@staticmethod
def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataCreated":
    """
    Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataCreated` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountReplyServerPacket.ReplyCodeDataCreated: The data to serialize.
    """
    data: AccountReplyServerPacket.ReplyCodeDataCreated = AccountReplyServerPacket.ReplyCodeDataCreated()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataChangeFailed

Data associated with reply_code value AccountReply.ChangeFailed

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
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
class ReplyCodeDataChangeFailed:
    """
    Data associated with reply_code value AccountReply.ChangeFailed
    """
    _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataChangeFailed") -> None:
        """
        Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataChangeFailed` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountReplyServerPacket.ReplyCodeDataChangeFailed): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataChangeFailed":
        """
        Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataChangeFailed` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountReplyServerPacket.ReplyCodeDataChangeFailed: The data to serialize.
        """
        data: AccountReplyServerPacket.ReplyCodeDataChangeFailed = AccountReplyServerPacket.ReplyCodeDataChangeFailed()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataChangeFailed(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.

serialize(writer, data) staticmethod

Serializes an instance of AccountReplyServerPacket.ReplyCodeDataChangeFailed to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataChangeFailed

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
365
366
367
368
369
370
371
372
373
374
@staticmethod
def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataChangeFailed") -> None:
    """
    Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataChangeFailed` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountReplyServerPacket.ReplyCodeDataChangeFailed): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of AccountReplyServerPacket.ReplyCodeDataChangeFailed from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataChangeFailed

AccountReplyServerPacket.ReplyCodeDataChangeFailed: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
@staticmethod
def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataChangeFailed":
    """
    Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataChangeFailed` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountReplyServerPacket.ReplyCodeDataChangeFailed: The data to serialize.
    """
    data: AccountReplyServerPacket.ReplyCodeDataChangeFailed = AccountReplyServerPacket.ReplyCodeDataChangeFailed()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataChanged

Data associated with reply_code value AccountReply.Changed

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
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
class ReplyCodeDataChanged:
    """
    Data associated with reply_code value AccountReply.Changed
    """
    _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataChanged") -> None:
        """
        Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataChanged` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountReplyServerPacket.ReplyCodeDataChanged): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataChanged":
        """
        Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataChanged` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountReplyServerPacket.ReplyCodeDataChanged: The data to serialize.
        """
        data: AccountReplyServerPacket.ReplyCodeDataChanged = AccountReplyServerPacket.ReplyCodeDataChanged()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataChanged(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.

serialize(writer, data) staticmethod

Serializes an instance of AccountReplyServerPacket.ReplyCodeDataChanged to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataChanged

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
417
418
419
420
421
422
423
424
425
426
@staticmethod
def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataChanged") -> None:
    """
    Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataChanged` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountReplyServerPacket.ReplyCodeDataChanged): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of AccountReplyServerPacket.ReplyCodeDataChanged from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataChanged

AccountReplyServerPacket.ReplyCodeDataChanged: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
@staticmethod
def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataChanged":
    """
    Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataChanged` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountReplyServerPacket.ReplyCodeDataChanged: The data to serialize.
    """
    data: AccountReplyServerPacket.ReplyCodeDataChanged = AccountReplyServerPacket.ReplyCodeDataChanged()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataRequestDenied

Data associated with reply_code value AccountReply.RequestDenied

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
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
class ReplyCodeDataRequestDenied:
    """
    Data associated with reply_code value AccountReply.RequestDenied
    """
    _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 serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataRequestDenied") -> None:
        """
        Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataRequestDenied` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountReplyServerPacket.ReplyCodeDataRequestDenied): The data to serialize.
        """
        writer.add_string("NO")

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataRequestDenied":
        """
        Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataRequestDenied` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountReplyServerPacket.ReplyCodeDataRequestDenied: The data to serialize.
        """
        data: AccountReplyServerPacket.ReplyCodeDataRequestDenied = AccountReplyServerPacket.ReplyCodeDataRequestDenied()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.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"AccountReplyServerPacket.ReplyCodeDataRequestDenied(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.

serialize(writer, data) staticmethod

Serializes an instance of AccountReplyServerPacket.ReplyCodeDataRequestDenied to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataRequestDenied

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
469
470
471
472
473
474
475
476
477
478
@staticmethod
def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataRequestDenied") -> None:
    """
    Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataRequestDenied` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountReplyServerPacket.ReplyCodeDataRequestDenied): The data to serialize.
    """
    writer.add_string("NO")

deserialize(reader) staticmethod

Deserializes an instance of AccountReplyServerPacket.ReplyCodeDataRequestDenied from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataRequestDenied

AccountReplyServerPacket.ReplyCodeDataRequestDenied: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
@staticmethod
def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataRequestDenied":
    """
    Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataRequestDenied` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountReplyServerPacket.ReplyCodeDataRequestDenied: The data to serialize.
    """
    data: AccountReplyServerPacket.ReplyCodeDataRequestDenied = AccountReplyServerPacket.ReplyCodeDataRequestDenied()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        reader.get_string()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

ReplyCodeDataDefault

Default data associated with reply_code

In this case (reply_code > 9), reply_code is a session ID for account creation

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
class ReplyCodeDataDefault:
    """
    Default data associated with reply_code

    In this case (reply_code &gt; 9), reply_code is a session ID for account creation
    """
    _byte_size: int = 0
    _sequence_start: 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 sequence_start(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._sequence_start

    @sequence_start.setter
    def sequence_start(self, sequence_start: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._sequence_start = sequence_start

    @staticmethod
    def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataDefault") -> None:
        """
        Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataDefault` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (AccountReplyServerPacket.ReplyCodeDataDefault): The data to serialize.
        """
        if data._sequence_start is None:
            raise SerializationError("sequence_start must be provided.")
        writer.add_char(data._sequence_start)
        writer.add_string("OK")

    @staticmethod
    def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataDefault":
        """
        Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataDefault` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            AccountReplyServerPacket.ReplyCodeDataDefault: The data to serialize.
        """
        data: AccountReplyServerPacket.ReplyCodeDataDefault = AccountReplyServerPacket.ReplyCodeDataDefault()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._sequence_start = reader.get_char()
            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"AccountReplyServerPacket.ReplyCodeDataDefault(byte_size={repr(self._byte_size)}, sequence_start={repr(self._sequence_start)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

sequence_start: int property writable

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of AccountReplyServerPacket.ReplyCodeDataDefault to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data ReplyCodeDataDefault

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
539
540
541
542
543
544
545
546
547
548
549
550
551
@staticmethod
def serialize(writer: EoWriter, data: "AccountReplyServerPacket.ReplyCodeDataDefault") -> None:
    """
    Serializes an instance of `AccountReplyServerPacket.ReplyCodeDataDefault` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountReplyServerPacket.ReplyCodeDataDefault): The data to serialize.
    """
    if data._sequence_start is None:
        raise SerializationError("sequence_start must be provided.")
    writer.add_char(data._sequence_start)
    writer.add_string("OK")

deserialize(reader) staticmethod

Deserializes an instance of AccountReplyServerPacket.ReplyCodeDataDefault from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Type Description
ReplyCodeDataDefault

AccountReplyServerPacket.ReplyCodeDataDefault: The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
@staticmethod
def deserialize(reader: EoReader) -> "AccountReplyServerPacket.ReplyCodeDataDefault":
    """
    Deserializes an instance of `AccountReplyServerPacket.ReplyCodeDataDefault` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountReplyServerPacket.ReplyCodeDataDefault: The data to serialize.
    """
    data: AccountReplyServerPacket.ReplyCodeDataDefault = AccountReplyServerPacket.ReplyCodeDataDefault()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._sequence_start = reader.get_char()
        reader.get_string()
        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/server/account_reply_server_packet.py
58
59
60
61
62
63
64
65
66
@staticmethod
def family() -> PacketFamily:
    """
    Returns the packet family associated with this packet.

    Returns:
        PacketFamily: The packet family associated with this packet.
    """
    return PacketFamily.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/server/account_reply_server_packet.py
68
69
70
71
72
73
74
75
76
@staticmethod
def action() -> PacketAction:
    """
    Returns the packet action associated with this packet.

    Returns:
        PacketAction: The packet action associated with this packet.
    """
    return PacketAction.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/server/account_reply_server_packet.py
78
79
80
81
82
83
84
85
def write(self, writer):
    """
    Serializes and writes this packet to the provided EoWriter.

    Args:
        writer (EoWriter): the writer that this packet will be written to.
    """
    AccountReplyServerPacket.serialize(writer, self)

serialize(writer, data) staticmethod

Serializes an instance of AccountReplyServerPacket to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data AccountReplyServerPacket

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
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
@staticmethod
def serialize(writer: EoWriter, data: "AccountReplyServerPacket") -> None:
    """
    Serializes an instance of `AccountReplyServerPacket` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (AccountReplyServerPacket): The data to serialize.
    """
    if data._reply_code is None:
        raise SerializationError("reply_code must be provided.")
    writer.add_short(int(data._reply_code))
    if data._reply_code == 0:
        if data._reply_code_data is not None:
            raise SerializationError("Expected reply_code_data to be None for reply_code " + AccountReply(data._reply_code).name + ".")
    elif data._reply_code == AccountReply.Exists:
        if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataExists):
            raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataExists for reply_code " + AccountReply(data._reply_code).name + ".")
        AccountReplyServerPacket.ReplyCodeDataExists.serialize(writer, data._reply_code_data)
    elif data._reply_code == AccountReply.NotApproved:
        if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataNotApproved):
            raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataNotApproved for reply_code " + AccountReply(data._reply_code).name + ".")
        AccountReplyServerPacket.ReplyCodeDataNotApproved.serialize(writer, data._reply_code_data)
    elif data._reply_code == AccountReply.Created:
        if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataCreated):
            raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataCreated for reply_code " + AccountReply(data._reply_code).name + ".")
        AccountReplyServerPacket.ReplyCodeDataCreated.serialize(writer, data._reply_code_data)
    elif data._reply_code == 4:
        if data._reply_code_data is not None:
            raise SerializationError("Expected reply_code_data to be None for reply_code " + AccountReply(data._reply_code).name + ".")
    elif data._reply_code == AccountReply.ChangeFailed:
        if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataChangeFailed):
            raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataChangeFailed for reply_code " + AccountReply(data._reply_code).name + ".")
        AccountReplyServerPacket.ReplyCodeDataChangeFailed.serialize(writer, data._reply_code_data)
    elif data._reply_code == AccountReply.Changed:
        if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataChanged):
            raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataChanged for reply_code " + AccountReply(data._reply_code).name + ".")
        AccountReplyServerPacket.ReplyCodeDataChanged.serialize(writer, data._reply_code_data)
    elif data._reply_code == AccountReply.RequestDenied:
        if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataRequestDenied):
            raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataRequestDenied for reply_code " + AccountReply(data._reply_code).name + ".")
        AccountReplyServerPacket.ReplyCodeDataRequestDenied.serialize(writer, data._reply_code_data)
    elif data._reply_code == 8:
        if data._reply_code_data is not None:
            raise SerializationError("Expected reply_code_data to be None for reply_code " + AccountReply(data._reply_code).name + ".")
    elif data._reply_code == 9:
        if data._reply_code_data is not None:
            raise SerializationError("Expected reply_code_data to be None for reply_code " + AccountReply(data._reply_code).name + ".")
    else:
        if not isinstance(data._reply_code_data, AccountReplyServerPacket.ReplyCodeDataDefault):
            raise SerializationError("Expected reply_code_data to be type AccountReplyServerPacket.ReplyCodeDataDefault for reply_code " + AccountReply(data._reply_code).name + ".")
        AccountReplyServerPacket.ReplyCodeDataDefault.serialize(writer, data._reply_code_data)

deserialize(reader) staticmethod

Deserializes an instance of AccountReplyServerPacket from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
AccountReplyServerPacket AccountReplyServerPacket

The data to serialize.

Source code in src/eolib/protocol/_generated/net/server/account_reply_server_packet.py
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
@staticmethod
def deserialize(reader: EoReader) -> "AccountReplyServerPacket":
    """
    Deserializes an instance of `AccountReplyServerPacket` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        AccountReplyServerPacket: The data to serialize.
    """
    data: AccountReplyServerPacket = AccountReplyServerPacket()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._reply_code = AccountReply(reader.get_short())
        if data._reply_code == 0:
            data._reply_code_data = None
        elif data._reply_code == AccountReply.Exists:
            data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataExists.deserialize(reader)
        elif data._reply_code == AccountReply.NotApproved:
            data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataNotApproved.deserialize(reader)
        elif data._reply_code == AccountReply.Created:
            data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataCreated.deserialize(reader)
        elif data._reply_code == 4:
            data._reply_code_data = None
        elif data._reply_code == AccountReply.ChangeFailed:
            data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataChangeFailed.deserialize(reader)
        elif data._reply_code == AccountReply.Changed:
            data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataChanged.deserialize(reader)
        elif data._reply_code == AccountReply.RequestDenied:
            data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataRequestDenied.deserialize(reader)
        elif data._reply_code == 8:
            data._reply_code_data = None
        elif data._reply_code == 9:
            data._reply_code_data = None
        else:
            data._reply_code_data = AccountReplyServerPacket.ReplyCodeDataDefault.deserialize(reader)
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

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)

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)

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()

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

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

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

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

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

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

Weight

Current carry weight and maximum carry capacity of a player

Source code in src/eolib/protocol/_generated/net/weight.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 Weight:
    """
    Current carry weight and maximum carry capacity of a player
    """
    _byte_size: int = 0
    _current: int = None # type: ignore [assignment]
    _max: 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 current(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._current

    @current.setter
    def current(self, current: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._current = current

    @property
    def max(self) -> int:
        """
        Note:
          - Value range is 0-252.
        """
        return self._max

    @max.setter
    def max(self, max: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._max = max

    @staticmethod
    def serialize(writer: EoWriter, data: "Weight") -> None:
        """
        Serializes an instance of `Weight` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (Weight): The data to serialize.
        """
        if data._current is None:
            raise SerializationError("current must be provided.")
        writer.add_char(data._current)
        if data._max is None:
            raise SerializationError("max must be provided.")
        writer.add_char(data._max)

    @staticmethod
    def deserialize(reader: EoReader) -> "Weight":
        """
        Deserializes an instance of `Weight` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            Weight: The data to serialize.
        """
        data: Weight = Weight()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._current = reader.get_char()
            data._max = 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"Weight(byte_size={repr(self._byte_size)}, current={repr(self._current)}, max={repr(self._max)})"

byte_size: int property

Returns the size of the data that this was deserialized from.

Returns:

Name Type Description
int int

The size of the data that this was deserialized from.

current: int property writable

Note
  • Value range is 0-252.

max: int property writable

Note
  • Value range is 0-252.

serialize(writer, data) staticmethod

Serializes an instance of Weight to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data Weight

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/weight.py
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@staticmethod
def serialize(writer: EoWriter, data: "Weight") -> None:
    """
    Serializes an instance of `Weight` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (Weight): The data to serialize.
    """
    if data._current is None:
        raise SerializationError("current must be provided.")
    writer.add_char(data._current)
    if data._max is None:
        raise SerializationError("max must be provided.")
    writer.add_char(data._max)

deserialize(reader) staticmethod

Deserializes an instance of Weight from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
Weight Weight

The data to serialize.

Source code in src/eolib/protocol/_generated/net/weight.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) -> "Weight":
    """
    Deserializes an instance of `Weight` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        Weight: The data to serialize.
    """
    data: Weight = Weight()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._current = reader.get_char()
        data._max = reader.get_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

Spell

A spell known by the player

Source code in src/eolib/protocol/_generated/net/spell.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 Spell:
    """
    A spell known by the player
    """
    _byte_size: int = 0
    _id: int = None # type: ignore [assignment]
    _level: 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 level(self) -> int:
        """
        Note:
          - Value range is 0-64008.
        """
        return self._level

    @level.setter
    def level(self, level: int) -> None:
        """
        Note:
          - Value range is 0-64008.
        """
        self._level = level

    @staticmethod
    def serialize(writer: EoWriter, data: "Spell") -> None:
        """
        Serializes an instance of `Spell` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (Spell): The data to serialize.
        """
        if data._id is None:
            raise SerializationError("id must be provided.")
        writer.add_short(data._id)
        if data._level is None:
            raise SerializationError("level must be provided.")
        writer.add_short(data._level)

    @staticmethod
    def deserialize(reader: EoReader) -> "Spell":
        """
        Deserializes an instance of `Spell` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            Spell: The data to serialize.
        """
        data: Spell = Spell()
        old_chunked_reading_mode: bool = reader.chunked_reading_mode
        try:
            reader_start_position: int = reader.position
            data._id = reader.get_short()
            data._level = 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"Spell(byte_size={repr(self._byte_size)}, id={repr(self._id)}, level={repr(self._level)})"

byte_size: int property

Returns the size 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.

level: int property writable

Note
  • Value range is 0-64008.

serialize(writer, data) staticmethod

Serializes an instance of Spell to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data Spell

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/spell.py
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@staticmethod
def serialize(writer: EoWriter, data: "Spell") -> None:
    """
    Serializes an instance of `Spell` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (Spell): The data to serialize.
    """
    if data._id is None:
        raise SerializationError("id must be provided.")
    writer.add_short(data._id)
    if data._level is None:
        raise SerializationError("level must be provided.")
    writer.add_short(data._level)

deserialize(reader) staticmethod

Deserializes an instance of Spell from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
Spell Spell

The data to serialize.

Source code in src/eolib/protocol/_generated/net/spell.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) -> "Spell":
    """
    Deserializes an instance of `Spell` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        Spell: The data to serialize.
    """
    data: Spell = Spell()
    old_chunked_reading_mode: bool = reader.chunked_reading_mode
    try:
        reader_start_position: int = reader.position
        data._id = reader.get_short()
        data._level = reader.get_short()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode

CharItem

An item reference with a 1-byte amount. Used for craft ingredients.

Source code in src/eolib/protocol/_generated/net/char_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 CharItem:
    """
    An item reference with a 1-byte amount.
    Used for craft ingredients.
    """
    _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-252.
        """
        return self._amount

    @amount.setter
    def amount(self, amount: int) -> None:
        """
        Note:
          - Value range is 0-252.
        """
        self._amount = amount

    @staticmethod
    def serialize(writer: EoWriter, data: "CharItem") -> None:
        """
        Serializes an instance of `CharItem` to the provided `EoWriter`.

        Args:
            writer (EoWriter): The writer that the data will be serialized to.
            data (CharItem): 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_char(data._amount)

    @staticmethod
    def deserialize(reader: EoReader) -> "CharItem":
        """
        Deserializes an instance of `CharItem` from the provided `EoReader`.

        Args:
            reader (EoReader): The writer that the data will be serialized to.

        Returns:
            CharItem: The data to serialize.
        """
        data: CharItem = CharItem()
        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_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"CharItem(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-252.

serialize(writer, data) staticmethod

Serializes an instance of CharItem to the provided EoWriter.

Parameters:

Name Type Description Default
writer EoWriter

The writer that the data will be serialized to.

required
data CharItem

The data to serialize.

required
Source code in src/eolib/protocol/_generated/net/char_item.py
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@staticmethod
def serialize(writer: EoWriter, data: "CharItem") -> None:
    """
    Serializes an instance of `CharItem` to the provided `EoWriter`.

    Args:
        writer (EoWriter): The writer that the data will be serialized to.
        data (CharItem): 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_char(data._amount)

deserialize(reader) staticmethod

Deserializes an instance of CharItem from the provided EoReader.

Parameters:

Name Type Description Default
reader EoReader

The writer that the data will be serialized to.

required

Returns:

Name Type Description
CharItem CharItem

The data to serialize.

Source code in src/eolib/protocol/_generated/net/char_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) -> "CharItem":
    """
    Deserializes an instance of `CharItem` from the provided `EoReader`.

    Args:
        reader (EoReader): The writer that the data will be serialized to.

    Returns:
        CharItem: The data to serialize.
    """
    data: CharItem = CharItem()
    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_char()
        data._byte_size = reader.position - reader_start_position
        return data
    finally:
        reader.chunked_reading_mode = old_chunked_reading_mode