summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-11 22:22:08 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-11 22:22:08 +0300
commit499d2fd952251bc1cb2156cecd965d0c07c9a98f (patch)
tree5dda1e4cc50e06aa144d06c6b5fd56d968dfe483
parent1305ef0f6465f7053019a4b89176e6837f5ada7f (diff)
downloadmanaverse-499d2fd952251bc1cb2156cecd965d0c07c9a98f.tar.gz
manaverse-499d2fd952251bc1cb2156cecd965d0c07c9a98f.tar.bz2
manaverse-499d2fd952251bc1cb2156cecd965d0c07c9a98f.tar.xz
manaverse-499d2fd952251bc1cb2156cecd965d0c07c9a98f.zip
Add packet CMSG_MAIL2_CANCEL_WRITE_MAIL 0x0a03.
-rw-r--r--src/net/eathena/mail2handler.cpp10
-rw-r--r--src/net/eathena/mail2handler.h2
-rw-r--r--src/net/eathena/packetsout.inc2
-rw-r--r--src/net/mail2handler.h2
-rw-r--r--src/net/tmwa/mail2handler.cpp4
-rw-r--r--src/net/tmwa/mail2handler.h2
6 files changed, 22 insertions, 0 deletions
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