Compare commits
No commits in common. "d34201e8a13b1f9cf42cc780306fbd121b11efbc" and "f1a4a44c8d93ebd32f7b4964fb641644d8bd3782" have entirely different histories.
d34201e8a1
...
f1a4a44c8d
BIN
Project/Binaries/Win64/UnrealEditor-GasaEditor.dll
(Stored with Git LFS)
BIN
Project/Binaries/Win64/UnrealEditor-GasaEditor.dll
(Stored with Git LFS)
Binary file not shown.
@ -2,14 +2,10 @@
|
|||||||
"ColumnWidths":
|
"ColumnWidths":
|
||||||
{
|
{
|
||||||
"MaxValue": 165,
|
"MaxValue": 165,
|
||||||
"Description": 303,
|
"Description": 135,
|
||||||
"Category": 96,
|
"Category": 96,
|
||||||
"BaseValue": 81,
|
"BaseValue": 106,
|
||||||
"Name": 124,
|
"Name": 82,
|
||||||
"MinAttribute": 84,
|
"MinAttribute": 327
|
||||||
"bUseMaxAttribute": 112,
|
|
||||||
"bUseMinAttribute": 114,
|
|
||||||
"MinValue": 73,
|
|
||||||
"MaxAttribute": 90
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -63,70 +63,6 @@ void UGasaAttributeSet::Client_OnRep_MaxMana( FGameplayAttributeData& PrevMaxMan
|
|||||||
static FProperty* UGasaAttributeSetProperty = FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, MaxMana ) );
|
static FProperty* UGasaAttributeSetProperty = FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, MaxMana ) );
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication( FGameplayAttribute( UGasaAttributeSetProperty ), MaxMana, PrevMaxMana );
|
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication( FGameplayAttribute( UGasaAttributeSetProperty ), MaxMana, PrevMaxMana );
|
||||||
}
|
}
|
||||||
void UGasaAttributeSet::Client_OnRep_Armor( FGameplayAttributeData& PrevArmor )
|
|
||||||
{
|
|
||||||
// From GAMEPLAYATTRIBUTE_REPNOTIFY
|
|
||||||
static FProperty* UGasaAttributeSetProperty = FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, Armor ) );
|
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication( FGameplayAttribute( UGasaAttributeSetProperty ), Armor, PrevArmor );
|
|
||||||
}
|
|
||||||
void UGasaAttributeSet::Client_OnRep_ArmorPenentration( FGameplayAttributeData& PrevArmorPenentration )
|
|
||||||
{
|
|
||||||
// From GAMEPLAYATTRIBUTE_REPNOTIFY
|
|
||||||
static FProperty* UGasaAttributeSetProperty = FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, ArmorPenentration ) );
|
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication(
|
|
||||||
FGameplayAttribute( UGasaAttributeSetProperty ), ArmorPenentration, PrevArmorPenentration
|
|
||||||
);
|
|
||||||
}
|
|
||||||
void UGasaAttributeSet::Client_OnRep_BlockChance( FGameplayAttributeData& PrevBlockChance )
|
|
||||||
{
|
|
||||||
// From GAMEPLAYATTRIBUTE_REPNOTIFY
|
|
||||||
static FProperty* UGasaAttributeSetProperty = FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, BlockChance ) );
|
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication(
|
|
||||||
FGameplayAttribute( UGasaAttributeSetProperty ), BlockChance, PrevBlockChance
|
|
||||||
);
|
|
||||||
}
|
|
||||||
void UGasaAttributeSet::Client_OnRep_CriticalHitChance( FGameplayAttributeData& PrevCriticalHitChance )
|
|
||||||
{
|
|
||||||
// From GAMEPLAYATTRIBUTE_REPNOTIFY
|
|
||||||
static FProperty* UGasaAttributeSetProperty = FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, CriticalHitChance ) );
|
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication(
|
|
||||||
FGameplayAttribute( UGasaAttributeSetProperty ), CriticalHitChance, PrevCriticalHitChance
|
|
||||||
);
|
|
||||||
}
|
|
||||||
void UGasaAttributeSet::Client_OnRep_CriticalHitDamage( FGameplayAttributeData& PrevCriticalHitDamage )
|
|
||||||
{
|
|
||||||
// From GAMEPLAYATTRIBUTE_REPNOTIFY
|
|
||||||
static FProperty* UGasaAttributeSetProperty = FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, CriticalHitDamage ) );
|
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication(
|
|
||||||
FGameplayAttribute( UGasaAttributeSetProperty ), CriticalHitDamage, PrevCriticalHitDamage
|
|
||||||
);
|
|
||||||
}
|
|
||||||
void UGasaAttributeSet::Client_OnRep_CriticalHitResistance( FGameplayAttributeData& PrevCriticalHitResistance )
|
|
||||||
{
|
|
||||||
// From GAMEPLAYATTRIBUTE_REPNOTIFY
|
|
||||||
static FProperty* UGasaAttributeSetProperty =
|
|
||||||
FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, CriticalHitResistance ) );
|
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication(
|
|
||||||
FGameplayAttribute( UGasaAttributeSetProperty ), CriticalHitResistance, PrevCriticalHitResistance
|
|
||||||
);
|
|
||||||
}
|
|
||||||
void UGasaAttributeSet::Client_OnRep_HealthRegeneration( FGameplayAttributeData& PrevHealthRegeneration )
|
|
||||||
{
|
|
||||||
// From GAMEPLAYATTRIBUTE_REPNOTIFY
|
|
||||||
static FProperty* UGasaAttributeSetProperty =
|
|
||||||
FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, HealthRegeneration ) );
|
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication(
|
|
||||||
FGameplayAttribute( UGasaAttributeSetProperty ), HealthRegeneration, PrevHealthRegeneration
|
|
||||||
);
|
|
||||||
}
|
|
||||||
void UGasaAttributeSet::Client_OnRep_ManaRegeneration( FGameplayAttributeData& PrevManaRegeneration )
|
|
||||||
{
|
|
||||||
// From GAMEPLAYATTRIBUTE_REPNOTIFY
|
|
||||||
static FProperty* UGasaAttributeSetProperty = FindFieldChecked<FProperty>( StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, ManaRegeneration ) );
|
|
||||||
GetOwningAbilitySystemComponentChecked()->SetBaseAttributeValueFromReplication(
|
|
||||||
FGameplayAttribute( UGasaAttributeSetProperty ), ManaRegeneration, PrevManaRegeneration
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#pragma endregion Rep Notifies
|
#pragma endregion Rep Notifies
|
||||||
|
|
||||||
void UGasaAttributeSet::PostGameplayEffectExecute( FGameplayEffectModCallbackData const& Data )
|
void UGasaAttributeSet::PostGameplayEffectExecute( FGameplayEffectModCallbackData const& Data )
|
||||||
@ -137,7 +73,7 @@ void UGasaAttributeSet::PostGameplayEffectExecute( FGameplayEffectModCallbackDat
|
|||||||
|
|
||||||
if ( Data.EvaluatedData.Attribute == GetHealthAttribute() )
|
if ( Data.EvaluatedData.Attribute == GetHealthAttribute() )
|
||||||
{
|
{
|
||||||
SetHealth( FMath::Clamp( GetHealth(), 0, 300.000000 ) );
|
SetHealth( FMath::Clamp( GetHealth(), 0, GetMaxHealth() ) );
|
||||||
}
|
}
|
||||||
if ( Data.EvaluatedData.Attribute == GetManaAttribute() )
|
if ( Data.EvaluatedData.Attribute == GetManaAttribute() )
|
||||||
{
|
{
|
||||||
@ -167,38 +103,8 @@ void UGasaAttributeSet::PostGameplayEffectExecute( FGameplayEffectModCallbackDat
|
|||||||
{
|
{
|
||||||
SetMaxMana( FMath::Clamp( GetMaxMana(), 0, 99999.000000 ) );
|
SetMaxMana( FMath::Clamp( GetMaxMana(), 0, 99999.000000 ) );
|
||||||
}
|
}
|
||||||
if ( Data.EvaluatedData.Attribute == GetArmorAttribute() )
|
|
||||||
{
|
Props.Populate( Data );
|
||||||
SetArmor( FMath::Clamp( GetArmor(), 0, 999.000000 ) );
|
|
||||||
}
|
|
||||||
if ( Data.EvaluatedData.Attribute == GetArmorPenentrationAttribute() )
|
|
||||||
{
|
|
||||||
SetArmorPenentration( FMath::Clamp( GetArmorPenentration(), 0, 999.000000 ) );
|
|
||||||
}
|
|
||||||
if ( Data.EvaluatedData.Attribute == GetBlockChanceAttribute() )
|
|
||||||
{
|
|
||||||
SetBlockChance( FMath::Clamp( GetBlockChance(), 0, 999.000000 ) );
|
|
||||||
}
|
|
||||||
if ( Data.EvaluatedData.Attribute == GetCriticalHitChanceAttribute() )
|
|
||||||
{
|
|
||||||
SetCriticalHitChance( FMath::Clamp( GetCriticalHitChance(), 0, 999.000000 ) );
|
|
||||||
}
|
|
||||||
if ( Data.EvaluatedData.Attribute == GetCriticalHitDamageAttribute() )
|
|
||||||
{
|
|
||||||
SetCriticalHitDamage( FMath::Clamp( GetCriticalHitDamage(), 0, 999.000000 ) );
|
|
||||||
}
|
|
||||||
if ( Data.EvaluatedData.Attribute == GetCriticalHitResistanceAttribute() )
|
|
||||||
{
|
|
||||||
SetCriticalHitResistance( FMath::Clamp( GetCriticalHitResistance(), 0, 999.000000 ) );
|
|
||||||
}
|
|
||||||
if ( Data.EvaluatedData.Attribute == GetHealthRegenerationAttribute() )
|
|
||||||
{
|
|
||||||
SetHealthRegeneration( FMath::Clamp( GetHealthRegeneration(), 0, 999.000000 ) );
|
|
||||||
}
|
|
||||||
if ( Data.EvaluatedData.Attribute == GetManaRegenerationAttribute() )
|
|
||||||
{
|
|
||||||
SetManaRegeneration( FMath::Clamp( GetManaRegeneration(), 0, 999.000000 ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UGasaAttributeSet::PreAttributeChange( FGameplayAttribute const& Attribute, float& NewValue )
|
void UGasaAttributeSet::PreAttributeChange( FGameplayAttribute const& Attribute, float& NewValue )
|
||||||
@ -207,7 +113,7 @@ void UGasaAttributeSet::PreAttributeChange( FGameplayAttribute const& Attribute,
|
|||||||
|
|
||||||
if ( Attribute == GetHealthAttribute() )
|
if ( Attribute == GetHealthAttribute() )
|
||||||
{
|
{
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 300.000000 );
|
NewValue = FMath::Clamp( NewValue, 0, GetMaxHealth() );
|
||||||
}
|
}
|
||||||
if ( Attribute == GetManaAttribute() )
|
if ( Attribute == GetManaAttribute() )
|
||||||
{
|
{
|
||||||
@ -237,38 +143,6 @@ void UGasaAttributeSet::PreAttributeChange( FGameplayAttribute const& Attribute,
|
|||||||
{
|
{
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 99999.000000 );
|
NewValue = FMath::Clamp( NewValue, 0, 99999.000000 );
|
||||||
}
|
}
|
||||||
if ( Attribute == GetArmorAttribute() )
|
|
||||||
{
|
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 999.000000 );
|
|
||||||
}
|
|
||||||
if ( Attribute == GetArmorPenentrationAttribute() )
|
|
||||||
{
|
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 999.000000 );
|
|
||||||
}
|
|
||||||
if ( Attribute == GetBlockChanceAttribute() )
|
|
||||||
{
|
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 999.000000 );
|
|
||||||
}
|
|
||||||
if ( Attribute == GetCriticalHitChanceAttribute() )
|
|
||||||
{
|
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 999.000000 );
|
|
||||||
}
|
|
||||||
if ( Attribute == GetCriticalHitDamageAttribute() )
|
|
||||||
{
|
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 999.000000 );
|
|
||||||
}
|
|
||||||
if ( Attribute == GetCriticalHitResistanceAttribute() )
|
|
||||||
{
|
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 999.000000 );
|
|
||||||
}
|
|
||||||
if ( Attribute == GetHealthRegenerationAttribute() )
|
|
||||||
{
|
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 999.000000 );
|
|
||||||
}
|
|
||||||
if ( Attribute == GetManaRegenerationAttribute() )
|
|
||||||
{
|
|
||||||
NewValue = FMath::Clamp( NewValue, 0, 999.000000 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UGasaAttributeSet::GetLifetimeReplicatedProps( TArray<FLifetimeProperty>& OutLifetimeProps ) const
|
void UGasaAttributeSet::GetLifetimeReplicatedProps( TArray<FLifetimeProperty>& OutLifetimeProps ) const
|
||||||
@ -283,12 +157,4 @@ void UGasaAttributeSet::GetLifetimeReplicatedProps( TArray<FLifetimeProperty>& O
|
|||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, Vigor );
|
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, Vigor );
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, MaxHealth );
|
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, MaxHealth );
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, MaxMana );
|
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, MaxMana );
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, Armor );
|
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, ArmorPenentration );
|
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, BlockChance );
|
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, CriticalHitChance );
|
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, CriticalHitDamage );
|
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, CriticalHitResistance );
|
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, HealthRegeneration );
|
|
||||||
DOREPLIFETIME_DEFAULT_GAS( UGasaAttributeSet, ManaRegeneration );
|
|
||||||
}
|
}
|
||||||
|
@ -35,22 +35,6 @@ public:
|
|||||||
FGameplayAttributeData MaxHealth;
|
FGameplayAttributeData MaxHealth;
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_MaxMana, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
UPROPERTY( ReplicatedUsing = Client_OnRep_MaxMana, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
||||||
FGameplayAttributeData MaxMana;
|
FGameplayAttributeData MaxMana;
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_Armor, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
||||||
FGameplayAttributeData Armor;
|
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_ArmorPenentration, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
||||||
FGameplayAttributeData ArmorPenentration;
|
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_BlockChance, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
||||||
FGameplayAttributeData BlockChance;
|
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_CriticalHitChance, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
||||||
FGameplayAttributeData CriticalHitChance;
|
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_CriticalHitDamage, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
||||||
FGameplayAttributeData CriticalHitDamage;
|
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_CriticalHitResistance, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
||||||
FGameplayAttributeData CriticalHitResistance;
|
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_HealthRegeneration, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
||||||
FGameplayAttributeData HealthRegeneration;
|
|
||||||
UPROPERTY( ReplicatedUsing = Client_OnRep_ManaRegeneration, EditAnywhere, BlueprintReadWrite, Category = "Attributes|Secondary" )
|
|
||||||
FGameplayAttributeData ManaRegeneration;
|
|
||||||
|
|
||||||
|
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
@ -69,22 +53,6 @@ public:
|
|||||||
void Client_OnRep_MaxHealth( FGameplayAttributeData& PrevMaxHealth );
|
void Client_OnRep_MaxHealth( FGameplayAttributeData& PrevMaxHealth );
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
void Client_OnRep_MaxMana( FGameplayAttributeData& PrevMaxMana );
|
void Client_OnRep_MaxMana( FGameplayAttributeData& PrevMaxMana );
|
||||||
UFUNCTION()
|
|
||||||
void Client_OnRep_Armor( FGameplayAttributeData& PrevArmor );
|
|
||||||
UFUNCTION()
|
|
||||||
void Client_OnRep_ArmorPenentration( FGameplayAttributeData& PrevArmorPenentration );
|
|
||||||
UFUNCTION()
|
|
||||||
void Client_OnRep_BlockChance( FGameplayAttributeData& PrevBlockChance );
|
|
||||||
UFUNCTION()
|
|
||||||
void Client_OnRep_CriticalHitChance( FGameplayAttributeData& PrevCriticalHitChance );
|
|
||||||
UFUNCTION()
|
|
||||||
void Client_OnRep_CriticalHitDamage( FGameplayAttributeData& PrevCriticalHitDamage );
|
|
||||||
UFUNCTION()
|
|
||||||
void Client_OnRep_CriticalHitResistance( FGameplayAttributeData& PrevCriticalHitResistance );
|
|
||||||
UFUNCTION()
|
|
||||||
void Client_OnRep_HealthRegeneration( FGameplayAttributeData& PrevHealthRegeneration );
|
|
||||||
UFUNCTION()
|
|
||||||
void Client_OnRep_ManaRegeneration( FGameplayAttributeData& PrevManaRegeneration );
|
|
||||||
|
|
||||||
#pragma region Getters
|
#pragma region Getters
|
||||||
static FGameplayAttribute GetHealthAttribute()
|
static FGameplayAttribute GetHealthAttribute()
|
||||||
@ -127,52 +95,6 @@ public:
|
|||||||
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, MaxMana ) );
|
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, MaxMana ) );
|
||||||
return Prop;
|
return Prop;
|
||||||
}
|
}
|
||||||
static FGameplayAttribute GetArmorAttribute()
|
|
||||||
{
|
|
||||||
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, Armor ) );
|
|
||||||
return Prop;
|
|
||||||
}
|
|
||||||
static FGameplayAttribute GetArmorPenentrationAttribute()
|
|
||||||
{
|
|
||||||
static FProperty* Prop =
|
|
||||||
FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, ArmorPenentration ) );
|
|
||||||
return Prop;
|
|
||||||
}
|
|
||||||
static FGameplayAttribute GetBlockChanceAttribute()
|
|
||||||
{
|
|
||||||
static FProperty* Prop = FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, BlockChance ) );
|
|
||||||
return Prop;
|
|
||||||
}
|
|
||||||
static FGameplayAttribute GetCriticalHitChanceAttribute()
|
|
||||||
{
|
|
||||||
static FProperty* Prop =
|
|
||||||
FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, CriticalHitChance ) );
|
|
||||||
return Prop;
|
|
||||||
}
|
|
||||||
static FGameplayAttribute GetCriticalHitDamageAttribute()
|
|
||||||
{
|
|
||||||
static FProperty* Prop =
|
|
||||||
FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, CriticalHitDamage ) );
|
|
||||||
return Prop;
|
|
||||||
}
|
|
||||||
static FGameplayAttribute GetCriticalHitResistanceAttribute()
|
|
||||||
{
|
|
||||||
static FProperty* Prop =
|
|
||||||
FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, CriticalHitResistance ) );
|
|
||||||
return Prop;
|
|
||||||
}
|
|
||||||
static FGameplayAttribute GetHealthRegenerationAttribute()
|
|
||||||
{
|
|
||||||
static FProperty* Prop =
|
|
||||||
FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, HealthRegeneration ) );
|
|
||||||
return Prop;
|
|
||||||
}
|
|
||||||
static FGameplayAttribute GetManaRegenerationAttribute()
|
|
||||||
{
|
|
||||||
static FProperty* Prop =
|
|
||||||
FindFieldChecked<FProperty>( UGasaAttributeSet::StaticClass(), GET_MEMBER_NAME_CHECKED( UGasaAttributeSet, ManaRegeneration ) );
|
|
||||||
return Prop;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE float GetHealth() const { return Health.GetCurrentValue(); }
|
FORCEINLINE float GetHealth() const { return Health.GetCurrentValue(); }
|
||||||
FORCEINLINE float GetMana() const { return Mana.GetCurrentValue(); }
|
FORCEINLINE float GetMana() const { return Mana.GetCurrentValue(); }
|
||||||
@ -182,14 +104,6 @@ public:
|
|||||||
FORCEINLINE float GetVigor() const { return Vigor.GetCurrentValue(); }
|
FORCEINLINE float GetVigor() const { return Vigor.GetCurrentValue(); }
|
||||||
FORCEINLINE float GetMaxHealth() const { return MaxHealth.GetCurrentValue(); }
|
FORCEINLINE float GetMaxHealth() const { return MaxHealth.GetCurrentValue(); }
|
||||||
FORCEINLINE float GetMaxMana() const { return MaxMana.GetCurrentValue(); }
|
FORCEINLINE float GetMaxMana() const { return MaxMana.GetCurrentValue(); }
|
||||||
FORCEINLINE float GetArmor() const { return Armor.GetCurrentValue(); }
|
|
||||||
FORCEINLINE float GetArmorPenentration() const { return ArmorPenentration.GetCurrentValue(); }
|
|
||||||
FORCEINLINE float GetBlockChance() const { return BlockChance.GetCurrentValue(); }
|
|
||||||
FORCEINLINE float GetCriticalHitChance() const { return CriticalHitChance.GetCurrentValue(); }
|
|
||||||
FORCEINLINE float GetCriticalHitDamage() const { return CriticalHitDamage.GetCurrentValue(); }
|
|
||||||
FORCEINLINE float GetCriticalHitResistance() const { return CriticalHitResistance.GetCurrentValue(); }
|
|
||||||
FORCEINLINE float GetHealthRegeneration() const { return HealthRegeneration.GetCurrentValue(); }
|
|
||||||
FORCEINLINE float GetManaRegeneration() const { return ManaRegeneration.GetCurrentValue(); }
|
|
||||||
#pragma endregion Getters
|
#pragma endregion Getters
|
||||||
|
|
||||||
#pragma region Setters
|
#pragma region Setters
|
||||||
@ -201,14 +115,6 @@ public:
|
|||||||
FORCEINLINE void SetVigor( float NewVal );
|
FORCEINLINE void SetVigor( float NewVal );
|
||||||
FORCEINLINE void SetMaxHealth( float NewVal );
|
FORCEINLINE void SetMaxHealth( float NewVal );
|
||||||
FORCEINLINE void SetMaxMana( float NewVal );
|
FORCEINLINE void SetMaxMana( float NewVal );
|
||||||
FORCEINLINE void SetArmor( float NewVal );
|
|
||||||
FORCEINLINE void SetArmorPenentration( float NewVal );
|
|
||||||
FORCEINLINE void SetBlockChance( float NewVal );
|
|
||||||
FORCEINLINE void SetCriticalHitChance( float NewVal );
|
|
||||||
FORCEINLINE void SetCriticalHitDamage( float NewVal );
|
|
||||||
FORCEINLINE void SetCriticalHitResistance( float NewVal );
|
|
||||||
FORCEINLINE void SetHealthRegeneration( float NewVal );
|
|
||||||
FORCEINLINE void SetManaRegeneration( float NewVal );
|
|
||||||
#pragma endregion Setters
|
#pragma endregion Setters
|
||||||
|
|
||||||
#pragma region AttributeSet
|
#pragma region AttributeSet
|
||||||
|
@ -77,78 +77,6 @@ void UGasaAttributeSet::SetMaxMana( float NewVal )
|
|||||||
AbilityComp->SetNumericAttributeBase( GetMaxManaAttribute(), NewVal );
|
AbilityComp->SetNumericAttributeBase( GetMaxManaAttribute(), NewVal );
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
FORCEINLINE
|
|
||||||
void UGasaAttributeSet::SetArmor( float NewVal )
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
|
|
||||||
if ( ensure( AbilityComp ) )
|
|
||||||
{
|
|
||||||
AbilityComp->SetNumericAttributeBase( GetArmorAttribute(), NewVal );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
FORCEINLINE
|
|
||||||
void UGasaAttributeSet::SetArmorPenentration( float NewVal )
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
|
|
||||||
if ( ensure( AbilityComp ) )
|
|
||||||
{
|
|
||||||
AbilityComp->SetNumericAttributeBase( GetArmorPenentrationAttribute(), NewVal );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
FORCEINLINE
|
|
||||||
void UGasaAttributeSet::SetBlockChance( float NewVal )
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
|
|
||||||
if ( ensure( AbilityComp ) )
|
|
||||||
{
|
|
||||||
AbilityComp->SetNumericAttributeBase( GetBlockChanceAttribute(), NewVal );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
FORCEINLINE
|
|
||||||
void UGasaAttributeSet::SetCriticalHitChance( float NewVal )
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
|
|
||||||
if ( ensure( AbilityComp ) )
|
|
||||||
{
|
|
||||||
AbilityComp->SetNumericAttributeBase( GetCriticalHitChanceAttribute(), NewVal );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
FORCEINLINE
|
|
||||||
void UGasaAttributeSet::SetCriticalHitDamage( float NewVal )
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
|
|
||||||
if ( ensure( AbilityComp ) )
|
|
||||||
{
|
|
||||||
AbilityComp->SetNumericAttributeBase( GetCriticalHitDamageAttribute(), NewVal );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
FORCEINLINE
|
|
||||||
void UGasaAttributeSet::SetCriticalHitResistance( float NewVal )
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
|
|
||||||
if ( ensure( AbilityComp ) )
|
|
||||||
{
|
|
||||||
AbilityComp->SetNumericAttributeBase( GetCriticalHitResistanceAttribute(), NewVal );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
FORCEINLINE
|
|
||||||
void UGasaAttributeSet::SetHealthRegeneration( float NewVal )
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
|
|
||||||
if ( ensure( AbilityComp ) )
|
|
||||||
{
|
|
||||||
AbilityComp->SetNumericAttributeBase( GetHealthRegenerationAttribute(), NewVal );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
FORCEINLINE
|
|
||||||
void UGasaAttributeSet::SetManaRegeneration( float NewVal )
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* AbilityComp = GetOwningAbilitySystemComponent();
|
|
||||||
if ( ensure( AbilityComp ) )
|
|
||||||
{
|
|
||||||
AbilityComp->SetNumericAttributeBase( GetManaRegenerationAttribute(), NewVal );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#pragma endregion Attribute Setters
|
#pragma endregion Attribute Setters
|
||||||
|
|
||||||
namespace Gasa
|
namespace Gasa
|
||||||
|
@ -65,19 +65,9 @@ AGasaCharacter::AGasaCharacter()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma region Ability System
|
#pragma region Ability System
|
||||||
void AGasaCharacter::ApplyEffectToSelf(TSubclassOf<UGameplayEffect> GE, float Level)
|
|
||||||
{
|
|
||||||
UAbilitySystemComponent* ASC = GetAbilitySystemComponent();
|
|
||||||
ensure(ASC);
|
|
||||||
ensure(GE);
|
|
||||||
FGameplayEffectContextHandle Context = ASC->MakeEffectContext();
|
|
||||||
FGameplayEffectSpecHandle Spec = ASC->MakeOutgoingSpec(GE, Level, Context );
|
|
||||||
ASC->ApplyGameplayEffectSpecToTarget( * Spec.Data, ASC );
|
|
||||||
}
|
|
||||||
|
|
||||||
void AGasaCharacter::InitDefaultAttributes()
|
void AGasaCharacter::InitDefaultAttributes()
|
||||||
{
|
{
|
||||||
UAbilitySystemComponent* ASC = GetAbilitySystemComponent();
|
UAbilitySystemComponent* ASC = GetAbilitySystemComponent();
|
||||||
ensure(ASC);
|
ensure(ASC);
|
||||||
ensure(DefaultVitalAttributes);
|
ensure(DefaultVitalAttributes);
|
||||||
ensure(DefaultPrimaryAttributes);
|
ensure(DefaultPrimaryAttributes);
|
||||||
|
@ -44,9 +44,6 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Ability System")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Ability System")
|
||||||
TSubclassOf<UGameplayEffect> DefaultSecondaryAttributes;
|
TSubclassOf<UGameplayEffect> DefaultSecondaryAttributes;
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
|
||||||
void ApplyEffectToSelf(TSubclassOf<UGameplayEffect> GE, float Level);
|
|
||||||
|
|
||||||
void InitDefaultAttributes();
|
void InitDefaultAttributes();
|
||||||
#pragma endregion Ability System
|
#pragma endregion Ability System
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user