summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/mail2handler.cpp13
-rw-r--r--src/net/eathena/mail2handler.h3
-rw-r--r--src/net/eathena/packetsout.inc6
-rw-r--r--src/net/mail2handler.h3
-rw-r--r--src/net/tmwa/mail2handler.cpp5
-rw-r--r--src/net/tmwa/mail2handler.h3
6 files changed, 33 insertions, 0 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp
index fc63d5912..09e8df11c 100644
--- a/src/net/eathena/mail2handler.cpp
+++ b/src/net/eathena/mail2handler.cpp
@@ -139,4 +139,17 @@ void Mail2Handler::nextPage(const int openType,
outMsg.writeInt64(mailId, "mail id");
}
+void Mail2Handler::readMail(const int openType,
+ const int64_t mailId) const
+{
+ if (packetVersion < 20131223 ||
+ serverVersion < 19)
+ {
+ return;
+ }
+ createOutPacket(CMSG_MAIL2_READ_MAIL);
+ 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 2a831a518..c8222f658 100644
--- a/src/net/eathena/mail2handler.h
+++ b/src/net/eathena/mail2handler.h
@@ -50,6 +50,9 @@ class Mail2Handler final : public Net::Mail2Handler
void nextPage(const int openType,
const int64_t mailId) const override final;
+
+ void readMail(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 8d382bab1..4effc3eea 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -323,6 +323,7 @@ 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);
+packet(CMSG_MAIL2_READ_MAIL, 0x0000, 0, nullptr);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1181,6 +1182,11 @@ if (packetVersion >= 20131223)
packet(CMSG_STORAGE_PASSWORD, 0x08a4, 36, clif->pStoragePassword);
}
+if (packetVersion >= 20131223)
+{
+ packet(CMSG_MAIL2_READ_MAIL, 0x09ea, 11, clif->pRodexReadMail);
+}
+
// 20131230
if (packetVersion >= 20131230)
{
diff --git a/src/net/mail2handler.h b/src/net/mail2handler.h
index ad29ebf74..519ca2dc1 100644
--- a/src/net/mail2handler.h
+++ b/src/net/mail2handler.h
@@ -56,6 +56,9 @@ class Mail2Handler notfinal
virtual void nextPage(const int openType,
const int64_t mailId) const = 0;
+
+ virtual void readMail(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 0440613e3..3963c1fa5 100644
--- a/src/net/tmwa/mail2handler.cpp
+++ b/src/net/tmwa/mail2handler.cpp
@@ -61,4 +61,9 @@ void Mail2Handler::nextPage(const int openType A_UNUSED,
{
}
+void Mail2Handler::readMail(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 37e220372..1509ba969 100644
--- a/src/net/tmwa/mail2handler.h
+++ b/src/net/tmwa/mail2handler.h
@@ -50,6 +50,9 @@ class Mail2Handler final : public Net::Mail2Handler
void nextPage(const int openType,
const int64_t mailId) const override final;
+
+ void readMail(const int openType,
+ const int64_t mailId) const override final;
};
} // namespace TmwAthena