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

Use this function in more cases and simplify and fix some related code.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-08 21:54:13 -06:00
parent 11b9bd42f7
commit 2bd90deeed
7 changed files with 37 additions and 53 deletions

View File

@@ -646,6 +646,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);