74. Modifier Magnitude Calculations
This commit is contained in:
@ -79,13 +79,17 @@ void AGasaCharacter::InitDefaultAttributes()
|
||||
{
|
||||
UAbilitySystemComponent* ASC = GetAbilitySystemComponent();
|
||||
ensure(ASC);
|
||||
|
||||
ensure(DefaultVitalAttributes);
|
||||
ensure(DefaultPrimaryAttributes);
|
||||
ensure(DefaultSecondaryAttributes);
|
||||
FGameplayEffectContextHandle Context = ASC->MakeEffectContext();
|
||||
FGameplayEffectSpecHandle SpecPrimary = ASC->MakeOutgoingSpec(DefaultPrimaryAttributes, 1.0f, Context );
|
||||
FGameplayEffectSpecHandle SpecSecondary = ASC->MakeOutgoingSpec(DefaultSecondaryAttributes, 1.0f, Context );
|
||||
FGameplayEffectSpecHandle SpecVital = ASC->MakeOutgoingSpec(DefaultVitalAttributes, 1.0f, Context );
|
||||
|
||||
FGameplayEffectContextHandle Context = ASC->MakeEffectContext();
|
||||
Context.AddSourceObject(this);
|
||||
|
||||
FGameplayEffectSpecHandle SpecPrimary = ASC->MakeOutgoingSpec(DefaultPrimaryAttributes, 1.0f, Context );
|
||||
FGameplayEffectSpecHandle SpecSecondary = ASC->MakeOutgoingSpec(DefaultSecondaryAttributes, 1.0f, Context );
|
||||
FGameplayEffectSpecHandle SpecVital = ASC->MakeOutgoingSpec(DefaultVitalAttributes, 1.0f, Context );
|
||||
ASC->ApplyGameplayEffectSpecToTarget( * SpecPrimary.Data, ASC );
|
||||
ASC->ApplyGameplayEffectSpecToTarget( * SpecSecondary.Data, ASC );
|
||||
ASC->ApplyGameplayEffectSpecToTarget( * SpecVital.Data, ASC );
|
||||
|
@ -14,9 +14,9 @@ APlayerCharacter::APlayerCharacter()
|
||||
}
|
||||
|
||||
#pragma region ICombat
|
||||
int32 APlayerCharacter::GetLevel()
|
||||
int32 APlayerCharacter::GetPlayerLevel()
|
||||
{
|
||||
return GetPlayerState<AGasaPlayerState>()->Level;
|
||||
return GetPlayerState<AGasaPlayerState>()->PlayerLevel;
|
||||
}
|
||||
#pragma endregion ICombat
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "GasaCharacter.h"
|
||||
|
||||
@ -13,7 +13,7 @@ public:
|
||||
APlayerCharacter();
|
||||
|
||||
#pragma region ICombat
|
||||
int32 GetLevel() override;
|
||||
int32 GetPlayerLevel() override;
|
||||
#pragma endregion ICombat
|
||||
|
||||
#pragma region Pawn
|
||||
|
Reference in New Issue
Block a user