summaryrefslogtreecommitdiff
path: root/src/net/eathena/mail2handler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-10-15 18:37:06 +0300
committerAndrei Karas <akaras@inbox.ru>2017-10-18 16:21:43 +0300
commit8107a607f05176000630e73424cb14beae55a6f8 (patch)
tree44b384c8d7a08731dcd04a5bbbefa90f98f97801 /src/net/eathena/mail2handler.cpp
parenta499c34b05b70a72572d8e43572def558403338e (diff)
downloadplus-8107a607f05176000630e73424cb14beae55a6f8.tar.gz
plus-8107a607f05176000630e73424cb14beae55a6f8.tar.bz2
plus-8107a607f05176000630e73424cb14beae55a6f8.tar.xz
plus-8107a607f05176000630e73424cb14beae55a6f8.zip
Add packets CMSG_MAIL2_OPEN_MAILBOX 0x0ac0, CMSG_MAIL2_REFRESH_MAIL_LIST 0x0ac1.
Diffstat (limited to 'src/net/eathena/mail2handler.cpp')
-rw-r--r--src/net/eathena/mail2handler.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp
index 2b4de04ab..13a7676d9 100644
--- a/src/net/eathena/mail2handler.cpp
+++ b/src/net/eathena/mail2handler.cpp
@@ -230,8 +230,19 @@ void Mail2Handler::refreshMailList(const MailOpenTypeT openType,
return;
}
createOutPacket(CMSG_MAIL2_REFRESH_MAIL_LIST);
- outMsg.writeInt8(toInt(openType, int8_t), "open type");
- outMsg.writeInt64(mailId, "mail id");
+ if (packetVersion >= 20170419)
+ {
+ outMsg.writeInt64(mailId, "mail id");
+ outMsg.writeInt32(0, "unknown 1");
+ outMsg.writeInt32(0, "unknown 2");
+ outMsg.writeInt32(0, "unknown 3");
+ outMsg.writeInt32(0, "unknown 4");
+ }
+ else
+ {
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
+ outMsg.writeInt64(mailId, "mail id");
+ }
}
void Mail2Handler::openMailBox(const MailOpenTypeT openType) const
@@ -242,8 +253,19 @@ void Mail2Handler::openMailBox(const MailOpenTypeT openType) const
return;
}
createOutPacket(CMSG_MAIL2_OPEN_MAILBOX);
- outMsg.writeInt8(toInt(openType, int8_t), "open type");
- outMsg.writeInt64(0, "mail id");
+ if (packetVersion >= 20170419)
+ {
+ outMsg.writeInt64(0, "mail id");
+ outMsg.writeInt32(0, "unknown 1");
+ outMsg.writeInt32(0, "unknown 2");
+ outMsg.writeInt32(0, "unknown 3");
+ outMsg.writeInt32(0, "unknown 4");
+ }
+ else
+ {
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
+ outMsg.writeInt64(0, "mail id");
+ }
}
void Mail2Handler::closeMailBox() const