summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-07 05:09:20 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:21 +0300
commit3e04d41cc450f65f004a6e5a45c5ce6f700b82b1 (patch)
tree2fa6ed2e7d6e820dc12e89d12d1a4204d78c03bc
parent0a7e3dee7e935254ae5bbc9ac4520f8b56dafb90 (diff)
downloadhercules-3e04d41cc450f65f004a6e5a45c5ce6f700b82b1.tar.gz
hercules-3e04d41cc450f65f004a6e5a45c5ce6f700b82b1.tar.bz2
hercules-3e04d41cc450f65f004a6e5a45c5ce6f700b82b1.tar.xz
hercules-3e04d41cc450f65f004a6e5a45c5ce6f700b82b1.zip
Update packet ZC_ACK_WEAPONREFINE.
-rw-r--r--src/map/clif.c12
-rw-r--r--src/map/packets_struct.h10
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