Core/Mail: Ignore currencies from loot for mails

(cherry picked from commit 2d22978346)
This commit is contained in:
Shauren
2024-08-27 15:57:10 +02:00
committed by Ovahlord
parent ab0d7ac8f3
commit a348eb7b01

View File

@@ -120,8 +120,11 @@ void MailDraft::prepareItems(Player* receiver, CharacterDatabaseTransaction tran
for (uint32 i = 0; m_items.size() < MAX_MAIL_ITEMS && i < mailLoot.items.size(); ++i)
{
if (LootItem* lootitem = mailLoot.LootItemInSlot(i, receiver))
if (LootItem const* lootitem = mailLoot.LootItemInSlot(i, receiver))
{
if (lootitem->type != LootItemType::Item)
continue;
if (Item* item = Item::CreateItem(lootitem->itemid, lootitem->count, lootitem->context, receiver))
{
item->SaveToDB(trans); // save for prevent lost at next mail load, if send fail then item will deleted