Skip to content

account_reply_server_packet

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