diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/mail2recv.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp index 7e3ed631e..5c1db8de6 100644 --- a/src/net/eathena/mail2recv.cpp +++ b/src/net/eathena/mail2recv.cpp @@ -337,6 +337,7 @@ void Mail2Recv::processMailListPage(Net::MessageIn &msg) } msg.readInt16("len"); bool isEnd = true; + if (packetVersion < 20170419) { mailWindow->setOpenType(fromInt(msg.readUInt8("open type"), @@ -356,7 +357,8 @@ void Mail2Recv::processMailListPage(Net::MessageIn &msg) mail->time = CAST_S32(cur_time - msg.readInt32("reg time")); mail->strTime = timeToStr(mail->time); } - mail->expireTime = msg.readInt32("expire time"); + mail->expireTime = msg.readInt32("expire time") + cur_time; + mail->expired = mail->expireTime <= 0; mail->title = msg.readString(-1, "title"); mailWindow->addMail(mail); } @@ -375,7 +377,8 @@ void Mail2Recv::processMailListPage(Net::MessageIn &msg) msg.readUInt8("type")); mail->sender = msg.readString(24, "sender name"); mail->strTime = "-"; - mail->expireTime = msg.readInt32("expire time"); + mail->expireTime = msg.readInt32("expire time") + cur_time; + mail->expired = mail->expireTime <= 0; mail->title = msg.readString(-1, "title"); mailWindow->addMail(mail); } |