Added Custom Bounty Altering Effect UFunctions

This commit is contained in:
Rafal Swierczek 2023-10-10 19:11:29 +01:00
parent 72e445efed
commit 3c1d16c967
2 changed files with 34 additions and 8 deletions

View File

@ -35,6 +35,16 @@ protected:
UPROPERTY(EditDefaultsOnly, Category = "Bounty") UPROPERTY(EditDefaultsOnly, Category = "Bounty")
FString BountyDesc; FString BountyDesc;
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
FString CustomAlteringEffect1_Description;
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
FString CustomAlteringEffect2_Description;
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
FString CustomAlteringEffect3_Description;
// ----------------------------------------------- // -----------------------------------------------
bool Completed = false; bool Completed = false;
@ -128,13 +138,30 @@ public:
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void CollectRewards(); void CollectRewards();
void DestroyReturnToShipStep() UFUNCTION(BlueprintImplementableEvent, Category = "Bounty")
void CustomBountyAlteringEffect1();
UFUNCTION(BlueprintCallable, Category = "Bounty")
FString GetCustomBountyAlteringEffect1_Description()
{ {
if (BountyCheckpoints.Num() > 1) return CustomAlteringEffect1_Description;
{
UE_LOG(LogTemp, Warning, TEXT("Didn't Destroy final step as more than one steps still left in Bounty"));
} }
BountyCheckpoints[0]->Destroy(); UFUNCTION(BlueprintImplementableEvent, Category = "Bounty")
void CustomBountyAlteringEffect2();
UFUNCTION(BlueprintCallable, Category = "Bounty")
FString GetCustomBountyAlteringEffect2_Description()
{
return CustomAlteringEffect2_Description;
}
UFUNCTION(BlueprintImplementableEvent, Category = "Bounty")
void CustomBountyAlteringEffect3();
UFUNCTION(BlueprintCallable, Category = "Bounty")
FString GetCustomBountyAlteringEffect3_Description()
{
return CustomAlteringEffect3_Description;
} }
}; };

View File

@ -85,7 +85,6 @@ void ABountyDirector::FinishActiveBounty()
ActiveBounty->CollectRewards(); ActiveBounty->CollectRewards();
// Destroy old Bounties // Destroy old Bounties
ActiveBounty->DestroyReturnToShipStep();
ActiveBounty->Destroy(); ActiveBounty->Destroy();
DestroyActiveSideBounties(); DestroyActiveSideBounties();