diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 12 | ||||
-rw-r--r-- | src/map/packets_struct.h | 10 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 5feda609e..76d8f751d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17880,14 +17880,16 @@ static void clif_buyingstore_trade_failed_seller(struct map_session_data *sd, sh { #if PACKETVER >= 20100420 int fd; + struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER p; nullpo_retv(sd); fd = sd->fd; - WFIFOHEAD(fd,packet_len(0x824)); - WFIFOW(fd,0) = 0x824; - WFIFOW(fd,2) = result; - WFIFOW(fd,4) = nameid; - WFIFOSET(fd,packet_len(0x824)); + WFIFOHEAD(fd, sizeof(p)); + p.packetType = 0x824; + p.result = result; + p.itemId = nameid; + memcpy(WFIFOP(fd, 0), &p, sizeof(p)); + WFIFOSET(fd, sizeof(p)); #endif } diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 30c5087e1..2ba537ef8 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -2117,6 +2117,16 @@ struct PACKET_ZC_PROPERTY_HOMUN { uint16 range; } __attribute__((packed)); +struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER { + int16 packetType; + uint16 result; +#if PACKETVER_RE_NUM >= 20180704 + uint32 itemId; +#else + uint16 itemId; +#endif +} __attribute__((packed)); + #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 |