VocationLife/Source/VocationLife/Private/VocationPlayerState.cpp
pixachux eae24f1c34 Initial VocationLife commit: C++ gameplay module and project foundation.
Source, config, and docs only — UE template assets stay local to save storage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 23:52:53 +02:00

31 lines
727 B
C++

// Copyright VocationLife Project. All Rights Reserved.
#include "VocationPlayerState.h"
#include "Net/UnrealNetwork.h"
AVocationPlayerState::AVocationPlayerState()
{
bReplicates = true;
}
void AVocationPlayerState::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(AVocationPlayerState, ActiveVocation);
DOREPLIFETIME(AVocationPlayerState, Health);
DOREPLIFETIME(AVocationPlayerState, MaxHealth);
}
void AVocationPlayerState::SetActiveVocation(EVocationLifeClass NewVocation)
{
if (HasAuthority())
{
ActiveVocation = NewVocation;
OnRep_ActiveVocation();
}
}
void AVocationPlayerState::OnRep_ActiveVocation()
{
}