Space Plunder
Loading...
Searching...
No Matches
QuestBPLib.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Data/QuestData.h"
7#include "Kismet/BlueprintFunctionLibrary.h"
8#include "QuestBPLib.generated.h"
9
10class IQuestView;
12class IQuestReporter;
13class IQuestPlayer;
14
15UCLASS()
16class QUESTSYSTEM_API UQuestBPLib : public UBlueprintFunctionLibrary
17{
18 GENERATED_BODY()
19
20public:
21 //@TODO Check all the functinos if they're still needed
22
23
24 static IQuestPlayer* GetPlayerQuestComponent(const AActor* Actor);
25 static IQuestPlayer* GetPlayerQuestComponent(const APlayerState* PlayerState);
26 static IQuestPlayer* GetPlayerQuestComponent(const AController* Controller);
27 static UObject* GetPlayerQuestComponentObject(const AActor* Actor);
28 static UObject* GetPlayerQuestComponentObject(const APlayerState* PlayerState);
29 static UObject* GetPlayerQuestComponentObject(const AController* Controller);
30
31
32 static IQuestReporter* GetQuestReporter(const UObject* WorldContextObject);
34 UFUNCTION(BlueprintCallable, Category="Quest System", meta=(WorldContext="WorldContextObject"), DisplayName="Get Quest Reporter")
35 static UActorComponent* GetQuestReporterReference(const UObject* WorldContextObject);
36
37 static IQuestDataInterface* GetQuestData(const UObject* WorldContextObject);
38
39 static IQuestView* GetQuestViewer(const AController* Controller);
40 //@ TODO Add these if needed
41 // UFUNCTION(BlueprintCallable, Category="Quest System")
42 // static UActorComponent* GetQuestPlayerComponent(const AActor* Actor);
43 // UFUNCTION(BlueprintCallable, Category="Quest System")
44 // static UActorComponent* GetQuestPlayerComponent(const APlayerState* PlayerState);
45 // UFUNCTION(BlueprintCallable, Category="Quest System")
46 // static UActorComponent* GetQuestPlayerComponent(const AController* Controller);
47
48
49 // Remove and go through all old functions
50 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
51 static UDataTable* LoadDefaultQuestDataTable();
52 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
53 static UDataTable* LoadDefaultObjectiveDataTable();
54
55 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System", meta=(WorldContext="WorldContextObject"))
56 static UDataTable* LoadQuestDataTableFromGameState(const UObject* WorldContextObject);
57 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System", meta=(WorldContext="WorldContextObject"))
58 static UDataTable* LoadObjectiveDataTableFromGameState(const UObject* WorldContextObject);
59
60
61 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
62 // static LoadObjectiveDataTableFromGameState(const UObject* WorldContextObject);
63
64 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
65 // static UDataTable* GetQuestDataTable(const AActor* OwningActor);
66
67 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
68 static bool GetOwningPlayerQuestStatus(const AActor* OwningActor, FPlayerQuestStatus& PlayerQuestStatus);
69
70
71 //- Convert Enums //
72 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
73 static FString ConvertQuestFilterToString(const EFilterQuestType FilterType, bool& bSuccess);
74 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
75 // static FString ConvertQuestCategoryToString(const EQuestCategory CategoryType, bool& bSuccess);
76 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
77 static FString ConvertQuestLocationToString(const EQuestLocation QuestLocation, bool& bSuccess);
78
79
80
81 //- Returns Quest info Based on ID in specified DataTable, Returns QuestData and if Succeeded //
82 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System", meta=(WorldContext="WorldContextObject"))
83 static FQuestInfo GetQuestInfo(const UObject* WorldContextObject, const FString& QuestID, bool& bSuccess, const UDataTable* DataTable = nullptr);
84 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System", meta=(WorldContext="WorldContextObject"))
85 static FQuestObjectives GetQuestObjectiveInfo(const UObject* WorldContextObject, const FString& ObjectiveID, bool& bSuccess, const UDataTable* DataTable = nullptr);
86
87
88 //- Returns Objectives Based on ID in specified DataTable, Returns Objectives and if Succeeded //
89 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
90 // static TArray<FQuestObjectives> GetQuestObjectives(const FString& QuestID, bool& bSuccess, const UDataTable* DataTable = nullptr);
91 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
92 // static TArray<FString> GetQuestObjectiveIDs(const FString& QuestID, bool& bSuccess, const UDataTable* DataTable = nullptr);
93
94 //- Checks: if Complete, Aborted, Active, IsValid, & if we've Finished required quests & Not at the maximum Active quests //
95 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System", meta=(WorldContext="WorldContextObject"))
96 // static bool CanQuestBeAccepted(const UObject* WorldContextObject, const FString& QuestID, const FPlayerQuestStatus& PlayerQuestStatus, const UDataTable* DataTable = nullptr);
97 // //- Checks: If all Objectives are completed //
98 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
99 // static bool CanQuestBeCompleted(const TArray<FQuestObjectives>& Objectives, EQuestOutcome& QuestOutcome);
100 //- Use to check if completed, Abandoned, Failed, Active //
101 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
102 // static bool DoesListContainQuest(const FString& QuestID, const TArray<FString>& QuestListIDs);
103 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
104 // static EQuestOutcome GetQuestOutcome(const FString& QuestID, const FPlayerQuestStatus& PlayerQuestStatus);
105
106 //- Use for checking if we're completed the required quests //
107 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
108 // static bool HasFinishedQuests(const TArray<FString>& QuestIDs, const TArray<FString>& CompletedQuestIDs);
109
110 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System", meta=(WorldContext="WorldContextObject"))
111 // static bool IsQuestActive(const UObject* WorldContextObject, const FString& QuestID, const TArray<FString>& ActiveQuestIDs, FQuestInfo& ActiveQuestInfo, const UDataTable* DataTable = nullptr);
112 //- Checks for Default Values and no Objectives //
113 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System", meta=(WorldContext="WorldContextObject"))
114 // static bool IsValidQuest(const UObject* WorldContextObject, const FString& QuestID, const UDataTable* DataTable = nullptr);
115
116 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Quest System")
117 // static TArray<FString> GetIDsFromQuests(const TArray<FQuestInfo>& Quests, bool& bSuccess);
118
119
120};
121
122
123
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
EFilterQuestType
Definition QuestData.h:28
EQuestLocation
Definition QuestData.h:51
Definition QuestDataInterface.h:20
Definition QuestPlayer.h:27
Definition QuestReporter.h:23
Definition QuestView.h:21
Definition QuestBPLib.h:17
Definition QuestData.h:1117
Definition QuestData.h:798
Definition QuestData.h:361