Completed phase 1
This commit is contained in:
@@ -1 +1,27 @@
|
||||
#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<UItemInstance*>& 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<UClothingItemInstance>(Outer);
|
||||
|
||||
NewItemInstance->Setup(ItemSaveRecord.Definition.Get(), {}, ItemSaveRecord.Condition, ItemSaveRecord.InstanceId);
|
||||
|
||||
return NewItemInstance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user