Add item auto slot operation and update ui

This commit is contained in:
HungDK
2026-05-19 11:11:01 +07:00
parent f9798d6280
commit 5376b6ad8c
4 changed files with 748 additions and 238 deletions
+4 -1
View File
@@ -137,12 +137,15 @@ namespace BrewMonster
}
case CommandID.CHANGE_IVTR_SIZE:
{
// C++: resize pack (normal inventory)
// C++ EC_HostMsg.cpp: m_pPack->Resize + FIXMSG_NEW_INVENTORY_SIZE
if (data != null && data.Length >= 4)
{
int newSize = BitConverter.ToInt32(data, 0);
if (m_pPack != null)
m_pPack.Resize(newSize);
EC_Game.GetGameRun()?.AddFixedMessage((int)FixedMsg.FIXMSG_NEW_INVENTORY_SIZE, newSize);
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
ui?.RefreshAll();
}