more fixing
This commit is contained in:
@@ -112,6 +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());
|
||||
OnXPToNextLevelChanged.Broadcast(this, XPToNextLevel.GetCurrentValue(), XPToNextLevel.GetCurrentValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void UStaminaAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCal
|
||||
if (OldStamina!=NewStamina)
|
||||
{
|
||||
SetStamina(NewStamina);
|
||||
OnMaxStaminaChanged.Broadcast(this, OldMaxStamina, NewMaxStamina);
|
||||
OnMaxStaminaChanged.Broadcast(this, OldStamina, NewStamina);
|
||||
}
|
||||
SetDrain(0.0f);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ void UStaminaAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCal
|
||||
if (OldStamina!=NewStamina)
|
||||
{
|
||||
SetStamina(NewStamina);
|
||||
OnMaxStaminaChanged.Broadcast(this, OldMaxStamina, NewMaxStamina);
|
||||
OnMaxStaminaChanged.Broadcast(this, OldStamina, NewStamina);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ void AMagickPlayerState::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& O
|
||||
DOREPLIFETIME_CONDITION_NOTIFY(AMagickPlayerState, ManaSet, COND_None, REPNOTIFY_Always);
|
||||
DOREPLIFETIME_CONDITION_NOTIFY(AMagickPlayerState, HealthSet, COND_None, REPNOTIFY_Always);
|
||||
DOREPLIFETIME_CONDITION_NOTIFY(AMagickPlayerState, StaminaSet, COND_None, REPNOTIFY_Always);
|
||||
DOREPLIFETIME_CONDITION_NOTIFY(AMagickPlayerState, LevelSet, COND_None, REPNOTIFY_Always);
|
||||
}
|
||||
|
||||
void AMagickPlayerState::SetupAbilityActorInfo()
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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) \
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
void SetupAbilityActorInfo();
|
||||
|
||||
protected:
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Abilities, Replicated)
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Abilities, ReplicatedUsing = OnRep_ElistriaAbilitySystemComponent)
|
||||
TObjectPtr<class UElistriaAbilitySystemComponent> ElistriaAbilitySystemComponent;
|
||||
|
||||
UPROPERTY(Replicated)
|
||||
@@ -46,6 +46,8 @@ protected:
|
||||
UPROPERTY(Replicated)
|
||||
TObjectPtr<ULevelAttributeSet> LevelSet;
|
||||
|
||||
UFUNCTION()
|
||||
void OnRep_ElistriaAbilitySystemComponent();
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user