diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-11 17:21:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-11 17:21:30 +0300 |
commit | 1a43a25be73ab9ed464903edef65486e54699437 (patch) | |
tree | baa8a39f2c15e08f582014fbba0e5c8060a71f3f /src/net/eathena | |
parent | d3329d1900d306643706478cb2685dec7a1100e4 (diff) | |
download | ManaVerse-1a43a25be73ab9ed464903edef65486e54699437.tar.gz ManaVerse-1a43a25be73ab9ed464903edef65486e54699437.tar.bz2 ManaVerse-1a43a25be73ab9ed464903edef65486e54699437.tar.xz ManaVerse-1a43a25be73ab9ed464903edef65486e54699437.zip |
Add packet CMSG_MAIL2_REMOVE_ITEM_MAIL 0x0a06.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/mail2handler.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/mail2handler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/packetsout.inc | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp index 5d7f50ba3..58acd7feb 100644 --- a/src/net/eathena/mail2handler.cpp +++ b/src/net/eathena/mail2handler.cpp @@ -61,4 +61,16 @@ void Mail2Handler::addItem(const Item *const item, outMsg.writeInt16(CAST_S16(amount), "amount"); } +void Mail2Handler::removeItem(const Item *const item, + const int amount) const +{ + if (item == nullptr) + return; + + createOutPacket(CMSG_MAIL2_REMOVE_ITEM_MAIL); + outMsg.writeInt16(CAST_S16( + item->getInvIndex() + INVENTORY_OFFSET), "index"); + outMsg.writeInt16(CAST_S16(amount), "amount"); +} + } // namespace EAthena diff --git a/src/net/eathena/mail2handler.h b/src/net/eathena/mail2handler.h index f239eff86..b71b8a59b 100644 --- a/src/net/eathena/mail2handler.h +++ b/src/net/eathena/mail2handler.h @@ -39,6 +39,9 @@ class Mail2Handler final : public Net::Mail2Handler void addItem(const Item *const item, const int amount) const override final; + + void removeItem(const Item *const item, + const int amount) const override final; }; } // namespace EAthena diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index fcb22bcc8..446d95144 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -319,6 +319,7 @@ packet(CMSG_BOOKING_DELETE_REQ, 0x0000, 0, nullptr); packet(CMSG_BOOKING_UPDATE_REQ, 0x0000, 0, nullptr); packet(CMSG_MAIL2_OPEN_WRITE_MAIL, 0x0000, 0, nullptr); packet(CMSG_MAIL2_ADD_ITEM_TO_MAIL, 0x0000, 0, nullptr); +packet(CMSG_MAIL2_REMOVE_ITEM_MAIL, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1378,6 +1379,7 @@ if (packetVersion == 20140416) packet(CMSG_NAME_REQUEST, 0x096a, 6, clif->pGetCharNameRequest); packet(CMSG_MAIL2_OPEN_WRITE_MAIL, 0x0a08, 26, clif->pRodexOpenWriteMail); packet(CMSG_MAIL2_ADD_ITEM_TO_MAIL, 0x0a04, 6, clif->pRodexAddItem); + packet(CMSG_MAIL2_REMOVE_ITEM_MAIL, 0x0a06, 6, clif->pRodexRemoveItem); } // 20140605 |