diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-05-27 13:33:54 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-05-27 13:33:54 -0700 |
commit | af4acff261d579428e8eef042cc5359fa392f725 (patch) | |
tree | ca73d54da799c3751e87ec88a785d60e7561a2f0 /src/proto2/login-char.hpp | |
parent | cac49afdef0992b93d8718fd928d73d721d434f4 (diff) | |
download | tmwa-af4acff261d579428e8eef042cc5359fa392f725.tar.gz tmwa-af4acff261d579428e8eef042cc5359fa392f725.tar.bz2 tmwa-af4acff261d579428e8eef042cc5359fa392f725.tar.xz tmwa-af4acff261d579428e8eef042cc5359fa392f725.zip |
Generate the char server protocol
Diffstat (limited to 'src/proto2/login-char.hpp')
-rw-r--r-- | src/proto2/login-char.hpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/proto2/login-char.hpp b/src/proto2/login-char.hpp index 6b2004d..14d19a9 100644 --- a/src/proto2/login-char.hpp +++ b/src/proto2/login-char.hpp @@ -27,6 +27,9 @@ // This is an internal protocol, and can be changed without notice +// this is only needed for the payload packet right now, and that needs to die +#pragma pack(push, 1) + template<> struct Packet_Fixed<0x2709> { @@ -206,7 +209,7 @@ struct Packet_Fixed<0x2725> // TODO remove this uint16_t magic_packet_id = PACKET_ID; AccountId account_id = {}; - HumanTimeDiff deltas = {}; + HumanTimeDiff ban_add = {}; }; template<> @@ -532,11 +535,11 @@ struct NetPacket_Fixed<0x2725> { Little16 magic_packet_id; Little32 account_id; - NetHumanTimeDiff deltas; + NetHumanTimeDiff ban_add; }; static_assert(offsetof(NetPacket_Fixed<0x2725>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2725>, magic_packet_id) == 0"); static_assert(offsetof(NetPacket_Fixed<0x2725>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2725>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2725>, deltas) == 6, "offsetof(NetPacket_Fixed<0x2725>, deltas) == 6"); +static_assert(offsetof(NetPacket_Fixed<0x2725>, ban_add) == 6, "offsetof(NetPacket_Fixed<0x2725>, ban_add) == 6"); static_assert(sizeof(NetPacket_Fixed<0x2725>) == 18, "sizeof(NetPacket_Fixed<0x2725>) == 18"); template<> @@ -975,7 +978,7 @@ bool native_to_network(NetPacket_Fixed<0x2725> *network, Packet_Fixed<0x2725> na 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->deltas, native.deltas); + rv &= native_to_network(&network->ban_add, native.ban_add); return rv; } inline __attribute__((warn_unused_result)) @@ -984,7 +987,7 @@ bool network_to_native(Packet_Fixed<0x2725> *native, NetPacket_Fixed<0x2725> net 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->deltas, network.deltas); + rv &= network_to_native(&native->ban_add, network.ban_add); return rv; } @@ -1204,4 +1207,6 @@ bool network_to_native(Packet_Fixed<0x2741> *native, NetPacket_Fixed<0x2741> net } +#pragma pack(pop) + #endif // TMWA_PROTO2_LOGIN_CHAR_HPP |