コード例 #1
0
FGAEffectHandle UGAAttributeComponent::ApplyEffectToSelf(const FGAEffectSpec& SpecIn, const FGAEffectContext& Context)
{
	FGAEffectHandle handle;
	if (GetOwnerRole() < ROLE_Authority)
	{
		
	}
	else
	{
		handle = ActiveEffects.ApplyEffect(SpecIn, Context);
	}
	
	if (GetNetMode() == ENetMode::NM_Standalone)
		OnRep_ActiveEffects();

	return handle;
}
コード例 #2
0
FGAEffectHandle UGAAttributeComponent::ApplyEffectToSelf(TSubclassOf<class UGAEffectSpecification> SpecIn,
	const FGAEffectContext& Context, const FName& EffeftName)
{
	FGAEffectHandle handle;
	if (GetOwnerRole() < ROLE_Authority)
	{

	}
	else
	{
		handle = ActiveEffects.ApplyEffect(SpecIn, Context, EffeftName);
	}

	if (GetNetMode() == ENetMode::NM_Standalone)
		OnRep_ActiveEffects();

	return handle;
}