第一次提交
This commit is contained in:
39
Source/PHYInventory/Public/UI/ItemStacks/ItemData.h
Normal file
39
Source/PHYInventory/Public/UI/ItemStacks/ItemData.h
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GIS_CoreStructLibray.h"
|
||||
#include "GIS_ItemInfo.h"
|
||||
#include "UObject/Object.h"
|
||||
#include "ItemData.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
class UItemStackContainer;
|
||||
|
||||
UCLASS()
|
||||
class PHYINVENTORY_API UItemData : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
private:
|
||||
// item info
|
||||
FGIS_ItemInfo ItemInfo;
|
||||
// item slot definition
|
||||
FGIS_ItemSlotDefinition ItemSlotDefinition;
|
||||
TWeakObjectPtr<UItemStackContainer> OwningItemStackContainer;
|
||||
public:
|
||||
const FGIS_ItemInfo& GetItemInfo() const { return ItemInfo; }
|
||||
void SetItemInfo(const FGIS_ItemInfo& InInfo) { ItemInfo = InInfo; }
|
||||
UItemStackContainer* GetContainer() const;
|
||||
void SetContainer(UItemStackContainer* InContainer);
|
||||
|
||||
const FGIS_ItemSlotDefinition& GetItemSlotDefinition() const { return ItemSlotDefinition; }
|
||||
void SetItemSlotDefinition(const FGIS_ItemSlotDefinition& InDef) { ItemSlotDefinition = InDef; }
|
||||
void Reset();
|
||||
bool IsValidItem() const;
|
||||
int32 GetItemSlotIndex() const;
|
||||
};
|
||||
Reference in New Issue
Block a user