Core/Mail: Prevent mail with recovered items from being returnable

This commit is contained in:
luis
2026-09-22 20:50:00 -03:00
parent b3076a01e0
commit d3c0feebd9
+2 -2
View File
@@ -19927,7 +19927,7 @@ void Player::_LoadInventory(PreparedQueryResult result, PreparedQueryResult arti
draft.AddItem(problematicItems.front()); draft.AddItem(problematicItems.front());
problematicItems.pop_front(); problematicItems.pop_front();
} }
draft.SendMailTo(trans, this, MailSender(this, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_COPIED); draft.SendMailTo(trans, this, MailSender(this, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_COPIED | MAIL_CHECK_MASK_NOT_RETURNABLE);
} }
CharacterDatabase.CommitTransaction(trans); CharacterDatabase.CommitTransaction(trans);
@@ -27571,7 +27571,7 @@ void Player::AutoUnequipOffhandIfNeed(bool force /*= false*/)
offItem->SaveToDB(trans); // recursive and not have transaction guard into self, item not in inventory and can be save standalone offItem->SaveToDB(trans); // recursive and not have transaction guard into self, item not in inventory and can be save standalone
std::string subject = GetSession()->GetTrinityString(LANG_NOT_EQUIPPED_ITEM); std::string subject = GetSession()->GetTrinityString(LANG_NOT_EQUIPPED_ITEM);
MailDraft(subject, "There were problems with equipping one or several items").AddItem(offItem).SendMailTo(trans, this, MailSender(this, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_COPIED); MailDraft(subject, "There were problems with equipping one or several items").AddItem(offItem).SendMailTo(trans, this, MailSender(this, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_COPIED | MAIL_CHECK_MASK_NOT_RETURNABLE);
CharacterDatabase.CommitTransaction(trans); CharacterDatabase.CommitTransaction(trans);
} }