第一次提交
This commit is contained in:
35
Source/PHYInventory/Private/UI/ItemStacks/ItemData.cpp
Normal file
35
Source/PHYInventory/Private/UI/ItemStacks/ItemData.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
|
||||
|
||||
#include "UI/ItemStacks/ItemData.h"
|
||||
|
||||
#include "UI/ItemStacks/ItemStackContainer.h"
|
||||
|
||||
UItemStackContainer* UItemData::GetContainer() const
|
||||
{
|
||||
return OwningItemStackContainer.Get();
|
||||
}
|
||||
|
||||
void UItemData::SetContainer(UItemStackContainer* InContainer)
|
||||
{
|
||||
OwningItemStackContainer = InContainer;
|
||||
}
|
||||
|
||||
void UItemData::Reset()
|
||||
{
|
||||
ItemInfo = FGIS_ItemInfo();
|
||||
}
|
||||
|
||||
bool UItemData::IsValidItem() const
|
||||
{
|
||||
return ItemInfo.IsValid();
|
||||
}
|
||||
|
||||
int32 UItemData::GetItemSlotIndex() const
|
||||
{
|
||||
if (OwningItemStackContainer.IsValid())
|
||||
{
|
||||
return OwningItemStackContainer.Get()->FindItemSlotIndex(this);
|
||||
}
|
||||
return INDEX_NONE;
|
||||
}
|
||||
Reference in New Issue
Block a user