From 11e63a9fe8496302dc789c74b2b6ba39a14b568a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Apr 2015 13:00:48 +0300 Subject: Impliment packet SMSG_MAIL_NEW_MAIL. --- src/net/eathena/mailhandler.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/net/eathena/mailhandler.cpp') diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 040828e9b..68a3a2e67 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -34,6 +34,7 @@ #include "resources/notifytypes.h" +#include "utils/gettext.h" #include "utils/stringutils.h" #include "debug.h" @@ -209,11 +210,12 @@ void MailHandler::processSendMailAck(Net::MessageIn &msg) void MailHandler::processNewMail(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - msg.readInt32("message id"); - msg.readString(40, "title"); - msg.readString(24, "sender name"); + const std::string subj = msg.readString(40, "title"); + const std::string sender = msg.readString(24, "sender name"); + NotifyManager::notify(NotifyTypes::NEW_MAIL, + strprintf(_("You have new mail from %s with subject %s"), + sender.c_str(), subj.c_str())); } void MailHandler::processSetAttachmentAck(Net::MessageIn &msg) -- cgit v1.2.3-60-g2f50