summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-06 21:27:26 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:20 +0300
commit9cada287c3d2f4ddfb83da8e37c725212fd9bbf9 (patch)
treea49d01e735139e20f4dd0de51a9b92251a0ba81b /src
parente0e674ad0668314da6c3125c9a951f13a27bebe4 (diff)
downloadhercules-9cada287c3d2f4ddfb83da8e37c725212fd9bbf9.tar.gz
hercules-9cada287c3d2f4ddfb83da8e37c725212fd9bbf9.tar.bz2
hercules-9cada287c3d2f4ddfb83da8e37c725212fd9bbf9.tar.xz
hercules-9cada287c3d2f4ddfb83da8e37c725212fd9bbf9.zip
Update packet ZC_CASH_ITEM_DELETE.
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 6b47e0ce9..eda4b933b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17020,11 +17020,13 @@ static void clif_rental_time(int fd, int nameid, int seconds)
/// 0299 <index>.W <name id>.W
static void clif_rental_expired(int fd, int index, int nameid)
{ // '<ItemName>' item has been deleted from the Inventory
- WFIFOHEAD(fd,packet_len(0x299));
- WFIFOW(fd,0) = 0x299;
- WFIFOW(fd,2) = index+2;
- WFIFOW(fd,4) = nameid;
- WFIFOSET(fd,packet_len(0x299));
+ struct PACKET_ZC_CASH_ITEM_DELETE p;
+ WFIFOHEAD(fd, sizeof(p));
+ p.packetType = 0x299;
+ p.index = index + 2;
+ p.itemId = nameid;
+ memcpy(WFIFOP(fd, 0), &p, sizeof(p));
+ WFIFOSET(fd, sizeof(p));
}
/// Book Reading (ZC_READ_BOOK).
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 7ca92814b..e5f253718 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -2021,6 +2021,16 @@ struct PACKET_ZC_CASH_TIME_COUNTER {
uint32 seconds;
} __attribute__((packed));
+struct PACKET_ZC_CASH_ITEM_DELETE {
+ int16 packetType;
+ uint16 index;
+#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