fix button equip

This commit is contained in:
Vũ Ngọc Hải
2026-05-31 17:31:54 +07:00
parent e888745ce3
commit 3343bc2299
@@ -1811,8 +1811,15 @@ namespace BrewMonster.Scripts.Managers
return;
var host = CECGameRun.Instance?.GetHostPlayer();
bool show = host != null && host.IsUsingTrashBox() &&
(package == PKG_INVENTORY || package == PKG_TRASHBOX);
bool isUsingTrashBox = host != null && host.IsUsingTrashBox();
bool isValidPackage = (package == PKG_INVENTORY || package == PKG_TRASHBOX);
bool show = isUsingTrashBox && isValidPackage;
if (storageTransferButton == null && !show)
{
return;
}
btn.gameObject.SetActive(show);
if (!show)
return;