summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-26 01:15:03 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-26 01:15:03 +0300
commit5b8c92a15a877bc05812c091ca1841cacf989f30 (patch)
treecc47b28fa2996ed4ef88cd163a928d11cbee9228 /src/net
parent9c2efbbe0e12e7cc24d74a5fbd91cb084fbad3b9 (diff)
downloadmanaverse-5b8c92a15a877bc05812c091ca1841cacf989f30.tar.gz
manaverse-5b8c92a15a877bc05812c091ca1841cacf989f30.tar.bz2
manaverse-5b8c92a15a877bc05812c091ca1841cacf989f30.tar.xz
manaverse-5b8c92a15a877bc05812c091ca1841cacf989f30.zip
Add support for mail deletion.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/mail2recv.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp
index e3dc5b9da..32d4f76c6 100644
--- a/src/net/eathena/mail2recv.cpp
+++ b/src/net/eathena/mail2recv.cpp
@@ -444,9 +444,14 @@ void Mail2Recv::processReadMail(Net::MessageIn &msg)
void Mail2Recv::processMailDelete(Net::MessageIn &msg)
{
- UNIMPLEMENTEDPACKET;
msg.readUInt8("open type");
- msg.readInt64("mail id");
+ const int64_t mailId = msg.readInt64("mail id");
+ if (mailWindow == nullptr)
+ {
+ reportAlways("Mail window not created.");
+ return;
+ }
+ mailWindow->removeMail(mailId);
}
void Mail2Recv::processRequestMoney(Net::MessageIn &msg)