diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-12 17:08:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-12 17:08:09 +0300 |
commit | f5e4b8888afa9b95469903148e4df1544b755bc8 (patch) | |
tree | 6ccb56595d92f5bdfa75a4d42a497cec4b59c61c /src | |
parent | edd3c87f697c6c0c33a2291cf70016ec56c84f54 (diff) | |
download | manaplus-f5e4b8888afa9b95469903148e4df1544b755bc8.tar.gz manaplus-f5e4b8888afa9b95469903148e4df1544b755bc8.tar.bz2 manaplus-f5e4b8888afa9b95469903148e4df1544b755bc8.tar.xz manaplus-f5e4b8888afa9b95469903148e4df1544b755bc8.zip |
eathena: add partial support for packet SMSG_MAIL_NEW_MAIL 0x024a.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/mailhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
4 files changed, 18 insertions, 1 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index c27c3c894..ae544dda2 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -44,6 +44,7 @@ MailHandler::MailHandler() : SMSG_MAIL_READ_MAIL, SMSG_MAIL_GET_ATTACHMENT, SMSG_MAIL_SEND_MAIL_ACK, + SMSG_MAIL_NEW_MAIL, 0 }; handledMessages = _messages; @@ -74,6 +75,10 @@ void MailHandler::handleMessage(Net::MessageIn &msg) processSendMailAck(msg); break; + case SMSG_MAIL_NEW_MAIL: + processNewMail(msg); + break; + default: break; } @@ -154,6 +159,15 @@ void MailHandler::processSendMailAck(Net::MessageIn &msg) msg.readUInt8("fail flag"); } +void MailHandler::processNewMail(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + + msg.readInt32("message id"); + msg.readString(40, "title"); + msg.readString(24, "sender name"); +} + void MailHandler::refresh() { createOutPacket(CMSG_MAIL_REFRESH_INBOX); diff --git a/src/net/eathena/mailhandler.h b/src/net/eathena/mailhandler.h index 079c7f590..fd7e9bf6e 100644 --- a/src/net/eathena/mailhandler.h +++ b/src/net/eathena/mailhandler.h @@ -66,6 +66,8 @@ class MailHandler final : public MessageHandler, public Net::MailHandler static void processGetAttachment(Net::MessageIn &msg); static void processSendMailAck(Net::MessageIn &msg); + + static void processNewMail(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 5bd49c386..da115b3bd 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -88,7 +88,7 @@ int16_t packet_lengths[] = -1, -1, 0, 8, 10, 0, 282, 0, 0, 15, 0, 0, 0, 19, 71, 5, 12, 0, 0, 0, 0, -1, 0, 0, 282, 0, 4, 0, 6, 0, 0, 0, // #0x0240 - -1, 0, -1, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, + -1, 0, -1, 0, 0, 3, 0, 0, 0, 3, 70, 0, 0, 0, 0, 0, 3, 0, -1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 4, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 35e72298d..6965e6710 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -309,6 +309,7 @@ #define SMSG_MAIL_READ_MAIL 0x0242 #define SMSG_MAIL_GET_ATTACHMENT 0x0245 #define SMSG_MAIL_SEND_MAIL_ACK 0x0249 +#define SMSG_MAIL_NEW_MAIL 0x024a #define SMSG_MAIL_OPEN_WINDOW 0x0260 #define SMSG_FAMILY_ASK_FOR_CHILD 0x01f6 |