fix change of textTotalSP and fix bug PW 174

This commit is contained in:
VuNgocHaiC7
2026-04-22 16:21:32 +07:00
parent bd6d987b55
commit 690cdd29f1
2 changed files with 15 additions and 2 deletions
@@ -190,7 +190,15 @@ namespace BrewMonster.UI
FitSize();
ShowLastSelectedSkill();
}
totalSPText.text = " <color=yellow>Nguyên Thần:</color> " + GetHostPlayer().GetBasicProps().iSP.ToString() + "</color>";
UpdateTotalSPText();
}
public void UpdateTotalSPText()
{
if (totalSPText != null && GetHostPlayer() != null)
{
totalSPText.text = " <color=yellow>Nguyên Thần:</color> " + GetHostPlayer().GetBasicProps().iSP.ToString() + "</color>";
}
}
// ħ״̬ / 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)
@@ -145,9 +145,13 @@ namespace BrewMonster
uiManager.ShowMessageBoxGeneral("MessageBox", m_upgradeDisabledReason, this);
return;
}
UnityGameSession.c2s_SendCmdNPCSevLearnSkill(skillID);
UpdateUpgradeBtn();
var parrentUiSkill = GetComponentInParent<CDlgSkillSubList>();
if (parrentUiSkill != null)
{
parrentUiSkill.UpdateTotalSPText();
}
});
messagebox.SetData((uint)m_skillID);