From f6bbeb4380f755c3cf64db8b7cb91b8bff16533e Mon Sep 17 00:00:00 2001 From: Ji Yoon Rhee Date: Mon, 9 Jun 2025 23:12:32 +0900 Subject: [PATCH] modified the AOE randomize item filter --- hwanyoung2/Source/hwanyoung2/HYShopAOE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwanyoung2/Source/hwanyoung2/HYShopAOE.cpp b/hwanyoung2/Source/hwanyoung2/HYShopAOE.cpp index 109296f5..3cd9686e 100644 --- a/hwanyoung2/Source/hwanyoung2/HYShopAOE.cpp +++ b/hwanyoung2/Source/hwanyoung2/HYShopAOE.cpp @@ -53,7 +53,7 @@ bool AHYShopAOE::RandomizeTradableItemSets(int CurrentHonbaekAmount) // Filtering match the case.(Item can be bought, ItemValue is less and equal than honbaek amount and over than 0) TArray FilteredItemData = ItemData.FilterByPredicate([CurrentHonbaekAmount](const FInventoryItem* ItemDataRow) { - return !ItemDataRow->OnlyDropped && ItemDataRow->ItemValue > 0 && ItemDataRow->ItemValue <= CurrentHonbaekAmount; + return !ItemDataRow->OnlyDropped && ItemDataRow->ItemValue > 0 && ItemDataRow->ItemValue <= CurrentHonbaekAmount && ItemDataRow->CanBeBought; }); int maxLoopNum = FMath::Min(5, FilteredItemData.Num());