diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 13 | ||||
-rw-r--r-- | src/resources/notifications.h | 8 | ||||
-rw-r--r-- | src/resources/notifytypes.h | 2 |
3 files changed, 19 insertions, 4 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 5e8ae486e..bebd4b10b 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -206,10 +206,15 @@ void MailHandler::processNewMail(Net::MessageIn &msg) void MailHandler::processSetAttachmentAck(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - - msg.readInt16("index"); - msg.readUInt8("flag"); + const int index = msg.readInt16("index"); + const int flag = msg.readUInt8("flag"); + if (flag) + { + if (index) + NotifyManager::notify(NotifyTypes::MAIL_ATTACH_ITEM_ERROR); + else + NotifyManager::notify(NotifyTypes::MAIL_ATTACH_MONEY_ERROR); + } } void MailHandler::processDeleteAck(Net::MessageIn &msg) diff --git a/src/resources/notifications.h b/src/resources/notifications.h index 0718f7ac5..7c864325b 100644 --- a/src/resources/notifications.h +++ b/src/resources/notifications.h @@ -575,6 +575,14 @@ namespace NotifyManager // TRANSLATORS: notification message N_("Message send failed."), NotifyFlags::EMPTY}, + {"mail attach item error", + // TRANSLATORS: notification message + N_("Item attach failed."), + NotifyFlags::EMPTY}, + {"mail attach money error", + // TRANSLATORS: notification message + N_("Money attach failed."), + NotifyFlags::EMPTY}, }; } // namespace NotifyManager #endif // RESOURCES_NOTIFICATIONS_H diff --git a/src/resources/notifytypes.h b/src/resources/notifytypes.h index 8076d327c..cdd6a22d0 100644 --- a/src/resources/notifytypes.h +++ b/src/resources/notifytypes.h @@ -162,6 +162,8 @@ namespace NotifyTypes USE_ITEM_WAIT, MAIL_SEND_OK, MAIL_SEND_ERROR, + MAIL_ATTACH_ITEM_ERROR, + MAIL_ATTACH_MONEY_ERROR, TYPE_END }; |