diff --git a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll index 8feff75..4b3f20d 100644 Binary files a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll and b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll differ diff --git a/ProjectFish/Content/DataAssets/Quest/Quest1_AutoAccept_CompleteByReward.uasset b/ProjectFish/Content/DataAssets/Quest/Quest1_AutoAccept_CompleteByReward.uasset index ebf903a..f226801 100644 Binary files a/ProjectFish/Content/DataAssets/Quest/Quest1_AutoAccept_CompleteByReward.uasset and b/ProjectFish/Content/DataAssets/Quest/Quest1_AutoAccept_CompleteByReward.uasset differ diff --git a/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_QuestList.uasset b/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_QuestList.uasset new file mode 100644 index 0000000..566286a Binary files /dev/null and b/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_QuestList.uasset differ diff --git a/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_Quest_Item.uasset b/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_Quest_Item.uasset new file mode 100644 index 0000000..85347d9 Binary files /dev/null and b/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_Quest_Item.uasset differ diff --git a/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_Quest_ObjectInfo.uasset b/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_Quest_ObjectInfo.uasset new file mode 100644 index 0000000..92751c0 Binary files /dev/null and b/ProjectFish/Content/UI/Fishing/Widgets/FollowQuest/UMG_Following_Quest_ObjectInfo.uasset differ diff --git a/ProjectFish/Content/UI/Fishing/Windows/UMG_ReadyWIndow.uasset b/ProjectFish/Content/UI/Fishing/Windows/UMG_ReadyWIndow.uasset index 804c456..a675d21 100644 Binary files a/ProjectFish/Content/UI/Fishing/Windows/UMG_ReadyWIndow.uasset and b/ProjectFish/Content/UI/Fishing/Windows/UMG_ReadyWIndow.uasset differ diff --git a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/QuestManager.cpp b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/QuestManager.cpp index a3f7cf5..1ed805c 100644 --- a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/QuestManager.cpp +++ b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/QuestManager.cpp @@ -257,6 +257,19 @@ TArray UQuestManager::GetActiveQuests() const return Result; } +TArray UQuestManager::GetFollowingQuests() const +{ + TArray Result; + for (const TPair& Pair : ActiveQuestsMap) + { + if (FollowingQuestIDs.Contains(Pair.Key)) + { + Result.Add(Pair.Value.QuestAsset); + } + } + return Result; +} + TArray UQuestManager::GetCompletedQuests() const { TArray Result; @@ -281,6 +294,17 @@ bool UQuestManager::GetQuestProgress(int32 QuestID, TArray& OutP return false; } +bool UQuestManager::GetQuestRuntimeData(int32 QuestID, FQuestRuntimeData& OutData) const +{ + const FQuestRuntimeData* RuntimeData = ActiveQuestsMap.Find(QuestID); + if (RuntimeData) + { + OutData = *RuntimeData; + return true; + } + return false; +} + bool UQuestManager::CanAcceptQuest(UQuestAsset* QuestAsset) const { if (!QuestAsset) @@ -353,7 +377,7 @@ void UQuestManager::LoadFromSaveData(const TArray& SaveData) if (questAsset->QuestID == Data.QuestID) { FQuestRuntimeData RuntimeData = CreateRuntimeData(questAsset); - for (int i =0; i < RuntimeData.ObjectiveProgress.Num(); i++) + for (int i =0; i < Data.ObjectiveProgress.Num(); i++) { RuntimeData.ObjectiveProgress[i].CurrentProgress = Data.ObjectiveProgress[i]; RuntimeData.ObjectiveProgress[i].bCompleted = Data.ObjectiveCompleted[i]; diff --git a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/QuestManager.h b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/QuestManager.h index 5b3d50a..2936cdc 100644 --- a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/QuestManager.h +++ b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/QuestManager.h @@ -95,6 +95,10 @@ public: UFUNCTION(BlueprintPure, Category = "Quest") TArray GetActiveQuests() const; + /** 获取所有追踪的任务 */ + UFUNCTION(BlueprintPure, Category = "Quest") + TArray GetFollowingQuests() const; + /** 获取所有已完成的任务 */ UFUNCTION(BlueprintPure, Category = "Quest") TArray GetCompletedQuests() const; @@ -103,6 +107,10 @@ public: UFUNCTION(BlueprintPure, Category = "Quest") bool GetQuestProgress(int32 QuestID, TArray& OutProgress) const; + /** 获取任务进度 */ + UFUNCTION(BlueprintPure, Category = "Quest") + bool GetQuestRuntimeData(int32 QuestID, FQuestRuntimeData& OutData) const; + /** 检查是否可以接受任务(前置任务检查) */ UFUNCTION(BlueprintPure, Category = "Quest") bool CanAcceptQuest(UQuestAsset* QuestAsset) const; @@ -140,7 +148,7 @@ private: TMap ActiveQuestsMap; /** 正在追踪的任务列表 */ - UPROPERTY() + UPROPERTY(BlueprintReadOnly, meta = (AllowPrivateAccess = true)) TSet FollowingQuestIDs; /** 已完成的任务ID列表 */