36 lines
606 B
C++
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;
|
|
}
|