Bugfix Crash On Damage Over Time Kill

This commit is contained in:
Blue Probert 2023-04-27 17:50:13 +01:00
parent 82ce8b2074
commit fc8c6bae19

View File

@ -45,6 +45,7 @@ void UStatusEffect::OnStatusEffectAdd(AActor* Character)
void UStatusEffect::TickDown(AActor* Character)
{
UStatusSystem* StatusSystem = Cast<UStatusSystem>(Character->GetComponentByClass(UStatusSystem::StaticClass()));
if (!IsValid(StatusSystem->GetActiveStatusEffect(this).StatusIcon)) return;
UTextBlock* StatusText = Cast<UTextBlock>(StatusSystem->GetActiveStatusEffect(this).StatusIcon->GetWidgetFromName(TEXT("DurationText")));
StatusText->SetText(FText::FromString(FString::FromInt(BaseDuration)));
}