From cff8879242e1f692dee58ac764c5a54da1a996cd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 27 Apr 2015 20:07:35 +0300 Subject: eathena: impliment packet SMSG_MAIL_SEND_MAIL_ACK. --- src/net/eathena/mailhandler.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/net/eathena/mailhandler.cpp') diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 7d7e128ce..840f53e27 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -21,6 +21,7 @@ #include "net/eathena/mailhandler.h" #include "logger.h" +#include "notifymanager.h" #include "gui/mailmessage.h" @@ -31,6 +32,8 @@ #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" +#include "resources/notifytypes.h" + #include "debug.h" extern Net::MailHandler *mailHandler; @@ -174,9 +177,18 @@ void MailHandler::processGetAttachment(Net::MessageIn &msg) void MailHandler::processSendMailAck(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - - msg.readUInt8("fail flag"); + switch (msg.readUInt8("fail flag")) + { + case 0: + NotifyManager::notify(NotifyTypes::MAIL_SEND_OK); + break; + case 1: + NotifyManager::notify(NotifyTypes::MAIL_SEND_ERROR); + break; + default: + UNIMPLIMENTEDPACKET; + break; + } } void MailHandler::processNewMail(Net::MessageIn &msg) -- cgit v1.2.3-70-g09d2