From d23ec275ea4b350dc616e592714724d66de4599a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 15 Sep 2014 12:35:41 +0300 Subject: eathena: add packet CMSG_MAIL_RESET_ATTACH 0x0246. --- src/net/eathena/mailhandler.cpp | 6 ++++++ src/net/eathena/mailhandler.h | 2 ++ src/net/eathena/protocol.h | 1 + src/net/mailhandler.h | 2 ++ src/net/tmwa/mailhandler.cpp | 4 ++++ src/net/tmwa/mailhandler.h | 2 ++ 6 files changed, 17 insertions(+) (limited to 'src') diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index ea420cfc4..23e959538 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -113,4 +113,10 @@ void MailHandler::setAttach(const int index, const int amount) outMsg.writeInt32(amount, "amount"); } +void MailHandler::resetAttach(const int flag) +{ + MessageOut outMsg(CMSG_MAIL_RESET_ATTACH); + outMsg.writeInt16(static_cast(flag), "flag"); +} + } // namespace EAthena diff --git a/src/net/eathena/mailhandler.h b/src/net/eathena/mailhandler.h index b6d2b9080..1b4f9f2b5 100644 --- a/src/net/eathena/mailhandler.h +++ b/src/net/eathena/mailhandler.h @@ -50,6 +50,8 @@ class MailHandler final : public MessageHandler, public Net::MailHandler void setAttach(const int index, const int amount) override final; + void resetAttach(const int flag) override final; + protected: void processMailOpen(Net::MessageIn &msg) const; }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index d28806559..70ffd74e5 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -372,6 +372,7 @@ #define CMSG_MAIL_DELETE_MESSAGE 0x0243 #define CMSG_MAIL_RETURN_MESSAGE 0x0273 #define CMSG_MAIL_SET_ATTACH 0x0247 +#define CMSG_MAIL_RESET_ATTACH 0x0246 #define SMSG_SOLVE_CHAR_NAME 0x0194 #define SMSG_SKILL_CASTING 0x07fb diff --git a/src/net/mailhandler.h b/src/net/mailhandler.h index ebad9b7b4..3ceb7625f 100644 --- a/src/net/mailhandler.h +++ b/src/net/mailhandler.h @@ -43,6 +43,8 @@ class MailHandler notfinal virtual void returnMessage(const int msgId) = 0; virtual void setAttach(const int index, const int amount) = 0; + + virtual void resetAttach(const int flag) = 0; }; } // namespace Net diff --git a/src/net/tmwa/mailhandler.cpp b/src/net/tmwa/mailhandler.cpp index 8d48094d2..dfd69976d 100644 --- a/src/net/tmwa/mailhandler.cpp +++ b/src/net/tmwa/mailhandler.cpp @@ -67,4 +67,8 @@ void MailHandler::setAttach(const int index A_UNUSED, { } +void MailHandler::resetAttach(const int flag A_UNUSED) +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/mailhandler.h b/src/net/tmwa/mailhandler.h index c6c77de26..fb0892211 100644 --- a/src/net/tmwa/mailhandler.h +++ b/src/net/tmwa/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; + + void resetAttach(const int flag) override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2