diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-30 01:05:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-30 01:05:52 +0300 |
commit | 780731dbb1d104f3f91eede326fa7dce75b0d6f3 (patch) | |
tree | 22b57294249f3b28f2b49fe2bc886d8da8a305b6 /src | |
parent | 9dc8560a0b659a1c54e3e64ed9cf158c22631d7c (diff) | |
download | manaplus-780731dbb1d104f3f91eede326fa7dce75b0d6f3.tar.gz manaplus-780731dbb1d104f3f91eede326fa7dce75b0d6f3.tar.bz2 manaplus-780731dbb1d104f3f91eede326fa7dce75b0d6f3.tar.xz manaplus-780731dbb1d104f3f91eede326fa7dce75b0d6f3.zip |
eathena: impliment packet SMSG_MAIL_GET_ATTACHMENT.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 18 | ||||
-rw-r--r-- | src/resources/notifications.h | 12 | ||||
-rw-r--r-- | src/resources/notifytypes.h | 3 |
3 files changed, 30 insertions, 3 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index effaf9cf2..040828e9b 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -174,9 +174,21 @@ void MailHandler::processReadMail(Net::MessageIn &msg) void MailHandler::processGetAttachment(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - - msg.readUInt8("flag"); + switch(msg.readUInt8("flag")) + { + case 0: + NotifyManager::notify(NotifyTypes::MAIL_GET_ATTACH_OK); + break; + case 1: + NotifyManager::notify(NotifyTypes::MAIL_GET_ATTACH_ERROR); + break; + case 2: + NotifyManager::notify(NotifyTypes::MAIL_GET_ATTACH_TOO_MANY_ITEMS); + break; + default: + UNIMPLIMENTEDPACKET; + break; + } } void MailHandler::processSendMailAck(Net::MessageIn &msg) diff --git a/src/resources/notifications.h b/src/resources/notifications.h index fe193d026..81199fcc7 100644 --- a/src/resources/notifications.h +++ b/src/resources/notifications.h @@ -599,6 +599,18 @@ namespace NotifyManager // TRANSLATORS: notification message N_("Message successfully deleted."), NotifyFlags::EMPTY}, + {"mail get attach ok", + // TRANSLATORS: notification message + N_("You got attach successfully."), + NotifyFlags::EMPTY}, + {"mail get attach error", + // TRANSLATORS: notification message + N_("Error on getting attach successfully."), + NotifyFlags::EMPTY}, + {"mail get attach too many items", + // TRANSLATORS: notification message + N_("Can't get attach. Too many items."), + NotifyFlags::EMPTY}, }; } // namespace NotifyManager #endif // RESOURCES_NOTIFICATIONS_H diff --git a/src/resources/notifytypes.h b/src/resources/notifytypes.h index d80689a76..14eedf9eb 100644 --- a/src/resources/notifytypes.h +++ b/src/resources/notifytypes.h @@ -168,6 +168,9 @@ namespace NotifyTypes MAIL_RETURN_OK, MAIL_DELETE_ERROR, MAIL_DELETE_OK, + MAIL_GET_ATTACH_OK, + MAIL_GET_ATTACH_ERROR, + MAIL_GET_ATTACH_TOO_MANY_ITEMS, TYPE_END }; |