From 2410aeb608329ed57a31315effdfd5a751788616 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sun, 18 May 2014 02:43:55 -0700 Subject: Convert login/char and login/admin server components to proto-v2 --- src/proto2/any-user.hpp | 102 +- src/proto2/any-user_test.cpp | 6 +- src/proto2/char-map.hpp | 8 +- src/proto2/char-map_test.cpp | 6 +- src/proto2/char-user.hpp | 8 +- src/proto2/char-user_test.cpp | 6 +- src/proto2/fwd.hpp | 172 ++- src/proto2/include_cstdint_test.cpp | 6 +- src/proto2/include_enums_test.cpp | 6 +- src/proto2/include_human_time_diff_test.cpp | 6 +- src/proto2/include_ids_test.cpp | 6 +- src/proto2/include_ip_test.cpp | 6 +- src/proto2/include_little_test.cpp | 6 +- src/proto2/include_strs_test.cpp | 6 +- src/proto2/include_utils_test.cpp | 6 +- src/proto2/include_version_test.cpp | 6 +- src/proto2/include_vstring_test.cpp | 6 +- src/proto2/login-admin.hpp | 2214 ++++++++++++++------------- src/proto2/login-admin_test.cpp | 6 +- src/proto2/login-char.hpp | 1140 +++++++------- src/proto2/login-char_test.cpp | 6 +- src/proto2/login-user.hpp | 8 +- src/proto2/login-user_test.cpp | 6 +- src/proto2/map-user.hpp | 52 +- src/proto2/map-user_test.cpp | 6 +- src/proto2/types.hpp | 52 +- 26 files changed, 2095 insertions(+), 1763 deletions(-) (limited to 'src/proto2') diff --git a/src/proto2/any-user.hpp b/src/proto2/any-user.hpp index f2847ef..037171c 100644 --- a/src/proto2/any-user.hpp +++ b/src/proto2/any-user.hpp @@ -7,16 +7,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead @@ -27,85 +27,93 @@ // This is a public protocol, and changes require client cooperation -struct RPacket0x7530_Fixed +struct RPacket_0x7530_Fixed { - uint16_t packet_id; + using NetType = NetRPacket_0x7530_Fixed; + static const uint16_t PACKET_ID = 0x7530; + + uint16_t magic_packet_id = PACKET_ID; +}; +struct SPacket_0x7531_Fixed +{ + using NetType = NetSPacket_0x7531_Fixed; + static const uint16_t PACKET_ID = 0x7531; + + uint16_t magic_packet_id = PACKET_ID; + Version version = {}; +}; +struct RPacket_0x7532_Fixed +{ + using NetType = NetRPacket_0x7532_Fixed; + static const uint16_t PACKET_ID = 0x7532; + + uint16_t magic_packet_id = PACKET_ID; +}; + +struct NetRPacket_0x7530_Fixed +{ + Little16 magic_packet_id; +}; +static_assert(offsetof(NetRPacket_0x7530_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7530_Fixed, magic_packet_id) == 0"); +static_assert(sizeof(NetRPacket_0x7530_Fixed) == 2, "sizeof(NetRPacket_0x7530_Fixed) == 2"); +struct NetSPacket_0x7531_Fixed +{ + Little16 magic_packet_id; + NetVersion version; }; -struct NetRPacket0x7530_Fixed +static_assert(offsetof(NetSPacket_0x7531_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7531_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7531_Fixed, version) == 2, "offsetof(NetSPacket_0x7531_Fixed, version) == 2"); +static_assert(sizeof(NetSPacket_0x7531_Fixed) == 10, "sizeof(NetSPacket_0x7531_Fixed) == 10"); +struct NetRPacket_0x7532_Fixed { - Little16 packet_id; + Little16 magic_packet_id; }; -static_assert(offsetof(NetRPacket0x7530_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7530_Fixed, packet_id) == 0"); -static_assert(sizeof(NetRPacket0x7530_Fixed) == 2, "sizeof(NetRPacket0x7530_Fixed) == 2"); +static_assert(offsetof(NetRPacket_0x7532_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7532_Fixed, magic_packet_id) == 0"); +static_assert(sizeof(NetRPacket_0x7532_Fixed) == 2, "sizeof(NetRPacket_0x7532_Fixed) == 2"); + inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7530_Fixed *network, RPacket0x7530_Fixed native) +bool native_to_network(NetRPacket_0x7530_Fixed *network, RPacket_0x7530_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7530_Fixed *native, NetRPacket0x7530_Fixed network) +bool network_to_native(RPacket_0x7530_Fixed *native, NetRPacket_0x7530_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); return rv; } - -struct SPacket0x7531_Fixed -{ - uint16_t packet_id; - Version version; -}; -struct NetSPacket0x7531_Fixed -{ - Little16 packet_id; - NetVersion version; -}; -static_assert(offsetof(NetSPacket0x7531_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7531_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7531_Fixed, version) == 2, "offsetof(NetSPacket0x7531_Fixed, version) == 2"); -static_assert(sizeof(NetSPacket0x7531_Fixed) == 10, "sizeof(NetSPacket0x7531_Fixed) == 10"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7531_Fixed *network, SPacket0x7531_Fixed native) +bool native_to_network(NetSPacket_0x7531_Fixed *network, SPacket_0x7531_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->version, native.version); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7531_Fixed *native, NetSPacket0x7531_Fixed network) +bool network_to_native(SPacket_0x7531_Fixed *native, NetSPacket_0x7531_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->version, network.version); return rv; } - -struct RPacket0x7532_Fixed -{ - uint16_t packet_id; -}; -struct NetRPacket0x7532_Fixed -{ - Little16 packet_id; -}; -static_assert(offsetof(NetRPacket0x7532_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7532_Fixed, packet_id) == 0"); -static_assert(sizeof(NetRPacket0x7532_Fixed) == 2, "sizeof(NetRPacket0x7532_Fixed) == 2"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7532_Fixed *network, RPacket0x7532_Fixed native) +bool native_to_network(NetRPacket_0x7532_Fixed *network, RPacket_0x7532_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7532_Fixed *native, NetRPacket0x7532_Fixed network) +bool network_to_native(RPacket_0x7532_Fixed *native, NetRPacket_0x7532_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); return rv; } - #endif // TMWA_PROTO2_ANY_USER_HPP diff --git a/src/proto2/any-user_test.cpp b/src/proto2/any-user_test.cpp index 5096d24..5f9747c 100644 --- a/src/proto2/any-user_test.cpp +++ b/src/proto2/any-user_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead diff --git a/src/proto2/char-map.hpp b/src/proto2/char-map.hpp index 3caa2df..83f13a7 100644 --- a/src/proto2/char-map.hpp +++ b/src/proto2/char-map.hpp @@ -7,16 +7,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead @@ -28,4 +28,6 @@ // This is an internal protocol, and can be changed without notice + + #endif // TMWA_PROTO2_CHAR_MAP_HPP diff --git a/src/proto2/char-map_test.cpp b/src/proto2/char-map_test.cpp index 1b6ccb1..e941f1a 100644 --- a/src/proto2/char-map_test.cpp +++ b/src/proto2/char-map_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead diff --git a/src/proto2/char-user.hpp b/src/proto2/char-user.hpp index d85d768..b31d9f1 100644 --- a/src/proto2/char-user.hpp +++ b/src/proto2/char-user.hpp @@ -7,16 +7,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead @@ -28,4 +28,6 @@ // This is a public protocol, and changes require client cooperation + + #endif // TMWA_PROTO2_CHAR_USER_HPP diff --git a/src/proto2/char-user_test.cpp b/src/proto2/char-user_test.cpp index 952d196..696b6e4 100644 --- a/src/proto2/char-user_test.cpp +++ b/src/proto2/char-user_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead diff --git a/src/proto2/fwd.hpp b/src/proto2/fwd.hpp index 023ebe5..a18d0ef 100644 --- a/src/proto2/fwd.hpp +++ b/src/proto2/fwd.hpp @@ -7,20 +7,184 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . # include "../sanity.hpp" -// TODO put stuff here +struct RPacket_0x2709_Fixed; +struct NetRPacket_0x2709_Fixed; +struct RPacket_0x2712_Fixed; +struct NetRPacket_0x2712_Fixed; +struct SPacket_0x2713_Fixed; +struct NetSPacket_0x2713_Fixed; +struct RPacket_0x2714_Fixed; +struct NetRPacket_0x2714_Fixed; +struct RPacket_0x2715_Fixed; +struct NetRPacket_0x2715_Fixed; +struct RPacket_0x2716_Fixed; +struct NetRPacket_0x2716_Fixed; +struct SPacket_0x2717_Fixed; +struct NetSPacket_0x2717_Fixed; +struct RPacket_0x2720_Head; +struct NetRPacket_0x2720_Head; +struct RPacket_0x2720_Repeat; +struct NetRPacket_0x2720_Repeat; +struct SPacket_0x2721_Fixed; +struct NetSPacket_0x2721_Fixed; +struct RPacket_0x2722_Fixed; +struct NetRPacket_0x2722_Fixed; +struct SPacket_0x2723_Fixed; +struct NetSPacket_0x2723_Fixed; +struct RPacket_0x2724_Fixed; +struct NetRPacket_0x2724_Fixed; +struct RPacket_0x2725_Fixed; +struct NetRPacket_0x2725_Fixed; +struct RPacket_0x2727_Fixed; +struct NetRPacket_0x2727_Fixed; +struct RPacket_0x2728_Head; +struct NetRPacket_0x2728_Head; +struct RPacket_0x2728_Repeat; +struct NetRPacket_0x2728_Repeat; +struct SPacket_0x2729_Head; +struct NetSPacket_0x2729_Head; +struct SPacket_0x2729_Repeat; +struct NetSPacket_0x2729_Repeat; +struct RPacket_0x272a_Fixed; +struct NetRPacket_0x272a_Fixed; +struct SPacket_0x2730_Fixed; +struct NetSPacket_0x2730_Fixed; +struct SPacket_0x2731_Fixed; +struct NetSPacket_0x2731_Fixed; +struct SPacket_0x2732_Head; +struct NetSPacket_0x2732_Head; +struct SPacket_0x2732_Repeat; +struct NetSPacket_0x2732_Repeat; +struct RPacket_0x2740_Fixed; +struct NetRPacket_0x2740_Fixed; +struct SPacket_0x2741_Fixed; +struct NetSPacket_0x2741_Fixed; + +struct SPacket_0x2726_Head; +struct NetSPacket_0x2726_Head; +struct SPacket_0x2726_Repeat; +struct NetSPacket_0x2726_Repeat; +struct RPacket_0x7920_Fixed; +struct NetRPacket_0x7920_Fixed; +struct SPacket_0x7921_Head; +struct NetSPacket_0x7921_Head; +struct SPacket_0x7921_Repeat; +struct NetSPacket_0x7921_Repeat; +struct RPacket_0x7924_Fixed; +struct NetRPacket_0x7924_Fixed; +struct SPacket_0x7925_Fixed; +struct NetSPacket_0x7925_Fixed; +struct RPacket_0x7930_Fixed; +struct NetRPacket_0x7930_Fixed; +struct SPacket_0x7931_Fixed; +struct NetSPacket_0x7931_Fixed; +struct RPacket_0x7932_Fixed; +struct NetRPacket_0x7932_Fixed; +struct SPacket_0x7933_Fixed; +struct NetSPacket_0x7933_Fixed; +struct RPacket_0x7934_Fixed; +struct NetRPacket_0x7934_Fixed; +struct SPacket_0x7935_Fixed; +struct NetSPacket_0x7935_Fixed; +struct RPacket_0x7936_Fixed; +struct NetRPacket_0x7936_Fixed; +struct SPacket_0x7937_Fixed; +struct NetSPacket_0x7937_Fixed; +struct RPacket_0x7938_Fixed; +struct NetRPacket_0x7938_Fixed; +struct SPacket_0x7939_Head; +struct NetSPacket_0x7939_Head; +struct SPacket_0x7939_Repeat; +struct NetSPacket_0x7939_Repeat; +struct RPacket_0x793a_Fixed; +struct NetRPacket_0x793a_Fixed; +struct SPacket_0x793b_Fixed; +struct NetSPacket_0x793b_Fixed; +struct RPacket_0x793c_Fixed; +struct NetRPacket_0x793c_Fixed; +struct SPacket_0x793d_Fixed; +struct NetSPacket_0x793d_Fixed; +struct RPacket_0x793e_Fixed; +struct NetRPacket_0x793e_Fixed; +struct SPacket_0x793f_Fixed; +struct NetSPacket_0x793f_Fixed; +struct RPacket_0x7940_Fixed; +struct NetRPacket_0x7940_Fixed; +struct SPacket_0x7941_Fixed; +struct NetSPacket_0x7941_Fixed; +struct RPacket_0x7942_Head; +struct NetRPacket_0x7942_Head; +struct RPacket_0x7942_Repeat; +struct NetRPacket_0x7942_Repeat; +struct SPacket_0x7943_Fixed; +struct NetSPacket_0x7943_Fixed; +struct RPacket_0x7944_Fixed; +struct NetRPacket_0x7944_Fixed; +struct SPacket_0x7945_Fixed; +struct NetSPacket_0x7945_Fixed; +struct RPacket_0x7946_Fixed; +struct NetRPacket_0x7946_Fixed; +struct SPacket_0x7947_Fixed; +struct NetSPacket_0x7947_Fixed; +struct RPacket_0x7948_Fixed; +struct NetRPacket_0x7948_Fixed; +struct SPacket_0x7949_Fixed; +struct NetSPacket_0x7949_Fixed; +struct RPacket_0x794a_Fixed; +struct NetRPacket_0x794a_Fixed; +struct SPacket_0x794b_Fixed; +struct NetSPacket_0x794b_Fixed; +struct RPacket_0x794c_Fixed; +struct NetRPacket_0x794c_Fixed; +struct SPacket_0x794d_Fixed; +struct NetSPacket_0x794d_Fixed; +struct RPacket_0x794e_Head; +struct NetRPacket_0x794e_Head; +struct RPacket_0x794e_Repeat; +struct NetRPacket_0x794e_Repeat; +struct SPacket_0x794f_Fixed; +struct NetSPacket_0x794f_Fixed; +struct RPacket_0x7950_Fixed; +struct NetRPacket_0x7950_Fixed; +struct SPacket_0x7951_Fixed; +struct NetSPacket_0x7951_Fixed; +struct RPacket_0x7952_Fixed; +struct NetRPacket_0x7952_Fixed; +struct SPacket_0x7953_Head; +struct NetSPacket_0x7953_Head; +struct SPacket_0x7953_Repeat; +struct NetSPacket_0x7953_Repeat; +struct RPacket_0x7954_Fixed; +struct NetRPacket_0x7954_Fixed; +struct RPacket_0x7955_Fixed; +struct NetRPacket_0x7955_Fixed; + + + + +struct SPacket_0x0212_Fixed; +struct NetSPacket_0x0212_Fixed; + +struct RPacket_0x7530_Fixed; +struct NetRPacket_0x7530_Fixed; +struct SPacket_0x7531_Fixed; +struct NetSPacket_0x7531_Fixed; +struct RPacket_0x7532_Fixed; +struct NetRPacket_0x7532_Fixed; + #endif // TMWA_PROTO2_FWD_HPP diff --git a/src/proto2/include_cstdint_test.cpp b/src/proto2/include_cstdint_test.cpp index a067574..7462057 100644 --- a/src/proto2/include_cstdint_test.cpp +++ b/src/proto2/include_cstdint_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_enums_test.cpp b/src/proto2/include_enums_test.cpp index a335c81..2b9ed36 100644 --- a/src/proto2/include_enums_test.cpp +++ b/src/proto2/include_enums_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_human_time_diff_test.cpp b/src/proto2/include_human_time_diff_test.cpp index 25a111d..3a5cc49 100644 --- a/src/proto2/include_human_time_diff_test.cpp +++ b/src/proto2/include_human_time_diff_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_ids_test.cpp b/src/proto2/include_ids_test.cpp index 63e1753..7dc26dc 100644 --- a/src/proto2/include_ids_test.cpp +++ b/src/proto2/include_ids_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_ip_test.cpp b/src/proto2/include_ip_test.cpp index bae7c3a..a489d9a 100644 --- a/src/proto2/include_ip_test.cpp +++ b/src/proto2/include_ip_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_little_test.cpp b/src/proto2/include_little_test.cpp index 70cb5d2..5e62b33 100644 --- a/src/proto2/include_little_test.cpp +++ b/src/proto2/include_little_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_strs_test.cpp b/src/proto2/include_strs_test.cpp index 1087f3a..5bf516c 100644 --- a/src/proto2/include_strs_test.cpp +++ b/src/proto2/include_strs_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_utils_test.cpp b/src/proto2/include_utils_test.cpp index 840ed5f..106bb59 100644 --- a/src/proto2/include_utils_test.cpp +++ b/src/proto2/include_utils_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_version_test.cpp b/src/proto2/include_version_test.cpp index d635efc..ed31f49 100644 --- a/src/proto2/include_version_test.cpp +++ b/src/proto2/include_version_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/include_vstring_test.cpp b/src/proto2/include_vstring_test.cpp index f415127..24504ed 100644 --- a/src/proto2/include_vstring_test.cpp +++ b/src/proto2/include_vstring_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "../poison.hpp" diff --git a/src/proto2/login-admin.hpp b/src/proto2/login-admin.hpp index 635ed44..005ecfc 100644 --- a/src/proto2/login-admin.hpp +++ b/src/proto2/login-admin.hpp @@ -7,16 +7,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead @@ -27,183 +27,1016 @@ // This is an internal protocol, and can be changed without notice -struct RPacket0x2726_Head +struct SPacket_0x2726_Head { - uint16_t packet_id; - uint16_t unused; - uint32_t string_length; + using NetType = NetSPacket_0x2726_Head; + static const uint16_t PACKET_ID = 0x2726; + + uint16_t magic_packet_id = PACKET_ID; + uint16_t unused = {}; + uint32_t magic_packet_length = {}; }; -struct NetRPacket0x2726_Head +struct SPacket_0x2726_Repeat { - Little16 packet_id; - Little16 unused; - Little32 string_length; + using NetType = NetSPacket_0x2726_Repeat; + static const uint16_t PACKET_ID = 0x2726; + + uint8_t c = {}; }; -static_assert(offsetof(NetRPacket0x2726_Head, packet_id) == 0, "offsetof(NetRPacket0x2726_Head, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2726_Head, unused) == 2, "offsetof(NetRPacket0x2726_Head, unused) == 2"); -static_assert(offsetof(NetRPacket0x2726_Head, string_length) == 4, "offsetof(NetRPacket0x2726_Head, string_length) == 4"); -static_assert(sizeof(NetRPacket0x2726_Head) == 8, "sizeof(NetRPacket0x2726_Head) == 8"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2726_Head *network, RPacket0x2726_Head native) +struct RPacket_0x7920_Fixed { - bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->string_length, native.string_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2726_Head *native, NetRPacket0x2726_Head network) + using NetType = NetRPacket_0x7920_Fixed; + static const uint16_t PACKET_ID = 0x7920; + + uint16_t magic_packet_id = PACKET_ID; + AccountId start_account_id = {}; + AccountId end_account_id = {}; +}; +struct SPacket_0x7921_Head { - bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->string_length, network.string_length); - return rv; -} + using NetType = NetSPacket_0x7921_Head; + static const uint16_t PACKET_ID = 0x7921; -struct RPacket0x2726_Repeat + uint16_t magic_packet_id = PACKET_ID; + uint16_t magic_packet_length = {}; +}; +struct SPacket_0x7921_Repeat { - uint8_t c; + using NetType = NetSPacket_0x7921_Repeat; + static const uint16_t PACKET_ID = 0x7921; + + AccountId account_id = {}; + GmLevel gm_level = {}; + AccountName account_name = {}; + SEX sex = {}; + uint32_t login_count = {}; + uint32_t status = {}; }; -struct NetRPacket0x2726_Repeat +struct RPacket_0x7924_Fixed { - Byte c; + using NetType = NetRPacket_0x7924_Fixed; + static const uint16_t PACKET_ID = 0x7924; + + uint16_t magic_packet_id = PACKET_ID; + ItemNameId source_item_id = {}; + ItemNameId dest_item_id = {}; }; -static_assert(offsetof(NetRPacket0x2726_Repeat, c) == 0, "offsetof(NetRPacket0x2726_Repeat, c) == 0"); -static_assert(sizeof(NetRPacket0x2726_Repeat) == 1, "sizeof(NetRPacket0x2726_Repeat) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2726_Repeat *network, RPacket0x2726_Repeat native) +struct SPacket_0x7925_Fixed { - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2726_Repeat *native, NetRPacket0x2726_Repeat network) + using NetType = NetSPacket_0x7925_Fixed; + static const uint16_t PACKET_ID = 0x7925; + + uint16_t magic_packet_id = PACKET_ID; +}; +struct RPacket_0x7930_Fixed { - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} + using NetType = NetRPacket_0x7930_Fixed; + static const uint16_t PACKET_ID = 0x7930; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + AccountPass password = {}; + SEX sex = {}; + AccountEmail email = {}; +}; +struct SPacket_0x7931_Fixed +{ + using NetType = NetSPacket_0x7931_Fixed; + static const uint16_t PACKET_ID = 0x7931; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x7932_Fixed +{ + using NetType = NetRPacket_0x7932_Fixed; + static const uint16_t PACKET_ID = 0x7932; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; +}; +struct SPacket_0x7933_Fixed +{ + using NetType = NetSPacket_0x7933_Fixed; + static const uint16_t PACKET_ID = 0x7933; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x7934_Fixed +{ + using NetType = NetRPacket_0x7934_Fixed; + static const uint16_t PACKET_ID = 0x7934; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + AccountPass password = {}; +}; +struct SPacket_0x7935_Fixed +{ + using NetType = NetSPacket_0x7935_Fixed; + static const uint16_t PACKET_ID = 0x7935; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x7936_Fixed +{ + using NetType = NetRPacket_0x7936_Fixed; + static const uint16_t PACKET_ID = 0x7936; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + uint32_t status = {}; + timestamp_seconds_buffer error_message = {}; +}; +struct SPacket_0x7937_Fixed +{ + using NetType = NetSPacket_0x7937_Fixed; + static const uint16_t PACKET_ID = 0x7937; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; + uint32_t status = {}; +}; +struct RPacket_0x7938_Fixed +{ + using NetType = NetRPacket_0x7938_Fixed; + static const uint16_t PACKET_ID = 0x7938; + + uint16_t magic_packet_id = PACKET_ID; +}; +struct SPacket_0x7939_Head +{ + using NetType = NetSPacket_0x7939_Head; + static const uint16_t PACKET_ID = 0x7939; + + uint16_t magic_packet_id = PACKET_ID; + uint16_t magic_packet_length = {}; +}; +struct SPacket_0x7939_Repeat +{ + using NetType = NetSPacket_0x7939_Repeat; + static const uint16_t PACKET_ID = 0x7939; + + IP4Address ip = {}; + uint16_t port = {}; + ServerName name = {}; + uint16_t users = {}; + uint16_t maintenance = {}; + uint16_t is_new = {}; +}; +struct RPacket_0x793a_Fixed +{ + using NetType = NetRPacket_0x793a_Fixed; + static const uint16_t PACKET_ID = 0x793a; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + AccountPass password = {}; +}; +struct SPacket_0x793b_Fixed +{ + using NetType = NetSPacket_0x793b_Fixed; + static const uint16_t PACKET_ID = 0x793b; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x793c_Fixed +{ + using NetType = NetRPacket_0x793c_Fixed; + static const uint16_t PACKET_ID = 0x793c; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + SEX sex = {}; +}; +struct SPacket_0x793d_Fixed +{ + using NetType = NetSPacket_0x793d_Fixed; + static const uint16_t PACKET_ID = 0x793d; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x793e_Fixed +{ + using NetType = NetRPacket_0x793e_Fixed; + static const uint16_t PACKET_ID = 0x793e; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + GmLevel gm_level = {}; +}; +struct SPacket_0x793f_Fixed +{ + using NetType = NetSPacket_0x793f_Fixed; + static const uint16_t PACKET_ID = 0x793f; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x7940_Fixed +{ + using NetType = NetRPacket_0x7940_Fixed; + static const uint16_t PACKET_ID = 0x7940; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + AccountEmail email = {}; +}; +struct SPacket_0x7941_Fixed +{ + using NetType = NetSPacket_0x7941_Fixed; + static const uint16_t PACKET_ID = 0x7941; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x7942_Head +{ + using NetType = NetRPacket_0x7942_Head; + static const uint16_t PACKET_ID = 0x7942; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + uint16_t magic_packet_length = {}; +}; +struct RPacket_0x7942_Repeat +{ + using NetType = NetRPacket_0x7942_Repeat; + static const uint16_t PACKET_ID = 0x7942; + + uint8_t c = {}; +}; +struct SPacket_0x7943_Fixed +{ + using NetType = NetSPacket_0x7943_Fixed; + static const uint16_t PACKET_ID = 0x7943; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x7944_Fixed +{ + using NetType = NetRPacket_0x7944_Fixed; + static const uint16_t PACKET_ID = 0x7944; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; +}; +struct SPacket_0x7945_Fixed +{ + using NetType = NetSPacket_0x7945_Fixed; + static const uint16_t PACKET_ID = 0x7945; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x7946_Fixed +{ + using NetType = NetRPacket_0x7946_Fixed; + static const uint16_t PACKET_ID = 0x7946; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; +}; +struct SPacket_0x7947_Fixed +{ + using NetType = NetSPacket_0x7947_Fixed; + static const uint16_t PACKET_ID = 0x7947; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; +}; +struct RPacket_0x7948_Fixed +{ + using NetType = NetRPacket_0x7948_Fixed; + static const uint16_t PACKET_ID = 0x7948; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + TimeT valid_until = {}; +}; +struct SPacket_0x7949_Fixed +{ + using NetType = NetSPacket_0x7949_Fixed; + static const uint16_t PACKET_ID = 0x7949; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; + TimeT valid_until = {}; +}; +struct RPacket_0x794a_Fixed +{ + using NetType = NetRPacket_0x794a_Fixed; + static const uint16_t PACKET_ID = 0x794a; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + TimeT ban_until = {}; +}; +struct SPacket_0x794b_Fixed +{ + using NetType = NetSPacket_0x794b_Fixed; + static const uint16_t PACKET_ID = 0x794b; -struct RPacket0x7920_Head + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; + TimeT ban_until = {}; +}; +struct RPacket_0x794c_Fixed { - uint16_t packet_id; - uint32_t start_account_id; - uint32_t end_account_id; + using NetType = NetRPacket_0x794c_Fixed; + static const uint16_t PACKET_ID = 0x794c; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + HumanTimeDiff ban_add = {}; }; -struct NetRPacket0x7920_Head +struct SPacket_0x794d_Fixed { - Little16 packet_id; + using NetType = NetSPacket_0x794d_Fixed; + static const uint16_t PACKET_ID = 0x794d; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; + TimeT ban_until = {}; +}; +struct RPacket_0x794e_Head +{ + using NetType = NetRPacket_0x794e_Head; + static const uint16_t PACKET_ID = 0x794e; + + uint16_t magic_packet_id = PACKET_ID; + uint16_t unused = {}; + uint32_t magic_packet_length = {}; +}; +struct RPacket_0x794e_Repeat +{ + using NetType = NetRPacket_0x794e_Repeat; + static const uint16_t PACKET_ID = 0x794e; + + uint8_t c = {}; +}; +struct SPacket_0x794f_Fixed +{ + using NetType = NetSPacket_0x794f_Fixed; + static const uint16_t PACKET_ID = 0x794f; + + uint16_t magic_packet_id = PACKET_ID; + uint16_t error = {}; +}; +struct RPacket_0x7950_Fixed +{ + using NetType = NetRPacket_0x7950_Fixed; + static const uint16_t PACKET_ID = 0x7950; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; + HumanTimeDiff valid_add = {}; +}; +struct SPacket_0x7951_Fixed +{ + using NetType = NetSPacket_0x7951_Fixed; + static const uint16_t PACKET_ID = 0x7951; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountName account_name = {}; + TimeT valid_until = {}; +}; +struct RPacket_0x7952_Fixed +{ + using NetType = NetRPacket_0x7952_Fixed; + static const uint16_t PACKET_ID = 0x7952; + + uint16_t magic_packet_id = PACKET_ID; + AccountName account_name = {}; +}; +struct SPacket_0x7953_Head +{ + using NetType = NetSPacket_0x7953_Head; + static const uint16_t PACKET_ID = 0x7953; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + GmLevel gm_level = {}; + AccountName account_name = {}; + SEX sex = {}; + uint32_t login_count = {}; + uint32_t state = {}; + timestamp_seconds_buffer error_message = {}; + timestamp_milliseconds_buffer last_login_string = {}; + VString<15> ip_string = {}; + AccountEmail email = {}; + TimeT connect_until = {}; + TimeT ban_until = {}; + uint16_t magic_packet_length = {}; +}; +struct SPacket_0x7953_Repeat +{ + using NetType = NetSPacket_0x7953_Repeat; + static const uint16_t PACKET_ID = 0x7953; + + uint8_t c = {}; +}; +struct RPacket_0x7954_Fixed +{ + using NetType = NetRPacket_0x7954_Fixed; + static const uint16_t PACKET_ID = 0x7954; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; +}; +struct RPacket_0x7955_Fixed +{ + using NetType = NetRPacket_0x7955_Fixed; + static const uint16_t PACKET_ID = 0x7955; + + uint16_t magic_packet_id = PACKET_ID; +}; + +struct NetSPacket_0x2726_Head +{ + Little16 magic_packet_id; + Little16 unused; + SkewedLength magic_packet_length; +}; +static_assert(offsetof(NetSPacket_0x2726_Head, magic_packet_id) == 0, "offsetof(NetSPacket_0x2726_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2726_Head, unused) == 2, "offsetof(NetSPacket_0x2726_Head, unused) == 2"); +static_assert(offsetof(NetSPacket_0x2726_Head, magic_packet_length) == 4, "offsetof(NetSPacket_0x2726_Head, magic_packet_length) == 4"); +static_assert(sizeof(NetSPacket_0x2726_Head) == 8, "sizeof(NetSPacket_0x2726_Head) == 8"); +struct NetSPacket_0x2726_Repeat +{ + Byte c; +}; +static_assert(offsetof(NetSPacket_0x2726_Repeat, c) == 0, "offsetof(NetSPacket_0x2726_Repeat, c) == 0"); +static_assert(sizeof(NetSPacket_0x2726_Repeat) == 1, "sizeof(NetSPacket_0x2726_Repeat) == 1"); +struct NetRPacket_0x7920_Fixed +{ + Little16 magic_packet_id; Little32 start_account_id; Little32 end_account_id; }; -static_assert(offsetof(NetRPacket0x7920_Head, packet_id) == 0, "offsetof(NetRPacket0x7920_Head, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7920_Head, start_account_id) == 2, "offsetof(NetRPacket0x7920_Head, start_account_id) == 2"); -static_assert(offsetof(NetRPacket0x7920_Head, end_account_id) == 6, "offsetof(NetRPacket0x7920_Head, end_account_id) == 6"); -static_assert(sizeof(NetRPacket0x7920_Head) == 10, "sizeof(NetRPacket0x7920_Head) == 10"); +static_assert(offsetof(NetRPacket_0x7920_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7920_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7920_Fixed, start_account_id) == 2, "offsetof(NetRPacket_0x7920_Fixed, start_account_id) == 2"); +static_assert(offsetof(NetRPacket_0x7920_Fixed, end_account_id) == 6, "offsetof(NetRPacket_0x7920_Fixed, end_account_id) == 6"); +static_assert(sizeof(NetRPacket_0x7920_Fixed) == 10, "sizeof(NetRPacket_0x7920_Fixed) == 10"); +struct NetSPacket_0x7921_Head +{ + Little16 magic_packet_id; + Little16 magic_packet_length; +}; +static_assert(offsetof(NetSPacket_0x7921_Head, magic_packet_id) == 0, "offsetof(NetSPacket_0x7921_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7921_Head, magic_packet_length) == 2, "offsetof(NetSPacket_0x7921_Head, magic_packet_length) == 2"); +static_assert(sizeof(NetSPacket_0x7921_Head) == 4, "sizeof(NetSPacket_0x7921_Head) == 4"); +struct NetSPacket_0x7921_Repeat +{ + Little32 account_id; + Byte gm_level; + NetString account_name; + Byte sex; + Little32 login_count; + Little32 status; +}; +static_assert(offsetof(NetSPacket_0x7921_Repeat, account_id) == 0, "offsetof(NetSPacket_0x7921_Repeat, account_id) == 0"); +static_assert(offsetof(NetSPacket_0x7921_Repeat, gm_level) == 4, "offsetof(NetSPacket_0x7921_Repeat, gm_level) == 4"); +static_assert(offsetof(NetSPacket_0x7921_Repeat, account_name) == 5, "offsetof(NetSPacket_0x7921_Repeat, account_name) == 5"); +static_assert(offsetof(NetSPacket_0x7921_Repeat, sex) == 29, "offsetof(NetSPacket_0x7921_Repeat, sex) == 29"); +static_assert(offsetof(NetSPacket_0x7921_Repeat, login_count) == 30, "offsetof(NetSPacket_0x7921_Repeat, login_count) == 30"); +static_assert(offsetof(NetSPacket_0x7921_Repeat, status) == 34, "offsetof(NetSPacket_0x7921_Repeat, status) == 34"); +static_assert(sizeof(NetSPacket_0x7921_Repeat) == 38, "sizeof(NetSPacket_0x7921_Repeat) == 38"); +struct NetRPacket_0x7924_Fixed +{ + Little16 magic_packet_id; + Little32 source_item_id; + Little32 dest_item_id; +}; +static_assert(offsetof(NetRPacket_0x7924_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7924_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7924_Fixed, source_item_id) == 2, "offsetof(NetRPacket_0x7924_Fixed, source_item_id) == 2"); +static_assert(offsetof(NetRPacket_0x7924_Fixed, dest_item_id) == 6, "offsetof(NetRPacket_0x7924_Fixed, dest_item_id) == 6"); +static_assert(sizeof(NetRPacket_0x7924_Fixed) == 10, "sizeof(NetRPacket_0x7924_Fixed) == 10"); +struct NetSPacket_0x7925_Fixed +{ + Little16 magic_packet_id; +}; +static_assert(offsetof(NetSPacket_0x7925_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7925_Fixed, magic_packet_id) == 0"); +static_assert(sizeof(NetSPacket_0x7925_Fixed) == 2, "sizeof(NetSPacket_0x7925_Fixed) == 2"); +struct NetRPacket_0x7930_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + NetString password; + char sex; + NetString email; +}; +static_assert(offsetof(NetRPacket_0x7930_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7930_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7930_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7930_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x7930_Fixed, password) == 26, "offsetof(NetRPacket_0x7930_Fixed, password) == 26"); +static_assert(offsetof(NetRPacket_0x7930_Fixed, sex) == 50, "offsetof(NetRPacket_0x7930_Fixed, sex) == 50"); +static_assert(offsetof(NetRPacket_0x7930_Fixed, email) == 51, "offsetof(NetRPacket_0x7930_Fixed, email) == 51"); +static_assert(sizeof(NetRPacket_0x7930_Fixed) == 91, "sizeof(NetRPacket_0x7930_Fixed) == 91"); +struct NetSPacket_0x7931_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x7931_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7931_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7931_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7931_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7931_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7931_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x7931_Fixed) == 30, "sizeof(NetSPacket_0x7931_Fixed) == 30"); +struct NetRPacket_0x7932_Fixed +{ + Little16 magic_packet_id; + NetString account_name; +}; +static_assert(offsetof(NetRPacket_0x7932_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7932_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7932_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7932_Fixed, account_name) == 2"); +static_assert(sizeof(NetRPacket_0x7932_Fixed) == 26, "sizeof(NetRPacket_0x7932_Fixed) == 26"); +struct NetSPacket_0x7933_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x7933_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7933_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7933_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7933_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7933_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7933_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x7933_Fixed) == 30, "sizeof(NetSPacket_0x7933_Fixed) == 30"); +struct NetRPacket_0x7934_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + NetString password; +}; +static_assert(offsetof(NetRPacket_0x7934_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7934_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7934_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7934_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x7934_Fixed, password) == 26, "offsetof(NetRPacket_0x7934_Fixed, password) == 26"); +static_assert(sizeof(NetRPacket_0x7934_Fixed) == 50, "sizeof(NetRPacket_0x7934_Fixed) == 50"); +struct NetSPacket_0x7935_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x7935_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7935_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7935_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7935_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7935_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7935_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x7935_Fixed) == 30, "sizeof(NetSPacket_0x7935_Fixed) == 30"); +struct NetRPacket_0x7936_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + Little32 status; + NetString error_message; +}; +static_assert(offsetof(NetRPacket_0x7936_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7936_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7936_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7936_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x7936_Fixed, status) == 26, "offsetof(NetRPacket_0x7936_Fixed, status) == 26"); +static_assert(offsetof(NetRPacket_0x7936_Fixed, error_message) == 30, "offsetof(NetRPacket_0x7936_Fixed, error_message) == 30"); +static_assert(sizeof(NetRPacket_0x7936_Fixed) == 50, "sizeof(NetRPacket_0x7936_Fixed) == 50"); +struct NetSPacket_0x7937_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; + Little32 status; +}; +static_assert(offsetof(NetSPacket_0x7937_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7937_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7937_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7937_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7937_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7937_Fixed, account_name) == 6"); +static_assert(offsetof(NetSPacket_0x7937_Fixed, status) == 30, "offsetof(NetSPacket_0x7937_Fixed, status) == 30"); +static_assert(sizeof(NetSPacket_0x7937_Fixed) == 34, "sizeof(NetSPacket_0x7937_Fixed) == 34"); +struct NetRPacket_0x7938_Fixed +{ + Little16 magic_packet_id; +}; +static_assert(offsetof(NetRPacket_0x7938_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7938_Fixed, magic_packet_id) == 0"); +static_assert(sizeof(NetRPacket_0x7938_Fixed) == 2, "sizeof(NetRPacket_0x7938_Fixed) == 2"); +struct NetSPacket_0x7939_Head +{ + Little16 magic_packet_id; + Little16 magic_packet_length; +}; +static_assert(offsetof(NetSPacket_0x7939_Head, magic_packet_id) == 0, "offsetof(NetSPacket_0x7939_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7939_Head, magic_packet_length) == 2, "offsetof(NetSPacket_0x7939_Head, magic_packet_length) == 2"); +static_assert(sizeof(NetSPacket_0x7939_Head) == 4, "sizeof(NetSPacket_0x7939_Head) == 4"); +struct NetSPacket_0x7939_Repeat +{ + IP4Address ip; + Little16 port; + NetString name; + Little16 users; + Little16 maintenance; + Little16 is_new; +}; +static_assert(offsetof(NetSPacket_0x7939_Repeat, ip) == 0, "offsetof(NetSPacket_0x7939_Repeat, ip) == 0"); +static_assert(offsetof(NetSPacket_0x7939_Repeat, port) == 4, "offsetof(NetSPacket_0x7939_Repeat, port) == 4"); +static_assert(offsetof(NetSPacket_0x7939_Repeat, name) == 6, "offsetof(NetSPacket_0x7939_Repeat, name) == 6"); +static_assert(offsetof(NetSPacket_0x7939_Repeat, users) == 26, "offsetof(NetSPacket_0x7939_Repeat, users) == 26"); +static_assert(offsetof(NetSPacket_0x7939_Repeat, maintenance) == 28, "offsetof(NetSPacket_0x7939_Repeat, maintenance) == 28"); +static_assert(offsetof(NetSPacket_0x7939_Repeat, is_new) == 30, "offsetof(NetSPacket_0x7939_Repeat, is_new) == 30"); +static_assert(sizeof(NetSPacket_0x7939_Repeat) == 32, "sizeof(NetSPacket_0x7939_Repeat) == 32"); +struct NetRPacket_0x793a_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + NetString password; +}; +static_assert(offsetof(NetRPacket_0x793a_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x793a_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x793a_Fixed, account_name) == 2, "offsetof(NetRPacket_0x793a_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x793a_Fixed, password) == 26, "offsetof(NetRPacket_0x793a_Fixed, password) == 26"); +static_assert(sizeof(NetRPacket_0x793a_Fixed) == 50, "sizeof(NetRPacket_0x793a_Fixed) == 50"); +struct NetSPacket_0x793b_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x793b_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x793b_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x793b_Fixed, account_id) == 2, "offsetof(NetSPacket_0x793b_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x793b_Fixed, account_name) == 6, "offsetof(NetSPacket_0x793b_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x793b_Fixed) == 30, "sizeof(NetSPacket_0x793b_Fixed) == 30"); +struct NetRPacket_0x793c_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + char sex; +}; +static_assert(offsetof(NetRPacket_0x793c_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x793c_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x793c_Fixed, account_name) == 2, "offsetof(NetRPacket_0x793c_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x793c_Fixed, sex) == 26, "offsetof(NetRPacket_0x793c_Fixed, sex) == 26"); +static_assert(sizeof(NetRPacket_0x793c_Fixed) == 27, "sizeof(NetRPacket_0x793c_Fixed) == 27"); +struct NetSPacket_0x793d_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x793d_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x793d_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x793d_Fixed, account_id) == 2, "offsetof(NetSPacket_0x793d_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x793d_Fixed, account_name) == 6, "offsetof(NetSPacket_0x793d_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x793d_Fixed) == 30, "sizeof(NetSPacket_0x793d_Fixed) == 30"); +struct NetRPacket_0x793e_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + Byte gm_level; +}; +static_assert(offsetof(NetRPacket_0x793e_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x793e_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x793e_Fixed, account_name) == 2, "offsetof(NetRPacket_0x793e_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x793e_Fixed, gm_level) == 26, "offsetof(NetRPacket_0x793e_Fixed, gm_level) == 26"); +static_assert(sizeof(NetRPacket_0x793e_Fixed) == 27, "sizeof(NetRPacket_0x793e_Fixed) == 27"); +struct NetSPacket_0x793f_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x793f_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x793f_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x793f_Fixed, account_id) == 2, "offsetof(NetSPacket_0x793f_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x793f_Fixed, account_name) == 6, "offsetof(NetSPacket_0x793f_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x793f_Fixed) == 30, "sizeof(NetSPacket_0x793f_Fixed) == 30"); +struct NetRPacket_0x7940_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + NetString email; +}; +static_assert(offsetof(NetRPacket_0x7940_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7940_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7940_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7940_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x7940_Fixed, email) == 26, "offsetof(NetRPacket_0x7940_Fixed, email) == 26"); +static_assert(sizeof(NetRPacket_0x7940_Fixed) == 66, "sizeof(NetRPacket_0x7940_Fixed) == 66"); +struct NetSPacket_0x7941_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x7941_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7941_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7941_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7941_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7941_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7941_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x7941_Fixed) == 30, "sizeof(NetSPacket_0x7941_Fixed) == 30"); +struct NetRPacket_0x7942_Head +{ + Little16 magic_packet_id; + NetString account_name; + SkewedLength magic_packet_length; +}; +static_assert(offsetof(NetRPacket_0x7942_Head, magic_packet_id) == 0, "offsetof(NetRPacket_0x7942_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7942_Head, account_name) == 2, "offsetof(NetRPacket_0x7942_Head, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x7942_Head, magic_packet_length) == 26, "offsetof(NetRPacket_0x7942_Head, magic_packet_length) == 26"); +static_assert(sizeof(NetRPacket_0x7942_Head) == 28, "sizeof(NetRPacket_0x7942_Head) == 28"); +struct NetRPacket_0x7942_Repeat +{ + Byte c; +}; +static_assert(offsetof(NetRPacket_0x7942_Repeat, c) == 0, "offsetof(NetRPacket_0x7942_Repeat, c) == 0"); +static_assert(sizeof(NetRPacket_0x7942_Repeat) == 1, "sizeof(NetRPacket_0x7942_Repeat) == 1"); +struct NetSPacket_0x7943_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x7943_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7943_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7943_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7943_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7943_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7943_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x7943_Fixed) == 30, "sizeof(NetSPacket_0x7943_Fixed) == 30"); +struct NetRPacket_0x7944_Fixed +{ + Little16 magic_packet_id; + NetString account_name; +}; +static_assert(offsetof(NetRPacket_0x7944_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7944_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7944_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7944_Fixed, account_name) == 2"); +static_assert(sizeof(NetRPacket_0x7944_Fixed) == 26, "sizeof(NetRPacket_0x7944_Fixed) == 26"); +struct NetSPacket_0x7945_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x7945_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7945_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7945_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7945_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7945_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7945_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x7945_Fixed) == 30, "sizeof(NetSPacket_0x7945_Fixed) == 30"); +struct NetRPacket_0x7946_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; +}; +static_assert(offsetof(NetRPacket_0x7946_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7946_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7946_Fixed, account_id) == 2, "offsetof(NetRPacket_0x7946_Fixed, account_id) == 2"); +static_assert(sizeof(NetRPacket_0x7946_Fixed) == 6, "sizeof(NetRPacket_0x7946_Fixed) == 6"); +struct NetSPacket_0x7947_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; +}; +static_assert(offsetof(NetSPacket_0x7947_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7947_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7947_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7947_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7947_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7947_Fixed, account_name) == 6"); +static_assert(sizeof(NetSPacket_0x7947_Fixed) == 30, "sizeof(NetSPacket_0x7947_Fixed) == 30"); +struct NetRPacket_0x7948_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + Little32 valid_until; +}; +static_assert(offsetof(NetRPacket_0x7948_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7948_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7948_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7948_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x7948_Fixed, valid_until) == 26, "offsetof(NetRPacket_0x7948_Fixed, valid_until) == 26"); +static_assert(sizeof(NetRPacket_0x7948_Fixed) == 30, "sizeof(NetRPacket_0x7948_Fixed) == 30"); +struct NetSPacket_0x7949_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; + Little32 valid_until; +}; +static_assert(offsetof(NetSPacket_0x7949_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7949_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7949_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7949_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7949_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7949_Fixed, account_name) == 6"); +static_assert(offsetof(NetSPacket_0x7949_Fixed, valid_until) == 30, "offsetof(NetSPacket_0x7949_Fixed, valid_until) == 30"); +static_assert(sizeof(NetSPacket_0x7949_Fixed) == 34, "sizeof(NetSPacket_0x7949_Fixed) == 34"); +struct NetRPacket_0x794a_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + Little32 ban_until; +}; +static_assert(offsetof(NetRPacket_0x794a_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x794a_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x794a_Fixed, account_name) == 2, "offsetof(NetRPacket_0x794a_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x794a_Fixed, ban_until) == 26, "offsetof(NetRPacket_0x794a_Fixed, ban_until) == 26"); +static_assert(sizeof(NetRPacket_0x794a_Fixed) == 30, "sizeof(NetRPacket_0x794a_Fixed) == 30"); +struct NetSPacket_0x794b_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; + Little32 ban_until; +}; +static_assert(offsetof(NetSPacket_0x794b_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x794b_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x794b_Fixed, account_id) == 2, "offsetof(NetSPacket_0x794b_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x794b_Fixed, account_name) == 6, "offsetof(NetSPacket_0x794b_Fixed, account_name) == 6"); +static_assert(offsetof(NetSPacket_0x794b_Fixed, ban_until) == 30, "offsetof(NetSPacket_0x794b_Fixed, ban_until) == 30"); +static_assert(sizeof(NetSPacket_0x794b_Fixed) == 34, "sizeof(NetSPacket_0x794b_Fixed) == 34"); +struct NetRPacket_0x794c_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + NetHumanTimeDiff ban_add; +}; +static_assert(offsetof(NetRPacket_0x794c_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x794c_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x794c_Fixed, account_name) == 2, "offsetof(NetRPacket_0x794c_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x794c_Fixed, ban_add) == 26, "offsetof(NetRPacket_0x794c_Fixed, ban_add) == 26"); +static_assert(sizeof(NetRPacket_0x794c_Fixed) == 38, "sizeof(NetRPacket_0x794c_Fixed) == 38"); +struct NetSPacket_0x794d_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; + Little32 ban_until; +}; +static_assert(offsetof(NetSPacket_0x794d_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x794d_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x794d_Fixed, account_id) == 2, "offsetof(NetSPacket_0x794d_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x794d_Fixed, account_name) == 6, "offsetof(NetSPacket_0x794d_Fixed, account_name) == 6"); +static_assert(offsetof(NetSPacket_0x794d_Fixed, ban_until) == 30, "offsetof(NetSPacket_0x794d_Fixed, ban_until) == 30"); +static_assert(sizeof(NetSPacket_0x794d_Fixed) == 34, "sizeof(NetSPacket_0x794d_Fixed) == 34"); +struct NetRPacket_0x794e_Head +{ + Little16 magic_packet_id; + Little16 unused; + SkewedLength magic_packet_length; +}; +static_assert(offsetof(NetRPacket_0x794e_Head, magic_packet_id) == 0, "offsetof(NetRPacket_0x794e_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x794e_Head, unused) == 2, "offsetof(NetRPacket_0x794e_Head, unused) == 2"); +static_assert(offsetof(NetRPacket_0x794e_Head, magic_packet_length) == 4, "offsetof(NetRPacket_0x794e_Head, magic_packet_length) == 4"); +static_assert(sizeof(NetRPacket_0x794e_Head) == 8, "sizeof(NetRPacket_0x794e_Head) == 8"); +struct NetRPacket_0x794e_Repeat +{ + Byte c; +}; +static_assert(offsetof(NetRPacket_0x794e_Repeat, c) == 0, "offsetof(NetRPacket_0x794e_Repeat, c) == 0"); +static_assert(sizeof(NetRPacket_0x794e_Repeat) == 1, "sizeof(NetRPacket_0x794e_Repeat) == 1"); +struct NetSPacket_0x794f_Fixed +{ + Little16 magic_packet_id; + Little16 error; +}; +static_assert(offsetof(NetSPacket_0x794f_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x794f_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x794f_Fixed, error) == 2, "offsetof(NetSPacket_0x794f_Fixed, error) == 2"); +static_assert(sizeof(NetSPacket_0x794f_Fixed) == 4, "sizeof(NetSPacket_0x794f_Fixed) == 4"); +struct NetRPacket_0x7950_Fixed +{ + Little16 magic_packet_id; + NetString account_name; + NetHumanTimeDiff valid_add; +}; +static_assert(offsetof(NetRPacket_0x7950_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7950_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7950_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7950_Fixed, account_name) == 2"); +static_assert(offsetof(NetRPacket_0x7950_Fixed, valid_add) == 26, "offsetof(NetRPacket_0x7950_Fixed, valid_add) == 26"); +static_assert(sizeof(NetRPacket_0x7950_Fixed) == 38, "sizeof(NetRPacket_0x7950_Fixed) == 38"); +struct NetSPacket_0x7951_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString account_name; + Little32 valid_until; +}; +static_assert(offsetof(NetSPacket_0x7951_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x7951_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7951_Fixed, account_id) == 2, "offsetof(NetSPacket_0x7951_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7951_Fixed, account_name) == 6, "offsetof(NetSPacket_0x7951_Fixed, account_name) == 6"); +static_assert(offsetof(NetSPacket_0x7951_Fixed, valid_until) == 30, "offsetof(NetSPacket_0x7951_Fixed, valid_until) == 30"); +static_assert(sizeof(NetSPacket_0x7951_Fixed) == 34, "sizeof(NetSPacket_0x7951_Fixed) == 34"); +struct NetRPacket_0x7952_Fixed +{ + Little16 magic_packet_id; + NetString account_name; +}; +static_assert(offsetof(NetRPacket_0x7952_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7952_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7952_Fixed, account_name) == 2, "offsetof(NetRPacket_0x7952_Fixed, account_name) == 2"); +static_assert(sizeof(NetRPacket_0x7952_Fixed) == 26, "sizeof(NetRPacket_0x7952_Fixed) == 26"); +struct NetSPacket_0x7953_Head +{ + Little16 magic_packet_id; + Little32 account_id; + Byte gm_level; + NetString account_name; + Byte sex; + Little32 login_count; + Little32 state; + NetString error_message; + NetString last_login_string; + NetString)> ip_string; + NetString email; + Little32 connect_until; + Little32 ban_until; + SkewedLength magic_packet_length; +}; +static_assert(offsetof(NetSPacket_0x7953_Head, magic_packet_id) == 0, "offsetof(NetSPacket_0x7953_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x7953_Head, account_id) == 2, "offsetof(NetSPacket_0x7953_Head, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x7953_Head, gm_level) == 6, "offsetof(NetSPacket_0x7953_Head, gm_level) == 6"); +static_assert(offsetof(NetSPacket_0x7953_Head, account_name) == 7, "offsetof(NetSPacket_0x7953_Head, account_name) == 7"); +static_assert(offsetof(NetSPacket_0x7953_Head, sex) == 31, "offsetof(NetSPacket_0x7953_Head, sex) == 31"); +static_assert(offsetof(NetSPacket_0x7953_Head, login_count) == 32, "offsetof(NetSPacket_0x7953_Head, login_count) == 32"); +static_assert(offsetof(NetSPacket_0x7953_Head, state) == 36, "offsetof(NetSPacket_0x7953_Head, state) == 36"); +static_assert(offsetof(NetSPacket_0x7953_Head, error_message) == 40, "offsetof(NetSPacket_0x7953_Head, error_message) == 40"); +static_assert(offsetof(NetSPacket_0x7953_Head, last_login_string) == 60, "offsetof(NetSPacket_0x7953_Head, last_login_string) == 60"); +static_assert(offsetof(NetSPacket_0x7953_Head, ip_string) == 84, "offsetof(NetSPacket_0x7953_Head, ip_string) == 84"); +static_assert(offsetof(NetSPacket_0x7953_Head, email) == 100, "offsetof(NetSPacket_0x7953_Head, email) == 100"); +static_assert(offsetof(NetSPacket_0x7953_Head, connect_until) == 140, "offsetof(NetSPacket_0x7953_Head, connect_until) == 140"); +static_assert(offsetof(NetSPacket_0x7953_Head, ban_until) == 144, "offsetof(NetSPacket_0x7953_Head, ban_until) == 144"); +static_assert(offsetof(NetSPacket_0x7953_Head, magic_packet_length) == 148, "offsetof(NetSPacket_0x7953_Head, magic_packet_length) == 148"); +static_assert(sizeof(NetSPacket_0x7953_Head) == 150, "sizeof(NetSPacket_0x7953_Head) == 150"); +struct NetSPacket_0x7953_Repeat +{ + Byte c; +}; +static_assert(offsetof(NetSPacket_0x7953_Repeat, c) == 0, "offsetof(NetSPacket_0x7953_Repeat, c) == 0"); +static_assert(sizeof(NetSPacket_0x7953_Repeat) == 1, "sizeof(NetSPacket_0x7953_Repeat) == 1"); +struct NetRPacket_0x7954_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; +}; +static_assert(offsetof(NetRPacket_0x7954_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7954_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x7954_Fixed, account_id) == 2, "offsetof(NetRPacket_0x7954_Fixed, account_id) == 2"); +static_assert(sizeof(NetRPacket_0x7954_Fixed) == 6, "sizeof(NetRPacket_0x7954_Fixed) == 6"); +struct NetRPacket_0x7955_Fixed +{ + Little16 magic_packet_id; +}; +static_assert(offsetof(NetRPacket_0x7955_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x7955_Fixed, magic_packet_id) == 0"); +static_assert(sizeof(NetRPacket_0x7955_Fixed) == 2, "sizeof(NetRPacket_0x7955_Fixed) == 2"); + inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7920_Head *network, RPacket0x7920_Head native) +bool native_to_network(NetSPacket_0x2726_Head *network, SPacket_0x2726_Head native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - rv &= native_to_network(&network->start_account_id, native.start_account_id); - rv &= native_to_network(&network->end_account_id, native.end_account_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->unused, native.unused); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7920_Head *native, NetRPacket0x7920_Head network) +bool network_to_native(SPacket_0x2726_Head *native, NetSPacket_0x2726_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->start_account_id, network.start_account_id); - rv &= network_to_native(&native->end_account_id, network.end_account_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->unused, network.unused); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); return rv; } - -struct RPacket0x7920_Repeat -{ - uint8_t c; -}; -struct NetRPacket0x7920_Repeat -{ - Byte c; -}; -static_assert(offsetof(NetRPacket0x7920_Repeat, c) == 0, "offsetof(NetRPacket0x7920_Repeat, c) == 0"); -static_assert(sizeof(NetRPacket0x7920_Repeat) == 1, "sizeof(NetRPacket0x7920_Repeat) == 1"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7920_Repeat *network, RPacket0x7920_Repeat native) +bool native_to_network(NetSPacket_0x2726_Repeat *network, SPacket_0x2726_Repeat native) { bool rv = true; rv &= native_to_network(&network->c, native.c); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7920_Repeat *native, NetRPacket0x7920_Repeat network) +bool network_to_native(SPacket_0x2726_Repeat *native, NetSPacket_0x2726_Repeat network) { bool rv = true; rv &= network_to_native(&native->c, network.c); return rv; } - -struct SPacket0x7921_Head -{ - uint16_t packet_id; - uint16_t packet_length; -}; -struct NetSPacket0x7921_Head -{ - Little16 packet_id; - Little16 packet_length; -}; -static_assert(offsetof(NetSPacket0x7921_Head, packet_id) == 0, "offsetof(NetSPacket0x7921_Head, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7921_Head, packet_length) == 2, "offsetof(NetSPacket0x7921_Head, packet_length) == 2"); -static_assert(sizeof(NetSPacket0x7921_Head) == 4, "sizeof(NetSPacket0x7921_Head) == 4"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7921_Head *network, SPacket0x7921_Head native) +bool native_to_network(NetRPacket_0x7920_Fixed *network, RPacket_0x7920_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - rv &= native_to_network(&network->packet_length, native.packet_length); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->start_account_id, native.start_account_id); + rv &= native_to_network(&network->end_account_id, native.end_account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7921_Head *native, NetSPacket0x7921_Head network) +bool network_to_native(RPacket_0x7920_Fixed *native, NetRPacket_0x7920_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->packet_length, network.packet_length); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->start_account_id, network.start_account_id); + rv &= network_to_native(&native->end_account_id, network.end_account_id); return rv; } - -struct SPacket0x7921_Repeat +inline __attribute__((warn_unused_result)) +bool native_to_network(NetSPacket_0x7921_Head *network, SPacket_0x7921_Head native) { - uint32_t account_id; - GmLevel gm_level; - AccountName account_name; - SEX sex; - uint32_t login_count; - uint32_t status; -}; -struct NetSPacket0x7921_Repeat + bool rv = true; + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); + return rv; +} +inline __attribute__((warn_unused_result)) +bool network_to_native(SPacket_0x7921_Head *native, NetSPacket_0x7921_Head network) { - Little32 account_id; - Byte gm_level; - NetString account_name; - Byte sex; - Little32 login_count; - Little32 status; -}; -static_assert(offsetof(NetSPacket0x7921_Repeat, account_id) == 0, "offsetof(NetSPacket0x7921_Repeat, account_id) == 0"); -static_assert(offsetof(NetSPacket0x7921_Repeat, gm_level) == 4, "offsetof(NetSPacket0x7921_Repeat, gm_level) == 4"); -static_assert(offsetof(NetSPacket0x7921_Repeat, account_name) == 5, "offsetof(NetSPacket0x7921_Repeat, account_name) == 5"); -static_assert(offsetof(NetSPacket0x7921_Repeat, sex) == 29, "offsetof(NetSPacket0x7921_Repeat, sex) == 29"); -static_assert(offsetof(NetSPacket0x7921_Repeat, login_count) == 30, "offsetof(NetSPacket0x7921_Repeat, login_count) == 30"); -static_assert(offsetof(NetSPacket0x7921_Repeat, status) == 34, "offsetof(NetSPacket0x7921_Repeat, status) == 34"); -static_assert(sizeof(NetSPacket0x7921_Repeat) == 38, "sizeof(NetSPacket0x7921_Repeat) == 38"); + bool rv = true; + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); + return rv; +} inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7921_Repeat *network, SPacket0x7921_Repeat native) +bool native_to_network(NetSPacket_0x7921_Repeat *network, SPacket_0x7921_Repeat native) { bool rv = true; rv &= native_to_network(&network->account_id, native.account_id); @@ -215,7 +1048,7 @@ bool native_to_network(NetSPacket0x7921_Repeat *network, SPacket0x7921_Repeat na return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7921_Repeat *native, NetSPacket0x7921_Repeat network) +bool network_to_native(SPacket_0x7921_Repeat *native, NetSPacket_0x7921_Repeat network) { bool rv = true; rv &= network_to_native(&native->account_id, network.account_id); @@ -226,94 +1059,43 @@ bool network_to_native(SPacket0x7921_Repeat *native, NetSPacket0x7921_Repeat net rv &= network_to_native(&native->status, network.status); return rv; } - -struct RPacket0x7924_Fixed -{ - uint16_t packet_id; - uint32_t source_item_id; - uint32_t dest_item_id; -}; -struct NetRPacket0x7924_Fixed -{ - Little16 packet_id; - Little32 source_item_id; - Little32 dest_item_id; -}; -static_assert(offsetof(NetRPacket0x7924_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7924_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7924_Fixed, source_item_id) == 2, "offsetof(NetRPacket0x7924_Fixed, source_item_id) == 2"); -static_assert(offsetof(NetRPacket0x7924_Fixed, dest_item_id) == 6, "offsetof(NetRPacket0x7924_Fixed, dest_item_id) == 6"); -static_assert(sizeof(NetRPacket0x7924_Fixed) == 10, "sizeof(NetRPacket0x7924_Fixed) == 10"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7924_Fixed *network, RPacket0x7924_Fixed native) +bool native_to_network(NetRPacket_0x7924_Fixed *network, RPacket_0x7924_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->source_item_id, native.source_item_id); rv &= native_to_network(&network->dest_item_id, native.dest_item_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7924_Fixed *native, NetRPacket0x7924_Fixed network) +bool network_to_native(RPacket_0x7924_Fixed *native, NetRPacket_0x7924_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->source_item_id, network.source_item_id); rv &= network_to_native(&native->dest_item_id, network.dest_item_id); return rv; } - -struct SPacket0x7925_Fixed -{ - uint16_t packet_id; -}; -struct NetSPacket0x7925_Fixed -{ - Little16 packet_id; -}; -static_assert(offsetof(NetSPacket0x7925_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7925_Fixed, packet_id) == 0"); -static_assert(sizeof(NetSPacket0x7925_Fixed) == 2, "sizeof(NetSPacket0x7925_Fixed) == 2"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7925_Fixed *network, SPacket0x7925_Fixed native) +bool native_to_network(NetSPacket_0x7925_Fixed *network, SPacket_0x7925_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7925_Fixed *native, NetSPacket0x7925_Fixed network) +bool network_to_native(SPacket_0x7925_Fixed *native, NetSPacket_0x7925_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); return rv; } - -struct RPacket0x7930_Fixed -{ - uint16_t packet_id; - AccountName account_name; - AccountPass password; - SEX sex; - AccountEmail email; -}; -struct NetRPacket0x7930_Fixed -{ - Little16 packet_id; - NetString account_name; - NetString password; - Byte sex; - NetString email; -}; -static_assert(offsetof(NetRPacket0x7930_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7930_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7930_Fixed, account_name) == 2, "offsetof(NetRPacket0x7930_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x7930_Fixed, password) == 26, "offsetof(NetRPacket0x7930_Fixed, password) == 26"); -static_assert(offsetof(NetRPacket0x7930_Fixed, sex) == 50, "offsetof(NetRPacket0x7930_Fixed, sex) == 50"); -static_assert(offsetof(NetRPacket0x7930_Fixed, email) == 51, "offsetof(NetRPacket0x7930_Fixed, email) == 51"); -static_assert(sizeof(NetRPacket0x7930_Fixed) == 91, "sizeof(NetRPacket0x7930_Fixed) == 91"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7930_Fixed *network, RPacket0x7930_Fixed native) +bool native_to_network(NetRPacket_0x7930_Fixed *network, RPacket_0x7930_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->password, native.password); rv &= native_to_network(&network->sex, native.sex); @@ -321,344 +1103,176 @@ bool native_to_network(NetRPacket0x7930_Fixed *network, RPacket0x7930_Fixed nati return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7930_Fixed *native, NetRPacket0x7930_Fixed network) +bool network_to_native(RPacket_0x7930_Fixed *native, NetRPacket_0x7930_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->password, network.password); rv &= network_to_native(&native->sex, network.sex); rv &= network_to_native(&native->email, network.email); return rv; } - -struct SPacket0x7931_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x7931_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x7931_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7931_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7931_Fixed, account_id) == 2, "offsetof(NetSPacket0x7931_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7931_Fixed, account_name) == 6, "offsetof(NetSPacket0x7931_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x7931_Fixed) == 30, "sizeof(NetSPacket0x7931_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7931_Fixed *network, SPacket0x7931_Fixed native) +bool native_to_network(NetSPacket_0x7931_Fixed *network, SPacket_0x7931_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7931_Fixed *native, NetSPacket0x7931_Fixed network) +bool network_to_native(SPacket_0x7931_Fixed *native, NetSPacket_0x7931_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x7932_Fixed -{ - uint16_t packet_id; - AccountName account_name; -}; -struct NetRPacket0x7932_Fixed -{ - Little16 packet_id; - NetString account_name; -}; -static_assert(offsetof(NetRPacket0x7932_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7932_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7932_Fixed, account_name) == 2, "offsetof(NetRPacket0x7932_Fixed, account_name) == 2"); -static_assert(sizeof(NetRPacket0x7932_Fixed) == 26, "sizeof(NetRPacket0x7932_Fixed) == 26"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7932_Fixed *network, RPacket0x7932_Fixed native) +bool native_to_network(NetRPacket_0x7932_Fixed *network, RPacket_0x7932_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7932_Fixed *native, NetRPacket0x7932_Fixed network) +bool network_to_native(RPacket_0x7932_Fixed *native, NetRPacket_0x7932_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct SPacket0x7933_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x7933_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x7933_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7933_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7933_Fixed, account_id) == 2, "offsetof(NetSPacket0x7933_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7933_Fixed, account_name) == 6, "offsetof(NetSPacket0x7933_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x7933_Fixed) == 30, "sizeof(NetSPacket0x7933_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7933_Fixed *network, SPacket0x7933_Fixed native) +bool native_to_network(NetSPacket_0x7933_Fixed *network, SPacket_0x7933_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7933_Fixed *native, NetSPacket0x7933_Fixed network) +bool network_to_native(SPacket_0x7933_Fixed *native, NetSPacket_0x7933_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x7934_Fixed -{ - uint16_t packet_id; - AccountName account_name; - AccountPass password; -}; -struct NetRPacket0x7934_Fixed -{ - Little16 packet_id; - NetString account_name; - NetString password; -}; -static_assert(offsetof(NetRPacket0x7934_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7934_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7934_Fixed, account_name) == 2, "offsetof(NetRPacket0x7934_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x7934_Fixed, password) == 26, "offsetof(NetRPacket0x7934_Fixed, password) == 26"); -static_assert(sizeof(NetRPacket0x7934_Fixed) == 50, "sizeof(NetRPacket0x7934_Fixed) == 50"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7934_Fixed *network, RPacket0x7934_Fixed native) +bool native_to_network(NetRPacket_0x7934_Fixed *network, RPacket_0x7934_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->password, native.password); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7934_Fixed *native, NetRPacket0x7934_Fixed network) +bool network_to_native(RPacket_0x7934_Fixed *native, NetRPacket_0x7934_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->password, network.password); return rv; } - -struct SPacket0x7935_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x7935_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x7935_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7935_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7935_Fixed, account_id) == 2, "offsetof(NetSPacket0x7935_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7935_Fixed, account_name) == 6, "offsetof(NetSPacket0x7935_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x7935_Fixed) == 30, "sizeof(NetSPacket0x7935_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7935_Fixed *network, SPacket0x7935_Fixed native) +bool native_to_network(NetSPacket_0x7935_Fixed *network, SPacket_0x7935_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7935_Fixed *native, NetSPacket0x7935_Fixed network) -{ - bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -struct RPacket0x7936_Fixed -{ - uint16_t packet_id; - AccountName account_name; - uint32_t status; - timestamp_seconds_buffer error_message; -}; -struct NetRPacket0x7936_Fixed +bool network_to_native(SPacket_0x7935_Fixed *native, NetSPacket_0x7935_Fixed network) { - Little16 packet_id; - NetString account_name; - Little32 status; - NetString error_message; -}; -static_assert(offsetof(NetRPacket0x7936_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7936_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7936_Fixed, account_name) == 2, "offsetof(NetRPacket0x7936_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x7936_Fixed, status) == 26, "offsetof(NetRPacket0x7936_Fixed, status) == 26"); -static_assert(offsetof(NetRPacket0x7936_Fixed, error_message) == 30, "offsetof(NetRPacket0x7936_Fixed, error_message) == 30"); -static_assert(sizeof(NetRPacket0x7936_Fixed) == 50, "sizeof(NetRPacket0x7936_Fixed) == 50"); + bool rv = true; + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->account_id, network.account_id); + rv &= network_to_native(&native->account_name, network.account_name); + return rv; +} inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7936_Fixed *network, RPacket0x7936_Fixed native) +bool native_to_network(NetRPacket_0x7936_Fixed *network, RPacket_0x7936_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->status, native.status); rv &= native_to_network(&network->error_message, native.error_message); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7936_Fixed *native, NetRPacket0x7936_Fixed network) +bool network_to_native(RPacket_0x7936_Fixed *native, NetRPacket_0x7936_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->status, network.status); rv &= network_to_native(&native->error_message, network.error_message); return rv; } - -struct SPacket0x7937_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x7937_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x7937_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7937_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7937_Fixed, account_id) == 2, "offsetof(NetSPacket0x7937_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7937_Fixed, account_name) == 6, "offsetof(NetSPacket0x7937_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x7937_Fixed) == 30, "sizeof(NetSPacket0x7937_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7937_Fixed *network, SPacket0x7937_Fixed native) +bool native_to_network(NetSPacket_0x7937_Fixed *network, SPacket_0x7937_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); + rv &= native_to_network(&network->status, native.status); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7937_Fixed *native, NetSPacket0x7937_Fixed network) +bool network_to_native(SPacket_0x7937_Fixed *native, NetSPacket_0x7937_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); + rv &= network_to_native(&native->status, network.status); return rv; } - -struct RPacket0x7938_Fixed -{ - uint16_t packet_id; -}; -struct NetRPacket0x7938_Fixed -{ - Little16 packet_id; -}; -static_assert(offsetof(NetRPacket0x7938_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7938_Fixed, packet_id) == 0"); -static_assert(sizeof(NetRPacket0x7938_Fixed) == 2, "sizeof(NetRPacket0x7938_Fixed) == 2"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7938_Fixed *network, RPacket0x7938_Fixed native) +bool native_to_network(NetRPacket_0x7938_Fixed *network, RPacket_0x7938_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7938_Fixed *native, NetRPacket0x7938_Fixed network) +bool network_to_native(RPacket_0x7938_Fixed *native, NetRPacket_0x7938_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); return rv; } - -struct SPacket0x7939_Head -{ - uint16_t packet_id; - uint16_t packet_length; -}; -struct NetSPacket0x7939_Head -{ - Little16 packet_id; - Little16 packet_length; -}; -static_assert(offsetof(NetSPacket0x7939_Head, packet_id) == 0, "offsetof(NetSPacket0x7939_Head, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7939_Head, packet_length) == 2, "offsetof(NetSPacket0x7939_Head, packet_length) == 2"); -static_assert(sizeof(NetSPacket0x7939_Head) == 4, "sizeof(NetSPacket0x7939_Head) == 4"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7939_Head *network, SPacket0x7939_Head native) +bool native_to_network(NetSPacket_0x7939_Head *network, SPacket_0x7939_Head native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - rv &= native_to_network(&network->packet_length, native.packet_length); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7939_Head *native, NetSPacket0x7939_Head network) +bool network_to_native(SPacket_0x7939_Head *native, NetSPacket_0x7939_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->packet_length, network.packet_length); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); return rv; } - -struct SPacket0x7939_Repeat -{ - IP4Address ip; - uint16_t port; - ServerName name; - uint16_t users; - uint16_t maintenance; - uint16_t is_new; -}; -struct NetSPacket0x7939_Repeat -{ - IP4Address ip; - Little16 port; - NetString name; - Little16 users; - Little16 maintenance; - Little16 is_new; -}; -static_assert(offsetof(NetSPacket0x7939_Repeat, ip) == 0, "offsetof(NetSPacket0x7939_Repeat, ip) == 0"); -static_assert(offsetof(NetSPacket0x7939_Repeat, port) == 4, "offsetof(NetSPacket0x7939_Repeat, port) == 4"); -static_assert(offsetof(NetSPacket0x7939_Repeat, name) == 6, "offsetof(NetSPacket0x7939_Repeat, name) == 6"); -static_assert(offsetof(NetSPacket0x7939_Repeat, users) == 26, "offsetof(NetSPacket0x7939_Repeat, users) == 26"); -static_assert(offsetof(NetSPacket0x7939_Repeat, maintenance) == 28, "offsetof(NetSPacket0x7939_Repeat, maintenance) == 28"); -static_assert(offsetof(NetSPacket0x7939_Repeat, is_new) == 30, "offsetof(NetSPacket0x7939_Repeat, is_new) == 30"); -static_assert(sizeof(NetSPacket0x7939_Repeat) == 32, "sizeof(NetSPacket0x7939_Repeat) == 32"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7939_Repeat *network, SPacket0x7939_Repeat native) +bool native_to_network(NetSPacket_0x7939_Repeat *network, SPacket_0x7939_Repeat native) { bool rv = true; rv &= native_to_network(&network->ip, native.ip); @@ -670,7 +1284,7 @@ bool native_to_network(NetSPacket0x7939_Repeat *network, SPacket0x7939_Repeat na return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7939_Repeat *native, NetSPacket0x7939_Repeat network) +bool network_to_native(SPacket_0x7939_Repeat *native, NetSPacket_0x7939_Repeat network) { bool rv = true; rv &= network_to_native(&native->ip, network.ip); @@ -681,990 +1295,493 @@ bool network_to_native(SPacket0x7939_Repeat *native, NetSPacket0x7939_Repeat net rv &= network_to_native(&native->is_new, network.is_new); return rv; } - -struct RPacket0x793a_Fixed -{ - uint16_t packet_id; - AccountName account_name; - AccountPass password; -}; -struct NetRPacket0x793a_Fixed -{ - Little16 packet_id; - NetString account_name; - NetString password; -}; -static_assert(offsetof(NetRPacket0x793a_Fixed, packet_id) == 0, "offsetof(NetRPacket0x793a_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x793a_Fixed, account_name) == 2, "offsetof(NetRPacket0x793a_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x793a_Fixed, password) == 26, "offsetof(NetRPacket0x793a_Fixed, password) == 26"); -static_assert(sizeof(NetRPacket0x793a_Fixed) == 50, "sizeof(NetRPacket0x793a_Fixed) == 50"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x793a_Fixed *network, RPacket0x793a_Fixed native) +bool native_to_network(NetRPacket_0x793a_Fixed *network, RPacket_0x793a_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->password, native.password); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x793a_Fixed *native, NetRPacket0x793a_Fixed network) +bool network_to_native(RPacket_0x793a_Fixed *native, NetRPacket_0x793a_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->password, network.password); return rv; } - -struct SPacket0x793b_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x793b_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x793b_Fixed, packet_id) == 0, "offsetof(NetSPacket0x793b_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x793b_Fixed, account_id) == 2, "offsetof(NetSPacket0x793b_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x793b_Fixed, account_name) == 6, "offsetof(NetSPacket0x793b_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x793b_Fixed) == 30, "sizeof(NetSPacket0x793b_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x793b_Fixed *network, SPacket0x793b_Fixed native) +bool native_to_network(NetSPacket_0x793b_Fixed *network, SPacket_0x793b_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x793b_Fixed *native, NetSPacket0x793b_Fixed network) +bool network_to_native(SPacket_0x793b_Fixed *native, NetSPacket_0x793b_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x793c_Fixed -{ - uint16_t packet_id; - AccountName account_name; - SEX sex; -}; -struct NetRPacket0x793c_Fixed -{ - Little16 packet_id; - NetString account_name; - Byte sex; -}; -static_assert(offsetof(NetRPacket0x793c_Fixed, packet_id) == 0, "offsetof(NetRPacket0x793c_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x793c_Fixed, account_name) == 2, "offsetof(NetRPacket0x793c_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x793c_Fixed, sex) == 26, "offsetof(NetRPacket0x793c_Fixed, sex) == 26"); -static_assert(sizeof(NetRPacket0x793c_Fixed) == 27, "sizeof(NetRPacket0x793c_Fixed) == 27"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x793c_Fixed *network, RPacket0x793c_Fixed native) +bool native_to_network(NetRPacket_0x793c_Fixed *network, RPacket_0x793c_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->sex, native.sex); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x793c_Fixed *native, NetRPacket0x793c_Fixed network) +bool network_to_native(RPacket_0x793c_Fixed *native, NetRPacket_0x793c_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->sex, network.sex); return rv; } - -struct SPacket0x793d_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x793d_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x793d_Fixed, packet_id) == 0, "offsetof(NetSPacket0x793d_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x793d_Fixed, account_id) == 2, "offsetof(NetSPacket0x793d_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x793d_Fixed, account_name) == 6, "offsetof(NetSPacket0x793d_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x793d_Fixed) == 30, "sizeof(NetSPacket0x793d_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x793d_Fixed *network, SPacket0x793d_Fixed native) +bool native_to_network(NetSPacket_0x793d_Fixed *network, SPacket_0x793d_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x793d_Fixed *native, NetSPacket0x793d_Fixed network) +bool network_to_native(SPacket_0x793d_Fixed *native, NetSPacket_0x793d_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x793e_Fixed -{ - uint16_t packet_id; - AccountName account_name; - GmLevel gm_level; -}; -struct NetRPacket0x793e_Fixed -{ - Little16 packet_id; - NetString account_name; - Byte gm_level; -}; -static_assert(offsetof(NetRPacket0x793e_Fixed, packet_id) == 0, "offsetof(NetRPacket0x793e_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x793e_Fixed, account_name) == 2, "offsetof(NetRPacket0x793e_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x793e_Fixed, gm_level) == 26, "offsetof(NetRPacket0x793e_Fixed, gm_level) == 26"); -static_assert(sizeof(NetRPacket0x793e_Fixed) == 27, "sizeof(NetRPacket0x793e_Fixed) == 27"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x793e_Fixed *network, RPacket0x793e_Fixed native) +bool native_to_network(NetRPacket_0x793e_Fixed *network, RPacket_0x793e_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->gm_level, native.gm_level); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x793e_Fixed *native, NetRPacket0x793e_Fixed network) +bool network_to_native(RPacket_0x793e_Fixed *native, NetRPacket_0x793e_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->gm_level, network.gm_level); return rv; } - -struct SPacket0x793f_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x793f_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x793f_Fixed, packet_id) == 0, "offsetof(NetSPacket0x793f_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x793f_Fixed, account_id) == 2, "offsetof(NetSPacket0x793f_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x793f_Fixed, account_name) == 6, "offsetof(NetSPacket0x793f_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x793f_Fixed) == 30, "sizeof(NetSPacket0x793f_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x793f_Fixed *network, SPacket0x793f_Fixed native) +bool native_to_network(NetSPacket_0x793f_Fixed *network, SPacket_0x793f_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x793f_Fixed *native, NetSPacket0x793f_Fixed network) +bool network_to_native(SPacket_0x793f_Fixed *native, NetSPacket_0x793f_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x7940_Fixed -{ - uint16_t packet_id; - AccountName account_name; - AccountEmail email; -}; -struct NetRPacket0x7940_Fixed -{ - Little16 packet_id; - NetString account_name; - NetString email; -}; -static_assert(offsetof(NetRPacket0x7940_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7940_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7940_Fixed, account_name) == 2, "offsetof(NetRPacket0x7940_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x7940_Fixed, email) == 26, "offsetof(NetRPacket0x7940_Fixed, email) == 26"); -static_assert(sizeof(NetRPacket0x7940_Fixed) == 66, "sizeof(NetRPacket0x7940_Fixed) == 66"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7940_Fixed *network, RPacket0x7940_Fixed native) +bool native_to_network(NetRPacket_0x7940_Fixed *network, RPacket_0x7940_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->email, native.email); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7940_Fixed *native, NetRPacket0x7940_Fixed network) +bool network_to_native(RPacket_0x7940_Fixed *native, NetRPacket_0x7940_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->email, network.email); return rv; } - -struct SPacket0x7941_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x7941_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x7941_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7941_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7941_Fixed, account_id) == 2, "offsetof(NetSPacket0x7941_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7941_Fixed, account_name) == 6, "offsetof(NetSPacket0x7941_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x7941_Fixed) == 30, "sizeof(NetSPacket0x7941_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7941_Fixed *network, SPacket0x7941_Fixed native) +bool native_to_network(NetSPacket_0x7941_Fixed *network, SPacket_0x7941_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7941_Fixed *native, NetSPacket0x7941_Fixed network) +bool network_to_native(SPacket_0x7941_Fixed *native, NetSPacket_0x7941_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x7942_Head -{ - uint16_t packet_id; - AccountName account_name; - uint16_t string_length; -}; -struct NetRPacket0x7942_Head -{ - Little16 packet_id; - NetString account_name; - Little16 string_length; -}; -static_assert(offsetof(NetRPacket0x7942_Head, packet_id) == 0, "offsetof(NetRPacket0x7942_Head, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7942_Head, account_name) == 2, "offsetof(NetRPacket0x7942_Head, account_name) == 2"); -static_assert(offsetof(NetRPacket0x7942_Head, string_length) == 26, "offsetof(NetRPacket0x7942_Head, string_length) == 26"); -static_assert(sizeof(NetRPacket0x7942_Head) == 28, "sizeof(NetRPacket0x7942_Head) == 28"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7942_Head *network, RPacket0x7942_Head native) +bool native_to_network(NetRPacket_0x7942_Head *network, RPacket_0x7942_Head native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->string_length, native.string_length); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7942_Head *native, NetRPacket0x7942_Head network) +bool network_to_native(RPacket_0x7942_Head *native, NetRPacket_0x7942_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->string_length, network.string_length); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); return rv; } - -struct RPacket0x7942_Repeat -{ - uint8_t c; -}; -struct NetRPacket0x7942_Repeat -{ - Byte c; -}; -static_assert(offsetof(NetRPacket0x7942_Repeat, c) == 0, "offsetof(NetRPacket0x7942_Repeat, c) == 0"); -static_assert(sizeof(NetRPacket0x7942_Repeat) == 1, "sizeof(NetRPacket0x7942_Repeat) == 1"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7942_Repeat *network, RPacket0x7942_Repeat native) +bool native_to_network(NetRPacket_0x7942_Repeat *network, RPacket_0x7942_Repeat native) { bool rv = true; rv &= native_to_network(&network->c, native.c); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7942_Repeat *native, NetRPacket0x7942_Repeat network) +bool network_to_native(RPacket_0x7942_Repeat *native, NetRPacket_0x7942_Repeat network) { bool rv = true; rv &= network_to_native(&native->c, network.c); return rv; } - -struct SPacket0x7943_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x7943_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x7943_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7943_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7943_Fixed, account_id) == 2, "offsetof(NetSPacket0x7943_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7943_Fixed, account_name) == 6, "offsetof(NetSPacket0x7943_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x7943_Fixed) == 30, "sizeof(NetSPacket0x7943_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7943_Fixed *network, SPacket0x7943_Fixed native) +bool native_to_network(NetSPacket_0x7943_Fixed *network, SPacket_0x7943_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7943_Fixed *native, NetSPacket0x7943_Fixed network) +bool network_to_native(SPacket_0x7943_Fixed *native, NetSPacket_0x7943_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x7944_Fixed -{ - uint16_t packet_id; - AccountName account_name; -}; -struct NetRPacket0x7944_Fixed -{ - Little16 packet_id; - NetString account_name; -}; -static_assert(offsetof(NetRPacket0x7944_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7944_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7944_Fixed, account_name) == 2, "offsetof(NetRPacket0x7944_Fixed, account_name) == 2"); -static_assert(sizeof(NetRPacket0x7944_Fixed) == 26, "sizeof(NetRPacket0x7944_Fixed) == 26"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7944_Fixed *network, RPacket0x7944_Fixed native) +bool native_to_network(NetRPacket_0x7944_Fixed *network, RPacket_0x7944_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7944_Fixed *native, NetRPacket0x7944_Fixed network) +bool network_to_native(RPacket_0x7944_Fixed *native, NetRPacket_0x7944_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct SPacket0x7945_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x7945_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x7945_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7945_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7945_Fixed, account_id) == 2, "offsetof(NetSPacket0x7945_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7945_Fixed, account_name) == 6, "offsetof(NetSPacket0x7945_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x7945_Fixed) == 30, "sizeof(NetSPacket0x7945_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7945_Fixed *network, SPacket0x7945_Fixed native) +bool native_to_network(NetSPacket_0x7945_Fixed *network, SPacket_0x7945_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7945_Fixed *native, NetSPacket0x7945_Fixed network) +bool network_to_native(SPacket_0x7945_Fixed *native, NetSPacket_0x7945_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x7946_Fixed -{ - uint16_t packet_id; - uint32_t account_id; -}; -struct NetRPacket0x7946_Fixed -{ - Little16 packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetRPacket0x7946_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7946_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7946_Fixed, account_id) == 2, "offsetof(NetRPacket0x7946_Fixed, account_id) == 2"); -static_assert(sizeof(NetRPacket0x7946_Fixed) == 6, "sizeof(NetRPacket0x7946_Fixed) == 6"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7946_Fixed *network, RPacket0x7946_Fixed native) +bool native_to_network(NetRPacket_0x7946_Fixed *network, RPacket_0x7946_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7946_Fixed *native, NetRPacket0x7946_Fixed network) +bool network_to_native(RPacket_0x7946_Fixed *native, NetRPacket_0x7946_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct SPacket0x7947_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; -}; -struct NetSPacket0x7947_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; -}; -static_assert(offsetof(NetSPacket0x7947_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7947_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7947_Fixed, account_id) == 2, "offsetof(NetSPacket0x7947_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7947_Fixed, account_name) == 6, "offsetof(NetSPacket0x7947_Fixed, account_name) == 6"); -static_assert(sizeof(NetSPacket0x7947_Fixed) == 30, "sizeof(NetSPacket0x7947_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7947_Fixed *network, SPacket0x7947_Fixed native) +bool native_to_network(NetSPacket_0x7947_Fixed *network, SPacket_0x7947_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7947_Fixed *native, NetSPacket0x7947_Fixed network) +bool network_to_native(SPacket_0x7947_Fixed *native, NetSPacket_0x7947_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct RPacket0x7948_Fixed -{ - uint16_t packet_id; - AccountName account_name; - TimeT valid_until; -}; -struct NetRPacket0x7948_Fixed -{ - Little16 packet_id; - NetString account_name; - Little32 valid_until; -}; -static_assert(offsetof(NetRPacket0x7948_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7948_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7948_Fixed, account_name) == 2, "offsetof(NetRPacket0x7948_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x7948_Fixed, valid_until) == 26, "offsetof(NetRPacket0x7948_Fixed, valid_until) == 26"); -static_assert(sizeof(NetRPacket0x7948_Fixed) == 30, "sizeof(NetRPacket0x7948_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7948_Fixed *network, RPacket0x7948_Fixed native) +bool native_to_network(NetRPacket_0x7948_Fixed *network, RPacket_0x7948_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->valid_until, native.valid_until); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7948_Fixed *native, NetRPacket0x7948_Fixed network) +bool network_to_native(RPacket_0x7948_Fixed *native, NetRPacket_0x7948_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->valid_until, network.valid_until); return rv; } - -struct SPacket0x7949_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; - TimeT valid_until; -}; -struct NetSPacket0x7949_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; - Little32 valid_until; -}; -static_assert(offsetof(NetSPacket0x7949_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7949_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7949_Fixed, account_id) == 2, "offsetof(NetSPacket0x7949_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7949_Fixed, account_name) == 6, "offsetof(NetSPacket0x7949_Fixed, account_name) == 6"); -static_assert(offsetof(NetSPacket0x7949_Fixed, valid_until) == 30, "offsetof(NetSPacket0x7949_Fixed, valid_until) == 30"); -static_assert(sizeof(NetSPacket0x7949_Fixed) == 34, "sizeof(NetSPacket0x7949_Fixed) == 34"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7949_Fixed *network, SPacket0x7949_Fixed native) +bool native_to_network(NetSPacket_0x7949_Fixed *network, SPacket_0x7949_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->valid_until, native.valid_until); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7949_Fixed *native, NetSPacket0x7949_Fixed network) +bool network_to_native(SPacket_0x7949_Fixed *native, NetSPacket_0x7949_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->valid_until, network.valid_until); return rv; } - -struct RPacket0x794a_Fixed -{ - uint16_t packet_id; - AccountName account_name; - TimeT ban_until; -}; -struct NetRPacket0x794a_Fixed -{ - Little16 packet_id; - NetString account_name; - Little32 ban_until; -}; -static_assert(offsetof(NetRPacket0x794a_Fixed, packet_id) == 0, "offsetof(NetRPacket0x794a_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x794a_Fixed, account_name) == 2, "offsetof(NetRPacket0x794a_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x794a_Fixed, ban_until) == 26, "offsetof(NetRPacket0x794a_Fixed, ban_until) == 26"); -static_assert(sizeof(NetRPacket0x794a_Fixed) == 30, "sizeof(NetRPacket0x794a_Fixed) == 30"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x794a_Fixed *network, RPacket0x794a_Fixed native) +bool native_to_network(NetRPacket_0x794a_Fixed *network, RPacket_0x794a_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->ban_until, native.ban_until); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x794a_Fixed *native, NetRPacket0x794a_Fixed network) +bool network_to_native(RPacket_0x794a_Fixed *native, NetRPacket_0x794a_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->ban_until, network.ban_until); return rv; } - -struct SPacket0x794b_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; - TimeT ban_until; -}; -struct NetSPacket0x794b_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; - Little32 ban_until; -}; -static_assert(offsetof(NetSPacket0x794b_Fixed, packet_id) == 0, "offsetof(NetSPacket0x794b_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x794b_Fixed, account_id) == 2, "offsetof(NetSPacket0x794b_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x794b_Fixed, account_name) == 6, "offsetof(NetSPacket0x794b_Fixed, account_name) == 6"); -static_assert(offsetof(NetSPacket0x794b_Fixed, ban_until) == 30, "offsetof(NetSPacket0x794b_Fixed, ban_until) == 30"); -static_assert(sizeof(NetSPacket0x794b_Fixed) == 34, "sizeof(NetSPacket0x794b_Fixed) == 34"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x794b_Fixed *network, SPacket0x794b_Fixed native) +bool native_to_network(NetSPacket_0x794b_Fixed *network, SPacket_0x794b_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->ban_until, native.ban_until); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x794b_Fixed *native, NetSPacket0x794b_Fixed network) +bool network_to_native(SPacket_0x794b_Fixed *native, NetSPacket_0x794b_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->ban_until, network.ban_until); return rv; } - -struct RPacket0x794c_Fixed -{ - uint16_t packet_id; - AccountName account_name; - HumanTimeDiff ban_add; -}; -struct NetRPacket0x794c_Fixed -{ - Little16 packet_id; - NetString account_name; - NetHumanTimeDiff ban_add; -}; -static_assert(offsetof(NetRPacket0x794c_Fixed, packet_id) == 0, "offsetof(NetRPacket0x794c_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x794c_Fixed, account_name) == 2, "offsetof(NetRPacket0x794c_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x794c_Fixed, ban_add) == 26, "offsetof(NetRPacket0x794c_Fixed, ban_add) == 26"); -static_assert(sizeof(NetRPacket0x794c_Fixed) == 38, "sizeof(NetRPacket0x794c_Fixed) == 38"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x794c_Fixed *network, RPacket0x794c_Fixed native) +bool native_to_network(NetRPacket_0x794c_Fixed *network, RPacket_0x794c_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->ban_add, native.ban_add); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x794c_Fixed *native, NetRPacket0x794c_Fixed network) +bool network_to_native(RPacket_0x794c_Fixed *native, NetRPacket_0x794c_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->ban_add, network.ban_add); return rv; } - -struct SPacket0x794d_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; - TimeT ban_until; -}; -struct NetSPacket0x794d_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; - Little32 ban_until; -}; -static_assert(offsetof(NetSPacket0x794d_Fixed, packet_id) == 0, "offsetof(NetSPacket0x794d_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x794d_Fixed, account_id) == 2, "offsetof(NetSPacket0x794d_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x794d_Fixed, account_name) == 6, "offsetof(NetSPacket0x794d_Fixed, account_name) == 6"); -static_assert(offsetof(NetSPacket0x794d_Fixed, ban_until) == 30, "offsetof(NetSPacket0x794d_Fixed, ban_until) == 30"); -static_assert(sizeof(NetSPacket0x794d_Fixed) == 34, "sizeof(NetSPacket0x794d_Fixed) == 34"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x794d_Fixed *network, SPacket0x794d_Fixed native) +bool native_to_network(NetSPacket_0x794d_Fixed *network, SPacket_0x794d_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->ban_until, native.ban_until); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x794d_Fixed *native, NetSPacket0x794d_Fixed network) +bool network_to_native(SPacket_0x794d_Fixed *native, NetSPacket_0x794d_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->ban_until, network.ban_until); return rv; } - -struct RPacket0x794e_Head -{ - uint16_t packet_id; - uint16_t unused; - uint32_t string_length; -}; -struct NetRPacket0x794e_Head -{ - Little16 packet_id; - Little16 unused; - Little32 string_length; -}; -static_assert(offsetof(NetRPacket0x794e_Head, packet_id) == 0, "offsetof(NetRPacket0x794e_Head, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x794e_Head, unused) == 2, "offsetof(NetRPacket0x794e_Head, unused) == 2"); -static_assert(offsetof(NetRPacket0x794e_Head, string_length) == 4, "offsetof(NetRPacket0x794e_Head, string_length) == 4"); -static_assert(sizeof(NetRPacket0x794e_Head) == 8, "sizeof(NetRPacket0x794e_Head) == 8"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x794e_Head *network, RPacket0x794e_Head native) +bool native_to_network(NetRPacket_0x794e_Head *network, RPacket_0x794e_Head native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->string_length, native.string_length); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x794e_Head *native, NetRPacket0x794e_Head network) +bool network_to_native(RPacket_0x794e_Head *native, NetRPacket_0x794e_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->string_length, network.string_length); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); return rv; } - -struct RPacket0x794e_Repeat -{ - uint8_t c; -}; -struct NetRPacket0x794e_Repeat -{ - Byte c; -}; -static_assert(offsetof(NetRPacket0x794e_Repeat, c) == 0, "offsetof(NetRPacket0x794e_Repeat, c) == 0"); -static_assert(sizeof(NetRPacket0x794e_Repeat) == 1, "sizeof(NetRPacket0x794e_Repeat) == 1"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x794e_Repeat *network, RPacket0x794e_Repeat native) +bool native_to_network(NetRPacket_0x794e_Repeat *network, RPacket_0x794e_Repeat native) { bool rv = true; rv &= native_to_network(&network->c, native.c); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x794e_Repeat *native, NetRPacket0x794e_Repeat network) +bool network_to_native(RPacket_0x794e_Repeat *native, NetRPacket_0x794e_Repeat network) { bool rv = true; rv &= network_to_native(&native->c, network.c); return rv; } - -struct SPacket0x794f_Fixed -{ - uint16_t packet_id; - uint16_t error; -}; -struct NetSPacket0x794f_Fixed -{ - Little16 packet_id; - Little16 error; -}; -static_assert(offsetof(NetSPacket0x794f_Fixed, packet_id) == 0, "offsetof(NetSPacket0x794f_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x794f_Fixed, error) == 2, "offsetof(NetSPacket0x794f_Fixed, error) == 2"); -static_assert(sizeof(NetSPacket0x794f_Fixed) == 4, "sizeof(NetSPacket0x794f_Fixed) == 4"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x794f_Fixed *network, SPacket0x794f_Fixed native) +bool native_to_network(NetSPacket_0x794f_Fixed *network, SPacket_0x794f_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->error, native.error); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x794f_Fixed *native, NetSPacket0x794f_Fixed network) +bool network_to_native(SPacket_0x794f_Fixed *native, NetSPacket_0x794f_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->error, network.error); return rv; } - -struct RPacket0x7950_Fixed -{ - uint16_t packet_id; - AccountName account_name; - HumanTimeDiff valid_add; -}; -struct NetRPacket0x7950_Fixed -{ - Little16 packet_id; - NetString account_name; - NetHumanTimeDiff valid_add; -}; -static_assert(offsetof(NetRPacket0x7950_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7950_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7950_Fixed, account_name) == 2, "offsetof(NetRPacket0x7950_Fixed, account_name) == 2"); -static_assert(offsetof(NetRPacket0x7950_Fixed, valid_add) == 26, "offsetof(NetRPacket0x7950_Fixed, valid_add) == 26"); -static_assert(sizeof(NetRPacket0x7950_Fixed) == 38, "sizeof(NetRPacket0x7950_Fixed) == 38"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7950_Fixed *network, RPacket0x7950_Fixed native) +bool native_to_network(NetRPacket_0x7950_Fixed *network, RPacket_0x7950_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->valid_add, native.valid_add); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7950_Fixed *native, NetRPacket0x7950_Fixed network) +bool network_to_native(RPacket_0x7950_Fixed *native, NetRPacket_0x7950_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->valid_add, network.valid_add); return rv; } - -struct SPacket0x7951_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountName account_name; - TimeT valid_until; -}; -struct NetSPacket0x7951_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString account_name; - Little32 valid_until; -}; -static_assert(offsetof(NetSPacket0x7951_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7951_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7951_Fixed, account_id) == 2, "offsetof(NetSPacket0x7951_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7951_Fixed, account_name) == 6, "offsetof(NetSPacket0x7951_Fixed, account_name) == 6"); -static_assert(offsetof(NetSPacket0x7951_Fixed, valid_until) == 30, "offsetof(NetSPacket0x7951_Fixed, valid_until) == 30"); -static_assert(sizeof(NetSPacket0x7951_Fixed) == 34, "sizeof(NetSPacket0x7951_Fixed) == 34"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7951_Fixed *network, SPacket0x7951_Fixed native) +bool native_to_network(NetSPacket_0x7951_Fixed *network, SPacket_0x7951_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->account_name, native.account_name); rv &= native_to_network(&network->valid_until, native.valid_until); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7951_Fixed *native, NetSPacket0x7951_Fixed network) +bool network_to_native(SPacket_0x7951_Fixed *native, NetSPacket_0x7951_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->account_name, network.account_name); rv &= network_to_native(&native->valid_until, network.valid_until); return rv; } - -struct RPacket0x7952_Fixed -{ - uint16_t packet_id; - AccountName account_name; -}; -struct NetRPacket0x7952_Fixed -{ - Little16 packet_id; - NetString account_name; -}; -static_assert(offsetof(NetRPacket0x7952_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7952_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7952_Fixed, account_name) == 2, "offsetof(NetRPacket0x7952_Fixed, account_name) == 2"); -static_assert(sizeof(NetRPacket0x7952_Fixed) == 26, "sizeof(NetRPacket0x7952_Fixed) == 26"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7952_Fixed *network, RPacket0x7952_Fixed native) +bool native_to_network(NetRPacket_0x7952_Fixed *network, RPacket_0x7952_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_name, native.account_name); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7952_Fixed *native, NetRPacket0x7952_Fixed network) +bool network_to_native(RPacket_0x7952_Fixed *native, NetRPacket_0x7952_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_name, network.account_name); return rv; } - -struct SPacket0x7953_Head -{ - uint16_t packet_id; - uint32_t account_id; - GmLevel gm_level; - AccountName account_name; - SEX id; - uint32_t login_count; - uint32_t state; - timestamp_seconds_buffer error_message; - timestamp_milliseconds_buffer last_login_string; - VString<15> ip_string; - AccountEmail email; - TimeT connect_until; - TimeT ban_until; - uint16_t string_length; -}; -struct NetSPacket0x7953_Head -{ - Little16 packet_id; - Little32 account_id; - Byte gm_level; - NetString account_name; - Byte id; - Little32 login_count; - Little32 state; - NetString error_message; - NetString last_login_string; - NetString)> ip_string; - NetString email; - Little32 connect_until; - Little32 ban_until; - Little16 string_length; -}; -static_assert(offsetof(NetSPacket0x7953_Head, packet_id) == 0, "offsetof(NetSPacket0x7953_Head, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x7953_Head, account_id) == 2, "offsetof(NetSPacket0x7953_Head, account_id) == 2"); -static_assert(offsetof(NetSPacket0x7953_Head, gm_level) == 6, "offsetof(NetSPacket0x7953_Head, gm_level) == 6"); -static_assert(offsetof(NetSPacket0x7953_Head, account_name) == 7, "offsetof(NetSPacket0x7953_Head, account_name) == 7"); -static_assert(offsetof(NetSPacket0x7953_Head, id) == 31, "offsetof(NetSPacket0x7953_Head, id) == 31"); -static_assert(offsetof(NetSPacket0x7953_Head, login_count) == 32, "offsetof(NetSPacket0x7953_Head, login_count) == 32"); -static_assert(offsetof(NetSPacket0x7953_Head, state) == 36, "offsetof(NetSPacket0x7953_Head, state) == 36"); -static_assert(offsetof(NetSPacket0x7953_Head, error_message) == 40, "offsetof(NetSPacket0x7953_Head, error_message) == 40"); -static_assert(offsetof(NetSPacket0x7953_Head, last_login_string) == 60, "offsetof(NetSPacket0x7953_Head, last_login_string) == 60"); -static_assert(offsetof(NetSPacket0x7953_Head, ip_string) == 84, "offsetof(NetSPacket0x7953_Head, ip_string) == 84"); -static_assert(offsetof(NetSPacket0x7953_Head, email) == 100, "offsetof(NetSPacket0x7953_Head, email) == 100"); -static_assert(offsetof(NetSPacket0x7953_Head, connect_until) == 140, "offsetof(NetSPacket0x7953_Head, connect_until) == 140"); -static_assert(offsetof(NetSPacket0x7953_Head, ban_until) == 144, "offsetof(NetSPacket0x7953_Head, ban_until) == 144"); -static_assert(offsetof(NetSPacket0x7953_Head, string_length) == 148, "offsetof(NetSPacket0x7953_Head, string_length) == 148"); -static_assert(sizeof(NetSPacket0x7953_Head) == 150, "sizeof(NetSPacket0x7953_Head) == 150"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7953_Head *network, SPacket0x7953_Head native) -{ - bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); +inline __attribute__((warn_unused_result)) +bool native_to_network(NetSPacket_0x7953_Head *network, SPacket_0x7953_Head native) +{ + bool rv = true; + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->gm_level, native.gm_level); rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->id, native.id); + rv &= native_to_network(&network->sex, native.sex); rv &= native_to_network(&network->login_count, native.login_count); rv &= native_to_network(&network->state, native.state); rv &= native_to_network(&network->error_message, native.error_message); @@ -1673,18 +1790,18 @@ bool native_to_network(NetSPacket0x7953_Head *network, SPacket0x7953_Head native rv &= native_to_network(&network->email, native.email); rv &= native_to_network(&network->connect_until, native.connect_until); rv &= native_to_network(&network->ban_until, native.ban_until); - rv &= native_to_network(&network->string_length, native.string_length); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7953_Head *native, NetSPacket0x7953_Head network) +bool network_to_native(SPacket_0x7953_Head *native, NetSPacket_0x7953_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->gm_level, network.gm_level); rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->id, network.id); + rv &= network_to_native(&native->sex, network.sex); rv &= network_to_native(&native->login_count, network.login_count); rv &= network_to_native(&native->state, network.state); rv &= network_to_native(&native->error_message, network.error_message); @@ -1693,89 +1810,52 @@ bool network_to_native(SPacket0x7953_Head *native, NetSPacket0x7953_Head network rv &= network_to_native(&native->email, network.email); rv &= network_to_native(&native->connect_until, network.connect_until); rv &= network_to_native(&native->ban_until, network.ban_until); - rv &= network_to_native(&native->string_length, network.string_length); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); return rv; } - -struct SPacket0x7953_Repeat -{ - uint8_t c; -}; -struct NetSPacket0x7953_Repeat -{ - Byte c; -}; -static_assert(offsetof(NetSPacket0x7953_Repeat, c) == 0, "offsetof(NetSPacket0x7953_Repeat, c) == 0"); -static_assert(sizeof(NetSPacket0x7953_Repeat) == 1, "sizeof(NetSPacket0x7953_Repeat) == 1"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x7953_Repeat *network, SPacket0x7953_Repeat native) +bool native_to_network(NetSPacket_0x7953_Repeat *network, SPacket_0x7953_Repeat native) { bool rv = true; rv &= native_to_network(&network->c, native.c); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x7953_Repeat *native, NetSPacket0x7953_Repeat network) +bool network_to_native(SPacket_0x7953_Repeat *native, NetSPacket_0x7953_Repeat network) { bool rv = true; rv &= network_to_native(&native->c, network.c); return rv; } - -struct RPacket0x7954_Fixed -{ - uint16_t packet_id; - uint32_t account_id; -}; -struct NetRPacket0x7954_Fixed -{ - Little16 packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetRPacket0x7954_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7954_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x7954_Fixed, account_id) == 2, "offsetof(NetRPacket0x7954_Fixed, account_id) == 2"); -static_assert(sizeof(NetRPacket0x7954_Fixed) == 6, "sizeof(NetRPacket0x7954_Fixed) == 6"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7954_Fixed *network, RPacket0x7954_Fixed native) +bool native_to_network(NetRPacket_0x7954_Fixed *network, RPacket_0x7954_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7954_Fixed *native, NetRPacket0x7954_Fixed network) +bool network_to_native(RPacket_0x7954_Fixed *native, NetRPacket_0x7954_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct RPacket0x7955_Fixed -{ - uint16_t packet_id; -}; -struct NetRPacket0x7955_Fixed -{ - Little16 packet_id; -}; -static_assert(offsetof(NetRPacket0x7955_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7955_Fixed, packet_id) == 0"); -static_assert(sizeof(NetRPacket0x7955_Fixed) == 2, "sizeof(NetRPacket0x7955_Fixed) == 2"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x7955_Fixed *network, RPacket0x7955_Fixed native) +bool native_to_network(NetRPacket_0x7955_Fixed *network, RPacket_0x7955_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x7955_Fixed *native, NetRPacket0x7955_Fixed network) +bool network_to_native(RPacket_0x7955_Fixed *native, NetRPacket_0x7955_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); return rv; } - #endif // TMWA_PROTO2_LOGIN_ADMIN_HPP diff --git a/src/proto2/login-admin_test.cpp b/src/proto2/login-admin_test.cpp index 5bd9566..2cccef2 100644 --- a/src/proto2/login-admin_test.cpp +++ b/src/proto2/login-admin_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead diff --git a/src/proto2/login-char.hpp b/src/proto2/login-char.hpp index a594207..9c0ba74 100644 --- a/src/proto2/login-char.hpp +++ b/src/proto2/login-char.hpp @@ -7,16 +7,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead @@ -27,61 +27,509 @@ // This is an internal protocol, and can be changed without notice -struct RPacket0x2709_Fixed +struct RPacket_0x2709_Fixed { - uint16_t packet_id; + using NetType = NetRPacket_0x2709_Fixed; + static const uint16_t PACKET_ID = 0x2709; + + uint16_t magic_packet_id = PACKET_ID; }; -struct NetRPacket0x2709_Fixed +struct RPacket_0x2712_Fixed { - Little16 packet_id; + using NetType = NetRPacket_0x2712_Fixed; + static const uint16_t PACKET_ID = 0x2712; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + uint32_t login_id1 = {}; + uint32_t login_id2 = {}; + SEX sex = {}; + IP4Address ip = {}; }; -static_assert(offsetof(NetRPacket0x2709_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2709_Fixed, packet_id) == 0"); -static_assert(sizeof(NetRPacket0x2709_Fixed) == 2, "sizeof(NetRPacket0x2709_Fixed) == 2"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2709_Fixed *network, RPacket0x2709_Fixed native) +struct SPacket_0x2713_Fixed { - bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2709_Fixed *native, NetRPacket0x2709_Fixed network) + using NetType = NetSPacket_0x2713_Fixed; + static const uint16_t PACKET_ID = 0x2713; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + uint8_t invalid = {}; + AccountEmail email = {}; + TimeT connect_until = {}; +}; +struct RPacket_0x2714_Fixed { - bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - return rv; -} + using NetType = NetRPacket_0x2714_Fixed; + static const uint16_t PACKET_ID = 0x2714; -struct RPacket0x2712_Fixed + uint16_t magic_packet_id = PACKET_ID; + uint32_t users = {}; +}; +struct RPacket_0x2715_Fixed { - uint16_t packet_id; - uint32_t account_id; - uint32_t login_id1; - uint32_t login_id2; - SEX sex; - IP4Address ip; + using NetType = NetRPacket_0x2715_Fixed; + static const uint16_t PACKET_ID = 0x2715; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountEmail email = {}; +}; +struct RPacket_0x2716_Fixed +{ + using NetType = NetRPacket_0x2716_Fixed; + static const uint16_t PACKET_ID = 0x2716; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; +}; +struct SPacket_0x2717_Fixed +{ + using NetType = NetSPacket_0x2717_Fixed; + static const uint16_t PACKET_ID = 0x2717; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountEmail email = {}; + TimeT connect_until = {}; +}; +struct RPacket_0x2720_Head +{ + using NetType = NetRPacket_0x2720_Head; + static const uint16_t PACKET_ID = 0x2720; + + uint16_t magic_packet_id = PACKET_ID; + uint16_t magic_packet_length = {}; + AccountId account_id = {}; +}; +struct RPacket_0x2720_Repeat +{ + using NetType = NetRPacket_0x2720_Repeat; + static const uint16_t PACKET_ID = 0x2720; + + uint8_t c = {}; +}; +struct SPacket_0x2721_Fixed +{ + using NetType = NetSPacket_0x2721_Fixed; + static const uint16_t PACKET_ID = 0x2721; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + GmLevel gm_level = {}; +}; +struct RPacket_0x2722_Fixed +{ + using NetType = NetRPacket_0x2722_Fixed; + static const uint16_t PACKET_ID = 0x2722; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountEmail old_email = {}; + AccountEmail new_email = {}; +}; +struct SPacket_0x2723_Fixed +{ + using NetType = NetSPacket_0x2723_Fixed; + static const uint16_t PACKET_ID = 0x2723; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + SEX sex = {}; +}; +struct RPacket_0x2724_Fixed +{ + using NetType = NetRPacket_0x2724_Fixed; + static const uint16_t PACKET_ID = 0x2724; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + uint32_t status = {}; +}; +struct RPacket_0x2725_Fixed +{ + using NetType = NetRPacket_0x2725_Fixed; + static const uint16_t PACKET_ID = 0x2725; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + HumanTimeDiff deltas = {}; +}; +struct RPacket_0x2727_Fixed +{ + using NetType = NetRPacket_0x2727_Fixed; + static const uint16_t PACKET_ID = 0x2727; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; +}; +struct RPacket_0x2728_Head +{ + using NetType = NetRPacket_0x2728_Head; + static const uint16_t PACKET_ID = 0x2728; + + uint16_t magic_packet_id = PACKET_ID; + uint16_t magic_packet_length = {}; + AccountId account_id = {}; +}; +struct RPacket_0x2728_Repeat +{ + using NetType = NetRPacket_0x2728_Repeat; + static const uint16_t PACKET_ID = 0x2728; + + VarName name = {}; + uint32_t value = {}; +}; +struct SPacket_0x2729_Head +{ + using NetType = NetSPacket_0x2729_Head; + static const uint16_t PACKET_ID = 0x2729; + + uint16_t magic_packet_id = PACKET_ID; + uint16_t magic_packet_length = {}; + AccountId account_id = {}; +}; +struct SPacket_0x2729_Repeat +{ + using NetType = NetSPacket_0x2729_Repeat; + static const uint16_t PACKET_ID = 0x2729; + + VarName name = {}; + uint32_t value = {}; +}; +struct RPacket_0x272a_Fixed +{ + using NetType = NetRPacket_0x272a_Fixed; + static const uint16_t PACKET_ID = 0x272a; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; +}; +struct SPacket_0x2730_Fixed +{ + using NetType = NetSPacket_0x2730_Fixed; + static const uint16_t PACKET_ID = 0x2730; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; +}; +struct SPacket_0x2731_Fixed +{ + using NetType = NetSPacket_0x2731_Fixed; + static const uint16_t PACKET_ID = 0x2731; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + uint8_t ban_not_status = {}; + TimeT status_or_ban_until = {}; +}; +struct SPacket_0x2732_Head +{ + using NetType = NetSPacket_0x2732_Head; + static const uint16_t PACKET_ID = 0x2732; + + uint16_t magic_packet_id = PACKET_ID; + uint16_t magic_packet_length = {}; }; -struct NetRPacket0x2712_Fixed +struct SPacket_0x2732_Repeat { - Little16 packet_id; + using NetType = NetSPacket_0x2732_Repeat; + static const uint16_t PACKET_ID = 0x2732; + + AccountId account_id = {}; + GmLevel gm_level = {}; +}; +struct RPacket_0x2740_Fixed +{ + using NetType = NetRPacket_0x2740_Fixed; + static const uint16_t PACKET_ID = 0x2740; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + AccountPass old_pass = {}; + AccountPass new_pass = {}; +}; +struct SPacket_0x2741_Fixed +{ + using NetType = NetSPacket_0x2741_Fixed; + static const uint16_t PACKET_ID = 0x2741; + + uint16_t magic_packet_id = PACKET_ID; + AccountId account_id = {}; + uint8_t status = {}; +}; + +struct NetRPacket_0x2709_Fixed +{ + Little16 magic_packet_id; +}; +static_assert(offsetof(NetRPacket_0x2709_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2709_Fixed, magic_packet_id) == 0"); +static_assert(sizeof(NetRPacket_0x2709_Fixed) == 2, "sizeof(NetRPacket_0x2709_Fixed) == 2"); +struct NetRPacket_0x2712_Fixed +{ + Little16 magic_packet_id; Little32 account_id; Little32 login_id1; Little32 login_id2; Byte sex; IP4Address ip; }; -static_assert(offsetof(NetRPacket0x2712_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2712_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2712_Fixed, account_id) == 2, "offsetof(NetRPacket0x2712_Fixed, account_id) == 2"); -static_assert(offsetof(NetRPacket0x2712_Fixed, login_id1) == 6, "offsetof(NetRPacket0x2712_Fixed, login_id1) == 6"); -static_assert(offsetof(NetRPacket0x2712_Fixed, login_id2) == 10, "offsetof(NetRPacket0x2712_Fixed, login_id2) == 10"); -static_assert(offsetof(NetRPacket0x2712_Fixed, sex) == 14, "offsetof(NetRPacket0x2712_Fixed, sex) == 14"); -static_assert(offsetof(NetRPacket0x2712_Fixed, ip) == 15, "offsetof(NetRPacket0x2712_Fixed, ip) == 15"); -static_assert(sizeof(NetRPacket0x2712_Fixed) == 19, "sizeof(NetRPacket0x2712_Fixed) == 19"); +static_assert(offsetof(NetRPacket_0x2712_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2712_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2712_Fixed, account_id) == 2, "offsetof(NetRPacket_0x2712_Fixed, account_id) == 2"); +static_assert(offsetof(NetRPacket_0x2712_Fixed, login_id1) == 6, "offsetof(NetRPacket_0x2712_Fixed, login_id1) == 6"); +static_assert(offsetof(NetRPacket_0x2712_Fixed, login_id2) == 10, "offsetof(NetRPacket_0x2712_Fixed, login_id2) == 10"); +static_assert(offsetof(NetRPacket_0x2712_Fixed, sex) == 14, "offsetof(NetRPacket_0x2712_Fixed, sex) == 14"); +static_assert(offsetof(NetRPacket_0x2712_Fixed, ip) == 15, "offsetof(NetRPacket_0x2712_Fixed, ip) == 15"); +static_assert(sizeof(NetRPacket_0x2712_Fixed) == 19, "sizeof(NetRPacket_0x2712_Fixed) == 19"); +struct NetSPacket_0x2713_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + Byte invalid; + NetString email; + Little32 connect_until; +}; +static_assert(offsetof(NetSPacket_0x2713_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x2713_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2713_Fixed, account_id) == 2, "offsetof(NetSPacket_0x2713_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x2713_Fixed, invalid) == 6, "offsetof(NetSPacket_0x2713_Fixed, invalid) == 6"); +static_assert(offsetof(NetSPacket_0x2713_Fixed, email) == 7, "offsetof(NetSPacket_0x2713_Fixed, email) == 7"); +static_assert(offsetof(NetSPacket_0x2713_Fixed, connect_until) == 47, "offsetof(NetSPacket_0x2713_Fixed, connect_until) == 47"); +static_assert(sizeof(NetSPacket_0x2713_Fixed) == 51, "sizeof(NetSPacket_0x2713_Fixed) == 51"); +struct NetRPacket_0x2714_Fixed +{ + Little16 magic_packet_id; + Little32 users; +}; +static_assert(offsetof(NetRPacket_0x2714_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2714_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2714_Fixed, users) == 2, "offsetof(NetRPacket_0x2714_Fixed, users) == 2"); +static_assert(sizeof(NetRPacket_0x2714_Fixed) == 6, "sizeof(NetRPacket_0x2714_Fixed) == 6"); +struct NetRPacket_0x2715_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString email; +}; +static_assert(offsetof(NetRPacket_0x2715_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2715_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2715_Fixed, account_id) == 2, "offsetof(NetRPacket_0x2715_Fixed, account_id) == 2"); +static_assert(offsetof(NetRPacket_0x2715_Fixed, email) == 6, "offsetof(NetRPacket_0x2715_Fixed, email) == 6"); +static_assert(sizeof(NetRPacket_0x2715_Fixed) == 46, "sizeof(NetRPacket_0x2715_Fixed) == 46"); +struct NetRPacket_0x2716_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; +}; +static_assert(offsetof(NetRPacket_0x2716_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2716_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2716_Fixed, account_id) == 2, "offsetof(NetRPacket_0x2716_Fixed, account_id) == 2"); +static_assert(sizeof(NetRPacket_0x2716_Fixed) == 6, "sizeof(NetRPacket_0x2716_Fixed) == 6"); +struct NetSPacket_0x2717_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString email; + Little32 connect_until; +}; +static_assert(offsetof(NetSPacket_0x2717_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x2717_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2717_Fixed, account_id) == 2, "offsetof(NetSPacket_0x2717_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x2717_Fixed, email) == 6, "offsetof(NetSPacket_0x2717_Fixed, email) == 6"); +static_assert(offsetof(NetSPacket_0x2717_Fixed, connect_until) == 46, "offsetof(NetSPacket_0x2717_Fixed, connect_until) == 46"); +static_assert(sizeof(NetSPacket_0x2717_Fixed) == 50, "sizeof(NetSPacket_0x2717_Fixed) == 50"); +struct NetRPacket_0x2720_Head +{ + Little16 magic_packet_id; + Little16 magic_packet_length; + Little32 account_id; +}; +static_assert(offsetof(NetRPacket_0x2720_Head, magic_packet_id) == 0, "offsetof(NetRPacket_0x2720_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2720_Head, magic_packet_length) == 2, "offsetof(NetRPacket_0x2720_Head, magic_packet_length) == 2"); +static_assert(offsetof(NetRPacket_0x2720_Head, account_id) == 4, "offsetof(NetRPacket_0x2720_Head, account_id) == 4"); +static_assert(sizeof(NetRPacket_0x2720_Head) == 8, "sizeof(NetRPacket_0x2720_Head) == 8"); +struct NetRPacket_0x2720_Repeat +{ + Byte c; +}; +static_assert(offsetof(NetRPacket_0x2720_Repeat, c) == 0, "offsetof(NetRPacket_0x2720_Repeat, c) == 0"); +static_assert(sizeof(NetRPacket_0x2720_Repeat) == 1, "sizeof(NetRPacket_0x2720_Repeat) == 1"); +struct NetSPacket_0x2721_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + Little32 gm_level; +}; +static_assert(offsetof(NetSPacket_0x2721_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x2721_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2721_Fixed, account_id) == 2, "offsetof(NetSPacket_0x2721_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x2721_Fixed, gm_level) == 6, "offsetof(NetSPacket_0x2721_Fixed, gm_level) == 6"); +static_assert(sizeof(NetSPacket_0x2721_Fixed) == 10, "sizeof(NetSPacket_0x2721_Fixed) == 10"); +struct NetRPacket_0x2722_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString old_email; + NetString new_email; +}; +static_assert(offsetof(NetRPacket_0x2722_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2722_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2722_Fixed, account_id) == 2, "offsetof(NetRPacket_0x2722_Fixed, account_id) == 2"); +static_assert(offsetof(NetRPacket_0x2722_Fixed, old_email) == 6, "offsetof(NetRPacket_0x2722_Fixed, old_email) == 6"); +static_assert(offsetof(NetRPacket_0x2722_Fixed, new_email) == 46, "offsetof(NetRPacket_0x2722_Fixed, new_email) == 46"); +static_assert(sizeof(NetRPacket_0x2722_Fixed) == 86, "sizeof(NetRPacket_0x2722_Fixed) == 86"); +struct NetSPacket_0x2723_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + Byte sex; +}; +static_assert(offsetof(NetSPacket_0x2723_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x2723_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2723_Fixed, account_id) == 2, "offsetof(NetSPacket_0x2723_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x2723_Fixed, sex) == 6, "offsetof(NetSPacket_0x2723_Fixed, sex) == 6"); +static_assert(sizeof(NetSPacket_0x2723_Fixed) == 7, "sizeof(NetSPacket_0x2723_Fixed) == 7"); +struct NetRPacket_0x2724_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + Little32 status; +}; +static_assert(offsetof(NetRPacket_0x2724_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2724_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2724_Fixed, account_id) == 2, "offsetof(NetRPacket_0x2724_Fixed, account_id) == 2"); +static_assert(offsetof(NetRPacket_0x2724_Fixed, status) == 6, "offsetof(NetRPacket_0x2724_Fixed, status) == 6"); +static_assert(sizeof(NetRPacket_0x2724_Fixed) == 10, "sizeof(NetRPacket_0x2724_Fixed) == 10"); +struct NetRPacket_0x2725_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetHumanTimeDiff deltas; +}; +static_assert(offsetof(NetRPacket_0x2725_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2725_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2725_Fixed, account_id) == 2, "offsetof(NetRPacket_0x2725_Fixed, account_id) == 2"); +static_assert(offsetof(NetRPacket_0x2725_Fixed, deltas) == 6, "offsetof(NetRPacket_0x2725_Fixed, deltas) == 6"); +static_assert(sizeof(NetRPacket_0x2725_Fixed) == 18, "sizeof(NetRPacket_0x2725_Fixed) == 18"); +struct NetRPacket_0x2727_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; +}; +static_assert(offsetof(NetRPacket_0x2727_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2727_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2727_Fixed, account_id) == 2, "offsetof(NetRPacket_0x2727_Fixed, account_id) == 2"); +static_assert(sizeof(NetRPacket_0x2727_Fixed) == 6, "sizeof(NetRPacket_0x2727_Fixed) == 6"); +struct NetRPacket_0x2728_Head +{ + Little16 magic_packet_id; + Little16 magic_packet_length; + Little32 account_id; +}; +static_assert(offsetof(NetRPacket_0x2728_Head, magic_packet_id) == 0, "offsetof(NetRPacket_0x2728_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2728_Head, magic_packet_length) == 2, "offsetof(NetRPacket_0x2728_Head, magic_packet_length) == 2"); +static_assert(offsetof(NetRPacket_0x2728_Head, account_id) == 4, "offsetof(NetRPacket_0x2728_Head, account_id) == 4"); +static_assert(sizeof(NetRPacket_0x2728_Head) == 8, "sizeof(NetRPacket_0x2728_Head) == 8"); +struct NetRPacket_0x2728_Repeat +{ + NetString name; + Little32 value; +}; +static_assert(offsetof(NetRPacket_0x2728_Repeat, name) == 0, "offsetof(NetRPacket_0x2728_Repeat, name) == 0"); +static_assert(offsetof(NetRPacket_0x2728_Repeat, value) == 32, "offsetof(NetRPacket_0x2728_Repeat, value) == 32"); +static_assert(sizeof(NetRPacket_0x2728_Repeat) == 36, "sizeof(NetRPacket_0x2728_Repeat) == 36"); +struct NetSPacket_0x2729_Head +{ + Little16 magic_packet_id; + Little16 magic_packet_length; + Little32 account_id; +}; +static_assert(offsetof(NetSPacket_0x2729_Head, magic_packet_id) == 0, "offsetof(NetSPacket_0x2729_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2729_Head, magic_packet_length) == 2, "offsetof(NetSPacket_0x2729_Head, magic_packet_length) == 2"); +static_assert(offsetof(NetSPacket_0x2729_Head, account_id) == 4, "offsetof(NetSPacket_0x2729_Head, account_id) == 4"); +static_assert(sizeof(NetSPacket_0x2729_Head) == 8, "sizeof(NetSPacket_0x2729_Head) == 8"); +struct NetSPacket_0x2729_Repeat +{ + NetString name; + Little32 value; +}; +static_assert(offsetof(NetSPacket_0x2729_Repeat, name) == 0, "offsetof(NetSPacket_0x2729_Repeat, name) == 0"); +static_assert(offsetof(NetSPacket_0x2729_Repeat, value) == 32, "offsetof(NetSPacket_0x2729_Repeat, value) == 32"); +static_assert(sizeof(NetSPacket_0x2729_Repeat) == 36, "sizeof(NetSPacket_0x2729_Repeat) == 36"); +struct NetRPacket_0x272a_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; +}; +static_assert(offsetof(NetRPacket_0x272a_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x272a_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x272a_Fixed, account_id) == 2, "offsetof(NetRPacket_0x272a_Fixed, account_id) == 2"); +static_assert(sizeof(NetRPacket_0x272a_Fixed) == 6, "sizeof(NetRPacket_0x272a_Fixed) == 6"); +struct NetSPacket_0x2730_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; +}; +static_assert(offsetof(NetSPacket_0x2730_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x2730_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2730_Fixed, account_id) == 2, "offsetof(NetSPacket_0x2730_Fixed, account_id) == 2"); +static_assert(sizeof(NetSPacket_0x2730_Fixed) == 6, "sizeof(NetSPacket_0x2730_Fixed) == 6"); +struct NetSPacket_0x2731_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + Byte ban_not_status; + Little32 status_or_ban_until; +}; +static_assert(offsetof(NetSPacket_0x2731_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x2731_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2731_Fixed, account_id) == 2, "offsetof(NetSPacket_0x2731_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x2731_Fixed, ban_not_status) == 6, "offsetof(NetSPacket_0x2731_Fixed, ban_not_status) == 6"); +static_assert(offsetof(NetSPacket_0x2731_Fixed, status_or_ban_until) == 7, "offsetof(NetSPacket_0x2731_Fixed, status_or_ban_until) == 7"); +static_assert(sizeof(NetSPacket_0x2731_Fixed) == 11, "sizeof(NetSPacket_0x2731_Fixed) == 11"); +struct NetSPacket_0x2732_Head +{ + Little16 magic_packet_id; + Little16 magic_packet_length; +}; +static_assert(offsetof(NetSPacket_0x2732_Head, magic_packet_id) == 0, "offsetof(NetSPacket_0x2732_Head, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2732_Head, magic_packet_length) == 2, "offsetof(NetSPacket_0x2732_Head, magic_packet_length) == 2"); +static_assert(sizeof(NetSPacket_0x2732_Head) == 4, "sizeof(NetSPacket_0x2732_Head) == 4"); +struct NetSPacket_0x2732_Repeat +{ + Little32 account_id; + Byte gm_level; +}; +static_assert(offsetof(NetSPacket_0x2732_Repeat, account_id) == 0, "offsetof(NetSPacket_0x2732_Repeat, account_id) == 0"); +static_assert(offsetof(NetSPacket_0x2732_Repeat, gm_level) == 4, "offsetof(NetSPacket_0x2732_Repeat, gm_level) == 4"); +static_assert(sizeof(NetSPacket_0x2732_Repeat) == 5, "sizeof(NetSPacket_0x2732_Repeat) == 5"); +struct NetRPacket_0x2740_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + NetString old_pass; + NetString new_pass; +}; +static_assert(offsetof(NetRPacket_0x2740_Fixed, magic_packet_id) == 0, "offsetof(NetRPacket_0x2740_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetRPacket_0x2740_Fixed, account_id) == 2, "offsetof(NetRPacket_0x2740_Fixed, account_id) == 2"); +static_assert(offsetof(NetRPacket_0x2740_Fixed, old_pass) == 6, "offsetof(NetRPacket_0x2740_Fixed, old_pass) == 6"); +static_assert(offsetof(NetRPacket_0x2740_Fixed, new_pass) == 30, "offsetof(NetRPacket_0x2740_Fixed, new_pass) == 30"); +static_assert(sizeof(NetRPacket_0x2740_Fixed) == 54, "sizeof(NetRPacket_0x2740_Fixed) == 54"); +struct NetSPacket_0x2741_Fixed +{ + Little16 magic_packet_id; + Little32 account_id; + Byte status; +}; +static_assert(offsetof(NetSPacket_0x2741_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x2741_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x2741_Fixed, account_id) == 2, "offsetof(NetSPacket_0x2741_Fixed, account_id) == 2"); +static_assert(offsetof(NetSPacket_0x2741_Fixed, status) == 6, "offsetof(NetSPacket_0x2741_Fixed, status) == 6"); +static_assert(sizeof(NetSPacket_0x2741_Fixed) == 7, "sizeof(NetSPacket_0x2741_Fixed) == 7"); + +inline __attribute__((warn_unused_result)) +bool native_to_network(NetRPacket_0x2709_Fixed *network, RPacket_0x2709_Fixed native) +{ + bool rv = true; + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + return rv; +} +inline __attribute__((warn_unused_result)) +bool network_to_native(RPacket_0x2709_Fixed *native, NetRPacket_0x2709_Fixed network) +{ + bool rv = true; + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + return rv; +} inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2712_Fixed *network, RPacket0x2712_Fixed native) +bool native_to_network(NetRPacket_0x2712_Fixed *network, RPacket_0x2712_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->login_id1, native.login_id1); rv &= native_to_network(&network->login_id2, native.login_id2); @@ -90,10 +538,10 @@ bool native_to_network(NetRPacket0x2712_Fixed *network, RPacket0x2712_Fixed nati return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2712_Fixed *native, NetRPacket0x2712_Fixed network) +bool network_to_native(RPacket_0x2712_Fixed *native, NetRPacket_0x2712_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->login_id1, network.login_id1); rv &= network_to_native(&native->login_id2, network.login_id2); @@ -101,34 +549,11 @@ bool network_to_native(RPacket0x2712_Fixed *native, NetRPacket0x2712_Fixed netwo rv &= network_to_native(&native->ip, network.ip); return rv; } - -struct SPacket0x2713_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - uint8_t invalid; - AccountEmail email; - TimeT connect_until; -}; -struct NetSPacket0x2713_Fixed -{ - Little16 packet_id; - Little32 account_id; - Byte invalid; - NetString email; - Little32 connect_until; -}; -static_assert(offsetof(NetSPacket0x2713_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2713_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x2713_Fixed, account_id) == 2, "offsetof(NetSPacket0x2713_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x2713_Fixed, invalid) == 6, "offsetof(NetSPacket0x2713_Fixed, invalid) == 6"); -static_assert(offsetof(NetSPacket0x2713_Fixed, email) == 7, "offsetof(NetSPacket0x2713_Fixed, email) == 7"); -static_assert(offsetof(NetSPacket0x2713_Fixed, connect_until) == 47, "offsetof(NetSPacket0x2713_Fixed, connect_until) == 47"); -static_assert(sizeof(NetSPacket0x2713_Fixed) == 51, "sizeof(NetSPacket0x2713_Fixed) == 51"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2713_Fixed *network, SPacket0x2713_Fixed native) +bool native_to_network(NetSPacket_0x2713_Fixed *network, SPacket_0x2713_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->invalid, native.invalid); rv &= native_to_network(&network->email, native.email); @@ -136,497 +561,246 @@ bool native_to_network(NetSPacket0x2713_Fixed *network, SPacket0x2713_Fixed nati return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2713_Fixed *native, NetSPacket0x2713_Fixed network) +bool network_to_native(SPacket_0x2713_Fixed *native, NetSPacket_0x2713_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->invalid, network.invalid); rv &= network_to_native(&native->email, network.email); rv &= network_to_native(&native->connect_until, network.connect_until); return rv; } - -struct RPacket0x2714_Fixed -{ - uint16_t packet_id; - uint32_t users; -}; -struct NetRPacket0x2714_Fixed -{ - Little16 packet_id; - Little32 users; -}; -static_assert(offsetof(NetRPacket0x2714_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2714_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2714_Fixed, users) == 2, "offsetof(NetRPacket0x2714_Fixed, users) == 2"); -static_assert(sizeof(NetRPacket0x2714_Fixed) == 6, "sizeof(NetRPacket0x2714_Fixed) == 6"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2714_Fixed *network, RPacket0x2714_Fixed native) +bool native_to_network(NetRPacket_0x2714_Fixed *network, RPacket_0x2714_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->users, native.users); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2714_Fixed *native, NetRPacket0x2714_Fixed network) +bool network_to_native(RPacket_0x2714_Fixed *native, NetRPacket_0x2714_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->users, network.users); return rv; } - -struct RPacket0x2715_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountEmail email; -}; -struct NetRPacket0x2715_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString email; -}; -static_assert(offsetof(NetRPacket0x2715_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2715_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2715_Fixed, account_id) == 2, "offsetof(NetRPacket0x2715_Fixed, account_id) == 2"); -static_assert(offsetof(NetRPacket0x2715_Fixed, email) == 6, "offsetof(NetRPacket0x2715_Fixed, email) == 6"); -static_assert(sizeof(NetRPacket0x2715_Fixed) == 46, "sizeof(NetRPacket0x2715_Fixed) == 46"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2715_Fixed *network, RPacket0x2715_Fixed native) +bool native_to_network(NetRPacket_0x2715_Fixed *network, RPacket_0x2715_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->email, native.email); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2715_Fixed *native, NetRPacket0x2715_Fixed network) +bool network_to_native(RPacket_0x2715_Fixed *native, NetRPacket_0x2715_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->email, network.email); return rv; } - -struct RPacket0x2716_Fixed -{ - uint16_t packet_id; - uint32_t account_id; -}; -struct NetRPacket0x2716_Fixed -{ - Little16 packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetRPacket0x2716_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2716_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2716_Fixed, account_id) == 2, "offsetof(NetRPacket0x2716_Fixed, account_id) == 2"); -static_assert(sizeof(NetRPacket0x2716_Fixed) == 6, "sizeof(NetRPacket0x2716_Fixed) == 6"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2716_Fixed *network, RPacket0x2716_Fixed native) +bool native_to_network(NetRPacket_0x2716_Fixed *network, RPacket_0x2716_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2716_Fixed *native, NetRPacket0x2716_Fixed network) +bool network_to_native(RPacket_0x2716_Fixed *native, NetRPacket_0x2716_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct SPacket0x2717_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountEmail email; - TimeT connect_until; -}; -struct NetSPacket0x2717_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString email; - Little32 connect_until; -}; -static_assert(offsetof(NetSPacket0x2717_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2717_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x2717_Fixed, account_id) == 2, "offsetof(NetSPacket0x2717_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x2717_Fixed, email) == 6, "offsetof(NetSPacket0x2717_Fixed, email) == 6"); -static_assert(offsetof(NetSPacket0x2717_Fixed, connect_until) == 46, "offsetof(NetSPacket0x2717_Fixed, connect_until) == 46"); -static_assert(sizeof(NetSPacket0x2717_Fixed) == 50, "sizeof(NetSPacket0x2717_Fixed) == 50"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2717_Fixed *network, SPacket0x2717_Fixed native) +bool native_to_network(NetSPacket_0x2717_Fixed *network, SPacket_0x2717_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->email, native.email); rv &= native_to_network(&network->connect_until, native.connect_until); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2717_Fixed *native, NetSPacket0x2717_Fixed network) +bool network_to_native(SPacket_0x2717_Fixed *native, NetSPacket_0x2717_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->email, network.email); rv &= network_to_native(&native->connect_until, network.connect_until); return rv; } - -struct RPacket0x2720_Head -{ - uint16_t packet_id; - uint16_t packet_length; - uint32_t account_id; -}; -struct NetRPacket0x2720_Head -{ - Little16 packet_id; - Little16 packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetRPacket0x2720_Head, packet_id) == 0, "offsetof(NetRPacket0x2720_Head, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2720_Head, packet_length) == 2, "offsetof(NetRPacket0x2720_Head, packet_length) == 2"); -static_assert(offsetof(NetRPacket0x2720_Head, account_id) == 4, "offsetof(NetRPacket0x2720_Head, account_id) == 4"); -static_assert(sizeof(NetRPacket0x2720_Head) == 8, "sizeof(NetRPacket0x2720_Head) == 8"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2720_Head *network, RPacket0x2720_Head native) +bool native_to_network(NetRPacket_0x2720_Head *network, RPacket_0x2720_Head native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - rv &= native_to_network(&network->packet_length, native.packet_length); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2720_Head *native, NetRPacket0x2720_Head network) +bool network_to_native(RPacket_0x2720_Head *native, NetRPacket_0x2720_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->packet_length, network.packet_length); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct RPacket0x2720_Repeat -{ - uint8_t c; -}; -struct NetRPacket0x2720_Repeat -{ - Byte c; -}; -static_assert(offsetof(NetRPacket0x2720_Repeat, c) == 0, "offsetof(NetRPacket0x2720_Repeat, c) == 0"); -static_assert(sizeof(NetRPacket0x2720_Repeat) == 1, "sizeof(NetRPacket0x2720_Repeat) == 1"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2720_Repeat *network, RPacket0x2720_Repeat native) +bool native_to_network(NetRPacket_0x2720_Repeat *network, RPacket_0x2720_Repeat native) { bool rv = true; rv &= native_to_network(&network->c, native.c); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2720_Repeat *native, NetRPacket0x2720_Repeat network) +bool network_to_native(RPacket_0x2720_Repeat *native, NetRPacket_0x2720_Repeat network) { bool rv = true; rv &= network_to_native(&native->c, network.c); return rv; } - -struct SPacket0x2721_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - GmLevel gm_level; -}; -struct NetSPacket0x2721_Fixed -{ - Little16 packet_id; - Little32 account_id; - Little32 gm_level; -}; -static_assert(offsetof(NetSPacket0x2721_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2721_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x2721_Fixed, account_id) == 2, "offsetof(NetSPacket0x2721_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x2721_Fixed, gm_level) == 6, "offsetof(NetSPacket0x2721_Fixed, gm_level) == 6"); -static_assert(sizeof(NetSPacket0x2721_Fixed) == 10, "sizeof(NetSPacket0x2721_Fixed) == 10"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2721_Fixed *network, SPacket0x2721_Fixed native) +bool native_to_network(NetSPacket_0x2721_Fixed *network, SPacket_0x2721_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->gm_level, native.gm_level); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2721_Fixed *native, NetSPacket0x2721_Fixed network) +bool network_to_native(SPacket_0x2721_Fixed *native, NetSPacket_0x2721_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->gm_level, network.gm_level); return rv; } - -struct RPacket0x2722_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountEmail old_email; - AccountEmail new_email; -}; -struct NetRPacket0x2722_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString old_email; - NetString new_email; -}; -static_assert(offsetof(NetRPacket0x2722_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2722_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2722_Fixed, account_id) == 2, "offsetof(NetRPacket0x2722_Fixed, account_id) == 2"); -static_assert(offsetof(NetRPacket0x2722_Fixed, old_email) == 6, "offsetof(NetRPacket0x2722_Fixed, old_email) == 6"); -static_assert(offsetof(NetRPacket0x2722_Fixed, new_email) == 46, "offsetof(NetRPacket0x2722_Fixed, new_email) == 46"); -static_assert(sizeof(NetRPacket0x2722_Fixed) == 86, "sizeof(NetRPacket0x2722_Fixed) == 86"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2722_Fixed *network, RPacket0x2722_Fixed native) +bool native_to_network(NetRPacket_0x2722_Fixed *network, RPacket_0x2722_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->old_email, native.old_email); rv &= native_to_network(&network->new_email, native.new_email); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2722_Fixed *native, NetRPacket0x2722_Fixed network) +bool network_to_native(RPacket_0x2722_Fixed *native, NetRPacket_0x2722_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->old_email, network.old_email); rv &= network_to_native(&native->new_email, network.new_email); return rv; } - -struct SPacket0x2723_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - SEX sex; -}; -struct NetSPacket0x2723_Fixed -{ - Little16 packet_id; - Little32 account_id; - Byte sex; -}; -static_assert(offsetof(NetSPacket0x2723_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2723_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x2723_Fixed, account_id) == 2, "offsetof(NetSPacket0x2723_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x2723_Fixed, sex) == 6, "offsetof(NetSPacket0x2723_Fixed, sex) == 6"); -static_assert(sizeof(NetSPacket0x2723_Fixed) == 7, "sizeof(NetSPacket0x2723_Fixed) == 7"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2723_Fixed *network, SPacket0x2723_Fixed native) +bool native_to_network(NetSPacket_0x2723_Fixed *network, SPacket_0x2723_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->sex, native.sex); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2723_Fixed *native, NetSPacket0x2723_Fixed network) +bool network_to_native(SPacket_0x2723_Fixed *native, NetSPacket_0x2723_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->sex, network.sex); return rv; } - -struct RPacket0x2724_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - uint32_t status; -}; -struct NetRPacket0x2724_Fixed -{ - Little16 packet_id; - Little32 account_id; - Little32 status; -}; -static_assert(offsetof(NetRPacket0x2724_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2724_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2724_Fixed, account_id) == 2, "offsetof(NetRPacket0x2724_Fixed, account_id) == 2"); -static_assert(offsetof(NetRPacket0x2724_Fixed, status) == 6, "offsetof(NetRPacket0x2724_Fixed, status) == 6"); -static_assert(sizeof(NetRPacket0x2724_Fixed) == 10, "sizeof(NetRPacket0x2724_Fixed) == 10"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2724_Fixed *network, RPacket0x2724_Fixed native) +bool native_to_network(NetRPacket_0x2724_Fixed *network, RPacket_0x2724_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->status, native.status); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2724_Fixed *native, NetRPacket0x2724_Fixed network) +bool network_to_native(RPacket_0x2724_Fixed *native, NetRPacket_0x2724_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->status, network.status); return rv; } - -struct RPacket0x2725_Head -{ - uint16_t packet_id; - uint32_t account_id; - HumanTimeDiff deltas; -}; -struct NetRPacket0x2725_Head -{ - Little16 packet_id; - Little32 account_id; - NetHumanTimeDiff deltas; -}; -static_assert(offsetof(NetRPacket0x2725_Head, packet_id) == 0, "offsetof(NetRPacket0x2725_Head, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2725_Head, account_id) == 2, "offsetof(NetRPacket0x2725_Head, account_id) == 2"); -static_assert(offsetof(NetRPacket0x2725_Head, deltas) == 6, "offsetof(NetRPacket0x2725_Head, deltas) == 6"); -static_assert(sizeof(NetRPacket0x2725_Head) == 18, "sizeof(NetRPacket0x2725_Head) == 18"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2725_Head *network, RPacket0x2725_Head native) +bool native_to_network(NetRPacket_0x2725_Fixed *network, RPacket_0x2725_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->deltas, native.deltas); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2725_Head *native, NetRPacket0x2725_Head network) +bool network_to_native(RPacket_0x2725_Fixed *native, NetRPacket_0x2725_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->deltas, network.deltas); return rv; } - -struct RPacket0x2725_Repeat -{ - uint8_t c; -}; -struct NetRPacket0x2725_Repeat -{ - Byte c; -}; -static_assert(offsetof(NetRPacket0x2725_Repeat, c) == 0, "offsetof(NetRPacket0x2725_Repeat, c) == 0"); -static_assert(sizeof(NetRPacket0x2725_Repeat) == 1, "sizeof(NetRPacket0x2725_Repeat) == 1"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2725_Repeat *network, RPacket0x2725_Repeat native) +bool native_to_network(NetRPacket_0x2727_Fixed *network, RPacket_0x2727_Fixed native) { bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2725_Repeat *native, NetRPacket0x2725_Repeat network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -struct RPacket0x2727_Fixed -{ - uint16_t packet_id; - uint32_t account_id; -}; -struct NetRPacket0x2727_Fixed -{ - Little16 packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetRPacket0x2727_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2727_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2727_Fixed, account_id) == 2, "offsetof(NetRPacket0x2727_Fixed, account_id) == 2"); -static_assert(sizeof(NetRPacket0x2727_Fixed) == 6, "sizeof(NetRPacket0x2727_Fixed) == 6"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2727_Fixed *network, RPacket0x2727_Fixed native) -{ - bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2727_Fixed *native, NetRPacket0x2727_Fixed network) +bool network_to_native(RPacket_0x2727_Fixed *native, NetRPacket_0x2727_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct RPacket0x2728_Head -{ - uint16_t packet_id; - uint16_t packet_length; - uint32_t account_id; -}; -struct NetRPacket0x2728_Head -{ - Little16 packet_id; - Little16 packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetRPacket0x2728_Head, packet_id) == 0, "offsetof(NetRPacket0x2728_Head, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2728_Head, packet_length) == 2, "offsetof(NetRPacket0x2728_Head, packet_length) == 2"); -static_assert(offsetof(NetRPacket0x2728_Head, account_id) == 4, "offsetof(NetRPacket0x2728_Head, account_id) == 4"); -static_assert(sizeof(NetRPacket0x2728_Head) == 8, "sizeof(NetRPacket0x2728_Head) == 8"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2728_Head *network, RPacket0x2728_Head native) +bool native_to_network(NetRPacket_0x2728_Head *network, RPacket_0x2728_Head native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - rv &= native_to_network(&network->packet_length, native.packet_length); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2728_Head *native, NetRPacket0x2728_Head network) +bool network_to_native(RPacket_0x2728_Head *native, NetRPacket_0x2728_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->packet_length, network.packet_length); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct RPacket0x2728_Repeat -{ - VarName name; - uint32_t value; -}; -struct NetRPacket0x2728_Repeat -{ - NetString name; - Little32 value; -}; -static_assert(offsetof(NetRPacket0x2728_Repeat, name) == 0, "offsetof(NetRPacket0x2728_Repeat, name) == 0"); -static_assert(offsetof(NetRPacket0x2728_Repeat, value) == 32, "offsetof(NetRPacket0x2728_Repeat, value) == 32"); -static_assert(sizeof(NetRPacket0x2728_Repeat) == 36, "sizeof(NetRPacket0x2728_Repeat) == 36"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2728_Repeat *network, RPacket0x2728_Repeat native) +bool native_to_network(NetRPacket_0x2728_Repeat *network, RPacket_0x2728_Repeat native) { bool rv = true; rv &= native_to_network(&network->name, native.name); @@ -634,64 +808,33 @@ bool native_to_network(NetRPacket0x2728_Repeat *network, RPacket0x2728_Repeat na return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2728_Repeat *native, NetRPacket0x2728_Repeat network) +bool network_to_native(RPacket_0x2728_Repeat *native, NetRPacket_0x2728_Repeat network) { bool rv = true; rv &= network_to_native(&native->name, network.name); rv &= network_to_native(&native->value, network.value); return rv; } - -struct SPacket0x2729_Head -{ - uint16_t packet_id; - uint16_t packet_length; - uint32_t account_id; -}; -struct NetSPacket0x2729_Head -{ - Little16 packet_id; - Little16 packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetSPacket0x2729_Head, packet_id) == 0, "offsetof(NetSPacket0x2729_Head, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x2729_Head, packet_length) == 2, "offsetof(NetSPacket0x2729_Head, packet_length) == 2"); -static_assert(offsetof(NetSPacket0x2729_Head, account_id) == 4, "offsetof(NetSPacket0x2729_Head, account_id) == 4"); -static_assert(sizeof(NetSPacket0x2729_Head) == 8, "sizeof(NetSPacket0x2729_Head) == 8"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2729_Head *network, SPacket0x2729_Head native) +bool native_to_network(NetSPacket_0x2729_Head *network, SPacket_0x2729_Head native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - rv &= native_to_network(&network->packet_length, native.packet_length); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2729_Head *native, NetSPacket0x2729_Head network) +bool network_to_native(SPacket_0x2729_Head *native, NetSPacket_0x2729_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->packet_length, network.packet_length); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct SPacket0x2729_Repeat -{ - VarName name; - uint32_t value; -}; -struct NetSPacket0x2729_Repeat -{ - NetString name; - Little32 value; -}; -static_assert(offsetof(NetSPacket0x2729_Repeat, name) == 0, "offsetof(NetSPacket0x2729_Repeat, name) == 0"); -static_assert(offsetof(NetSPacket0x2729_Repeat, value) == 32, "offsetof(NetSPacket0x2729_Repeat, value) == 32"); -static_assert(sizeof(NetSPacket0x2729_Repeat) == 36, "sizeof(NetSPacket0x2729_Repeat) == 36"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2729_Repeat *network, SPacket0x2729_Repeat native) +bool native_to_network(NetSPacket_0x2729_Repeat *network, SPacket_0x2729_Repeat native) { bool rv = true; rv &= native_to_network(&network->name, native.name); @@ -699,154 +842,83 @@ bool native_to_network(NetSPacket0x2729_Repeat *network, SPacket0x2729_Repeat na return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2729_Repeat *native, NetSPacket0x2729_Repeat network) +bool network_to_native(SPacket_0x2729_Repeat *native, NetSPacket_0x2729_Repeat network) { bool rv = true; rv &= network_to_native(&native->name, network.name); rv &= network_to_native(&native->value, network.value); return rv; } - -struct RPacket0x272a_Fixed -{ - uint16_t packet_id; - uint32_t account_id; -}; -struct NetRPacket0x272a_Fixed -{ - Little16 packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetRPacket0x272a_Fixed, packet_id) == 0, "offsetof(NetRPacket0x272a_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x272a_Fixed, account_id) == 2, "offsetof(NetRPacket0x272a_Fixed, account_id) == 2"); -static_assert(sizeof(NetRPacket0x272a_Fixed) == 6, "sizeof(NetRPacket0x272a_Fixed) == 6"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x272a_Fixed *network, RPacket0x272a_Fixed native) +bool native_to_network(NetRPacket_0x272a_Fixed *network, RPacket_0x272a_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x272a_Fixed *native, NetRPacket0x272a_Fixed network) +bool network_to_native(RPacket_0x272a_Fixed *native, NetRPacket_0x272a_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct SPacket0x2730_Fixed -{ - uint16_t packet_id; -}; -struct NetSPacket0x2730_Fixed -{ - Little16 packet_id; -}; -static_assert(offsetof(NetSPacket0x2730_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2730_Fixed, packet_id) == 0"); -static_assert(sizeof(NetSPacket0x2730_Fixed) == 2, "sizeof(NetSPacket0x2730_Fixed) == 2"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2730_Fixed *network, SPacket0x2730_Fixed native) +bool native_to_network(NetSPacket_0x2730_Fixed *network, SPacket_0x2730_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->account_id, native.account_id); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2730_Fixed *native, NetSPacket0x2730_Fixed network) +bool network_to_native(SPacket_0x2730_Fixed *native, NetSPacket_0x2730_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->account_id, network.account_id); return rv; } - -struct SPacket0x2731_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - uint8_t ban_not_status; - TimeT status_or_ban_until; -}; -struct NetSPacket0x2731_Fixed -{ - Little16 packet_id; - Little32 account_id; - Byte ban_not_status; - Little32 status_or_ban_until; -}; -static_assert(offsetof(NetSPacket0x2731_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2731_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x2731_Fixed, account_id) == 2, "offsetof(NetSPacket0x2731_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x2731_Fixed, ban_not_status) == 6, "offsetof(NetSPacket0x2731_Fixed, ban_not_status) == 6"); -static_assert(offsetof(NetSPacket0x2731_Fixed, status_or_ban_until) == 7, "offsetof(NetSPacket0x2731_Fixed, status_or_ban_until) == 7"); -static_assert(sizeof(NetSPacket0x2731_Fixed) == 11, "sizeof(NetSPacket0x2731_Fixed) == 11"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2731_Fixed *network, SPacket0x2731_Fixed native) +bool native_to_network(NetSPacket_0x2731_Fixed *network, SPacket_0x2731_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->ban_not_status, native.ban_not_status); rv &= native_to_network(&network->status_or_ban_until, native.status_or_ban_until); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2731_Fixed *native, NetSPacket0x2731_Fixed network) +bool network_to_native(SPacket_0x2731_Fixed *native, NetSPacket_0x2731_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->ban_not_status, network.ban_not_status); rv &= network_to_native(&native->status_or_ban_until, network.status_or_ban_until); return rv; } - -struct SPacket0x2732_Head -{ - uint16_t packet_id; - uint16_t packet_length; -}; -struct NetSPacket0x2732_Head -{ - Little16 packet_id; - Little16 packet_length; -}; -static_assert(offsetof(NetSPacket0x2732_Head, packet_id) == 0, "offsetof(NetSPacket0x2732_Head, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x2732_Head, packet_length) == 2, "offsetof(NetSPacket0x2732_Head, packet_length) == 2"); -static_assert(sizeof(NetSPacket0x2732_Head) == 4, "sizeof(NetSPacket0x2732_Head) == 4"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2732_Head *network, SPacket0x2732_Head native) +bool native_to_network(NetSPacket_0x2732_Head *network, SPacket_0x2732_Head native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); - rv &= native_to_network(&network->packet_length, native.packet_length); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); + rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2732_Head *native, NetSPacket0x2732_Head network) +bool network_to_native(SPacket_0x2732_Head *native, NetSPacket_0x2732_Head network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); - rv &= network_to_native(&native->packet_length, network.packet_length); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); + rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); return rv; } - -struct SPacket0x2732_Repeat -{ - uint32_t account_id; - GmLevel gm_level; -}; -struct NetSPacket0x2732_Repeat -{ - Little32 account_id; - Byte gm_level; -}; -static_assert(offsetof(NetSPacket0x2732_Repeat, account_id) == 0, "offsetof(NetSPacket0x2732_Repeat, account_id) == 0"); -static_assert(offsetof(NetSPacket0x2732_Repeat, gm_level) == 4, "offsetof(NetSPacket0x2732_Repeat, gm_level) == 4"); -static_assert(sizeof(NetSPacket0x2732_Repeat) == 5, "sizeof(NetSPacket0x2732_Repeat) == 5"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2732_Repeat *network, SPacket0x2732_Repeat native) +bool native_to_network(NetSPacket_0x2732_Repeat *network, SPacket_0x2732_Repeat native) { bool rv = true; rv &= native_to_network(&network->account_id, native.account_id); @@ -854,88 +926,50 @@ bool native_to_network(NetSPacket0x2732_Repeat *network, SPacket0x2732_Repeat na return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2732_Repeat *native, NetSPacket0x2732_Repeat network) +bool network_to_native(SPacket_0x2732_Repeat *native, NetSPacket_0x2732_Repeat network) { bool rv = true; rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->gm_level, network.gm_level); return rv; } - -struct RPacket0x2740_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - AccountPass old_pass; - AccountPass new_pass; -}; -struct NetRPacket0x2740_Fixed -{ - Little16 packet_id; - Little32 account_id; - NetString old_pass; - NetString new_pass; -}; -static_assert(offsetof(NetRPacket0x2740_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2740_Fixed, packet_id) == 0"); -static_assert(offsetof(NetRPacket0x2740_Fixed, account_id) == 2, "offsetof(NetRPacket0x2740_Fixed, account_id) == 2"); -static_assert(offsetof(NetRPacket0x2740_Fixed, old_pass) == 6, "offsetof(NetRPacket0x2740_Fixed, old_pass) == 6"); -static_assert(offsetof(NetRPacket0x2740_Fixed, new_pass) == 30, "offsetof(NetRPacket0x2740_Fixed, new_pass) == 30"); -static_assert(sizeof(NetRPacket0x2740_Fixed) == 54, "sizeof(NetRPacket0x2740_Fixed) == 54"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetRPacket0x2740_Fixed *network, RPacket0x2740_Fixed native) +bool native_to_network(NetRPacket_0x2740_Fixed *network, RPacket_0x2740_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->old_pass, native.old_pass); rv &= native_to_network(&network->new_pass, native.new_pass); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(RPacket0x2740_Fixed *native, NetRPacket0x2740_Fixed network) +bool network_to_native(RPacket_0x2740_Fixed *native, NetRPacket_0x2740_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->old_pass, network.old_pass); rv &= network_to_native(&native->new_pass, network.new_pass); return rv; } - -struct SPacket0x2741_Fixed -{ - uint16_t packet_id; - uint32_t account_id; - uint8_t status; -}; -struct NetSPacket0x2741_Fixed -{ - Little16 packet_id; - Little32 account_id; - Byte status; -}; -static_assert(offsetof(NetSPacket0x2741_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2741_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x2741_Fixed, account_id) == 2, "offsetof(NetSPacket0x2741_Fixed, account_id) == 2"); -static_assert(offsetof(NetSPacket0x2741_Fixed, status) == 6, "offsetof(NetSPacket0x2741_Fixed, status) == 6"); -static_assert(sizeof(NetSPacket0x2741_Fixed) == 7, "sizeof(NetSPacket0x2741_Fixed) == 7"); inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x2741_Fixed *network, SPacket0x2741_Fixed native) +bool native_to_network(NetSPacket_0x2741_Fixed *network, SPacket_0x2741_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->account_id, native.account_id); rv &= native_to_network(&network->status, native.status); return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x2741_Fixed *native, NetSPacket0x2741_Fixed network) +bool network_to_native(SPacket_0x2741_Fixed *native, NetSPacket_0x2741_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->account_id, network.account_id); rv &= network_to_native(&native->status, network.status); return rv; } - #endif // TMWA_PROTO2_LOGIN_CHAR_HPP diff --git a/src/proto2/login-char_test.cpp b/src/proto2/login-char_test.cpp index 9ae0f5a..ec25fb5 100644 --- a/src/proto2/login-char_test.cpp +++ b/src/proto2/login-char_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead diff --git a/src/proto2/login-user.hpp b/src/proto2/login-user.hpp index 4c71e8a..ee00e9a 100644 --- a/src/proto2/login-user.hpp +++ b/src/proto2/login-user.hpp @@ -7,16 +7,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead @@ -28,4 +28,6 @@ // This is a public protocol, and changes require client cooperation + + #endif // TMWA_PROTO2_LOGIN_USER_HPP diff --git a/src/proto2/login-user_test.cpp b/src/proto2/login-user_test.cpp index 3b623b6..293a458 100644 --- a/src/proto2/login-user_test.cpp +++ b/src/proto2/login-user_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead diff --git a/src/proto2/map-user.hpp b/src/proto2/map-user.hpp index da59c40..90102f7 100644 --- a/src/proto2/map-user.hpp +++ b/src/proto2/map-user.hpp @@ -7,16 +7,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead @@ -27,36 +27,41 @@ // This is a public protocol, and changes require client cooperation -struct SPacket0x0212_Fixed +struct SPacket_0x0212_Fixed { - uint16_t packet_id; - BlockId npc_id; - uint16_t command; - BlockId id; - uint16_t x; - uint16_t y; + using NetType = NetSPacket_0x0212_Fixed; + static const uint16_t PACKET_ID = 0x0212; + + uint16_t magic_packet_id = PACKET_ID; + BlockId npc_id = {}; + uint16_t command = {}; + BlockId id = {}; + uint16_t x = {}; + uint16_t y = {}; }; -struct NetSPacket0x0212_Fixed + +struct NetSPacket_0x0212_Fixed { - Little16 packet_id; + Little16 magic_packet_id; Little32 npc_id; Little16 command; Little32 id; Little16 x; Little16 y; }; -static_assert(offsetof(NetSPacket0x0212_Fixed, packet_id) == 0, "offsetof(NetSPacket0x0212_Fixed, packet_id) == 0"); -static_assert(offsetof(NetSPacket0x0212_Fixed, npc_id) == 2, "offsetof(NetSPacket0x0212_Fixed, npc_id) == 2"); -static_assert(offsetof(NetSPacket0x0212_Fixed, command) == 6, "offsetof(NetSPacket0x0212_Fixed, command) == 6"); -static_assert(offsetof(NetSPacket0x0212_Fixed, id) == 8, "offsetof(NetSPacket0x0212_Fixed, id) == 8"); -static_assert(offsetof(NetSPacket0x0212_Fixed, x) == 12, "offsetof(NetSPacket0x0212_Fixed, x) == 12"); -static_assert(offsetof(NetSPacket0x0212_Fixed, y) == 14, "offsetof(NetSPacket0x0212_Fixed, y) == 14"); -static_assert(sizeof(NetSPacket0x0212_Fixed) == 16, "sizeof(NetSPacket0x0212_Fixed) == 16"); +static_assert(offsetof(NetSPacket_0x0212_Fixed, magic_packet_id) == 0, "offsetof(NetSPacket_0x0212_Fixed, magic_packet_id) == 0"); +static_assert(offsetof(NetSPacket_0x0212_Fixed, npc_id) == 2, "offsetof(NetSPacket_0x0212_Fixed, npc_id) == 2"); +static_assert(offsetof(NetSPacket_0x0212_Fixed, command) == 6, "offsetof(NetSPacket_0x0212_Fixed, command) == 6"); +static_assert(offsetof(NetSPacket_0x0212_Fixed, id) == 8, "offsetof(NetSPacket_0x0212_Fixed, id) == 8"); +static_assert(offsetof(NetSPacket_0x0212_Fixed, x) == 12, "offsetof(NetSPacket_0x0212_Fixed, x) == 12"); +static_assert(offsetof(NetSPacket_0x0212_Fixed, y) == 14, "offsetof(NetSPacket_0x0212_Fixed, y) == 14"); +static_assert(sizeof(NetSPacket_0x0212_Fixed) == 16, "sizeof(NetSPacket_0x0212_Fixed) == 16"); + inline __attribute__((warn_unused_result)) -bool native_to_network(NetSPacket0x0212_Fixed *network, SPacket0x0212_Fixed native) +bool native_to_network(NetSPacket_0x0212_Fixed *network, SPacket_0x0212_Fixed native) { bool rv = true; - rv &= native_to_network(&network->packet_id, native.packet_id); + rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); rv &= native_to_network(&network->npc_id, native.npc_id); rv &= native_to_network(&network->command, native.command); rv &= native_to_network(&network->id, native.id); @@ -65,10 +70,10 @@ bool native_to_network(NetSPacket0x0212_Fixed *network, SPacket0x0212_Fixed nati return rv; } inline __attribute__((warn_unused_result)) -bool network_to_native(SPacket0x0212_Fixed *native, NetSPacket0x0212_Fixed network) +bool network_to_native(SPacket_0x0212_Fixed *native, NetSPacket_0x0212_Fixed network) { bool rv = true; - rv &= network_to_native(&native->packet_id, network.packet_id); + rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); rv &= network_to_native(&native->npc_id, network.npc_id); rv &= network_to_native(&native->command, network.command); rv &= network_to_native(&native->id, network.id); @@ -77,5 +82,4 @@ bool network_to_native(SPacket0x0212_Fixed *native, NetSPacket0x0212_Fixed netwo return rv; } - #endif // TMWA_PROTO2_MAP_USER_HPP diff --git a/src/proto2/map-user_test.cpp b/src/proto2/map-user_test.cpp index adbdf6f..7d404fe 100644 --- a/src/proto2/map-user_test.cpp +++ b/src/proto2/map-user_test.cpp @@ -6,16 +6,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // This is a generated file, edit tools/protocol.py instead diff --git a/src/proto2/types.hpp b/src/proto2/types.hpp index f69d943..b047865 100644 --- a/src/proto2/types.hpp +++ b/src/proto2/types.hpp @@ -7,16 +7,16 @@ // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License +// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . # include "fwd.hpp" @@ -32,24 +32,24 @@ # include "../mmo/strs.hpp" # include "../mmo/utils.hpp" # include "../mmo/version.hpp" -template +template bool native_to_network(T *network, T native) { *network = native; return true; } -template +template bool network_to_native(T *native, T network) { *native = network; return true; } -template +template struct NetString { char data[N]; }; -template +template bool native_to_network(NetString *network, VString native) { // basically WBUF_STRING @@ -59,7 +59,7 @@ bool native_to_network(NetString *network, VString native) std::fill(mid, end, '\0'); return true; } -template +template bool network_to_native(VString *native, NetString network) { // basically RBUF_STRING @@ -70,6 +70,25 @@ bool network_to_native(VString *native, NetString network) return true; } +template +struct SkewedLength +{ + T data; +}; +template +bool native_to_network(SkewedLength *network, U native) +{ + native -= N; + return native_to_network(&network->data, native); +} +template +bool network_to_native(U *native, SkewedLength network) +{ + bool rv = network_to_native(native, network.data); + *native += N; + return rv; +} + inline __attribute__((warn_unused_result)) bool native_to_network(Byte *network, SEX native) { @@ -174,6 +193,23 @@ bool network_to_native(ItemNameId *native, Little16 network) return rv; } inline __attribute__((warn_unused_result)) +bool native_to_network(Little32 *network, ItemNameId native) +{ + bool rv = true; + uint32_t tmp = unwrap(native); + rv &= native_to_network(network, tmp); + return rv; +} +inline __attribute__((warn_unused_result)) +bool network_to_native(ItemNameId *native, Little32 network) +{ + bool rv = true; + uint32_t tmp; + rv &= network_to_native(&tmp, network); + *native = wrap(tmp); + return rv; +} +inline __attribute__((warn_unused_result)) bool native_to_network(Little32 *network, BlockId native) { bool rv = true; -- cgit v1.2.3-70-g09d2