Fix major accessory duplication bug. Release Build 8666.

This commit is contained in:
2024-04-01 20:58:29 -05:00
parent 99d449400b
commit 37a8847e4e
4 changed files with 5 additions and 6 deletions
+1 -3
View File
@@ -491,9 +491,7 @@ uint32_t Inventory::GetItemCount(IT it){
if(!_inventory.count(it)){
return 0;
}else
if(ITEM_DATA.at(it).IsAccessory()){
return 1; //We always only have 1 of any given accessory.
}else{
{
auto inventory=_inventory.equal_range(it);
return std::accumulate(inventory.first,inventory.second,0,[](int val,std::pair<IT,std::shared_ptr<Item>>it){return val+(*it.second).Amt();});
}