[8779] Not output error at empty item loot for mail template at mail creating.

This commit is contained in:
VladimirMangos 2009-11-06 02:34:49 +03:00
parent a6d245058d
commit d594a29af1
6 changed files with 20 additions and 18 deletions

View file

@ -837,7 +837,8 @@ void MailDraft::prepareItems(Player* receiver)
Loot mailLoot;
mailLoot.FillLoot(m_mailTemplateId, LootTemplates_Mail, receiver,true);
// can be empty
mailLoot.FillLoot(m_mailTemplateId, LootTemplates_Mail, receiver, true, true);
uint32 max_slot = mailLoot.GetMaxSlotInLootFor(receiver);
for(uint32 i = 0; m_items.size() < MAX_MAIL_ITEMS && i < max_slot; ++i)