diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-04-15 23:30:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-05-05 22:22:05 +0300 |
commit | 91b6b9d0d35e244dacb03d34a89754bed3934946 (patch) | |
tree | daf630bbe3ef4006f3f3817e84b2fd959672c75a | |
parent | 21557e413a1ed62d2b8321761009b80d13b09379 (diff) | |
download | hercules-91b6b9d0d35e244dacb03d34a89754bed3934946.tar.gz hercules-91b6b9d0d35e244dacb03d34a89754bed3934946.tar.bz2 hercules-91b6b9d0d35e244dacb03d34a89754bed3934946.tar.xz hercules-91b6b9d0d35e244dacb03d34a89754bed3934946.zip |
Update packet ZC_PARTY_CONFIG
-rw-r--r-- | src/map/clif.c | 11 | ||||
-rw-r--r-- | src/map/packets_struct.h | 8 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index c0b3858ea..c7157f891 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7134,14 +7134,17 @@ static void clif_party_job_and_level(struct map_session_data *sd) /// 1 = auto-deny party invites static void clif_partyinvitationstate(struct map_session_data *sd) { +#if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO) int fd; nullpo_retv(sd); fd = sd->fd; - WFIFOHEAD(fd, packet_len(0x2c9)); - WFIFOW(fd, 0) = 0x2c9; - WFIFOB(fd, 2) = sd->status.allow_party ? 0 : 1; - WFIFOSET(fd, packet_len(0x2c9)); + WFIFOHEAD(fd, sizeof(struct PACKET_ZC_PARTY_CONFIG)); + struct PACKET_ZC_PARTY_CONFIG *p = WFIFOP(fd, 0); + p->packetType = HEADER_ZC_PARTY_CONFIG; + p->denyPartyInvites = sd->status.allow_party ? 1 : 0; + WFIFOSET(fd, sizeof(struct PACKET_ZC_PARTY_CONFIG)); +#endif } /// Party invitation request. diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index e898d414e..d61434603 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3219,6 +3219,14 @@ struct PACKET_ZC_LOAD_CONFIRM { DEFINE_PACKET_HEADER(ZC_LOAD_CONFIRM, 0x0b1b); #endif +#if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO) +struct PACKET_ZC_PARTY_CONFIG { + int16 packetType; + uint8 denyPartyInvites; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_PARTY_CONFIG, 0x02c9); +#endif + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris |