Add item auto slot operation and update ui
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user