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/mail2handler.cpp | |
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/mail2handler.cpp')
-rw-r--r-- | src/net/eathena/mail2handler.cpp | 12 |
1 files changed, 12 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 |