|
|
|
|
| #pragma once
|
|
|
| #include "ActiveGameplayEffectHandle.h"
|
| #include "Engine/DataAsset.h"
|
| #include "AttributeSet.h"
|
| #include "GameplayTagContainer.h"
|
|
|
| #include "GameplayAbilitySpecHandle.h"
|
| #include "LyraAbilitySet.generated.h"
|
|
|
| class UAttributeSet;
|
| class UGameplayEffect;
|
| class ULyraAbilitySystemComponent;
|
| class ULyraGameplayAbility;
|
| class UObject;
|
|
|
|
|
| |
| |
| |
| |
|
|
| USTRUCT(BlueprintType)
|
| struct FLyraAbilitySet_GameplayAbility
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
|
|
|
|
| UPROPERTY(EditDefaultsOnly)
|
| TSubclassOf<ULyraGameplayAbility> Ability = nullptr;
|
|
|
|
|
| UPROPERTY(EditDefaultsOnly)
|
| int32 AbilityLevel = 1;
|
|
|
|
|
| UPROPERTY(EditDefaultsOnly, Meta = (Categories = "InputTag"))
|
| FGameplayTag InputTag;
|
| };
|
|
|
|
|
| |
| |
| |
| |
|
|
| USTRUCT(BlueprintType)
|
| struct FLyraAbilitySet_GameplayEffect
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
|
|
|
|
| UPROPERTY(EditDefaultsOnly)
|
| TSubclassOf<UGameplayEffect> GameplayEffect = nullptr;
|
|
|
|
|
| UPROPERTY(EditDefaultsOnly)
|
| float EffectLevel = 1.0f;
|
| };
|
|
|
| |
| |
| |
| |
|
|
| USTRUCT(BlueprintType)
|
| struct FLyraAbilitySet_AttributeSet
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
|
|
| UPROPERTY(EditDefaultsOnly)
|
| TSubclassOf<UAttributeSet> AttributeSet;
|
|
|
| };
|
|
|
| |
| |
| |
| |
|
|
| USTRUCT(BlueprintType)
|
| struct FLyraAbilitySet_GrantedHandles
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
|
|
| void AddAbilitySpecHandle(const FGameplayAbilitySpecHandle& Handle);
|
| void AddGameplayEffectHandle(const FActiveGameplayEffectHandle& Handle);
|
| void AddAttributeSet(UAttributeSet* Set);
|
|
|
| void TakeFromAbilitySystem(ULyraAbilitySystemComponent* LyraASC);
|
|
|
| protected:
|
|
|
|
|
| UPROPERTY()
|
| TArray<FGameplayAbilitySpecHandle> AbilitySpecHandles;
|
|
|
|
|
| UPROPERTY()
|
| TArray<FActiveGameplayEffectHandle> GameplayEffectHandles;
|
|
|
|
|
| UPROPERTY()
|
| TArray<TObjectPtr<UAttributeSet>> GrantedAttributeSets;
|
| };
|
|
|
|
|
| |
| |
| |
| |
|
|
| UCLASS(BlueprintType, Const)
|
| class ULyraAbilitySet : public UPrimaryDataAsset
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
|
|
| ULyraAbilitySet(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
|
|
|
|
|
|
|
| void GiveToAbilitySystem(ULyraAbilitySystemComponent* LyraASC, FLyraAbilitySet_GrantedHandles* OutGrantedHandles, UObject* SourceObject = nullptr) const;
|
|
|
| protected:
|
|
|
|
|
| UPROPERTY(EditDefaultsOnly, Category = "Gameplay Abilities", meta=(TitleProperty=Ability))
|
| TArray<FLyraAbilitySet_GameplayAbility> GrantedGameplayAbilities;
|
|
|
|
|
| UPROPERTY(EditDefaultsOnly, Category = "Gameplay Effects", meta=(TitleProperty=GameplayEffect))
|
| TArray<FLyraAbilitySet_GameplayEffect> GrantedGameplayEffects;
|
|
|
|
|
| UPROPERTY(EditDefaultsOnly, Category = "Attribute Sets", meta=(TitleProperty=AttributeSet))
|
| TArray<FLyraAbilitySet_AttributeSet> GrantedAttributes;
|
| };
|
|
|