summaryrefslogtreecommitdiff
path: root/src/net/eathena/mail2handler.cpp
diff options
context:
space:
mode:
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