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);
|
PlayerActor->CallFunctionByNameWithArguments(*Command, AR, nullptr, true);
|
||||||
const FString Command69 = FString::Printf(TEXT("CloseEscapeMenu"));
|
const FString Command69 = FString::Printf(TEXT("CloseEscapeMenu"));
|
||||||
PlayerActor->CallFunctionByNameWithArguments(*Command69, AR, nullptr, true);
|
PlayerActor->CallFunctionByNameWithArguments(*Command69, AR, nullptr, true);
|
||||||
|
|
||||||
//Disable Character Movement
|
//Disable Character Movement
|
||||||
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
|
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
|
||||||
PlayerController->SetIgnoreMoveInput(true);
|
PlayerController->SetIgnoreMoveInput(true);
|
||||||
@ -112,7 +112,7 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, const bool bWasShot)
|
|||||||
void ATurnBaseCombatV2::CombatCheck(const bool bWasShot)
|
void ATurnBaseCombatV2::CombatCheck(const bool bWasShot)
|
||||||
{
|
{
|
||||||
const UBlackboardComponent* EnemyBlackboard = Cast<AAIController>(EnemyActor->GetInstigatorController())->GetBlackboardComponent();
|
const UBlackboardComponent* EnemyBlackboard = Cast<AAIController>(EnemyActor->GetInstigatorController())->GetBlackboardComponent();
|
||||||
|
|
||||||
ChainDamageMultiplier = 0;
|
ChainDamageMultiplier = 0;
|
||||||
BaseDamageMultiplier = DefaultBaseDamageMultiplier;
|
BaseDamageMultiplier = DefaultBaseDamageMultiplier;
|
||||||
EnemyBaseDamageMultiplier = DefaultEnemyBaseDamageMultiplier;
|
EnemyBaseDamageMultiplier = DefaultEnemyBaseDamageMultiplier;
|
||||||
@ -415,6 +415,9 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo)
|
|||||||
|
|
||||||
if (!bPlayerHasExtraTurn)
|
if (!bPlayerHasExtraTurn)
|
||||||
{
|
{
|
||||||
|
FProperty* IsBossProperty = FindFieldChecked<FProperty>(EnemyActor->GetClass(), "IsBoss");
|
||||||
|
const FBoolProperty* IsBossBoolProperty = CastFieldChecked<FBoolProperty>(IsBossProperty);
|
||||||
|
if (IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor) && EnemyHealth <= nullptr) return;
|
||||||
SwitchTurn();
|
SwitchTurn();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user