Add more abilities in the sample

This commit is contained in:
Arnaud Jamin
2023-10-05 16:57:43 -04:00
parent e952256b98
commit 25f2e06400
83 changed files with 966 additions and 356 deletions
@@ -4,8 +4,12 @@
#include "CogSampleFunctionLibrary_Gameplay.generated.h"
class UAbilitySystemComponent;
class UGameplayAbility;
struct FGameplayAbilitySpecHandle;
struct FGameplayAttribute;
struct FGameplayAttributeData;
struct FGameplayCueNotify_SpawnResult;
struct FGameplayCueParameters;
#define ATTRIBUTE_ACCESSORS(ClassName, PropertyName) \
GAMEPLAYATTRIBUTE_PROPERTY_GETTER(ClassName, PropertyName) \
@@ -21,4 +25,28 @@ class UCogSampleFunctionLibrary_Gameplay : public UBlueprintFunctionLibrary
public:
static void AdjustAttributeForMaxChange(UAbilitySystemComponent* AbilityComponent, FGameplayAttributeData& AffectedAttribute, float OldValue, float NewMaxValue, const FGameplayAttribute& AffectedAttributeProperty);
UFUNCTION(BlueprintPure)
static FVector GetActorBottomLocation(const AActor* Actor);
UFUNCTION(BlueprintCallable)
static bool FindAbilitySpecHandleFromClass(UAbilitySystemComponent* AbilitySystemComponent, TSubclassOf<UGameplayAbility> AbilityClass, FGameplayAbilitySpecHandle& SpecHandle);
UFUNCTION(BlueprintCallable)
static void ApplyAllGameplayEffectContextValues(const FGameplayCueParameters& Parameters, const FGameplayCueNotify_SpawnResult& SpawnResult);
/* Same as UAbilitySystemBlueprintLibrary::SendGameplayEventToActor but doesn't log an error when the ability system
* is not found. When a montage is played in the montage editor the notifications are executed and if a notification
* uses SendGameplayEventToActor it will log an error. */
UFUNCTION(BlueprintCallable)
static void SendMontageEvent(AActor* Actor, FGameplayTag EventTag, FGameplayEventData Payload);
UFUNCTION(BlueprintPure)
static float GetFloatValue(const FScalableFloat& ScalableFloat, int32 Level);
UFUNCTION(BlueprintPure)
static bool GetBoolValue(const FScalableFloat& ScalableFloat, int32 Level);
UFUNCTION(BlueprintPure)
static int32 GetIntValue(const FScalableFloat& ScalableFloat, int32 Level);
};