Bugfix Player Getting Damaged Once Boss was Dead

This commit is contained in:
Philip W 2023-05-22 17:12:08 +01:00
parent 4bba8fc1eb
commit ccb50a804e

View File

@ -415,6 +415,9 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo)
if (!bPlayerHasExtraTurn)
{
FProperty* IsBossProperty = FindFieldChecked<FProperty>(EnemyActor->GetClass(), "IsBoss");
const FBoolProperty* IsBossBoolProperty = CastFieldChecked<FBoolProperty>(IsBossProperty);
if (IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor) && EnemyHealth <= nullptr) return;
SwitchTurn();
}
else