diff options
-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 c279546b5..95184ed9f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6083,11 +6083,13 @@ static void clif_refine(int fd, int fail, int index, int val) /// 3 = "you lack the item %s to upgrade the weapon" MsgStringTable[914] in rgb(255,200,200) static void clif_upgrademessage(int fd, int result, int item_id) { - WFIFOHEAD(fd,packet_len(0x223)); - WFIFOW(fd,0)=0x223; - WFIFOL(fd,2)=result; - WFIFOW(fd,6)=item_id; - WFIFOSET(fd,packet_len(0x223)); + struct PACKET_ZC_ACK_WEAPONREFINE p; + WFIFOHEAD(fd, sizeof(p)); + p.packetType = 0x223; + p.result = result; + p.itemId = item_id; + memcpy(WFIFOP(fd, 0), &p, sizeof(p)); + WFIFOSET(fd, sizeof(p)); } /// Whisper is transmitted to the destination player (ZC_WHISPER). diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 2699f9108..778a65050 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -2070,6 +2070,16 @@ struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE { #endif } __attribute__((packed)); +struct PACKET_ZC_ACK_WEAPONREFINE { + int16 packetType; + int32 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 |