Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
28602 authored and 28602 committed Jan 1, 2023
1 parent ed2fb34 commit aac1b5d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Tool/PCRSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,21 @@ public void SaveDataToFile(string file, object data)
ClientLog.AccumulateClientLog("ERROR:" + ex.Message + "\n" + ex.StackTrace);
}
}
public int GetTeamExp(int teamLevel)
{
try
{
if (CanSetCharData())
{
return Elements.ManagerSingleton<Elements.MasterDataManager>.Instance.masterExperienceTeam[teamLevel].total_exp + 1;
}
}
catch
{
return 0;
}
return 0;
}
public bool CanSetCharData()
{
return Elements.ManagerSingleton<Elements.MasterDataManager>.Instance != null;
Expand Down
5 changes: 5 additions & 0 deletions Tool/PCRTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ public static string GetNetworkresult(string URL, string uploadJson)
receiveParam.data.unit_data = PCRSettings.Instance.GetUnitDataS(unitid);
result = JsonConvert.SerializeObject(receiveParam);
}
else if (URL.Contains("daily_task/top"))
{
var deck = new MusicTop();
result = JsonConvert.SerializeObject(deck);
}

if (result == "ERROR")
{
Expand Down
3 changes: 3 additions & 0 deletions UI/ManagerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ public void SaveMainSetting()
var loadIndex = Settings.loadData;
loadIndex.data.user_info.user_name = username_txt.Text;
loadIndex.data.user_info.team_level = int.Parse(unitlevel_txt.Text);
int exp = Settings.GetTeamExp(loadIndex.data.user_info.team_level);
if (exp > 0)
loadIndex.data.user_info.team_exp = exp;

Settings.globalSetting.userAssestPath = assestPath_txt.Text;
Settings.globalSetting.useUserAssestPath = useUserPath_check.Checked;
Expand Down

0 comments on commit aac1b5d

Please sign in to comment.