Skip to content

Commit

Permalink
Fix graffiti and agent patches not being added to loot lists (bug int…
Browse files Browse the repository at this point in the history
…roduced by 50b46a3)
  • Loading branch information
danielkrupinski committed Jul 8, 2021
1 parent abcc107 commit f4d47e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Osiris/InventoryChanger/StaticData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@ class StaticDataImpl {
const auto& contents = lootList->getLootListContents();
for (int j = 0; j < contents.size; ++j) {
if (contents[j].stickerKit != 0) {
if (const auto idx = getItemIndex(WeaponId::Sticker, contents[j].stickerKit); idx != InvalidItemIdx)
if (auto idx = getItemIndex(WeaponId::Sticker, contents[j].stickerKit); idx != InvalidItemIdx)
loot.push_back(idx);
else if ((idx = getItemIndex(WeaponId::Graffiti, contents[j].stickerKit)) != InvalidItemIdx)
loot.push_back(idx);
else if ((idx = getItemIndex(WeaponId::Patch, contents[j].stickerKit)) != InvalidItemIdx)
loot.push_back(idx);
} else if (contents[j].musicKit != 0) {
const auto it = std::ranges::find_if(std::as_const(_gameItems), [musicKit = contents[j].musicKit, this](const auto& item) { return item.isMusic() && _paintKits[item.dataIndex].id == musicKit; });
Expand Down

0 comments on commit f4d47e3

Please sign in to comment.