AzureAbyss/Source/the_twilight_abyss/Quest/Quest.h

40 lines
1.1 KiB
C
Raw Normal View History

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