diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..ddb6ff85a3 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "visualstudiotoolsforunity.vstuc" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..1a1c874bd4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Unity", + "type": "unity", + "request": "attach" + }, + { + "name": "Attach to Unity", + "type": "vstuc", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..7cc83abf07 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,60 @@ +{ + "files.exclude": { + "**/.DS_Store": true, + "**/.git": true, + "**/.vs": true, + "**/.gitmodules": true, + "**/.vsconfig": true, + "**/*.booproj": true, + "**/*.pidb": true, + "**/*.suo": true, + "**/*.user": true, + "**/*.userprefs": true, + "**/*.unityproj": true, + "**/*.dll": true, + "**/*.exe": true, + "**/*.pdf": true, + "**/*.mid": true, + "**/*.midi": true, + "**/*.wav": true, + "**/*.gif": true, + "**/*.ico": true, + "**/*.jpg": true, + "**/*.jpeg": true, + "**/*.png": true, + "**/*.psd": true, + "**/*.tga": true, + "**/*.tif": true, + "**/*.tiff": true, + "**/*.3ds": true, + "**/*.3DS": true, + "**/*.fbx": true, + "**/*.FBX": true, + "**/*.lxo": true, + "**/*.LXO": true, + "**/*.ma": true, + "**/*.MA": true, + "**/*.obj": true, + "**/*.OBJ": true, + "**/*.asset": true, + "**/*.cubemap": true, + "**/*.flare": true, + "**/*.mat": true, + "**/*.meta": true, + "**/*.prefab": true, + "**/*.unity": true, + "build/": true, + "Build/": true, + "Library/": true, + "library/": true, + "obj/": true, + "Obj/": true, + "Logs/": true, + "logs/": true, + "ProjectSettings/": true, + "UserSettings/": true, + "temp/": true, + "Temp/": true + }, + "dotnet.defaultSolution": "perfect-world-unity.sln" +} \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Inventory.meta b/Assets/PerfectWorld/Scripts/Inventory.meta new file mode 100644 index 0000000000..a0f879d270 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Inventory.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 55413edee9f1ea349b29d665bb3e34f3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs b/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs new file mode 100644 index 0000000000..0778f453d0 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs @@ -0,0 +1,65 @@ +namespace BrewMonster.Scripts +{ + public class InventoryConst + { + // Index of item in equipment inventory + public static int EQUIPIVTR_WEAPON = 0; + public static int EQUIPIVTR_HEAD = 1; + public static int EQUIPIVTR_NECK = 2; + public static int EQUIPIVTR_SHOULDER = 3; + public static int EQUIPIVTR_BODY = 4; + public static int EQUIPIVTR_WAIST = 5; + public static int EQUIPIVTR_LEG = 6; + public static int EQUIPIVTR_FOOT = 7; + public static int EQUIPIVTR_WRIST = 8; + public static int EQUIPIVTR_FINGER1 = 9; + public static int EQUIPIVTR_FINGER2 = 10; + public static int EQUIPIVTR_PROJECTILE = 11; + public static int EQUIPIVTR_FLYSWORD = 12; + public static int EQUIPIVTR_FASHION_BODY = 13; + public static int EQUIPIVTR_FASHION_LEG = 14; + public static int EQUIPIVTR_FASHION_FOOT = 15; + public static int EQUIPIVTR_FASHION_WRIST = 16; + public static int EQUIPIVTR_RUNE = 17; + public static int EQUIPIVTR_BIBLE = 18; + public static int EQUIPIVTR_SPEAKER = 19; + public static int EQUIPIVTR_AUTOHP = 20; + public static int EQUIPIVTR_AUTOMP = 21; + public static int EQUIPIVTR_POCKET = 22; + public static int EQUIPIVTR_GOBLIN = 23; + public static int EQUIPIVTR_CERTIFICATE = 24; + public static int EQUIPIVTR_FASHION_HEAD = 25; + public static int EQUIPIVTR_FORCE_TOKEN = 26; + public static int EQUIPIVTR_DYNSKILLEQUIP1 = 27; + public static int EQUIPIVTR_DYNSKILLEQUIP2 = 28; + public static int EQUIPIVTR_FASHION_WEAPON = 29; + public static int SIZE_EQUIPIVTR = 30; + public static int EQUIPIVTR_UNUSED1 = 30; + public static int EQUIPIVTR_UNUSED2 = 31; + public static int EQUIPIVTR_GENERALCARD1 = 32; + public static int EQUIPIVTR_GENERALCARD2 = 33; + public static int EQUIPIVTR_GENERALCARD3 = 34; + public static int EQUIPIVTR_GENERALCARD4 = 35; + public static int EQUIPIVTR_GENERALCARD5 = 36; + public static int EQUIPIVTR_GENERALCARD6 = 37; + public static int SIZE_ALL_EQUIPIVTR = 38; + public static int SIZE_GENERALCARD_EQUIPIVTR = 6; // SIZE_ALL_EQUIPIVTR - EQUIPIVTR_GENERALCARD1 + + // Inventory size constants + public static int IVTRSIZE_EQUIPPACK = 32; // Equipment (SIZE_ALL_EQUIPIVTR) + public static int IVTRSIZE_TASKPACK = 32; // Task pack + public static int IVTRSIZE_DEALPACK = 24; // Deal pack + public static int IVTRSIZE_NPCPACK = 32; // NPC pack + public static int IVTRSIZE_TRASHBOX = 16; // Trash box + public static int IVTRSIZE_BUYPACK = 12; // Buy pack + public static int IVTRSIZE_SELLPACK = 12; // Sell pack + public static int IVTRSIZE_BOOTHSPACK = 12; // Default booth pack for selling + public static int IVTRSIZE_BOOTHBPACK = 12; // Default booth pack for buying + public static int IVTRSIZE_BOOTHSPACK_MAX = 20; // Max booth pack for selling (player may use certificate...) + public static int IVTRSIZE_BOOTHBPACK_MAX = 20; // Max booth pack for buying + + public static int IVTRSIZE_CLIENTCARDPACK = 32; // Client pack for general card collection + + public static int NUM_NPCIVTR = 8; // NPC inventory number + } +} \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs.meta b/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs.meta new file mode 100644 index 0000000000..9a59fc046b --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7aaaaba042d177642850cd76fced3c78 \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Managers/EC_Inventory.cs b/Assets/PerfectWorld/Scripts/Managers/EC_Inventory.cs index 62f9ceb5df..ce5b1312cf 100644 --- a/Assets/PerfectWorld/Scripts/Managers/EC_Inventory.cs +++ b/Assets/PerfectWorld/Scripts/Managers/EC_Inventory.cs @@ -8,21 +8,21 @@ namespace BrewMonster.Scripts.Managers public static class EC_Inventory { private static readonly Dictionary _packSizeByPackage = new Dictionary(); - private static readonly Dictionary> _itemsByPackage = new Dictionary>(); + private static readonly Dictionary> _itemsByPackage = new Dictionary>(); private const int MaxContentHexToLog = 64; // Package constants to mirror legacy C++ names - public const byte PACK_INVENTORY = 0; - public const byte PACK_EQUIPMENT = 1; - public const byte PACK_TASKINVENTORY = 2; + public const byte IVTRTYPE_PACK = 0; + public const byte IVTRTYPE_EQUIPPACK = 1; + public const byte IVTRTYPE_TASKPACK = 2; private static string GetPackageName(byte pkg) { switch (pkg) { - case 0: return "PACK_INVENTORY"; - case 1: return "PACK_EQUIPMENT"; - case 2: return "PACK_TASKINVENTORY"; + case 0: return "IVTRTYPE_PACK"; + case 1: return "IVTRTYPE_EQUIPPACK"; + case 2: return "IVTRTYPE_TASKPACK"; default: return "PACK_UNKNOWN"; } } @@ -36,13 +36,18 @@ namespace BrewMonster.Scripts.Managers return hex; } - public static InventoryItemData GetItem(int iSlot, bool bRemove) + public static Dictionary GetPack(byte byPackage) { - // Backward-compatible overload defaulting to inventory package - return GetItem(PACK_INVENTORY, iSlot, bRemove); + return _itemsByPackage[byPackage]; } - public static InventoryItemData GetItem(byte byPackage, int slot, bool remove) + public static EC_IvtrItem GetItem(int iSlot, bool bRemove) + { + // Backward-compatible overload defaulting to inventory package + return GetItem(IVTRTYPE_PACK, iSlot, bRemove); + } + + public static EC_IvtrItem GetItem(byte byPackage, int slot, bool remove) { if (!_itemsByPackage.TryGetValue(byPackage, out var slots) || slot < 0) return null; @@ -53,11 +58,11 @@ namespace BrewMonster.Scripts.Managers return item; } - private static Dictionary EnsureSlots(byte byPackage) + private static Dictionary EnsureSlots(byte byPackage) { if (!_itemsByPackage.TryGetValue(byPackage, out var slots) || slots == null) { - slots = new Dictionary(); + slots = new Dictionary(); _itemsByPackage[byPackage] = slots; } return slots; @@ -69,7 +74,7 @@ namespace BrewMonster.Scripts.Managers EnsureSlots(byPackage); } - public static InventoryItemData PutItem(byte byPackage, int slot, InventoryItemData item) + public static EC_IvtrItem PutItem(byte byPackage, int slot, EC_IvtrItem item) { var slots = EnsureSlots(byPackage); if (slot < 0) return null; @@ -78,7 +83,7 @@ namespace BrewMonster.Scripts.Managers return oldItem; } - public static void SetItem(byte byPackage, int slot, InventoryItemData item) + public static void SetItem(byte byPackage, int slot, EC_IvtrItem item) { var slots = EnsureSlots(byPackage); if (slot < 0) return; @@ -100,8 +105,8 @@ namespace BrewMonster.Scripts.Managers var slots = EnsureSlots(byPackage); if (!slots.TryGetValue(slot, out var item) || item == null) return true; - int newCount = Math.Max(0, item.Count - Math.Max(0, amount)); - item.Count = newCount; + int newCount = Math.Max(0, item.m_iCount - Math.Max(0, amount)); + item.m_iCount = newCount; if (newCount <= 0) slots.Remove(slot); else @@ -139,7 +144,7 @@ namespace BrewMonster.Scripts.Managers if (baseIdx < 0) baseIdx = 0; for (int i = baseIdx; i < size; i++) { - if (slots.TryGetValue(i, out var it) && it != null && it.TemplateId == templateId) + if (slots.TryGetValue(i, out var it) && it != null && it.m_tid == templateId) return i; } return -1; @@ -151,8 +156,8 @@ namespace BrewMonster.Scripts.Managers foreach (var kv in EnsureSlots(byPackage)) { var it = kv.Value; - if (it != null && it.TemplateId == templateId) - total += Math.Max(0, it.Count); + if (it != null && it.m_tid == templateId) + total += Math.Max(0, it.m_iCount); } return total; } @@ -163,10 +168,10 @@ namespace BrewMonster.Scripts.Managers foreach (var kv in EnsureSlots(byPackage)) { var it = kv.Value; - if (it != null && it.TemplateId == templateId) + if (it != null && it.m_tid == templateId) { - int pileLimit = Math.Max(1, EC_IvtrItem.GetPileLimit(templateId)); - ret += Math.Max(0, pileLimit - Math.Max(0, it.Count)); + int pileLimit = Math.Max(1, EC_IvtrItemUtils.GetPileLimit(templateId)); + ret += Math.Max(0, pileLimit - Math.Max(0, it.m_iCount)); } } return ret; @@ -175,7 +180,7 @@ namespace BrewMonster.Scripts.Managers public static int CanAddItem(byte byPackage, int templateId, int amount, bool tryPile) { int firstEmpty = -1; - int pileLimit = Math.Max(1, EC_IvtrItem.GetPileLimit(templateId)); + int pileLimit = Math.Max(1, EC_IvtrItemUtils.GetPileLimit(templateId)); int size = _packSizeByPackage.TryGetValue(byPackage, out var s) ? s : 0; var slots = EnsureSlots(byPackage); for (int i = 0; i < size; i++) @@ -185,7 +190,7 @@ namespace BrewMonster.Scripts.Managers if (!tryPile) return i; if (firstEmpty < 0) firstEmpty = i; } - else if (it.TemplateId == templateId && it.Count + amount <= pileLimit) + else if (it.m_tid == templateId && it.m_iCount + amount <= pileLimit) { return i; } @@ -198,7 +203,7 @@ namespace BrewMonster.Scripts.Managers lastSlot = -1; slotAmount = 0; var slots = EnsureSlots(byPackage); - int pileLimit = Math.Max(1, EC_IvtrItem.GetPileLimit(templateId)); + int pileLimit = Math.Max(1, EC_IvtrItemUtils.GetPileLimit(templateId)); int firstEmpty = -1; int size = _packSizeByPackage.TryGetValue(byPackage, out var s) ? s : 0; for (int i = 0; i < size && amount > 0; i++) @@ -209,25 +214,25 @@ namespace BrewMonster.Scripts.Managers if (firstEmpty < 0) firstEmpty = i; continue; } - if (slotItem.TemplateId != templateId) continue; - int canAdd = Math.Max(0, pileLimit - Math.Max(0, slotItem.Count)); + if (slotItem.m_tid != templateId) continue; + int canAdd = Math.Max(0, pileLimit - Math.Max(0, slotItem.m_iCount)); if (canAdd <= 0) continue; int add = Math.Min(canAdd, amount); - slotItem.Count += add; + slotItem.m_iCount += add; amount -= add; lastSlot = i; - slotAmount = slotItem.Count; + slotAmount = slotItem.m_iCount; } if (amount <= 0) return true; if (firstEmpty < 0) return false; - var newItem = new InventoryItemData + var newItem = new EC_IvtrItem { Package = byPackage, Slot = firstEmpty, - TemplateId = templateId, - ExpireDate = expireDate, + m_tid = templateId, + m_expire_date = expireDate, State = 0, - Count = amount, + m_iCount = amount, Crc = 0, Content = null }; @@ -248,14 +253,14 @@ namespace BrewMonster.Scripts.Managers slots.TryGetValue(dest, out var dstItem); if (dstItem == null) { - var clone = new InventoryItemData + var clone = new EC_IvtrItem { Package = byPackage, Slot = dest, - TemplateId = srcItem.TemplateId, - ExpireDate = srcItem.ExpireDate, + m_tid = srcItem.m_tid, + m_expire_date = srcItem.m_expire_date, State = srcItem.State, - Count = amount, + m_iCount = amount, Crc = srcItem.Crc, Content = srcItem.Content != null ? (byte[])srcItem.Content.Clone() : null }; @@ -263,23 +268,23 @@ namespace BrewMonster.Scripts.Managers } else { - if (dstItem.TemplateId != srcItem.TemplateId) return false; - int pileLimit = Math.Max(1, EC_IvtrItem.GetPileLimit(dstItem.TemplateId)); - int canAdd = Math.Max(0, pileLimit - Math.Max(0, dstItem.Count)); + if (dstItem.m_tid != srcItem.m_tid) return false; + int pileLimit = Math.Max(1, EC_IvtrItemUtils.GetPileLimit(dstItem.m_tid)); + int canAdd = Math.Max(0, pileLimit - Math.Max(0, dstItem.m_iCount)); int add = Math.Min(canAdd, amount); if (add <= 0) return false; - dstItem.Count += add; + dstItem.m_iCount += add; amount = add; } RemoveItem(byPackage, src, amount); return true; } - public static void UpdatePack(byte byPackage, int ivtrSize, IEnumerable items) + public static void UpdatePack(byte byPackage, int ivtrSize, IEnumerable items) { _packSizeByPackage[byPackage] = ivtrSize; if (!_itemsByPackage.TryGetValue(byPackage, out var slots)) { - slots = new Dictionary(); + slots = new Dictionary(); _itemsByPackage[byPackage] = slots; } slots.Clear(); @@ -306,7 +311,7 @@ namespace BrewMonster.Scripts.Managers RemoveAllItems(byPackage); return true; } - if (!EC_IvtrItem.TryParseInventoryDetail(data, out var pkg, out var size, out var items)) + if (!EC_IvtrItemUtils.TryParseInventoryDetail(data, out var pkg, out var size, out var items)) return false; // Prefer header values when valid byte finalPkg = byPackage; @@ -317,7 +322,7 @@ namespace BrewMonster.Scripts.Managers } - private static void LogPackInternal(byte byPackage, int ivtrSize, IReadOnlyDictionary slots) + private static void LogPackInternal(byte byPackage, int ivtrSize, IReadOnlyDictionary slots) { //Debug.Log($"[Inventory] === Pack {GetPackageName(byPackage)}({byPackage}) size={ivtrSize}, items={(slots?.Count ?? 0)} ==="); if (slots == null || slots.Count == 0) @@ -328,8 +333,8 @@ namespace BrewMonster.Scripts.Managers foreach (var kv in slots) { var it = kv.Value; - string itemName = EC_IvtrItem.ResolveItemName(it.TemplateId); - string extraHex = it.Content != null && it.Content.Length > 0 ? EC_IvtrItem.BytesToHex(it.Content, MaxContentHexToLog) : ""; + string itemName = EC_IvtrItemUtils.ResolveItemName(it.m_tid); + string extraHex = it.Content != null && it.Content.Length > 0 ? EC_IvtrItemUtils.BytesToHex(it.Content, MaxContentHexToLog) : ""; //int extraLen = it.Content?.Length ?? 0; //Debug.Log( // $"[Inventory] pkg={GetPackageName(it.Package)}({it.Package}) slot={it.Slot} tid={it.TemplateId}{(string.IsNullOrEmpty(itemName) ? "" : " \"" + itemName + "\"")} count={it.Count} state={it.State} expire={it.ExpireDate} crc={it.Crc} content_len={extraLen}{(extraLen > 0 ? ", content_hex=" + extraHex : "")}" diff --git a/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs b/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs index 414af1d8a4..5b97be9908 100644 --- a/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs +++ b/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs @@ -173,7 +173,7 @@ namespace BrewMonster.Scripts.Managers // Current selected item for equip/unequip operations private byte currentSelectedPackage; private int currentSelectedSlot; - private InventoryItemData currentSelectedItem; + private EC_IvtrItem currentSelectedItem; private EC_IvtrEquip currentSelectedEquipment; private const byte PKG_INVENTORY = 0; @@ -356,16 +356,16 @@ namespace BrewMonster.Scripts.Managers /// /// Create EC_IvtrEquip object from InventoryItemData /// - private EC_IvtrEquip CreateEquipmentFromItemData(InventoryItemData itemData) + private EC_IvtrEquip CreateEquipmentFromItemData(EC_IvtrItem itemData) { if (itemData == null) return null; - var equipment = new EC_IvtrEquip(itemData.TemplateId, itemData.ExpireDate); + var equipment = new EC_IvtrEquip(itemData.m_tid, itemData.m_expire_date); // Set basic properties (use default values since InventoryItemData doesn't have these) equipment.Price = 0; - equipment.Count = itemData.Count; + equipment.Count = itemData.m_iCount; equipment.PriceScale = 1.0f; equipment.ScaleType = 0; @@ -378,17 +378,17 @@ namespace BrewMonster.Scripts.Managers return equipment; } - private string GetDisplayTextForItem(int slot, InventoryItemData itemData) + private string GetDisplayTextForItem(int slot, EC_IvtrItem itemData) { - if (itemData == null || itemData.Count <= 0) + if (itemData == null || itemData.m_iCount <= 0) { return string.Empty; } - string itemName = EC_IvtrItem.ResolveItemName(itemData.TemplateId); - string displayText = string.IsNullOrEmpty(itemName) ? $"Item {itemData.TemplateId}" : itemName; - if (itemData.Count > 1) + string itemName = EC_IvtrItemUtils.ResolveItemName(itemData.m_tid); + string displayText = string.IsNullOrEmpty(itemName) ? $"Item {itemData.m_tid}" : itemName; + if (itemData.m_iCount > 1) { - displayText += $" x{itemData.Count}"; + displayText += $" x{itemData.m_iCount}"; } return displayText; } @@ -466,17 +466,17 @@ namespace BrewMonster.Scripts.Managers // For equipping, we need to find an empty equipment slot // Use the new method that checks for available slots (especially for finger items) - byte equipLocation = EC_IvtrType.GetAvailableEquipLocationForItem(currentSelectedItem.TemplateId); + byte equipLocation = EC_IvtrType.GetAvailableEquipLocationForItem(currentSelectedItem.m_tid); if (equipLocation >= (byte)IndexOfIteminEquipmentInventory.SIZE_EQUIPIVTR) { - Debug.LogWarning($"[InventoryUI] Could not determine equip location for item {currentSelectedItem.TemplateId}"); + Debug.LogWarning($"[InventoryUI] Could not determine equip location for item {currentSelectedItem.m_tid}"); return; } // Call RequestEquipItemAsync with inventory slot and equip location UnityGameSession.RequestEquipItemAsync((byte)currentSelectedSlot, equipLocation, () => { - Debug.Log($"[InventoryUI] Equip request sent for item {currentSelectedItem.TemplateId} from slot {currentSelectedSlot} to equip location {equipLocation}"); + Debug.Log($"[InventoryUI] Equip request sent for item {currentSelectedItem.m_tid} from slot {currentSelectedSlot} to equip location {equipLocation}"); // Refresh inventory after equip RefreshAll(); }); @@ -501,7 +501,7 @@ namespace BrewMonster.Scripts.Managers // Call RequestEquipItemAsync with empty inventory slot and current equip location UnityGameSession.RequestEquipItemAsync((byte)emptySlot, equipLocation, () => { - Debug.Log($"[InventoryUI] Unequip request sent for item {currentSelectedItem.TemplateId} from equip location {equipLocation} to inventory slot {emptySlot}"); + Debug.Log($"[InventoryUI] Unequip request sent for item {currentSelectedItem.m_tid} from equip location {equipLocation} to inventory slot {emptySlot}"); // Refresh inventory after unequip RefreshAll(); }); @@ -513,7 +513,7 @@ namespace BrewMonster.Scripts.Managers // Call RequestDropIvrtItem with slot index and amount UnityGameSession.RequestDropIvrtItem((byte)currentSelectedSlot, 1); - Debug.Log($"[InventoryUI] Drop request sent for inventory item {currentSelectedItem.TemplateId} from slot {currentSelectedSlot} with amount {currentSelectedItem.Count}"); + Debug.Log($"[InventoryUI] Drop request sent for inventory item {currentSelectedItem.m_tid} from slot {currentSelectedSlot} with amount {currentSelectedItem.m_iCount}"); // Refresh inventory after drop RefreshAll(); @@ -525,7 +525,7 @@ namespace BrewMonster.Scripts.Managers // Call RequestDropEquipItem with slot index UnityGameSession.RequestDropEquipItem((byte)currentSelectedSlot); - Debug.Log($"[InventoryUI] Drop request sent for equipment item {currentSelectedItem.TemplateId} from slot {currentSelectedSlot}"); + Debug.Log($"[InventoryUI] Drop request sent for equipment item {currentSelectedItem.m_tid} from slot {currentSelectedSlot}"); // Refresh inventory after drop RefreshAll(); @@ -666,22 +666,22 @@ namespace BrewMonster.Scripts.Managers } } - public Dictionary GetInventoryData(byte package) + public Dictionary GetInventoryData(byte package) { if (itemsByPackageField == null) { - return new Dictionary(); + return new Dictionary(); } - var itemsByPackage = itemsByPackageField.GetValue(null) as Dictionary>; + var itemsByPackage = itemsByPackageField.GetValue(null) as Dictionary>; if (itemsByPackage == null) { - return new Dictionary(); + return new Dictionary(); } if (itemsByPackage.TryGetValue(package, out var packageItems)) { return packageItems; } - return new Dictionary(); + return new Dictionary(); } } @@ -690,7 +690,7 @@ namespace BrewMonster.Scripts.Managers { private static readonly Dictionary _defaultSprites = new Dictionary(); - public void RenderPackage(List