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")
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;
@ -128,13 +138,30 @@ public:
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void CollectRewards();
void DestroyReturnToShipStep()
{
if (BountyCheckpoints.Num() > 1)
{
UE_LOG(LogTemp, Warning, TEXT("Didn't Destroy final step as more than one steps still left in Bounty"));
}
UFUNCTION(BlueprintImplementableEvent, Category = "Bounty")
void CustomBountyAlteringEffect1();
BountyCheckpoints[0]->Destroy();
UFUNCTION(BlueprintCallable, Category = "Bounty")
FString GetCustomBountyAlteringEffect1_Description()
{
return CustomAlteringEffect1_Description;
}
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();
// Destroy old Bounties
ActiveBounty->DestroyReturnToShipStep();
ActiveBounty->Destroy();
DestroyActiveSideBounties();