fix(Core/Loot): Fixed processing duplicated loot item within different groups. (#13038)

Fixes #13038
This commit is contained in:
UltraNix
2022-11-12 13:31:29 +01:00
committed by GitHub
parent c1c9dc6105
commit 6278072b16
3 changed files with 4 additions and 1 deletions

View File

@@ -71,7 +71,7 @@ struct LootGroupInvalidSelector : public Acore::unary_function<LootStoreItem*, b
uint8 foundDuplicates = 0;
for (std::vector<LootItem>::const_iterator itr = _loot.items.begin(); itr != _loot.items.end(); ++itr)
if (itr->itemid == item->itemid)
if (itr->itemid == item->itemid && itr->groupid == item->groupid)
{
++foundDuplicates;
if (_proto->InventoryType == 0 && foundDuplicates == 3 && _proto->ItemId != 47242 /*Trophy of the Crusade*/) // Non-equippable items are limited to 3 drops
@@ -401,6 +401,7 @@ LootItem::LootItem(LootStoreItem const& li)
is_underthreshold = 0;
is_counted = 0;
rollWinnerGUID = ObjectGuid::Empty;
groupid = li.groupid;
}
// Basic checks for player/item compatibility - if false no chance to see the item in the loot