diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-23 20:34:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-23 20:55:58 +0300 |
commit | 79864826790a33a3583819fe02893eed010381d9 (patch) | |
tree | 33b90cf3613900c9de45715e5fea69a721d26f10 /src/net/eathena/mail2handler.cpp | |
parent | 4da8a6304b5b7bb4d2b655ed3471c0ff4a7d610a (diff) | |
download | manaplus-79864826790a33a3583819fe02893eed010381d9.tar.gz manaplus-79864826790a33a3583819fe02893eed010381d9.tar.bz2 manaplus-79864826790a33a3583819fe02893eed010381d9.tar.xz manaplus-79864826790a33a3583819fe02893eed010381d9.zip |
Add mailqueuetype enum for mail queue types.
Diffstat (limited to 'src/net/eathena/mail2handler.cpp')
-rw-r--r-- | src/net/eathena/mail2handler.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp index f3ed3201d..1b19e4823 100644 --- a/src/net/eathena/mail2handler.cpp +++ b/src/net/eathena/mail2handler.cpp @@ -140,21 +140,20 @@ void Mail2Handler::sendMail(const std::string &to, outMsg.writeString(body, bodySz, "body"); } -bool Mail2Handler::queueSendMail(const std::string &to, - const std::string &title, - const std::string &body, - const int64_t &money) const +void Mail2Handler::queueCheckName(const MailQueueTypeT type, + const std::string &to, + const std::string &title, + const std::string &body, + const int64_t &money) const { - if (!Mail2Recv::mMailQueue.empty()) - return false; MailQueue *const mail = new MailQueue; mail->to = to; mail->title = title; mail->body = body; mail->money = money; - mail->sendMail = true; + mail->type = type; Mail2Recv::mMailQueue.push(mail); - return true; + requestCheckName(to); } void Mail2Handler::nextPage(const MailOpenTypeT openType, |