From 5376b6ad8c36871c7dcef155ed4c6ab0e46d8737 Mon Sep 17 00:00:00 2001
From: HungDK <>
Date: Tue, 19 May 2026 11:11:01 +0700
Subject: [PATCH 1/3] Add item auto slot operation and update ui
---
.../Scripts/Inventory/EC_IvtrType.cs | 6 +
.../Scripts/Managers/EC_InventoryUI.cs | 88 +-
Assets/Prefabs/UI/InventoryUI.prefab | 887 +++++++++++++-----
Assets/Scripts/CECHostPlayer.Inventory.cs | 5 +-
4 files changed, 748 insertions(+), 238 deletions(-)
diff --git a/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs b/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs
index 5e4f43354d..9064fcc8d0 100644
--- a/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs
+++ b/Assets/PerfectWorld/Scripts/Inventory/EC_IvtrType.cs
@@ -59,6 +59,12 @@ namespace BrewMonster.Scripts
public const int IVTRSIZE_BOOTHBPACK_MAX = 20; // Max booth pack for buying
public const int IVTRSIZE_CLIENTCARDPACK = 32; // Client pack for general card collection
+
+ // Main bag UI (C++ DlgInventory.h: CECDLGSHOP_PACKMAX / PACKLINEMAX)
+ public const int IVTRSIZE_PACK_UI_PAGE = 32;
+ public const int IVTRSIZE_PACK_UI_LINE = 8;
+ /// Upper bound for client pack slots (server ivtr_size is byte).
+ public const int IVTRSIZE_PACK_MAX = 255;
public const int NUM_NPCIVTR = 8; // NPC inventory number
diff --git a/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs b/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs
index 8743a04f9c..817318d79f 100644
--- a/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs
+++ b/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs
@@ -26,6 +26,10 @@ namespace BrewMonster.Scripts.Managers
[Header("Pack Buttons (assign in Inspector)")]
[Tooltip("Main slot grid: shows IVTRTYPE_PACK (0) on Item tab and IVTRTYPE_TASKPACK (2) on Task tab.")]
[SerializeField] private List