From b1eab9e816a285e6778009edf0452bd0685a8e84 Mon Sep 17 00:00:00 2001 From: staphen Date: Sun, 12 May 2024 11:26:36 -0400 Subject: [PATCH] Fix error in lambda --- Source/items.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/items.cpp b/Source/items.cpp index 062ac5d8e6be..dc725178b31c 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3352,7 +3352,8 @@ void TryRandomUniqueItem(Item &item, _item_indexes idx, int8_t mLevel, int uper, } // Amount to decrease the final uid by in CheckUnique() to get the desired unique. - const int uidOffset = std::count_if(uids.begin() + uid + 1, uids.end(), [&uniqueItem](UniqueItem potentialMatch) { + const int uidOffset = std::count_if(uids.begin() + uid + 1, uids.end(), [&uniqueItem](int matchId) { + const UniqueItem &potentialMatch = UniqueItems[matchId]; return uniqueItem.UIItemId == potentialMatch.UIItemId && uniqueItem.UIMinLvl == potentialMatch.UIMinLvl; });