From ca54c8874b631b392366f98731704db6177b14a6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 Mar 2015 16:51:00 +0300 Subject: eathena: add partial support for packet SMSG_MAIL_GET_ATTACHMENT 0x0245. --- src/net/eathena/mailhandler.cpp | 12 ++++++++++++ src/net/eathena/mailhandler.h | 2 ++ src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2