Added starting save data
This commit is contained in:
@@ -153,7 +153,7 @@ void UClothingManager::PutOnClothing(UClothingItemInstance* ClothingItemInstance
|
||||
void UClothingManager::TakeClothing(UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
const EClothingSlotType SlotType = ClothingItemInstance->GetClothingItem()->SlotType;
|
||||
if (const UClothingItemInstance* ExistingClothing = *EquippedClothing.Find(SlotType))
|
||||
if (EquippedClothing.Contains(SlotType))
|
||||
{
|
||||
DropClothing(SlotType);
|
||||
}
|
||||
@@ -175,10 +175,17 @@ void UClothingManager::TakeClothing(UClothingItemInstance* ClothingItemInstance)
|
||||
|
||||
UClothingItemInstance* UClothingManager::RemoveClothing(const EClothingSlotType ClothingSlotType)
|
||||
{
|
||||
UClothingItemInstance* ExistingItem = *EquippedClothing.Find(ClothingSlotType);
|
||||
TObjectPtr<UClothingItemInstance>* ExistingItemRef = EquippedClothing.Find(ClothingSlotType);
|
||||
if (!ExistingItemRef)
|
||||
{
|
||||
UE_LOG(LogTemp, Warning, TEXT("UClothingManager::RemoveClothing ExistingItemRef == nullptr"));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
UClothingItemInstance* ExistingItem = *ExistingItemRef;
|
||||
if (!ExistingItem)
|
||||
{
|
||||
UE_LOG(LogTemp, Warning, TEXT("UClothingManager::RemoveClothing No clothing found"));
|
||||
UE_LOG(LogTemp, Warning, TEXT("UClothingManager::RemoveClothing ExistingItem == nullptr"));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user