OLS/Source/ols/Private/AbilitySystem/Attributes/OLSCombatAttributeSet.cpp

31 lines
1004 B
C++
Raw Normal View History

2025-01-15 18:00:34 +00:00
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
#include "AbilitySystem/Attributes/OLSCombatAttributeSet.h"
#include "Net/UnrealNetwork.h"
UOLSCombatAttributeSet::UOLSCombatAttributeSet()
: BaseDamage(0.0f)
, BaseHeal(0.0f)
{
}
void UOLSCombatAttributeSet::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME_CONDITION_NOTIFY(ThisClass, BaseDamage, COND_OwnerOnly, REPNOTIFY_Always);
DOREPLIFETIME_CONDITION_NOTIFY(ThisClass, BaseHeal, COND_OwnerOnly, REPNOTIFY_Always);
}
void UOLSCombatAttributeSet::OnRep_BaseDamage(const FGameplayAttributeData& oldValue)
{
GAMEPLAYATTRIBUTE_REPNOTIFY(ThisClass, BaseDamage, oldValue);
}
void UOLSCombatAttributeSet::OnRep_BaseHeal(const FGameplayAttributeData& oldValue)
{
GAMEPLAYATTRIBUTE_REPNOTIFY(ThisClass, BaseHeal, oldValue);
}