5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
13#include "QuestPlayerComponent.generated.h"
23UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent) )
24class QUESTSYSTEM_API UQuestPlayerComponent :
public UPlayerControllerComponent,
public IQuestPlayer,
public IQuestView
29 UQuestPlayerComponent();
31 virtual
void ComponentSetupComplete() override;
35 virtual
void ObjectiveComplete(const FString& ObjectiveID) override;
36 virtual
void ObjectiveFailed(const FString& ObjectiveID) override;
38 virtual int32 GetPlayerQuestIndex()
const override {
return ActiveQuest;};
41 UPROPERTY(BlueprintAssignable, Category=
"Quest System")
42 FOnPlayerQuestStatusUpdated OnPlayerQuestStatusUpdated;
45 UFUNCTION(BlueprintCallable, Category="Quest
System")
46 void CreateQuestTrackerWidget(const
FQuestInfo& QuestInfo);
49 UFUNCTION(BlueprintCallable, Category="Quest
System", BlueprintPure=false)
50 void UpdateQuestTracker() const;
52 UFUNCTION(BlueprintCallable, Category="Quest
System")
53 virtual
void SetQuestTrackerVisibility(const
bool bVisible) const override;
55 UFUNCTION(BlueprintCallable, Category="Quest
System")
56 virtual
bool GetIsTrackerVisible() const override;
57 virtual int32 GetActiveQuestIndex()
const override {
return ActiveQuest;};
68 virtual void AddQuest(
const int32 QuestIndex)
override;
70 UFUNCTION(BlueprintCallable, Category=
"Quest System")
71 virtual
void CompleteQuest(const
FQuestOutcome& QuestOutcome) override;
73 UFUNCTION(BlueprintCallable, Category="Quest
System")
74 virtual
bool GetIsActiveQuest(const
FQuestInfo& QuestInfo) const override;
76 virtual
void CreditsAdded(const int32 CreditsAdded, const int32 TotalCredits) override;
77 virtual
void ExperienceAdded(const int32 ExperienceAdded, const int32 TotalExperience) override;
80 UFUNCTION(BlueprintCallable, Category="Quest
System", BlueprintPure=false)
81 bool ToggleQuestLog();
83 UFUNCTION(BlueprintCallable, Category="Quest
System")
84 bool TrackButtonPressed();
86 UFUNCTION(BlueprintCallable, Category="Quest
System", BlueprintPure=false)
87 bool ToggleQuestTracker() const;
88 UFUNCTION(BlueprintCallable, Category="Quest
System", BlueprintPure=false)
89 bool ToggleQuestStats() const;
91 UFUNCTION(BlueprintCallable, Category="Quest
System")
92 void PlaceWaypointsOnActors() ;
93 UFUNCTION(BlueprintCallable, Category="Quest
System")
94 void RemoveWaypointsOnActors() ;
95 UFUNCTION(BlueprintCallable, Category="Quest
System")
96 void RemoveAllWaypoints() ;
98 UFUNCTION(BlueprintCallable, Category="Quest
System")
99 TSoftObjectPtr<UUserWidget> GetQuestLogWidget() const;
102 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Quest
System|Widget")
106 virtual
void BeginPlay() override;
109 virtual
bool SaveGame() override;
110 virtual
bool LoadGame() override;
117 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Quest
System|Widget")
119 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Quest
System|Widget")
120 float QuestUpdateNotificationLife = 1.0f;
121 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Quest
System|Widget")
122 float RewardLife = 3.0f;
123 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Quest
System|Widget")
124 TSoftClassPtr<UUserWidget> QuestLogWidgetClass;
125 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Quest
System|Widget")
126 TSoftClassPtr<UUserWidget> QuestTrackerWidgetClass;
127 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Quest
System|Widget")
128 TSoftClassPtr<UUserWidget> QuestNotificationManagerClass;
130 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Quest
System|Widget")
131 TSoftClassPtr<UUserWidget> QuestStatsClass;
133 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Quest
System|Quests")
134 int32 ActiveQuest = -1;
138 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Quest
System|Quests")
139 bool bTrackNewQuest = false;
140 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Quest
System|Quests")
144 void SetupQuestLogWidget();
145 void SetupQuestTrackerWidget();
146 void SetupQuestNotificationManager();
147 void SetupQuestStatsWidget();
149 void UpdateQuestStats() const;
150 void UpdateQuestLog() const;
158 class
IRewards* QuestStats =
nullptr;
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnPlayerQuestStatusUpdated, const FPlayerQuestStatus &, QuestStatus)
Definition NotificationManagerInterface.h:23
Definition QuestDataInterface.h:20
Definition QuestLogHUD.h:21
Definition QuestPlayer.h:27
virtual void AddQuest(const int32 QuestIndex)=0
Definition QuestTrackerHUD.h:21
Definition QuestView.h:21
virtual bool SetCurrentQuest(const FQuestInfo &QuestInfo)=0
virtual bool ToggleQuestTrackerVisibility()
Definition QuestView.h:44
Definition RadialWheelData.h:17
Definition QuestData.h:1117
Definition QuestData.h:798
Definition QuestData.h:1084
Definition BaseData.h:253