summaryrefslogtreecommitdiff
path: root/src/net/eathena/guildrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-28 01:53:58 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-28 02:33:43 +0300
commitc5a039edf81958d7d6131d84107d666dfb848195 (patch)
treec5e1b9fa3ea446089a37f7f1aac27220d8641e7d /src/net/eathena/guildrecv.cpp
parentb013c695838bb3c26687f230b6d33d68fc844448 (diff)
downloadplus-c5a039edf81958d7d6131d84107d666dfb848195.tar.gz
plus-c5a039edf81958d7d6131d84107d666dfb848195.tar.bz2
plus-c5a039edf81958d7d6131d84107d666dfb848195.tar.xz
plus-c5a039edf81958d7d6131d84107d666dfb848195.zip
Add packet SMSG_GUILD_MEMBER_LIST 0x0aa5.
Diffstat (limited to 'src/net/eathena/guildrecv.cpp')
-rw-r--r--src/net/eathena/guildrecv.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp
index 2b3c2b9e2..741fcd6d8 100644
--- a/src/net/eathena/guildrecv.cpp
+++ b/src/net/eathena/guildrecv.cpp
@@ -41,6 +41,7 @@
#include "net/eathena/guildhandler.h"
#include "utils/delete2.h"
+#include "utils/checkutils.h"
#include "utils/gettext.h"
#include "debug.h"
@@ -183,7 +184,18 @@ void GuildRecv::processGuildMemberList(Net::MessageIn &msg)
const int length = msg.readInt16("len");
if (length < 4)
return;
- const int count = (length - 4) / 104;
+ int guildSize = 0;
+ if (msg.getVersion() >= 20161026)
+ {
+ guildSize = 34;
+ reportAlways("missing guild member names");
+ }
+ else
+ {
+ guildSize = 104;
+ }
+
+ const int count = (length - 4) / guildSize;
if (taGuild == nullptr)
{
logger->log1("!taGuild");
@@ -206,8 +218,16 @@ void GuildRecv::processGuildMemberList(Net::MessageIn &msg)
const int exp = msg.readInt32("exp");
const int online = msg.readInt32("online");
const int pos = msg.readInt32("position");
- msg.skip(50, "unused");
- std::string name = msg.readString(24, "name");
+ std::string name;
+ if (msg.getVersion() < 20161026)
+ {
+ msg.skip(50, "unused");
+ name = msg.readString(24, "name");
+ }
+ else
+ {
+ continue;
+ }
GuildMember *const m = taGuild->addMember(id, charId, name);
if (m != nullptr)