38 lines
925 B
C++
38 lines
925 B
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Engine/DataAsset.h"
|
|
#include "GameplayTagContainer.h"
|
|
#include "DA_EquipmentConfig.generated.h"
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FRAMEWORK_API FDamageTypeResistance
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
FGameplayTag DamageType;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
float Resistance = 0.0f;
|
|
};
|
|
|
|
UCLASS(BlueprintType)
|
|
class FRAMEWORK_API UDA_EquipmentConfig : public UPrimaryDataAsset
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
TArray<FDamageTypeResistance> DamageTypeResistances;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
float Durability = 100.0f;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
float Weight = 1.0f;
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Config")
|
|
float GetResistance(FGameplayTag DamageType) const;
|
|
};
|