summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/mailhandler.cpp14
-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, 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