#pragma once #include "CoreMinimal.h" #include "CraftingCost.h" #include "EUpgradeClass.h" #include "EUpgradeTiers.h" #include "ItemUpgradeStatText.h" #include "RefundableInterface.h" #include "SavableDataAsset.h" #include "Templates/SubclassOf.h" #include "UpgradeValues.h" #include "ItemUpgrade.generated.h" class AActor; class AFSDPlayerState; class UItemUpgrade; class UItemUpgradeCategory; class UItemUpgradeElement; class UResourceData; UCLASS(Blueprintable, EditInlineNew) class FSD_API UItemUpgrade : public USavableDataAsset, public IRefundableInterface { GENERATED_BODY() public: DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FItemUpgradeSignature, UItemUpgrade*, Upgrade); UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) FItemUpgradeSignature OnCrafted; UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) FItemUpgradeSignature OnEquipped; UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) FItemUpgradeSignature OnUnequipped; protected: UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FText Name; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FText Description; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) int32 Cost; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool UseOldCost; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) EUpgradeTiers UpgradeTier; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) EUpgradeClass upgradeClass; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) UItemUpgradeCategory* Category; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) TMap UpgradeCraftingCost; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) TArray ResourceCost; UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true)) TArray Elements; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) TArray StatTexts; public: UItemUpgrade(); UFUNCTION(BlueprintCallable) void UnequipUpgrade(TSubclassOf itemClass, AFSDPlayerState* PlayerState); UFUNCTION(BlueprintCallable, BlueprintPure) TArray GetUpgradeStatTexts() const; UFUNCTION(BlueprintCallable, BlueprintPure) static FText GetUpgradeName(UItemUpgrade* Upgrade); UFUNCTION(BlueprintCallable, BlueprintPure) TArray GetUpgradeCost() const; UFUNCTION(BlueprintCallable) FString GetSourceName(); UFUNCTION(BlueprintCallable, BlueprintPure) static FUpgradeValues GetGenericUpgradedValue(TSubclassOf Item, AFSDPlayerState* Player, UItemUpgrade* NewUpgradeClass); UFUNCTION(BlueprintCallable, BlueprintPure) float GetCreditsCost() const; UFUNCTION(BlueprintCallable) void EquipUpgrade(TSubclassOf itemClass, AFSDPlayerState* PlayerState); // Fix for true pure virtual functions not being implemented };