From 690cdd29f16cfafc1dd8932d42b4bbfff366255d Mon Sep 17 00:00:00 2001 From: VuNgocHaiC7 Date: Wed, 22 Apr 2026 16:21:32 +0700 Subject: [PATCH] fix change of textTotalSP and fix bug PW 174 --- .../Scripts/UI/Dialogs/CDlgSkillSubList.cs | 11 ++++++++++- .../UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs index dd156bb996..db81c09fe0 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs @@ -190,7 +190,15 @@ namespace BrewMonster.UI FitSize(); ShowLastSelectedSkill(); } - totalSPText.text = " Nguyên Thần: " + GetHostPlayer().GetBasicProps().iSP.ToString() + ""; + UpdateTotalSPText(); + } + + public void UpdateTotalSPText() + { + if (totalSPText != null && GetHostPlayer() != null) + { + totalSPText.text = " Nguyên Thần: " + GetHostPlayer().GetBasicProps().iSP.ToString() + ""; + } } // ��鵯��ħ״̬ / Reset when switching between god/evil @@ -495,6 +503,7 @@ namespace BrewMonster.UI } else if (q.m_changeMask == CECSkillPanelChange.enumChangeMask.CHANGE_SKILL_LEVEL_UP) { + UpdateTotalSPText(); if (q.m_skillLevel == 1) { foreach (var kv in m_skillSubDialogsMap) diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs b/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs index 335e40fb64..21bc94a290 100644 --- a/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs @@ -145,9 +145,13 @@ namespace BrewMonster uiManager.ShowMessageBoxGeneral("MessageBox", m_upgradeDisabledReason, this); return; } - UnityGameSession.c2s_SendCmdNPCSevLearnSkill(skillID); UpdateUpgradeBtn(); + var parrentUiSkill = GetComponentInParent(); + if (parrentUiSkill != null) + { + parrentUiSkill.UpdateTotalSPText(); + } }); messagebox.SetData((uint)m_skillID);