aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Loot/LootMgr.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index a0fc3156c07..cf76cd4036d 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -476,18 +476,19 @@ void Loot::FillNotNormalLootFor(Player* pl, bool withCurrency)
// Process currency items
uint32 max_slot = GetMaxSlotInLootFor(pl);
- uint32 itemId = 0;
+ LootItem const *item = NULL;
uint32 itemsSize = uint32(items.size());
for (uint32 i = 0; i < max_slot; ++i)
{
if (i < items.size())
- itemId = items[i].itemid;
+ item = &items[i];
else
- itemId = quest_items[i-itemsSize].itemid;
+ item = &quest_items[i-itemsSize];
- if (ItemPrototype const* proto = ObjectMgr::GetItemPrototype(itemId))
- if (proto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
- pl->StoreLootItem(i, this);
+ if (!item->is_looted && item->freeforall && item->AllowedForPlayer(pl))
+ if (ItemPrototype const* proto = ObjectMgr::GetItemPrototype(item->itemid))
+ if (proto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
+ pl->StoreLootItem(i, this);
}
}