summaryrefslogtreecommitdiff
path: root/src/net/eathena/guildrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-01 17:05:47 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-01 17:05:47 +0300
commit75edc42f4be5689b5e40090f30ec70e676876c14 (patch)
treeb91357455063f0ca9df59bd070b90b736248407c /src/net/eathena/guildrecv.cpp
parent2022268b439fe0a00cfac1d5c659f1add993753f (diff)
downloadmv-75edc42f4be5689b5e40090f30ec70e676876c14.tar.gz
mv-75edc42f4be5689b5e40090f30ec70e676876c14.tar.bz2
mv-75edc42f4be5689b5e40090f30ec70e676876c14.tar.xz
mv-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.cpp19
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");
}
}