// Copyright CodeSpartan, 2023. All rights reserved.

#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "BuffAssetCpp.generated.h"

class UBuffDynamicsCpp;
/**
 * 
 */
UCLASS(Blueprintable, BlueprintType)
class MMOKITCODE_API UBuffAssetCpp : public UPrimaryDataAsset
{
	GENERATED_BODY()

public:

	/** Provides a way to dynamically define Effects and Duration. Dynamic effects supplement static ones.
	 * This object also provides OnBuffApply, OnBuffEnd and TickLogic functions. */
	UPROPERTY(Instanced, EditDefaultsOnly, BlueprintReadOnly, Category = "Dynamics")
	UBuffDynamicsCpp* BuffDynamics = nullptr;

	/* == UPrimaryDataAsset-related boilerplate below == */

	/** Must be set correctly, or the asset won't be gathered by the Asset Manager */
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Asset Manager")
	FPrimaryAssetType AssetType = FPrimaryAssetType(FName(TEXT("BuffAsset")));

	/** Returns the logical name, equivalent to the primary asset id */
	UFUNCTION(BlueprintCallable, Category = "Buff")
	FString GetIdentifierString() const;

	/** Overridden to use saved type */
	virtual FPrimaryAssetId GetPrimaryAssetId() const override;
};
