// © 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& 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); }