diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-01 23:08:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-01 23:16:32 +0300 |
commit | 53eede04dc83830481fa0981f47339e2c8072b42 (patch) | |
tree | c84798a327ee988afb9239cf27781ca538d18250 /src/net/tmwa | |
parent | 83915bb5c10c8b694e633b8e3089603d3281b8a0 (diff) | |
download | plus-53eede04dc83830481fa0981f47339e2c8072b42.tar.gz plus-53eede04dc83830481fa0981f47339e2c8072b42.tar.bz2 plus-53eede04dc83830481fa0981f47339e2c8072b42.tar.xz plus-53eede04dc83830481fa0981f47339e2c8072b42.zip |
Use packet sizes from packetsin.inc
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/network.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index 64f5047fe..0f9a43ef8 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -38,8 +38,7 @@ namespace TmwAthena { -static const unsigned int packet_lengths_size - = static_cast<unsigned int>(sizeof(packet_lengths) / sizeof(int16_t)); +static const unsigned int packet_lengths_size = 0x0230U; static const unsigned int messagesSize = 0xFFFFU; Network *Network::mInstance = nullptr; @@ -107,7 +106,7 @@ void Network::dispatchMessages() if (msgId == SMSG_SERVER_VERSION_RESPONSE) len = 10; else if (msgId < packet_lengths_size) - len = packet_lengths[msgId]; + len = mPackets[msgId].len; if (len == -1) len = readWord(2); @@ -164,7 +163,7 @@ bool Network::messageReady() if (msgId >= 0 && static_cast<unsigned int>(msgId) < packet_lengths_size) { - len = packet_lengths[msgId]; + len = mPackets[msgId].len; } } |