summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/mailhandler.cpp18
-rw-r--r--src/resources/notifications.h12
-rw-r--r--src/resources/notifytypes.h3
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
};