GASATHON/Project/Source/Gasa/AbilitySystem/GasaAttributeSet_Inlines.h
2024-10-21 16:10:56 -04:00

90 lines
2.4 KiB
C++

// Generated by GasaGen/GasaGen_UGasaAttributeSet.cpp
#pragma once
#include "GasaAttributeSet.h"
#include "AbilitySystemComponent.h"
#pragma region Attribute Setters
FORCEINLINE
void UGasaAttributeSet::SetStrength( float NewVal )
{
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
if ( ensure( AbilityComp ) )
{
AbilityComp->SetNumericAttributeBase( GetStrengthAttribute(), NewVal );
};
}
FORCEINLINE
void UGasaAttributeSet::SetIntelligence( float NewVal )
{
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
if ( ensure( AbilityComp ) )
{
AbilityComp->SetNumericAttributeBase( GetIntelligenceAttribute(), NewVal );
};
}
FORCEINLINE
void UGasaAttributeSet::SetResilience( float NewVal )
{
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
if ( ensure( AbilityComp ) )
{
AbilityComp->SetNumericAttributeBase( GetResilienceAttribute(), NewVal );
};
}
FORCEINLINE
void UGasaAttributeSet::SetVigor( float NewVal )
{
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
if ( ensure( AbilityComp ) )
{
AbilityComp->SetNumericAttributeBase( GetVigorAttribute(), NewVal );
};
}
FORCEINLINE
void UGasaAttributeSet::SetHealth( float NewVal )
{
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
if ( ensure( AbilityComp ) )
{
AbilityComp->SetNumericAttributeBase( GetHealthAttribute(), NewVal );
};
}
FORCEINLINE
void UGasaAttributeSet::SetMaxHealth( float NewVal )
{
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
if ( ensure( AbilityComp ) )
{
AbilityComp->SetNumericAttributeBase( GetMaxHealthAttribute(), NewVal );
};
}
FORCEINLINE
void UGasaAttributeSet::SetMana( float NewVal )
{
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
if ( ensure( AbilityComp ) )
{
AbilityComp->SetNumericAttributeBase( GetManaAttribute(), NewVal );
};
}
FORCEINLINE
void UGasaAttributeSet::SetMaxMana( float NewVal )
{
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
if ( ensure( AbilityComp ) )
{
AbilityComp->SetNumericAttributeBase( GetMaxManaAttribute(), NewVal );
};
}
#pragma endregion Attribute Setters
namespace Gasa
{
inline UGasaAttributeSet const* GetAttributeSet( UAbilitySystemComponent* ASC )
{
return Cast<UGasaAttributeSet>( ASC->GetAttributeSet( UGasaAttributeSet::StaticClass() ) );
}
}