From 3c1d16c9671fdd5c8cbbd72a84ea4665d6556db0 Mon Sep 17 00:00:00 2001 From: Rafal Swierczek <34179rs@gmail.com> Date: Tue, 10 Oct 2023 19:11:29 +0100 Subject: [PATCH] Added Custom Bounty Altering Effect UFunctions --- .../BountySystem/BountyClass.h | 41 +++++++++++++++---- .../BountySystem/BountyDirector.cpp | 1 - 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h index 48ecb257..40f2ff03 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h @@ -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; } }; diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.cpp b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.cpp index 6f1a7cab..8708cf04 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.cpp @@ -85,7 +85,6 @@ void ABountyDirector::FinishActiveBounty() ActiveBounty->CollectRewards(); // Destroy old Bounties - ActiveBounty->DestroyReturnToShipStep(); ActiveBounty->Destroy(); DestroyActiveSideBounties();