RealtimeStyleTransferRuntime/Source/LyraGame/AbilitySystem/Attributes/LyraCombatSet.cpp

35 lines
957 B
C++
Raw Permalink Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "LyraCombatSet.h"
2022-09-13 07:18:28 +00:00
#include "Containers/Array.h"
2022-05-23 18:41:30 +00:00
#include "Net/UnrealNetwork.h"
2022-09-13 07:18:28 +00:00
#include "UObject/CoreNetTypes.h"
class FLifetimeProperty;
2022-05-23 18:41:30 +00:00
ULyraCombatSet::ULyraCombatSet()
: BaseDamage(0.0f)
, BaseHeal(0.0f)
{
}
void ULyraCombatSet::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME_CONDITION_NOTIFY(ULyraCombatSet, BaseDamage, COND_OwnerOnly, REPNOTIFY_Always);
DOREPLIFETIME_CONDITION_NOTIFY(ULyraCombatSet, BaseHeal, COND_OwnerOnly, REPNOTIFY_Always);
}
void ULyraCombatSet::OnRep_BaseDamage(const FGameplayAttributeData& OldValue)
{
GAMEPLAYATTRIBUTE_REPNOTIFY(ULyraCombatSet, BaseDamage, OldValue);
}
void ULyraCombatSet::OnRep_BaseHeal(const FGameplayAttributeData& OldValue)
{
GAMEPLAYATTRIBUTE_REPNOTIFY(ULyraCombatSet, BaseHeal, OldValue);
}