From 0389a3eda12eb7f9ca3dcb8ad6b6817c41532071 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 Aug 2017 20:05:12 +0300 Subject: Add packet CMSG_MAIL2_NEXT_PAGE 0x09ee. --- src/net/eathena/mail2handler.cpp | 13 +++++++++++++ src/net/eathena/mail2handler.h | 3 +++ src/net/eathena/packetsout.inc | 5 +++++ src/net/mail2handler.h | 3 +++ src/net/tmwa/mail2handler.cpp | 5 +++++ src/net/tmwa/mail2handler.h | 3 +++ 6 files changed, 32 insertions(+) (limited to 'src/net') diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp index ab4aace0e..fc63d5912 100644 --- a/src/net/eathena/mail2handler.cpp +++ b/src/net/eathena/mail2handler.cpp @@ -126,4 +126,17 @@ void Mail2Handler::sendMail(const std::string &to, outMsg.writeString(body, bodySz, "body"); } +void Mail2Handler::nextPage(const int openType, + const int64_t mailId) const +{ + if (packetVersion < 20131218 || + serverVersion < 19) + { + return; + } + createOutPacket(CMSG_MAIL2_NEXT_PAGE); + outMsg.writeInt8(openType, "open type"); + outMsg.writeInt64(mailId, "mail id"); +} + } // namespace EAthena diff --git a/src/net/eathena/mail2handler.h b/src/net/eathena/mail2handler.h index ff6530866..2a831a518 100644 --- a/src/net/eathena/mail2handler.h +++ b/src/net/eathena/mail2handler.h @@ -47,6 +47,9 @@ class Mail2Handler final : public Net::Mail2Handler const std::string &title, const std::string &body, const int64_t &money) const override final; + + void nextPage(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 4c996253c..8d382bab1 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -322,6 +322,7 @@ packet(CMSG_MAIL2_OPEN_WRITE_MAIL, 0x0000, 0, nullptr); packet(CMSG_MAIL2_ADD_ITEM_TO_MAIL, 0x0000, 0, nullptr); packet(CMSG_MAIL2_REMOVE_ITEM_MAIL, 0x0000, 0, nullptr); packet(CMSG_MAIL2_SEND_MAIL, 0x0000, 0, nullptr); +packet(CMSG_MAIL2_NEXT_PAGE, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1164,6 +1165,10 @@ if (packetVersion >= 20131218) packet(CMSG_STORAGE_PASSWORD, 0x085c, 36, clif->pStoragePassword); packet(CMSG_ITEM_LIST_WINDOW_SELECT, 0x0281, -1, clif->pItemListWindowSelected); } +if (packetVersion >= 20131218) +{ + packet(CMSG_MAIL2_NEXT_PAGE, 0x09ee, 11, clif->pRodexNextMaillist); +} // 20131223 if (packetVersion >= 20131223) diff --git a/src/net/mail2handler.h b/src/net/mail2handler.h index 8dd43e413..ad29ebf74 100644 --- a/src/net/mail2handler.h +++ b/src/net/mail2handler.h @@ -53,6 +53,9 @@ class Mail2Handler notfinal const std::string &title, const std::string &body, const int64_t &money) const = 0; + + virtual void nextPage(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 0913f4c5c..0440613e3 100644 --- a/src/net/tmwa/mail2handler.cpp +++ b/src/net/tmwa/mail2handler.cpp @@ -56,4 +56,9 @@ void Mail2Handler::sendMail(const std::string &to A_UNUSED, { } +void Mail2Handler::nextPage(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 3c28371bf..37e220372 100644 --- a/src/net/tmwa/mail2handler.h +++ b/src/net/tmwa/mail2handler.h @@ -47,6 +47,9 @@ class Mail2Handler final : public Net::Mail2Handler const std::string &title, const std::string &body, const int64_t &money) const override final; + + void nextPage(const int openType, + const int64_t mailId) const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2