// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "UWorldState.h" #include "Quest.generated.h" UENUM(BlueprintType) enum class EQuestLine : uint8 { Main UMETA(DisplayName="Main"), Sub UMETA(DisplayName="Sub") }; UCLASS(Abstract, BlueprintType, Blueprintable, EditInlineNew, DefaultToInstanced) class THE_TWILIGHT_ABYSS_API UQuest : public UObject { GENERATED_BODY() public: UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) FText Title; UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) FText Description; UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) EQuestLine QuestLine; UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, NoClear, Instanced) UWorldState* Goals; UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Instanced) UWorldState* PreConditions; UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, NoClear, Instanced) TArray Rewards; bool CheckConditions(UWorldState* WorldState) const; bool CheckPreConditions(UWorldState* WorldState) const; void ApplyRewards(UInventoryComponent* Inventory); static bool WorldStateMatch(UWorldState* A, UWorldState* B); };