From 1d348f3ac6d53317c70dfca62f03fc79fc238e19 Mon Sep 17 00:00:00 2001 From: HungDK <> Date: Thu, 25 Sep 2025 14:07:38 +0700 Subject: [PATCH] Update load icon from multi sprite file, default icon slot --- .../Scripts/Managers/EC_InventoryUI.cs | 29 +++---- .../Scripts/Managers/EC_IvtrItem.cs | 85 ++++++++++++++++--- 2 files changed, 84 insertions(+), 30 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs b/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs index 2ca7f9ee0c..adc2a2b417 100644 --- a/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs +++ b/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs @@ -199,22 +199,6 @@ namespace PerfectWorld.Scripts.Managers } - - private byte GetDefaultEquipLocation(int templateId) - { - // Basic equip location mapping based on template ID - // Adjust these ranges based on your game's item system - if (templateId >= 1000 && templateId < 2000) return 0; // Weapon - if (templateId >= 2000 && templateId < 3000) return 2; // Armor - if (templateId >= 3000 && templateId < 4000) return 3; // Accessory - if (templateId >= 4000 && templateId < 5000) return 4; // Ring - if (templateId >= 5000 && templateId < 6000) return 5; // Necklace - - // Default to slot 1 if no specific mapping - Debug.Log($"[InventoryUI] Using default equip location 1 for template {templateId}"); - return 0; - } - private int FindEmptyInventorySlot() { var inventoryData = model.GetInventoryData(PKG_INVENTORY); @@ -270,6 +254,8 @@ namespace PerfectWorld.Scripts.Managers // === MVC: View === private class InventoryView { + private static readonly Dictionary _defaultSprites = new Dictionary(); + public void RenderPackage(List