fix(Core/Mails): mails containing items not being returned if they were read and ensure mails sent by GMs are not returned (#8095)

This commit is contained in:
Skjalf
2021-10-04 10:45:33 -03:00
committed by GitHub
parent e094c1ae78
commit 9330df59da
3 changed files with 13 additions and 9 deletions

View File

@@ -207,6 +207,10 @@ struct Mail
}
[[nodiscard]] bool HasItems() const { return !items.empty(); }
[[nodiscard]] bool IsSentByPlayer() const { return messageType == MAIL_NORMAL; }
[[nodiscard]] bool IsSentByGM() const { return stationery == MAIL_STATIONERY_GM; }
[[nodiscard]] bool IsCODPayment() const { return checked & MAIL_CHECK_MASK_COD_PAYMENT; }
[[nodiscard]] bool IsReturnedMail() const { return checked & MAIL_CHECK_MASK_RETURNED; }
};
#endif