From e656df75288964072258eb3b06149816189c3b84 Mon Sep 17 00:00:00 2001 From: Cyberium Date: Sun, 15 Nov 2015 01:56:50 +0100 Subject: [PATCH] Fix some conditional item not show in loot windows. Also add a log to help debuging. (based on cmangos/mangos-wotlk@56bfffd) Signed-off-by: Xfurry --- src/game/LootMgr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 5c8346e8dd..2440f3eec8 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -503,7 +503,7 @@ LootSlotType LootItem::GetSlotTypeForSharedLoot(Player const* player, Loot const if (!lootedBy.empty()) return MAX_LOOT_SLOT_TYPE; // a not free for all item should not be looted more than once - if (lootItemType != LOOTITEM_TYPE_NORMAL) + if (lootItemType == LOOTITEM_TYPE_QUEST) { if (loot->m_lootMethod == NOT_GROUP_TYPE_LOOT || loot->m_lootMethod == FREE_FOR_ALL) return LOOT_SLOT_OWNER; @@ -2097,7 +2097,10 @@ bool Loot::GetLootContentFor(Player* player, ByteBuffer& buffer) LootItem* lootItem = *lootItemItr; LootSlotType slot_type = lootItem->GetSlotTypeForSharedLoot(player, this); if (slot_type >= MAX_LOOT_SLOT_TYPE) + { + sLog.outString("Item cannot send> itemid(%u) in slot (%u)!", lootItem->itemId, uint32(lootItem->lootSlot)); continue; + } buffer << uint8(lootItem->lootSlot); buffer << *lootItem;