diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-12 16:51:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-12 16:51:00 +0300 |
commit | ca54c8874b631b392366f98731704db6177b14a6 (patch) | |
tree | 2e1ca02a81f695fd98e0bd5f64dc7c3c55ec0aa2 /src | |
parent | 3b77e87f120b096510f5c6af721563683057b101 (diff) | |
download | manaplus-ca54c8874b631b392366f98731704db6177b14a6.tar.gz manaplus-ca54c8874b631b392366f98731704db6177b14a6.tar.bz2 manaplus-ca54c8874b631b392366f98731704db6177b14a6.tar.xz manaplus-ca54c8874b631b392366f98731704db6177b14a6.zip |
eathena: add partial support for packet SMSG_MAIL_GET_ATTACHMENT 0x0245.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 12 | ||||
-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, 16 insertions, 1 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index e1da3ca6b..d0d361170 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -42,6 +42,7 @@ MailHandler::MailHandler() : SMSG_MAIL_OPEN_WINDOW, SMSG_MAIL_MAILS_LIST, SMSG_MAIL_READ_MAIL, + SMSG_MAIL_GET_ATTACHMENT, 0 }; handledMessages = _messages; @@ -64,6 +65,10 @@ void MailHandler::handleMessage(Net::MessageIn &msg) processReadMail(msg); break; + case SMSG_MAIL_GET_ATTACHMENT: + processGetAttachment(msg); + break; + default: break; } @@ -130,6 +135,13 @@ void MailHandler::processReadMail(Net::MessageIn &msg) msg.readString(sz, "message"); } +void MailHandler::processGetAttachment(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + + msg.readUInt8("flag"); +} + void MailHandler::refresh() { createOutPacket(CMSG_MAIL_REFRESH_INBOX); diff --git a/src/net/eathena/mailhandler.h b/src/net/eathena/mailhandler.h index 162eeee41..e098a0540 100644 --- a/src/net/eathena/mailhandler.h +++ b/src/net/eathena/mailhandler.h @@ -62,6 +62,8 @@ class MailHandler final : public MessageHandler, public Net::MailHandler static void processMailList(Net::MessageIn &msg); static void processReadMail(Net::MessageIn &msg); + + static void processGetAttachment(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 897e8fdca..70d7db83a 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 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 ef20ce002..575e52246 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -307,6 +307,7 @@ #define SMSG_MAIL_MAILS_LIST 0x0240 #define SMSG_MAIL_READ_MAIL 0x0242 +#define SMSG_MAIL_GET_ATTACHMENT 0x0245 #define SMSG_MAIL_OPEN_WINDOW 0x0260 #define SMSG_FAMILY_ASK_FOR_CHILD 0x01f6 |