Fix major accessory duplication bug. Release Build 8666.
This commit is contained in:
@@ -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();});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user