summaryrefslogtreecommitdiff
path: root/src/net/eathena/mailhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-29 21:44:43 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-29 21:44:43 +0300
commit9e9984354609a246ba00a638ff9cd96e318afa9d (patch)
treeb2b4a7d65383b62cbdb705310bee9d24ff84e5c8 /src/net/eathena/mailhandler.cpp
parent600c370ed33ec9828ef609d68a8e46d564f0f1af (diff)
downloadplus-9e9984354609a246ba00a638ff9cd96e318afa9d.tar.gz
plus-9e9984354609a246ba00a638ff9cd96e318afa9d.tar.bz2
plus-9e9984354609a246ba00a638ff9cd96e318afa9d.tar.xz
plus-9e9984354609a246ba00a638ff9cd96e318afa9d.zip
eathena: impliment packet SMSG_MAIL_DELETE_MAIL_ACK.
Diffstat (limited to 'src/net/eathena/mailhandler.cpp')
-rw-r--r--src/net/eathena/mailhandler.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp
index e40d34e17..effaf9cf2 100644
--- a/src/net/eathena/mailhandler.cpp
+++ b/src/net/eathena/mailhandler.cpp
@@ -219,10 +219,17 @@ void MailHandler::processSetAttachmentAck(Net::MessageIn &msg)
void MailHandler::processDeleteAck(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
-
- msg.readInt32("message id");
- msg.readInt16("fail flag");
+ const int mail = msg.readInt32("message id");
+ const int flag = msg.readInt16("fail flag");
+ if (flag)
+ {
+ NotifyManager::notify(NotifyTypes::MAIL_DELETE_ERROR);
+ }
+ else
+ {
+ NotifyManager::notify(NotifyTypes::MAIL_DELETE_OK);
+ mailWindow->removeMail(mail);
+ }
}
void MailHandler::processMailReturn(Net::MessageIn &msg)