Skip to content

init_init_server_packet

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