summaryrefslogtreecommitdiff
path: root/src/net/eathena/mailhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-10 16:33:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-10 16:33:47 +0300
commitd8e145940a4499b4218346f6bb7c50dfd44f54c0 (patch)
treefbe5c25af7ccd8a1b29d43952d0d0a89e7e3531b /src/net/eathena/mailhandler.cpp
parent24e4e3c241f39c088bd6f9eb471a2c0285c4eebf (diff)
downloadmanaverse-d8e145940a4499b4218346f6bb7c50dfd44f54c0.tar.gz
manaverse-d8e145940a4499b4218346f6bb7c50dfd44f54c0.tar.bz2
manaverse-d8e145940a4499b4218346f6bb7c50dfd44f54c0.tar.xz
manaverse-d8e145940a4499b4218346f6bb7c50dfd44f54c0.zip
eathena: add partial support for packet SMSG_MAIL_OPEN_WINDOW 0x0260.
Diffstat (limited to 'src/net/eathena/mailhandler.cpp')
-rw-r--r--src/net/eathena/mailhandler.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp
index 32080b529..3cbefb623 100644
--- a/src/net/eathena/mailhandler.cpp
+++ b/src/net/eathena/mailhandler.cpp
@@ -20,6 +20,8 @@
#include "net/eathena/mailhandler.h"
+#include "logger.h"
+
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
@@ -35,6 +37,7 @@ MailHandler::MailHandler() :
{
static const uint16_t _messages[] =
{
+ SMSG_MAIL_OPEN_WINDOW,
0
};
handledMessages = _messages;
@@ -43,6 +46,32 @@ MailHandler::MailHandler() :
void MailHandler::handleMessage(Net::MessageIn &msg)
{
+ switch(msg.getId())
+ {
+ case SMSG_MAIL_OPEN_WINDOW:
+ processMailOpen(msg);
+ break;
+
+ default:
+ break;
+ }
+}
+
+void MailHandler::processMailOpen(Net::MessageIn &msg) const
+{
+ const int flag = msg.readInt32("flag");
+ switch(flag)
+ {
+ case 0: // open window
+ break;
+
+ case 1: // close window
+ break;
+
+ default:
+ logger->log("unknown mail window open flag: %u", flag);
+ break;
+ }
}
} // namespace EAthena