diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-01 17:05:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-01 17:05:47 +0300 |
commit | 75edc42f4be5689b5e40090f30ec70e676876c14 (patch) | |
tree | b91357455063f0ca9df59bd070b90b736248407c /src/net/eathena/guildrecv.cpp | |
parent | 2022268b439fe0a00cfac1d5c659f1add993753f (diff) | |
download | plus-75edc42f4be5689b5e40090f30ec70e676876c14.tar.gz plus-75edc42f4be5689b5e40090f30ec70e676876c14.tar.bz2 plus-75edc42f4be5689b5e40090f30ec70e676876c14.tar.xz plus-75edc42f4be5689b5e40090f30ec70e676876c14.zip |
Sort more packets. Add version checks inside packets.
Diffstat (limited to 'src/net/eathena/guildrecv.cpp')
-rw-r--r-- | src/net/eathena/guildrecv.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index 7adfdfb27..ef49698ee 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -132,12 +132,21 @@ void GuildRecv::processGuildExpulsionList(Net::MessageIn &msg) if (length < 4) return; - const int count = (length - 4) / 64; - - for (int i = 0; i < count; i++) + int count; + if (msg.getVersion() < 20100803) + { + count = (length - 4) / 64; + for (int i = 0; i < count; i++) + { + msg.readString(24, "name"); + msg.readString(40, "message"); + } + } + else { - msg.readString(24, "name"); - msg.readString(40, "message"); + count = (length - 4) / 40; + for (int i = 0; i < count; i++) + msg.readString(40, "message"); } } |