// Copyright Echo Devgroup #include "Player/AuraPlayerState.h" #include "AbilitySystem/AuraAbilitySystemComponent.h" #include "AbilitySystem/AuraAttributeSet.h" #include "Net/UnrealNetwork.h" AAuraPlayerState::AAuraPlayerState() { AbilitySystemComponent = CreateDefaultSubobject("AbilitySystemComponent"); AbilitySystemComponent->SetIsReplicated(true); AbilitySystemComponent->SetReplicationMode(EGameplayEffectReplicationMode::Mixed); AttributeSet = CreateDefaultSubobject("AttributeSet"); NetUpdateFrequency = 100.f; } void AAuraPlayerState::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const { Super::GetLifetimeReplicatedProps(OutLifetimeProps); DOREPLIFETIME(AAuraPlayerState, Level); } UAbilitySystemComponent* AAuraPlayerState::GetAbilitySystemComponent() const { return AbilitySystemComponent; } void AAuraPlayerState::OnRep_Level(int32 OldLevel) { }