diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-14 21:40:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-25 01:43:47 +0300 |
commit | 95bdf27b863fec3a3da9721d6e1506772d61873b (patch) | |
tree | c696ba98809985d017e5391e6225fa78cb30b7ce /src/map | |
parent | 731412b4494cc48c75fbef42d1beefd70589bfa5 (diff) | |
download | hercules-95bdf27b863fec3a3da9721d6e1506772d61873b.tar.gz hercules-95bdf27b863fec3a3da9721d6e1506772d61873b.tar.bz2 hercules-95bdf27b863fec3a3da9721d6e1506772d61873b.tar.xz hercules-95bdf27b863fec3a3da9721d6e1506772d61873b.zip |
Add packet 0x0a84 for guild basic info. 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.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 45c80e48b..089aa00d8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7452,14 +7452,20 @@ void clif_guild_basicinfo(struct map_session_data *sd) int fd; struct guild *g; +#if PACKETVER < 20160622 + const int cmd = 0x1b6; //0x150; [4144] this is packet for older versions? +#else + const int cmd = 0xa84; +#endif + nullpo_retv(sd); fd = sd->fd; if ((g = sd->guild) == NULL) return; - WFIFOHEAD(fd, packet_len(0x1b6)); - WFIFOW(fd, 0) = 0x1b6; //0x150; + WFIFOHEAD(fd, packet_len(cmd)); + WFIFOW(fd, 0) = cmd; WFIFOL(fd, 2) = g->guild_id; WFIFOL(fd, 6) = g->guild_lv; WFIFOL(fd, 10) = g->connect_member; @@ -7472,12 +7478,17 @@ void clif_guild_basicinfo(struct map_session_data *sd) WFIFOL(fd, 38) = 0; // Virtue: (down) Wicked [-100,100] Righteous (up) WFIFOL(fd, 42) = g->emblem_id; memcpy(WFIFOP(fd, 46), g->name, NAME_LENGTH); +#if PACKETVER < 20160622 memcpy(WFIFOP(fd, 70), g->master, NAME_LENGTH); - safestrncpy(WFIFOP(fd, 94), msg_sd(sd, 300 + guild->checkcastles(g)), 16); // "'N' castles" WFIFOL(fd, 110) = 0; // zeny +#else + safestrncpy(WFIFOP(fd, 70), msg_sd(sd, 300 + guild->checkcastles(g)), 16); // "'N' castles" + WFIFOL(fd, 86) = 0; // zeny + WFIFOL(fd, 90) = g->member[0].char_id; // leader +#endif - WFIFOSET(fd, packet_len(0x1b6)); + WFIFOSET(fd, packet_len(cmd)); } /// Guild alliance and opposition list (ZC_MYGUILD_BASIC_INFO). |