summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-14 22:04:44 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-25 01:43:47 +0300
commitf13f809a163b3974a34211fe30ebdd659cf7edcb (patch)
tree059c611d14bed120f07fc9d0e916ffe27d335416
parent7e9b5edffcca79507538af3c3e01fba03e1e4e37 (diff)
downloadhercules-f13f809a163b3974a34211fe30ebdd659cf7edcb.tar.gz
hercules-f13f809a163b3974a34211fe30ebdd659cf7edcb.tar.bz2
hercules-f13f809a163b3974a34211fe30ebdd659cf7edcb.tar.xz
hercules-f13f809a163b3974a34211fe30ebdd659cf7edcb.zip
Add packet 0x0aa5 for 2016 clients for guild members list. Based on rathena commit:
commit 9412ebb9f7b009e3ae3b69e5eb1ae8a3d341a5f2 Author: Lemongrass3110 <lemongrass@kstp.at> Date: Sat Jun 3 14:08:06 2017 +0200 Added support for 2016's guild packets Thanks to @mrdiablo for his help.
-rw-r--r--src/map/clif.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c01e56d35..fdfda603c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7530,6 +7530,14 @@ void clif_guild_memberlist(struct map_session_data *sd)
int fd;
int i,c;
struct guild *g;
+#if PACKETVER < 20161026
+ const int cmd = 0x154;
+ const int size = 104;
+#else
+ const int cmd = 0xaa5;
+ const int size = 34;
+#endif
+
nullpo_retv(sd);
if ((fd = sd->fd) == 0)
@@ -7537,27 +7545,31 @@ void clif_guild_memberlist(struct map_session_data *sd)
if ((g = sd->guild) == NULL)
return;
- WFIFOHEAD(fd, g->max_member * 104 + 4);
- WFIFOW(fd, 0) = 0x154;
+ WFIFOHEAD(fd, g->max_member * size + 4);
+ WFIFOW(fd, 0) = cmd;
for (i = 0, c = 0; i < g->max_member; i++) {
struct guild_member *m = &g->member[i];
if (m->account_id == 0)
continue;
- WFIFOL(fd, c * 104 + 4) = m->account_id;
- WFIFOL(fd, c * 104 + 8) = m->char_id;
- WFIFOW(fd, c * 104 + 12) = m->hair;
- WFIFOW(fd, c * 104 + 14) = m->hair_color;
- WFIFOW(fd, c * 104 + 16) = m->gender;
- WFIFOW(fd, c * 104 + 18) = m->class;
- WFIFOW(fd, c * 104 + 20) = m->lv;
- WFIFOL(fd, c * 104 + 22) = (int)cap_value(m->exp, 0, INT32_MAX);
- WFIFOL(fd, c * 104 + 26) = m->online;
- WFIFOL(fd, c * 104 + 30) = m->position;
- memset(WFIFOP(fd, c * 104 + 34), 0, 50); //[Ind] - This is displayed in the 'note' column but being you can't edit it it's sent empty.
- memcpy(WFIFOP(fd, c * 104 + 84), m->name, NAME_LENGTH);
+ WFIFOL(fd, c * size + 4) = m->account_id;
+ WFIFOL(fd, c * size + 8) = m->char_id;
+ WFIFOW(fd, c * size + 12) = m->hair;
+ WFIFOW(fd, c * size + 14) = m->hair_color;
+ WFIFOW(fd, c * size + 16) = m->gender;
+ WFIFOW(fd, c * size + 18) = m->class;
+ WFIFOW(fd, c * size + 20) = m->lv;
+ WFIFOL(fd, c * size + 22) = (int)cap_value(m->exp, 0, INT32_MAX);
+ WFIFOL(fd, c * size + 26) = m->online;
+ WFIFOL(fd, c * size + 30) = m->position;
+#if PACKETVER < 20161026
+ memset(WFIFOP(fd, c * size + 34), 0, 50); //[Ind] - This is displayed in the 'note' column but being you can't edit it it's sent empty.
+ memcpy(WFIFOP(fd, c * size + 84), m->name, NAME_LENGTH);
+#else
+ WFIFOL(fd, c * size + 34) = 0; // [4144] this is member last login time. But in hercules it not present.
+#endif
c++;
}
- WFIFOW(fd, 2) = c * 104 + 4;
+ WFIFOW(fd, 2) = c * size + 4;
WFIFOSET(fd, WFIFOW(fd, 2));
}