updated the tradeable quantity limit in inventory item struct, and created floating damage number prototype.

This commit is contained in:
7heIVIaze 2025-06-05 19:38:25 +09:00
parent 36727688ac
commit a34821b9c8
9 changed files with 16 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -82,7 +82,7 @@ TMap<FInventoryItem, int> AHYShopAOE::GetTradableItemSets(int CurrentHonbaekAmou
for (FInventoryItem TempItem : TempItems) for (FInventoryItem TempItem : TempItems)
{ {
int MaxAmount = CurrentHonbaekAmount / TempItem.ItemValue; int MaxAmount = CurrentHonbaekAmount / TempItem.ItemValue;
int Amount = FMath::Clamp(FMath::RandRange(0, MaxAmount), 1, 10); int Amount = FMath::Clamp(FMath::RandRange(0, MaxAmount), 1, TempItem.ItemTradeLimitNumber);
Item.Add({ TempItem, Amount }); Item.Add({ TempItem, Amount });
} }

View File

@ -71,6 +71,10 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FCraftingInfo> CraftCombinations; TArray<FCraftingInfo> CraftCombinations;
// The limit on the number of trade possible.
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 ItemTradeLimitNumber;
bool operator==(const FInventoryItem& OtherItem) const { bool operator==(const FInventoryItem& OtherItem) const {
return ItemID == OtherItem.ItemID; return ItemID == OtherItem.ItemID;
} }