fix conflig
This commit is contained in:
@@ -106,6 +106,7 @@ namespace BrewMonster
|
||||
int needMoney = CECHostSkillModel.Instance.GetSkillMoney(m_skillID, m_curLevel + 1);
|
||||
int needSp = CECHostSkillModel.Instance.GetSkillSp(m_skillID, m_curLevel + 1);
|
||||
|
||||
|
||||
string str = GPDataTypeHelper.ReplacePercentD(GetStringFromTable(11326), needMoney, needSp);
|
||||
// var messagebox = uiManager.ShowMessageBox(new MessageBoxData()
|
||||
// {
|
||||
@@ -115,16 +116,38 @@ namespace BrewMonster
|
||||
// });
|
||||
var messagebox = uiManager.ShowMessageBoxYes("Game_LearnSkill", str, this,
|
||||
() => {
|
||||
UnityGameSession.c2s_SendCmdNPCSevLearnSkill(m_skillID);
|
||||
int skillID = (int)GetData();
|
||||
int nCondition = EC_Game.GetGameRun().GetHostPlayer().CheckSkillLearnCondition(skillID, true);
|
||||
// BMLogger.LogError("HoangDev: CDlgSkillSubListItem OnCommand_Upgrade clicked yes for nCondition " + nCondition);
|
||||
CECHostPlayer hostPlayer = GetHostPlayer();
|
||||
if (hostPlayer == null)
|
||||
return;
|
||||
|
||||
if (0 == nCondition)
|
||||
int skillID = m_skillID;
|
||||
int recheck = hostPlayer.CheckSkillLearnCondition(skillID, true);
|
||||
|
||||
if (recheck != 0)
|
||||
{
|
||||
UnityGameSession.c2s_SendCmdNPCSevLearnSkill(skillID);
|
||||
UpdateUpgradeBtn();
|
||||
if (!string.IsNullOrEmpty(m_upgradeDisabledReason))
|
||||
{
|
||||
uiManager.ShowMessageBoxGeneral("MessageBox", m_upgradeDisabledReason, this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int costMoney = CECHostSkillModel.Instance.GetSkillMoney(skillID, m_curLevel + 1);
|
||||
int costSp = CECHostSkillModel.Instance.GetSkillSp(skillID, m_curLevel + 1);
|
||||
|
||||
if(!hostPlayer.TryConsumeSkillLearnCost(costMoney, costSp))
|
||||
{
|
||||
UpdateUpgradeBtn();
|
||||
if(!string.IsNullOrEmpty(m_upgradeDisabledReason))
|
||||
{
|
||||
uiManager.ShowMessageBoxGeneral("MessageBox", m_upgradeDisabledReason, this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
UnityGameSession.c2s_SendCmdNPCSevLearnSkill(skillID);
|
||||
UpdateUpgradeBtn();
|
||||
});
|
||||
messagebox.SetData((uint)m_skillID);
|
||||
//GetGameUIMan()->MessageBox("Game_LearnSkill", str, //GetGameUIMan()->GetStringFromTable(231),
|
||||
|
||||
Reference in New Issue
Block a user