summaryrefslogtreecommitdiff
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
parentb013c695838bb3c26687f230b6d33d68fc844448 (diff)
downloadplus-c5a039edf81958d7d6131d84107d666dfb848195.tar.gz
plus-c5a039edf81958d7d6131d84107d666dfb848195.tar.bz2
plus-c5a039edf81958d7d6131d84107d666dfb848195.tar.xz
plus-c5a039edf81958d7d6131d84107d666dfb848195.zip
Add packet SMSG_GUILD_MEMBER_LIST 0x0aa5.
-rw-r--r--src/net/eathena/guildrecv.cpp26
-rw-r--r--src/net/eathena/packetsin.inc6
2 files changed, 29 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)
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 0a10c21a5..036c5fde9 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -900,6 +900,12 @@ if (packetVersion >= 20160921)
packet(SMSG_VENDING_ITEMS_LIST, 0x0800, -1, &VendingRecv::processItemsList, 20160921);
}
+// 20161026
+if (packetVersion >= 20161026)
+{
+ packet(SMSG_GUILD_MEMBER_LIST, 0x0aa5, -1, &GuildRecv::processGuildMemberList, 20161026);
+}
+
// 20170315
if (packetVersion >= 20170315)
{