Auto stash before rebase of "main" onto "main/main"
This commit is contained in:
@@ -48,8 +48,12 @@ void ULevelAttributeSet::ConsumeXPGain()
|
||||
const float Gain = GetXPGain();
|
||||
if (Gain > 0.0f)
|
||||
{
|
||||
SetXP(GetXP() + Gain);
|
||||
float OldXP = GetXP();
|
||||
float NewXP =OldXP + Gain;
|
||||
SetXP(NewXP);
|
||||
SetXPGain(0.0f);
|
||||
OnXPChanged.Broadcast(this, GetXP(), Gain);
|
||||
OnLevelChanged.Broadcast(this, GetXP()-Gain, Level.GetCurrentValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,5 +112,6 @@ void ULevelAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCallb
|
||||
SetLevel(static_cast<float>(Lvl));
|
||||
SetXP(FMath::Clamp(GetXP(),0.0f,ComputeXPForLevel(Lvl)));
|
||||
SetXPToNextLevel(ComputeXPForLevel(Lvl));
|
||||
OnXPToNextLevelChanged.Broadcast(this, OldValue.GetCurrentValue(), XPToNextLevel.GetCurrentValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ void UManaAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCallba
|
||||
if (Data.EvaluatedData.Attribute == GetManaAttribute())
|
||||
{
|
||||
SetMana(FMath::Clamp(GetMana(), 0.0f, GetMaxMana()));
|
||||
;
|
||||
}
|
||||
if (Data.EvaluatedData.Attribute == GetCostAttribute())
|
||||
{
|
||||
@@ -48,7 +49,9 @@ void UManaAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCallba
|
||||
if (OldMana!=NewMana)
|
||||
{
|
||||
SetMana(NewMana);
|
||||
OnManaChanged.Broadcast(this, OldMana, NewMana);
|
||||
}
|
||||
OnManaChanged.Broadcast(this, OldMana, NewMana);
|
||||
SetCost(0.0f);
|
||||
}
|
||||
if (Data.EvaluatedData.Attribute==GetRestoreAttribute())
|
||||
@@ -60,7 +63,9 @@ void UManaAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCallba
|
||||
if (OldMana!=NewMana)
|
||||
{
|
||||
SetMana(NewMana);
|
||||
OnManaChanged.Broadcast(this, OldMana, NewMana);
|
||||
}
|
||||
OnManaChanged.Broadcast(this, OldMana, NewMana);
|
||||
SetRestore(0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ void UStaminaAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCal
|
||||
if (OldStamina!=NewStamina)
|
||||
{
|
||||
SetStamina(NewStamina);
|
||||
OnMaxStaminaChanged.Broadcast(this, OldMaxStamina, NewMaxStamina);
|
||||
}
|
||||
SetDrain(0.0f);
|
||||
}
|
||||
@@ -57,6 +58,7 @@ void UStaminaAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCal
|
||||
if (OldStamina!=NewStamina)
|
||||
{
|
||||
SetStamina(NewStamina);
|
||||
OnMaxStaminaChanged.Broadcast(this, OldMaxStamina, NewMaxStamina);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
UCLASS()
|
||||
class ELISTRIA_CALLING_API UStaminaAttributeSet : public UElistriaAttributeSetBase
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FAttributeChangedEvent, UAttributeSet*, AttributeSet, float, OldValue,
|
||||
float, NewValue);
|
||||
#define ATTRIBUTE_ACCESSORS(ClassName, PropertyName) \
|
||||
GAMEPLAYATTRIBUTE_PROPERTY_GETTER(ClassName, PropertyName) \
|
||||
GAMEPLAYATTRIBUTE_VALUE_GETTER(PropertyName) \
|
||||
|
||||
Reference in New Issue
Block a user