52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/NoExportTypes.h"
|
|
#include "ProjectEleri/Public/InventoryComponent.h"
|
|
|
|
#include "ItemStackObjectWrapper.generated.h"
|
|
|
|
class UItemDataAsset;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS(BlueprintType)
|
|
class PROJECTELERI_API UItemStackObjectWrapper : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
UItemStackObjectWrapper* Init(const FItemStack& InItemStack, UObject* Owner, bool ShowPrice = false);
|
|
|
|
UFUNCTION(BlueprintCallable, BLueprintPure)
|
|
const FItemStack& GetItemStack() { return ItemStack; }
|
|
|
|
UFUNCTION(BlueprintCallable, BLueprintPure)
|
|
UItemDataAsset* GetDataAsset() { return DataAsset; }
|
|
|
|
UFUNCTION(BlueprintCallable, BLueprintPure)
|
|
UObject* GetOwnerObject() { return OwnerObject; }
|
|
|
|
UFUNCTION(BlueprintCallable, BLueprintPure)
|
|
bool ShouldShowPrice() { return bShowPrice; }
|
|
|
|
protected:
|
|
|
|
UPROPERTY()
|
|
FItemStack ItemStack;
|
|
|
|
UPROPERTY()
|
|
UItemDataAsset* DataAsset;
|
|
|
|
UPROPERTY()
|
|
UObject* OwnerObject;
|
|
|
|
UPROPERTY()
|
|
bool bShowPrice = false;
|
|
};
|