summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-12 17:20:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-12 17:20:10 +0300
commit0fec797c95aca9d1c575daf4e9a3359fec10896d (patch)
tree9ff619e55b2bc0a5f1e00c6866fd56a808012c23 /src/net
parentbc0ccd9664c637d6d3fe62b3cd45b72e3a503ab3 (diff)
downloadplus-0fec797c95aca9d1c575daf4e9a3359fec10896d.tar.gz
plus-0fec797c95aca9d1c575daf4e9a3359fec10896d.tar.bz2
plus-0fec797c95aca9d1c575daf4e9a3359fec10896d.tar.xz
plus-0fec797c95aca9d1c575daf4e9a3359fec10896d.zip
eathena: add partial support for packet SMSG_MAIL_SET_ATTACHMENT_ACK 0x0255.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/mailhandler.cpp13
-rw-r--r--src/net/eathena/mailhandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
4 files changed, 17 insertions, 1 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp
index ae544dda2..13991ad22 100644
--- a/src/net/eathena/mailhandler.cpp
+++ b/src/net/eathena/mailhandler.cpp
@@ -45,6 +45,7 @@ MailHandler::MailHandler() :
SMSG_MAIL_GET_ATTACHMENT,
SMSG_MAIL_SEND_MAIL_ACK,
SMSG_MAIL_NEW_MAIL,
+ SMSG_MAIL_SET_ATTACHMENT_ACK,
0
};
handledMessages = _messages;
@@ -79,6 +80,10 @@ void MailHandler::handleMessage(Net::MessageIn &msg)
processNewMail(msg);
break;
+ case SMSG_MAIL_SET_ATTACHMENT_ACK:
+ processSetAttachmentAck(msg);
+ break;
+
default:
break;
}
@@ -168,6 +173,14 @@ void MailHandler::processNewMail(Net::MessageIn &msg)
msg.readString(24, "sender name");
}
+void MailHandler::processSetAttachmentAck(Net::MessageIn &msg)
+{
+ UNIMPLIMENTEDPACKET;
+
+ msg.readInt16("index");
+ 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 fd7e9bf6e..ded92de08 100644
--- a/src/net/eathena/mailhandler.h
+++ b/src/net/eathena/mailhandler.h
@@ -68,6 +68,8 @@ class MailHandler final : public MessageHandler, public Net::MailHandler
static void processSendMailAck(Net::MessageIn &msg);
static void processNewMail(Net::MessageIn &msg);
+
+ static void processSetAttachmentAck(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index c2751005f..31ff7deb4 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, 0, 5, 0, 0, 0, 0, 0, 0, 4, 0, 6,
+ 3, 0, -1, 3, 0, 5, 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,
// #0x0280
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 9930bb50f..04dca188b 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -311,6 +311,7 @@
#define SMSG_MAIL_GET_ATTACHMENT 0x0245
#define SMSG_MAIL_SEND_MAIL_ACK 0x0249
#define SMSG_MAIL_NEW_MAIL 0x024a
+#define SMSG_MAIL_SET_ATTACHMENT_ACK 0x0255
#define SMSG_MAIL_OPEN_WINDOW 0x0260
#define SMSG_FAMILY_ASK_FOR_CHILD 0x01f6