Added Starter Quests

This commit is contained in:
Philip W 2023-05-04 05:12:43 +01:00
parent 23c9c5b07a
commit fc9597ed33
2 changed files with 3 additions and 3 deletions

BIN
Content/Levels/Build.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -58,7 +58,6 @@ void UQuestSystem::CheckActiveQuestConditions()
{ {
if (Quest->CheckConditions(GetWorldState())) if (Quest->CheckConditions(GetWorldState()))
{ {
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Quest Completed!"));
CompletedQuests.Add(Quest); CompletedQuests.Add(Quest);
Quest->ApplyRewards(PlayerInventory); Quest->ApplyRewards(PlayerInventory);
QuestCompletionTitle->SetText(Quest->Title); QuestCompletionTitle->SetText(Quest->Title);
@ -88,6 +87,7 @@ UWorldState* UQuestSystem::GetWorldState() const
bool UQuestSystem::AddQuest(UQuest* Quest) bool UQuestSystem::AddQuest(UQuest* Quest)
{ {
if (HasActiveQuest(Quest)) return false;
if (!Quest->CheckPreConditions(GetWorldState())) return false; if (!Quest->CheckPreConditions(GetWorldState())) return false;
ActiveQuests.Add(Quest); ActiveQuests.Add(Quest);
if (Quest->QuestLine == EQuestLine::Sub) if (Quest->QuestLine == EQuestLine::Sub)