Clothing system refactor
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "EquipmentSlotWidget.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "NakedDesire/Clothing/ClothingItem.h"
|
||||
#include "NakedDesire/Clothing/ClothingItemDefinition.h"
|
||||
#include "NakedDesire/Clothing/ClothingItemInstance.h"
|
||||
#include "NakedDesire/Clothing/ClothingManager.h"
|
||||
#include "NakedDesire/Clothing/ClothingSlotsData.h"
|
||||
@@ -13,7 +13,7 @@ void UEquipmentSlotWidget::SetItem(UClothingItemInstance* InItem)
|
||||
{
|
||||
ClothingItemInstance = InItem;
|
||||
|
||||
IconImage->SetBrushFromTexture(InItem->GetClothingItem()->Icon);
|
||||
IconImage->SetBrushFromTexture(InItem->GetClothingItemDefinition()->Icon);
|
||||
IconImage->SetVisibility(ESlateVisibility::SelfHitTestInvisible);
|
||||
PlaceholderImage->SetVisibility(ESlateVisibility::Hidden);
|
||||
SetIsEnabled(true);
|
||||
@@ -45,7 +45,7 @@ void UEquipmentSlotWidget::NativePreConstruct()
|
||||
|
||||
void UEquipmentSlotWidget::OnClothingEquip(UClothingItemInstance* InClothingItemInstance)
|
||||
{
|
||||
if (InClothingItemInstance->GetClothingItem()->SlotType != SlotType)
|
||||
if (InClothingItemInstance->GetClothingItemDefinition()->SlotType != SlotType)
|
||||
return;
|
||||
|
||||
SetItem(InClothingItemInstance);
|
||||
@@ -53,7 +53,7 @@ void UEquipmentSlotWidget::OnClothingEquip(UClothingItemInstance* InClothingItem
|
||||
|
||||
void UEquipmentSlotWidget::OnClothingUnequip(UClothingItemInstance* InClothingItemInstance)
|
||||
{
|
||||
if (InClothingItemInstance->GetClothingItem()->SlotType != SlotType)
|
||||
if (InClothingItemInstance->GetClothingItemDefinition()->SlotType != SlotType)
|
||||
return;
|
||||
|
||||
ClearItem();
|
||||
|
||||
Reference in New Issue
Block a user