스탯 초기화 조건 클라 추가
This commit is contained in:
parent
2df008418f
commit
07764e3960
|
|
@ -1928,6 +1928,7 @@ public partial class ServerData
|
|||
}
|
||||
|
||||
if (TopMoney.isIns) TopMoney.Ins.Set();
|
||||
MoneyForm.Refresh_MoneyForms();
|
||||
break;
|
||||
|
||||
case eItem.Weapon:
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class PCInfoStatMgrUI : uScrollViewMgr
|
|||
Set_Point();
|
||||
}
|
||||
|
||||
int Get_Point() { return ServerInfo.Ins.m_ServerData.PC.Get_Point() - dic_SaveStat.Values.Select(stat => (int)stat).Sum(); }
|
||||
int Get_Point() { return ServerInfo.Ins.m_ServerData.PC.Get_Point() - dic_SaveStat.Values.Select(stat => (int)stat).Sum(); }
|
||||
void Set_Point() { texts[0].text = Get_Point().ToString(); }
|
||||
|
||||
public int Get_Stat(eStat stat) { return dic_SaveStat[stat]; }
|
||||
|
|
@ -57,7 +57,7 @@ public class PCInfoStatMgrUI : uScrollViewMgr
|
|||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
bool success = false;
|
||||
if (add > 0) success = Get_Point() >= add;
|
||||
if (add > 0) success = Get_Point() >= add;
|
||||
else if (add < 0) success = Get_Stat(stat) > 0;
|
||||
if (success)
|
||||
{
|
||||
|
|
@ -91,17 +91,19 @@ public class PCInfoStatMgrUI : uScrollViewMgr
|
|||
{
|
||||
m_StatResetUI.Set(() =>
|
||||
{
|
||||
ServerInfo.Ins.Save_PC_StatInit(() =>
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
if (sdata.PC.CanResetStat())
|
||||
{
|
||||
if (ServerInfo.Ins.m_ServerData.PC.CanResetStat())
|
||||
{
|
||||
ServerInfo.Ins.m_ServerData.PC.Reset_Stat();
|
||||
Set_UI();
|
||||
MyValue.Get_ActorStatInfoorNull(eRole.PC);
|
||||
}
|
||||
else
|
||||
ToastUI.Ins.Set(400);
|
||||
});
|
||||
if (sdata.Common[8] == 0 || sdata.Check_ItemAmount(1, 100))
|
||||
ServerInfo.Ins.Save_PC_StatInit(() =>
|
||||
{
|
||||
ServerInfo.Ins.m_ServerData.PC.Reset_Stat();
|
||||
Set_UI();
|
||||
MyValue.Get_ActorStatInfoorNull(eRole.PC);
|
||||
});
|
||||
}
|
||||
else
|
||||
ToastUI.Ins.Set(400);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue