summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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