Bugfix Player Getting Damaged Once Boss was Dead
This commit is contained in:
parent
4bba8fc1eb
commit
ccb50a804e
@ -62,7 +62,7 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, const bool bWasShot)
|
||||
PlayerActor->CallFunctionByNameWithArguments(*Command, AR, nullptr, true);
|
||||
const FString Command69 = FString::Printf(TEXT("CloseEscapeMenu"));
|
||||
PlayerActor->CallFunctionByNameWithArguments(*Command69, AR, nullptr, true);
|
||||
|
||||
|
||||
//Disable Character Movement
|
||||
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
|
||||
PlayerController->SetIgnoreMoveInput(true);
|
||||
@ -112,7 +112,7 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, const bool bWasShot)
|
||||
void ATurnBaseCombatV2::CombatCheck(const bool bWasShot)
|
||||
{
|
||||
const UBlackboardComponent* EnemyBlackboard = Cast<AAIController>(EnemyActor->GetInstigatorController())->GetBlackboardComponent();
|
||||
|
||||
|
||||
ChainDamageMultiplier = 0;
|
||||
BaseDamageMultiplier = DefaultBaseDamageMultiplier;
|
||||
EnemyBaseDamageMultiplier = DefaultEnemyBaseDamageMultiplier;
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user