summaryrefslogtreecommitdiff
path: root/src/net/eathena/mail2handler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-11 17:21:30 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-11 17:21:30 +0300
commit1a43a25be73ab9ed464903edef65486e54699437 (patch)
treebaa8a39f2c15e08f582014fbba0e5c8060a71f3f /src/net/eathena/mail2handler.cpp
parentd3329d1900d306643706478cb2685dec7a1100e4 (diff)
downloadmv-1a43a25be73ab9ed464903edef65486e54699437.tar.gz
mv-1a43a25be73ab9ed464903edef65486e54699437.tar.bz2
mv-1a43a25be73ab9ed464903edef65486e54699437.tar.xz
mv-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.cpp12
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