[7239] Support multiply items loot and not normal loot items in Player::AutoStoreLoot.

Use this function in more cases and simplify and fix some related code.
This commit is contained in:
VladimirMangos 2009-02-07 10:07:27 +03:00
parent 7d63f4ce02
commit 5e2553ff7e
7 changed files with 36 additions and 53 deletions

View file

@ -643,6 +643,12 @@ LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem **qite
return item;
}
uint32 Loot::GetMaxSlotInLootFor(Player* player) const
{
QuestItemMap::const_iterator itr = PlayerQuestItems.find(player->GetGUIDLow());
return items.size() + (itr != PlayerQuestItems.end() ? itr->second->size() : 0);
}
ByteBuffer& operator<<(ByteBuffer& b, LootItem const& li)
{
b << uint32(li.itemid);