35 lines
805 B
C++
35 lines
805 B
C++
// Amasson
|
|
|
|
|
|
#include "Inventory/AuraInventoryComponent.h"
|
|
#include "Kismet/GameplayStatics.h"
|
|
#include "Game/AuraGameState.h"
|
|
#include "Game/AuraGameModeBase.h"
|
|
#include "Inventory/AuraInventoryDataSource.h"
|
|
|
|
|
|
uint8 UAuraInventoryComponent::GetMaxStackSizeForID(const FName& ID) const
|
|
{
|
|
FInventoryItemData Data;
|
|
FetchSlotData(ID, Data);
|
|
return Data.MaxStackSize;
|
|
}
|
|
|
|
bool UAuraInventoryComponent::FetchSlotData(const FName& SlotId, FInventoryItemData& Data) const
|
|
{
|
|
if (DataSource)
|
|
{
|
|
return DataSource->GetDataForItemId(SlotId, Data);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
FLinearColor UAuraInventoryComponent::GetColorFromQuality(EInventoryItemQuality Quality) const
|
|
{
|
|
if (DataSource)
|
|
{
|
|
return DataSource->GetColorFromQuality(Quality);
|
|
}
|
|
return FLinearColor();
|
|
}
|