|
|
|
@ -1351,8 +1351,8 @@ _item_indexes GetItemIndexForDroppableItem(bool considerDropRate, tl::function_r |
|
|
|
ril.clear(); |
|
|
|
ril.clear(); |
|
|
|
|
|
|
|
|
|
|
|
unsigned cumulativeWeight = 0; |
|
|
|
unsigned cumulativeWeight = 0; |
|
|
|
for (std::underlying_type_t<_item_indexes> i = IDI_GOLD; i <= IDI_LAST; i++) { |
|
|
|
for (size_t i = 0; i < AllItemsList.size(); i++) { |
|
|
|
if (!IsItemAvailable(i)) |
|
|
|
if (!IsItemAvailable(static_cast<int>(i))) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
const ItemData &item = AllItemsList[i]; |
|
|
|
const ItemData &item = AllItemsList[i]; |
|
|
|
if (item.dropRate == 0) |
|
|
|
if (item.dropRate == 0) |
|
|
|
@ -2369,7 +2369,7 @@ std::string GetTranslatedItemNameMagical(const Item &item, bool hellfireItem, bo |
|
|
|
|
|
|
|
|
|
|
|
bool IsItemAvailable(int i) |
|
|
|
bool IsItemAvailable(int i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (i < 0 || i > IDI_LAST) |
|
|
|
if (i < 0 || i >= static_cast<int>(AllItemsList.size())) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (gbIsSpawn) { |
|
|
|
if (gbIsSpawn) { |
|
|
|
|