diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 9 | ||||
-rw-r--r-- | src/net/eathena/mailhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 006c5e9a2..ea420cfc4 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -22,6 +22,8 @@ #include "logger.h" +#include "net/ea/eaprotocol.h" + #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" @@ -104,4 +106,11 @@ void MailHandler::returnMessage(const int msgId) outMsg.writeString("", 24, "unused"); } +void MailHandler::setAttach(const int index, const int amount) +{ + MessageOut outMsg(CMSG_MAIL_SET_ATTACH); + outMsg.writeInt16(static_cast<int16_t>(index + INVENTORY_OFFSET), "index"); + outMsg.writeInt32(amount, "amount"); +} + } // namespace EAthena diff --git a/src/net/eathena/mailhandler.h b/src/net/eathena/mailhandler.h index a90f3cbea..b6d2b9080 100644 --- a/src/net/eathena/mailhandler.h +++ b/src/net/eathena/mailhandler.h @@ -48,6 +48,8 @@ class MailHandler final : public MessageHandler, public Net::MailHandler void returnMessage(const int msgId) override final; + void setAttach(const int index, const int amount) override final; + protected: void processMailOpen(Net::MessageIn &msg) const; }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 1196988aa..d28806559 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -371,6 +371,7 @@ #define CMSG_MAIL_GET_ATTACH 0x0244 #define CMSG_MAIL_DELETE_MESSAGE 0x0243 #define CMSG_MAIL_RETURN_MESSAGE 0x0273 +#define CMSG_MAIL_SET_ATTACH 0x0247 #define SMSG_SOLVE_CHAR_NAME 0x0194 #define SMSG_SKILL_CASTING 0x07fb |