From fef0ef492188caaff77d557570d0588f0ce67561 Mon Sep 17 00:00:00 2001 From: NguyenVanDat Date: Mon, 2 Feb 2026 15:31:03 +0700 Subject: [PATCH] update logic show Install Dialogue --- .../Scripts/UI/Dialogs/DlgInstall.cs | 2 +- .../PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgInstall.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgInstall.cs index 363c0dce18..f45efd4a3e 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgInstall.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgInstall.cs @@ -375,7 +375,7 @@ namespace BrewMonster { message = GetGameUIMan().GetStringFromTable(226); CECUIManager.Instance.ShowMessageBox("", message); - // GetGameUIMan()->MessageBox("", GetGameUIMan().GetStringFromTable(226), MB_OK, + // GetGameUIMan().GetDialog("") // A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox); // pMsgBox->SetLife(3); return; diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs index 79d9d1914e..ab8369e45a 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs @@ -3406,22 +3406,9 @@ namespace BrewMonster.UI if (pCurNPCEssence.HasValue) { uint npcID = pCurNPCEssence.Value.id; - DlgInstall dlgInstall = FindFirstObjectByType(); - if (dlgInstall == null) - { - CECGameUIMan gameUIMan = GetGameUIMan(); - DialogScriptTableObject dialogResource = gameUIMan.GetDialogResource(); - Canvas canvas = gameUIMan.GetCanvas(); - - if(dialogResource != null && canvas != null) - { - GameObject ob = dialogResource.GetPrefabDialog("Win_Enchase"); - if (ob != null) - { - dlgInstall = GameObject.Instantiate(ob, canvas.transform).GetComponent(); - } - } - } + + var dlgInstall =GetGameUIMan().GetDialog("Win_Enchase"); + dlgInstall.Show(true); } //pShow1 = m_pAUIManager.GetDialog("Win_Enchase"); //pShow2 = m_pAUIManager.GetDialog("Win_Inventory");