// © 2025 Naked People Team. All Rights Reserved.


#include "ItemDefinition.h"

#include "ItemInstance.h"

UItemInstance* UItemDefinition::CreateInstance(UObject* Outer) const
{
	const TSubclassOf<UItemInstance> InstanceClass = GetInstanceClass();
	if (!InstanceClass)
		return nullptr;

	UItemInstance* Instance = NewObject<UItemInstance>(Outer, InstanceClass);
	Instance->SetItemDefinition(const_cast<UItemDefinition*>(this));
	return Instance;
}