From 91b6b9d0d35e244dacb03d34a89754bed3934946 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 15 Apr 2019 23:30:34 +0300 Subject: Update packet ZC_PARTY_CONFIG --- src/map/clif.c | 11 +++++++---- 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 -- cgit v1.2.3-70-g09d2