From 16c4b0ef4fb76431563f09b147662b81788fa6c6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 Mar 2015 17:33:09 +0300 Subject: eathena: add partial support for packet SMSG_MAIL_DELETE_MAIL_ACK 0x0257. --- src/net/eathena/mailhandler.cpp | 13 +++++++++++++ src/net/eathena/mailhandler.h | 2 ++ src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 13991ad22..44234cb04 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -46,6 +46,7 @@ MailHandler::MailHandler() : SMSG_MAIL_SEND_MAIL_ACK, SMSG_MAIL_NEW_MAIL, SMSG_MAIL_SET_ATTACHMENT_ACK, + SMSG_MAIL_DELETE_MAIL_ACK, 0 }; handledMessages = _messages; @@ -84,6 +85,10 @@ void MailHandler::handleMessage(Net::MessageIn &msg) processSetAttachmentAck(msg); break; + case SMSG_MAIL_DELETE_MAIL_ACK: + processDeleteAck(msg); + break; + default: break; } @@ -181,6 +186,14 @@ void MailHandler::processSetAttachmentAck(Net::MessageIn &msg) msg.readUInt8("flag"); } +void MailHandler::processDeleteAck(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + + msg.readInt32("message id"); + msg.readInt16("fail flag"); +} + void MailHandler::refresh() { createOutPacket(CMSG_MAIL_REFRESH_INBOX); diff --git a/src/net/eathena/mailhandler.h b/src/net/eathena/mailhandler.h index ded92de08..0630b1988 100644 --- a/src/net/eathena/mailhandler.h +++ b/src/net/eathena/mailhandler.h @@ -70,6 +70,8 @@ class MailHandler final : public MessageHandler, public Net::MailHandler static void processNewMail(Net::MessageIn &msg); static void processSetAttachmentAck(Net::MessageIn &msg); + + static void processDeleteAck(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 31ff7deb4..480da3d71 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -89,7 +89,7 @@ int16_t packet_lengths[] = 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, 70, 0, 0, 0, 0, 0, - 3, 0, -1, 3, 0, 5, 5, 0, 0, 0, 0, 0, 0, 4, 0, 6, + 3, 0, -1, 3, 0, 5, 5, 8, 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, // #0x0280 diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 04dca188b..1b44fbbbc 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -312,6 +312,7 @@ #define SMSG_MAIL_SEND_MAIL_ACK 0x0249 #define SMSG_MAIL_NEW_MAIL 0x024a #define SMSG_MAIL_SET_ATTACHMENT_ACK 0x0255 +#define SMSG_MAIL_DELETE_MAIL_ACK 0x0257 #define SMSG_MAIL_OPEN_WINDOW 0x0260 #define SMSG_FAMILY_ASK_FOR_CHILD 0x01f6 -- cgit v1.2.3-60-g2f50