From 9e9984354609a246ba00a638ff9cd96e318afa9d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Apr 2015 21:44:43 +0300 Subject: eathena: impliment packet SMSG_MAIL_DELETE_MAIL_ACK. --- src/net/eathena/mailhandler.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/net') 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) -- cgit v1.2.3-60-g2f50