summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-11 20:31:27 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-11 20:31:27 +0300
commit66d940df678f16b5f53f58f80837826e24031eb1 (patch)
tree5201aa351f4760ff1e5d171c0ea4fa2b4d84a7c1 /src
parentabb284e237e02cd78a975a703e349b799f7f446d (diff)
downloadplus-66d940df678f16b5f53f58f80837826e24031eb1.tar.gz
plus-66d940df678f16b5f53f58f80837826e24031eb1.tar.bz2
plus-66d940df678f16b5f53f58f80837826e24031eb1.tar.xz
plus-66d940df678f16b5f53f58f80837826e24031eb1.zip
Add packet CMSG_MAIL2_DELETE_MAIL 0x09f5.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/mail2handler.cpp13
-rw-r--r--src/net/eathena/mail2handler.h3
-rw-r--r--src/net/eathena/packetsout.inc2
-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, 29 insertions, 0 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp
index 09e8df11c..3ee9f193c 100644
--- a/src/net/eathena/mail2handler.cpp
+++ b/src/net/eathena/mail2handler.cpp
@@ -152,4 +152,17 @@ void Mail2Handler::readMail(const int openType,
outMsg.writeInt64(mailId, "mail id");
}
+void Mail2Handler::deleteMail(const int openType,
+ const int64_t mailId) const
+{
+ if (packetVersion < 20131218 ||
+ serverVersion < 19)
+ {
+ return;
+ }
+ createOutPacket(CMSG_MAIL2_DELETE_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 c8222f658..eec69f3a1 100644
--- a/src/net/eathena/mail2handler.h
+++ b/src/net/eathena/mail2handler.h
@@ -53,6 +53,9 @@ class Mail2Handler final : public Net::Mail2Handler
void readMail(const int openType,
const int64_t mailId) const override final;
+
+ void deleteMail(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 4effc3eea..12f9a03ce 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -324,6 +324,7 @@ 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);
+packet(CMSG_MAIL2_DELETE_MAIL, 0x0000, 0, nullptr);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1169,6 +1170,7 @@ if (packetVersion >= 20131218)
if (packetVersion >= 20131218)
{
packet(CMSG_MAIL2_NEXT_PAGE, 0x09ee, 11, clif->pRodexNextMaillist);
+ packet(CMSG_MAIL2_DELETE_MAIL, 0x09f5, 11, clif->pRodexDeleteMail);
}
// 20131223
diff --git a/src/net/mail2handler.h b/src/net/mail2handler.h
index 519ca2dc1..b16d751db 100644
--- a/src/net/mail2handler.h
+++ b/src/net/mail2handler.h
@@ -59,6 +59,9 @@ class Mail2Handler notfinal
virtual void readMail(const int openType,
const int64_t mailId) const = 0;
+
+ virtual void deleteMail(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 3963c1fa5..ce80e1893 100644
--- a/src/net/tmwa/mail2handler.cpp
+++ b/src/net/tmwa/mail2handler.cpp
@@ -66,4 +66,9 @@ void Mail2Handler::readMail(const int openType A_UNUSED,
{
}
+void Mail2Handler::deleteMail(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 1509ba969..cae94d788 100644
--- a/src/net/tmwa/mail2handler.h
+++ b/src/net/tmwa/mail2handler.h
@@ -53,6 +53,9 @@ class Mail2Handler final : public Net::Mail2Handler
void readMail(const int openType,
const int64_t mailId) const override final;
+
+ void deleteMail(const int openType,
+ const int64_t mailId) const override final;
};
} // namespace TmwAthena