Files
PHY/Source/PHYInventory/Private/UI/ItemStacks/ItemData.cpp
2026-03-03 01:23:02 +08:00

36 lines
606 B
C++

//
#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;
}