From 499d2fd952251bc1cb2156cecd965d0c07c9a98f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 Aug 2017 22:22:08 +0300 Subject: Add packet CMSG_MAIL2_CANCEL_WRITE_MAIL 0x0a03. --- src/net/eathena/mail2handler.cpp | 10 ++++++++++ src/net/eathena/mail2handler.h | 2 ++ src/net/eathena/packetsout.inc | 2 ++ src/net/mail2handler.h | 2 ++ src/net/tmwa/mail2handler.cpp | 4 ++++ src/net/tmwa/mail2handler.h | 2 ++ 6 files changed, 22 insertions(+) (limited to 'src') diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp index 4797eaf82..8d1df482b 100644 --- a/src/net/eathena/mail2handler.cpp +++ b/src/net/eathena/mail2handler.cpp @@ -226,4 +226,14 @@ void Mail2Handler::closeMailBox() const createOutPacket(CMSG_MAIL2_CLOSE_MAILBOX); } +void Mail2Handler::cancelWriteMail() const +{ + if (packetVersion < 20140326 || + serverVersion < 19) + { + return; + } + createOutPacket(CMSG_MAIL2_CANCEL_WRITE_MAIL); +} + } // namespace EAthena diff --git a/src/net/eathena/mail2handler.h b/src/net/eathena/mail2handler.h index acd32dfd6..7525851d8 100644 --- a/src/net/eathena/mail2handler.h +++ b/src/net/eathena/mail2handler.h @@ -69,6 +69,8 @@ class Mail2Handler final : public Net::Mail2Handler void openMailBox(const int openType) const override final; void closeMailBox() const override final; + + void cancelWriteMail() const override final; }; } // namespace EAthena diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index 136d3f20d..2d5131196 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -330,6 +330,7 @@ packet(CMSG_MAIL2_REQUEST_ITEMS, 0x0000, 0, nullptr); packet(CMSG_MAIL2_REFRESH_MAIL_LIST, 0x0000, 0, nullptr); packet(CMSG_MAIL2_OPEN_MAILBOX, 0x0000, 0, nullptr); packet(CMSG_MAIL2_CLOSE_MAILBOX, 0x0000, 0, nullptr); +packet(CMSG_MAIL2_CANCEL_WRITE_MAIL, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1353,6 +1354,7 @@ if (packetVersion == 20140326) { packet(CMSG_MAIL2_REQUEST_MONEY, 0x09f1, 11, clif->pRodexRequestZeny); packet(CMSG_MAIL2_REQUEST_ITEMS, 0x09f3, 11, clif->pRodexRequestItems); + packet(CMSG_MAIL2_CANCEL_WRITE_MAIL, 0x0a03, 2, clif->pRodexCancelWriteMail); } // 20140402 diff --git a/src/net/mail2handler.h b/src/net/mail2handler.h index d8d3570be..9381838fb 100644 --- a/src/net/mail2handler.h +++ b/src/net/mail2handler.h @@ -75,6 +75,8 @@ class Mail2Handler notfinal virtual void openMailBox(const int openType) const = 0; virtual void closeMailBox() const = 0; + + virtual void cancelWriteMail() const = 0; }; } // namespace Net diff --git a/src/net/tmwa/mail2handler.cpp b/src/net/tmwa/mail2handler.cpp index c4b41dcd1..1ab43b038 100644 --- a/src/net/tmwa/mail2handler.cpp +++ b/src/net/tmwa/mail2handler.cpp @@ -94,4 +94,8 @@ void Mail2Handler::closeMailBox() const { } +void Mail2Handler::cancelWriteMail() const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/mail2handler.h b/src/net/tmwa/mail2handler.h index ea93b859c..62b6c570b 100644 --- a/src/net/tmwa/mail2handler.h +++ b/src/net/tmwa/mail2handler.h @@ -69,6 +69,8 @@ class Mail2Handler final : public Net::Mail2Handler void openMailBox(const int openType) const override final; void closeMailBox() const override final; + + void cancelWriteMail() const override final; }; } // namespace TmwAthena -- cgit v1.2.3-60-g2f50