#include "ClothingItemInstance.h" #include "ClothingItem.h" #include "NakedDesire/SaveGame/ItemSaveRecord.h" void UClothingItemInstance::Init(UClothingItem* InClothingItem) { ClothingItem = InClothingItem; } void UClothingItemInstance::Setup(UClothingItem* InClothingItem, const TArray& InStoredItems, const float InCondition, const FGuid InInstanceId) { this->ClothingItem = InClothingItem; this->StoredItems = InStoredItems; this->Condition = InCondition; this->InstanceId = InInstanceId; } UClothingItemInstance* UClothingItemInstance::CreateFromSave(UObject* Outer, const FItemSaveRecord& ItemSaveRecord) { UClothingItemInstance* NewItemInstance = NewObject(Outer); NewItemInstance->Setup(ItemSaveRecord.Definition.Get(), {}, ItemSaveRecord.Condition, ItemSaveRecord.InstanceId); return NewItemInstance; }