From b69cc890606be77416d1e1031c0041754fa51c52 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 Aug 2017 03:28:34 +0300 Subject: Add packet SMSG_RODEX_READ_MAIL 0x09eb. --- src/net/eathena/mail2recv.cpp | 31 +++++++++++++++++++++++++++++++ src/net/eathena/mail2recv.h | 1 + src/net/eathena/packetsin.inc | 3 +++ 3 files changed, 35 insertions(+) (limited to 'src/net') diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp index 1cc66e0de..3f2049d18 100644 --- a/src/net/eathena/mail2recv.cpp +++ b/src/net/eathena/mail2recv.cpp @@ -115,4 +115,35 @@ void Mail2Recv::processMailListPage(Net::MessageIn &msg) } } +void Mail2Recv::processReadMail(Net::MessageIn &msg) +{ + UNIMPLEMENTEDPACKET; + msg.readInt16("len"); + msg.readUInt8("open type"); + msg.readInt64("mail id"); + const int textLen = msg.readInt16("text len"); + msg.readInt64("money"); + const int itemsCount = msg.readUInt8("item count"); + msg.readString(textLen, "text message"); + for (int f = 0; f < itemsCount; f ++) + { + msg.readInt16("amount"); + msg.readInt16("item id"); + msg.readUInt8("identify"); + msg.readUInt8("damaged"); + msg.readUInt8("refine"); + for (int d = 0; d < maxCards; d ++) + msg.readUInt16("card"); + msg.readInt32("unknown"); + msg.readUInt8("type"); + msg.readInt32("unknown"); + for (int d = 0; d < 5; d ++) + { + msg.readInt16("option index"); + msg.readInt16("option value"); + msg.readUInt8("option param"); + } + } +} + } // namespace EAthena diff --git a/src/net/eathena/mail2recv.h b/src/net/eathena/mail2recv.h index 73b141e6b..0202c6586 100644 --- a/src/net/eathena/mail2recv.h +++ b/src/net/eathena/mail2recv.h @@ -37,6 +37,7 @@ namespace EAthena void processCheckNameResult(Net::MessageIn &msg); void processSendResult(Net::MessageIn &msg); void processMailListPage(Net::MessageIn &msg); + void processReadMail(Net::MessageIn &msg); } // namespace MailRecv } // namespace EAthena diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 669d574a4..17226fdf5 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -794,6 +794,9 @@ if (packetVersion >= 20131223) // 20131230 packet(SMSG_RODEX_SEND_RESULT, 0x09ed, 3, &Mail2Recv::processSendResult, 20131230); +// 20140115 +packet(SMSG_RODEX_READ_MAIL, 0x09eb, -1, &Mail2Recv::processReadMail, 20140115); + // 20140416 packet(SMSG_RODEX_OPEN_NEW_MAIL_WINDOW, 0x0a12, 27, &Mail2Recv::processOpenNewMailWindow, 20140416); -- cgit v1.2.3-70-g09d2