// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "BountyClass.h"
#include "SideBountyClass.generated.h"

USTRUCT(BlueprintType)
struct FSideBountyStruct
{
	GENERATED_BODY();

	UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
	FString BountyTitle = "";

	UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
	FString BountyDesc = "";

	UPROPERTY(BlueprintReadOnly)
	int SideBountyUID = 0;

	// Amount of Favours the Player will earn for Completing this Side Bounty
    UPROPERTY(EditDefaultsOnly)
	int FavoursEarnedForCompletion = 1;

	int MoneyEarnedForCompletion = 0;
};

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FCompletedSideBounty, int, SB_UID);

UCLASS()
class ENDLESSVENDETTA_API ASideBountyClass : public ABountyClass
{
	GENERATED_BODY()

// ------------------- ATTRIBUTES ------------------------------

	
protected:

public:	
	// Delegate Broadcast when Side Bounty is Completed, Listened to by Bounty Character
	FCompletedSideBounty CompletedSideBounty;

	// Struct Containing all Data to be Displayed about the Side Bounty
	UPROPERTY(EditDefaultsOnly, Category = "Side Bounty")
	FSideBountyStruct SideBountyStruct;
	
// ------------------- METHODS ---------------------------------
private:
	virtual void BeginPlay() override;

protected:
	// Overrides to check if Side Bounty has been Completed
	virtual void IncrementBountyCheckpoint() override;

public:
	// Overrides to Set Title of Waypoint
	void ActivateFirstCheckpoint() override;


	// ------------------- LEGACY ---------------------------------

public:
	void DestroyCheckpoints();
	int GetRewardInFavours()
	{
		return 0;
	}
};
