From 3be81954bafe8cf4b883da939d4185c8aa6f799e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 Aug 2017 21:17:14 +0300 Subject: Add packet CMSG_MAIL2_REQUEST_ITEMS 0x09f3. --- src/net/eathena/mail2handler.cpp | 13 +++++++++++++ src/net/eathena/mail2handler.h | 3 +++ src/net/eathena/packetsout.inc | 2 ++ src/net/mail2handler.h | 3 +++ src/net/tmwa/mail2handler.cpp | 5 +++++ src/net/tmwa/mail2handler.h | 3 +++ 6 files changed, 29 insertions(+) diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp index 623283617..97f4f0bb2 100644 --- a/src/net/eathena/mail2handler.cpp +++ b/src/net/eathena/mail2handler.cpp @@ -178,4 +178,17 @@ void Mail2Handler::requestMoney(const int openType, outMsg.writeInt8(openType, "open type"); } +void Mail2Handler::requestItems(const int openType, + const int64_t mailId) const +{ + if (packetVersion < 20140326 || + serverVersion < 19) + { + return; + } + createOutPacket(CMSG_MAIL2_REQUEST_ITEMS); + outMsg.writeInt64(mailId, "mail id"); + outMsg.writeInt8(openType, "open type"); +} + } // namespace EAthena diff --git a/src/net/eathena/mail2handler.h b/src/net/eathena/mail2handler.h index 6188f21eb..14ff5441d 100644 --- a/src/net/eathena/mail2handler.h +++ b/src/net/eathena/mail2handler.h @@ -59,6 +59,9 @@ class Mail2Handler final : public Net::Mail2Handler void requestMoney(const int openType, const int64_t mailId) const override final; + + void requestItems(const int openType, + const int64_t mailId) const override final; }; } // namespace EAthena diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index 456ae8ae4..580e8bb19 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -326,6 +326,7 @@ packet(CMSG_MAIL2_NEXT_PAGE, 0x0000, 0, nullptr); packet(CMSG_MAIL2_READ_MAIL, 0x0000, 0, nullptr); packet(CMSG_MAIL2_DELETE_MAIL, 0x0000, 0, nullptr); packet(CMSG_MAIL2_REQUEST_MONEY, 0x0000, 0, nullptr); +packet(CMSG_MAIL2_REQUEST_ITEMS, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1335,6 +1336,7 @@ if (packetVersion == 20140305) if (packetVersion == 20140326) { packet(CMSG_MAIL2_REQUEST_MONEY, 0x09f1, 11, clif->pRodexRequestZeny); + packet(CMSG_MAIL2_REQUEST_ITEMS, 0x09f3, 11, clif->pRodexRequestItems); } // 20140402 diff --git a/src/net/mail2handler.h b/src/net/mail2handler.h index 0b824c1d2..c42905857 100644 --- a/src/net/mail2handler.h +++ b/src/net/mail2handler.h @@ -65,6 +65,9 @@ class Mail2Handler notfinal virtual void requestMoney(const int openType, const int64_t mailId) const = 0; + + virtual void requestItems(const int openType, + const int64_t mailId) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/mail2handler.cpp b/src/net/tmwa/mail2handler.cpp index 5017e0716..bc01d874b 100644 --- a/src/net/tmwa/mail2handler.cpp +++ b/src/net/tmwa/mail2handler.cpp @@ -76,4 +76,9 @@ void Mail2Handler::requestMoney(const int openType A_UNUSED, { } +void Mail2Handler::requestItems(const int openType A_UNUSED, + const int64_t mailId A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/mail2handler.h b/src/net/tmwa/mail2handler.h index 5df6370df..d46f73291 100644 --- a/src/net/tmwa/mail2handler.h +++ b/src/net/tmwa/mail2handler.h @@ -59,6 +59,9 @@ class Mail2Handler final : public Net::Mail2Handler void requestMoney(const int openType, const int64_t mailId) const override final; + + void requestItems(const int openType, + const int64_t mailId) const override final; }; } // namespace TmwAthena -- cgit v1.2.3-60-g2f50