Initialize Git with LFS for binary assets and add standard Unreal Engine .gitignore/.gitattributes. Co-authored-by: Cursor <cursoragent@cursor.com>
82 lines
2.4 KiB
C++
82 lines
2.4 KiB
C++
// REALMS IN RUIN. Copyright (c) 2025 Trevor Edwards. All rights reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "AttributeSet.h"
|
|
#include "AbilitySystemComponent.h"
|
|
#include "RIRAttributeSet.generated.h"
|
|
|
|
// Macro to simplify creating Attribute Accessors
|
|
#define ATTRIBUTE_ACCESSORS(ClassName, PropertyName) \
|
|
GAMEPLAYATTRIBUTE_PROPERTY_GETTER(ClassName, PropertyName) \
|
|
GAMEPLAYATTRIBUTE_VALUE_GETTER(PropertyName) \
|
|
GAMEPLAYATTRIBUTE_VALUE_SETTER(PropertyName) \
|
|
GAMEPLAYATTRIBUTE_VALUE_INITTER(PropertyName)
|
|
|
|
/**
|
|
* Custom Attribute Set for RIR Project
|
|
*/
|
|
UCLASS()
|
|
class REALMSINRUIN_API URIRAttributeSet : public UAttributeSet
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
URIRAttributeSet();
|
|
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
|
|
|
// Health
|
|
UPROPERTY(BlueprintReadOnly, Category="GAS|Attributes|Primary", ReplicatedUsing = OnRep_Health)
|
|
FGameplayAttributeData Health;
|
|
ATTRIBUTE_ACCESSORS(URIRAttributeSet, Health);
|
|
|
|
UFUNCTION()
|
|
void OnRep_Health(const FGameplayAttributeData& OldHealth) const;
|
|
|
|
// MaxHealth
|
|
UPROPERTY(BlueprintReadOnly, Category="GAS|Attributes|Primary", ReplicatedUsing = OnRep_MaxHealth)
|
|
FGameplayAttributeData MaxHealth;
|
|
ATTRIBUTE_ACCESSORS(URIRAttributeSet, MaxHealth);
|
|
|
|
UFUNCTION()
|
|
void OnRep_MaxHealth(const FGameplayAttributeData& OldMaxHealth) const;
|
|
|
|
// Mana
|
|
UPROPERTY(BlueprintReadOnly, Category="GAS|Attributes|Primary", ReplicatedUsing = OnRep_Mana)
|
|
FGameplayAttributeData Mana;
|
|
ATTRIBUTE_ACCESSORS(URIRAttributeSet, Mana);
|
|
|
|
UFUNCTION()
|
|
void OnRep_Mana(const FGameplayAttributeData& OldMana) const;
|
|
|
|
// MaxMana
|
|
UPROPERTY(BlueprintReadOnly, Category="GAS|Attributes|Primary", ReplicatedUsing = OnRep_MaxMana)
|
|
FGameplayAttributeData MaxMana;
|
|
ATTRIBUTE_ACCESSORS(URIRAttributeSet, MaxMana);
|
|
|
|
UFUNCTION()
|
|
void OnRep_MaxMana(const FGameplayAttributeData& OldMaxMana) const;
|
|
|
|
// Stamina
|
|
UPROPERTY(BlueprintReadOnly, Category="GAS|Attributes|Primary", ReplicatedUsing = OnRep_Stamina)
|
|
FGameplayAttributeData Stamina;
|
|
ATTRIBUTE_ACCESSORS(URIRAttributeSet, Stamina);
|
|
|
|
UFUNCTION()
|
|
void OnRep_Stamina(const FGameplayAttributeData& OldStamina) const;
|
|
|
|
// MaxStamina
|
|
UPROPERTY(BlueprintReadOnly, Category="GAS|Attributes|Primary", ReplicatedUsing = OnRep_MaxStamina)
|
|
FGameplayAttributeData MaxStamina;
|
|
ATTRIBUTE_ACCESSORS(URIRAttributeSet, MaxStamina);
|
|
|
|
UFUNCTION()
|
|
void OnRep_MaxStamina(const FGameplayAttributeData& OldMaxStamina) const;
|
|
|
|
protected:
|
|
|
|
};
|
|
|
|
|