131 lines
5.3 KiB
C++
131 lines
5.3 KiB
C++
// Generated by GasaEditor/GasaGen/GasaGen_AttributeSets.cpp
|
|
#pragma once
|
|
|
|
#include "AttributeSet.h"
|
|
#include "GasaAttributeSet.generated.h"
|
|
|
|
UCLASS()
|
|
class GASA_API UGasaAttributeSet : public UAttributeSet
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
UGasaAttributeSet();
|
|
|
|
// Vital Attributes
|
|
|
|
UPROPERTY( ReplicatedUsing = Client_OnRep_Health, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Vital" )
|
|
FGameplayAttributeData Health;
|
|
UPROPERTY( ReplicatedUsing = Client_OnRep_Mana, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Vital" )
|
|
FGameplayAttributeData Mana;
|
|
|
|
// Primary Attributes
|
|
|
|
UPROPERTY( ReplicatedUsing = Client_OnRep_Strength, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Primary" )
|
|
FGameplayAttributeData Strength;
|
|
UPROPERTY( ReplicatedUsing = Client_OnRep_Intelligence, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Primary" )
|
|
FGameplayAttributeData Intelligence;
|
|
UPROPERTY( ReplicatedUsing = Client_OnRep_Resilience, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Primary" )
|
|
FGameplayAttributeData Resilience;
|
|
UPROPERTY( ReplicatedUsing = Client_OnRep_Vigor, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Primary" )
|
|
FGameplayAttributeData Vigor;
|
|
|
|
// Secondary Attributes
|
|
|
|
UPROPERTY( ReplicatedUsing = Client_OnRep_MaxHealth, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
FGameplayAttributeData MaxHealth;
|
|
UPROPERTY( ReplicatedUsing = Client_OnRep_MaxMana, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
FGameplayAttributeData MaxMana;
|
|
|
|
|
|
UFUNCTION()
|
|
void Client_OnRep_Health( FGameplayAttributeData& PrevHealth );
|
|
UFUNCTION()
|
|
void Client_OnRep_Mana( FGameplayAttributeData& PrevMana );
|
|
UFUNCTION()
|
|
void Client_OnRep_Strength( FGameplayAttributeData& PrevStrength );
|
|
UFUNCTION()
|
|
void Client_OnRep_Intelligence( FGameplayAttributeData& PrevIntelligence );
|
|
UFUNCTION()
|
|
void Client_OnRep_Resilience( FGameplayAttributeData& PrevResilience );
|
|
UFUNCTION()
|
|
void Client_OnRep_Vigor( FGameplayAttributeData& PrevVigor );
|
|
UFUNCTION()
|
|
void Client_OnRep_MaxHealth( FGameplayAttributeData& PrevMaxHealth );
|
|
UFUNCTION()
|
|
void Client_OnRep_MaxMana( FGameplayAttributeData& PrevMaxMana );
|
|
|
|
#pragma region Getters
|
|
static FGameplayAttribute GetHealthAttribute()
|
|
{
|
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, Health ) );
|
|
return Prop;
|
|
}
|
|
static FGameplayAttribute GetManaAttribute()
|
|
{
|
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, Mana ) );
|
|
return Prop;
|
|
}
|
|
static FGameplayAttribute GetStrengthAttribute()
|
|
{
|
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, Strength ) );
|
|
return Prop;
|
|
}
|
|
static FGameplayAttribute GetIntelligenceAttribute()
|
|
{
|
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, Intelligence ) );
|
|
return Prop;
|
|
}
|
|
static FGameplayAttribute GetResilienceAttribute()
|
|
{
|
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, Resilience ) );
|
|
return Prop;
|
|
}
|
|
static FGameplayAttribute GetVigorAttribute()
|
|
{
|
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, Vigor ) );
|
|
return Prop;
|
|
}
|
|
static FGameplayAttribute GetMaxHealthAttribute()
|
|
{
|
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, MaxHealth ) );
|
|
return Prop;
|
|
}
|
|
static FGameplayAttribute GetMaxManaAttribute()
|
|
{
|
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, MaxMana ) );
|
|
return Prop;
|
|
}
|
|
|
|
FORCEINLINE float GetHealth() const { return Health.GetCurrentValue(); }
|
|
FORCEINLINE float GetMana() const { return Mana.GetCurrentValue(); }
|
|
FORCEINLINE float GetStrength() const { return Strength.GetCurrentValue(); }
|
|
FORCEINLINE float GetIntelligence() const { return Intelligence.GetCurrentValue(); }
|
|
FORCEINLINE float GetResilience() const { return Resilience.GetCurrentValue(); }
|
|
FORCEINLINE float GetVigor() const { return Vigor.GetCurrentValue(); }
|
|
FORCEINLINE float GetMaxHealth() const { return MaxHealth.GetCurrentValue(); }
|
|
FORCEINLINE float GetMaxMana() const { return MaxMana.GetCurrentValue(); }
|
|
#pragma endregion Getters
|
|
|
|
#pragma region Setters
|
|
FORCEINLINE void SetHealth( float NewVal );
|
|
FORCEINLINE void SetMana( float NewVal );
|
|
FORCEINLINE void SetStrength( float NewVal );
|
|
FORCEINLINE void SetIntelligence( float NewVal );
|
|
FORCEINLINE void SetResilience( float NewVal );
|
|
FORCEINLINE void SetVigor( float NewVal );
|
|
FORCEINLINE void SetMaxHealth( float NewVal );
|
|
FORCEINLINE void SetMaxMana( float NewVal );
|
|
#pragma endregion Setters
|
|
|
|
#pragma region AttributeSet
|
|
void
|
|
PreAttributeChange( const FGameplayAttribute& Attribute, float& NewValue ) override;
|
|
void PostGameplayEffectExecute( FGameplayEffectModCallbackData const& Data ) override;
|
|
#pragma endregion AttributeSet
|
|
|
|
#pragma region UObject
|
|
void
|
|
GetLifetimeReplicatedProps( TArray<FLifetimeProperty>& OutLifetimeProps ) const override;
|
|
#pragma endregion UObject
|
|
};
|