summaryrefslogtreecommitdiff
path: root/src/net/eathena/mailhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-29 21:36:44 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-29 21:36:44 +0300
commit600c370ed33ec9828ef609d68a8e46d564f0f1af (patch)
tree21b6ee1a0250dfa123858a53bfe991cba33af01a /src/net/eathena/mailhandler.cpp
parent8e0bbcbabb8752d8c28618e98a1ea46309252f3a (diff)
downloadplus-600c370ed33ec9828ef609d68a8e46d564f0f1af.tar.gz
plus-600c370ed33ec9828ef609d68a8e46d564f0f1af.tar.bz2
plus-600c370ed33ec9828ef609d68a8e46d564f0f1af.tar.xz
plus-600c370ed33ec9828ef609d68a8e46d564f0f1af.zip
eathena: impliment packet SMSG_MAIL_RETURN.
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 bebd4b10b..e40d34e17 100644
--- a/src/net/eathena/mailhandler.cpp
+++ b/src/net/eathena/mailhandler.cpp
@@ -227,10 +227,17 @@ void MailHandler::processDeleteAck(Net::MessageIn &msg)
void MailHandler::processMailReturn(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_RETURN_ERROR);
+ }
+ else
+ {
+ NotifyManager::notify(NotifyTypes::MAIL_RETURN_OK);
+ mailWindow->removeMail(mail);
+ }
}
void MailHandler::refresh()