Bugfix Random Fatal Crash After Combat

This commit is contained in:
Philip W 2023-05-19 02:38:10 +01:00
parent 09b55ac425
commit df08924046

View File

@ -156,6 +156,7 @@ void ATurnBaseCombatV2::EndCombat()
{
StatusEffect->OnExpiry(PlayerActor);
}
StatusEffects.Empty();
HUD->RemoveFromParent();
APawn* PlayerPawn = Cast<APawn>(GetWorld()->GetFirstPlayerController()->GetPawn());
@ -782,6 +783,7 @@ void ATurnBaseCombatV2::EnableButtons() const
void ATurnBaseCombatV2::EnemyTurn()
{
if (!IsValid(EnemyActor)) return;
int ChanceToMiss;
FProperty* IsBossProperty = FindFieldChecked<FProperty>(EnemyActor->GetClass(), "IsBoss");
const FBoolProperty* IsBossBoolProperty = CastFieldChecked<FBoolProperty>(IsBossProperty);