Bugfix Heal Over Time Exposed Heal Amount

This commit is contained in:
Blue Probert 2023-04-27 17:59:06 +01:00
parent fc8c6bae19
commit 0f0618ed0a
2 changed files with 3 additions and 1 deletions

View File

@ -20,7 +20,7 @@ void UHealOverTime::Heal(AActor* Character, const float Amount) const
void UHealOverTime::Invoke(AActor* Character, float TimeOfExpiry)
{
Super::Invoke(Character, TimeOfExpiry);
GetWorld()->GetTimerManager().SetTimer(HealTimerHandle, [this, Character] { Heal(Character, 1); }, 1, true, 0);
GetWorld()->GetTimerManager().SetTimer(HealTimerHandle, [this, Character] { Heal(Character, HealAmount); }, 1, true, 0);
}
void UHealOverTime::OnExpiry(AActor* Character)

View File

@ -22,4 +22,6 @@ public:
FTimerHandle HealTimerHandle;
virtual void Invoke(AActor* Character, float TimeOfExpiry) override;
virtual void OnExpiry(AActor* Character) override;
UPROPERTY(EditAnywhere)
int HealAmount = 1;
};