#pragma once #include "CoreMinimal.h" #include "Kismet/BlueprintFunctionLibrary.h" #include "EPerkSlotType.h" #include "EPerkUsageType.h" #include "Templates/SubclassOf.h" #include "PerkFunctionLibrary.generated.h" class APlayerCharacter; class UObject; class UPerkAsset; class UPlayerCharacterID; UCLASS(Blueprintable) class UPerkFunctionLibrary : public UBlueprintFunctionLibrary { GENERATED_BODY() public: UPerkFunctionLibrary(); UFUNCTION(BlueprintCallable) static void SplitPerksByUsage(const TArray& perks, TArray& OutPassivePerks, TArray& OutActivePerks); UFUNCTION(BlueprintCallable) static TArray SortPerksByUsage(UPARAM(Ref) TArray& perks); UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContext")) static void RandomizePerkLoadout(UObject* WorldContext, UPlayerCharacterID* characterID); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static bool IsPerkTierUnLocked(UObject* WorldContext, int32 Tier); UFUNCTION(BlueprintCallable, BlueprintPure) static int32 GetRequiredPerkClaimsForTier(int32 Tier); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static void GetPerkTierState(UObject* WorldContext, int32 Tier, bool& TierUnLocked, int32& NextRequiredCount, int32& NextProgressCount); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static void GetPerkEquipSlots(UObject* WorldContext, EPerkUsageType InType, TSubclassOf InCharacterClass, int32& OutAvailableSlots, int32& OutUnavailableSlots, int32& OutPromotionLockedSlots); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static TArray GetPerkEquipSlotLayout(UObject* WorldContext, EPerkUsageType InType, TSubclassOf InCharacterClass); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static TArray GetOwnedPerksByType(UObject* WorldContext, EPerkUsageType InType); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static TArray GetOwnedPerks(UObject* WorldContext); UFUNCTION(BlueprintCallable, BlueprintPure) static int32 GetHighestPerkTier(); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static TArray GetCharacterNonEquippedPerks(UObject* WorldContext, UPlayerCharacterID* characterID); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static TArray GetCharacterEquippedPerks(UObject* WorldContext, UPlayerCharacterID* characterID); UFUNCTION(BlueprintCallable, BlueprintPure) static TArray GetAvailablePerks(); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static int32 GetAmountOfPurchasedPerks(UObject* WorldContext); UFUNCTION(BlueprintCallable, BlueprintPure) static FText FormatRichText(const FText& SourceText, bool UpperCase, const TMap CharTagMap); UFUNCTION(BlueprintCallable, BlueprintPure, meta=(WorldContext="WorldContext")) static int32 CalculateClaimablePerkPoints(UObject* WorldContext); };