summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-06 21:15:27 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:20 +0300
commite0e674ad0668314da6c3125c9a951f13a27bebe4 (patch)
tree6a62d56253b961ec58d769437d70305f144acb36
parent8b6b2eb2c762af0c965538ff077e70d0a4953d66 (diff)
downloadhercules-e0e674ad0668314da6c3125c9a951f13a27bebe4.tar.gz
hercules-e0e674ad0668314da6c3125c9a951f13a27bebe4.tar.bz2
hercules-e0e674ad0668314da6c3125c9a951f13a27bebe4.tar.xz
hercules-e0e674ad0668314da6c3125c9a951f13a27bebe4.zip
Update packet ZC_CASH_TIME_COUNTER.
-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 15560dd00..6b47e0ce9 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17007,11 +17007,13 @@ static void clif_mercenary_message(struct map_session_data *sd, int message)
/// 0298 <name id>.W <seconds>.L
static void clif_rental_time(int fd, int nameid, int seconds)
{ // '<ItemName>' item will disappear in <seconds/60> minutes.
- WFIFOHEAD(fd,packet_len(0x298));
- WFIFOW(fd,0) = 0x298;
- WFIFOW(fd,2) = nameid;
- WFIFOL(fd,4) = seconds;
- WFIFOSET(fd,packet_len(0x298));
+ struct PACKET_ZC_CASH_TIME_COUNTER p;
+ WFIFOHEAD(fd, sizeof(p));
+ p.packetType = 0x298;
+ p.itemId = nameid;
+ p.seconds = seconds;
+ memcpy(WFIFOP(fd, 0), &p, sizeof(p));
+ WFIFOSET(fd, sizeof(p));
}
/// Deletes a rental item from client's inventory (ZC_CASH_ITEM_DELETE).
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index e0010e530..7ca92814b 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -2011,6 +2011,16 @@ struct PACKET_ZC_ADD_EXCHANGE_ITEM {
#endif
} __attribute__((packed));
+struct PACKET_ZC_CASH_TIME_COUNTER {
+ int16 packetType;
+#if PACKETVER_RE_NUM >= 20180704
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ uint32 seconds;
+} __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