diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab index e20dea9c..7ebba81d 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab @@ -585,7 +585,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 961aba7b7a39e4d4c832e94350f44d4c, type: 3} + m_Sprite: {fileID: 21300000, guid: 0ab2653139d474e40a1ce8213f36274e, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs index fa08afc3..91cbc4d5 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs @@ -172,8 +172,6 @@ namespace AxibugEmuOnline.Client public unsafe void Save(uint sequence, byte[] savData, byte[] screenShotData) { - if (IsBusy) return; - var filePath = FilePath; var header = new Header diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs index 951d4c9d..23949a35 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs @@ -26,8 +26,8 @@ namespace AxibugEmuOnline.Client } m_sequece = (uint)netData.Sequence; - m_downloadTask = AxiHttpProxy.GetDownLoad($"{App.httpAPI.WebHost}/{netData.SavUrl}"); - m_downloadTaskImg = AxiHttpProxy.GetDownLoad($"{App.httpAPI.WebHost}/{netData.SavImgUrl}"); + m_downloadTask = AxiHttpProxy.GetDownLoad($"{App.httpAPI.WebHost}/{netData.SavUrl}?v={m_sequece}"); + m_downloadTaskImg = AxiHttpProxy.GetDownLoad($"{App.httpAPI.WebHost}/{netData.SavImgUrl}?v={m_sequece}"); Host.SetSavingFlag(); } @@ -52,14 +52,25 @@ namespace AxibugEmuOnline.Client if (m_downloadTaskImg.downloadHandler.bHadErr) //下载失败 { - FSM.ChangeState(); + FSM.GetState().Error = m_downloadTaskImg.downloadHandler.ErrInfo; + FSM.ChangeState(); return; } - var savData = Host.CloudAPI.UnGzipData(m_downloadTask.downloadHandler.data); - var imgData = Host.CloudAPI.UnGzipData(m_downloadTaskImg.downloadHandler.data); - Host.Save(m_sequece, savData, imgData); - FSM.ChangeState(); + try + { + var savData = Host.CloudAPI.UnGzipData(m_downloadTask.downloadHandler.data); + var imgData = m_downloadTaskImg.downloadHandler.data; //图片数据已被服务器解压 + + Host.Save(m_sequece, savData, imgData); + FSM.ChangeState(); + } + catch + { + FSM.GetState().Error = "云存档解压失败"; + FSM.ChangeState(); + return; + } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs index eff8c86a..b98ed527 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs @@ -92,18 +92,16 @@ namespace AxibugEmuOnline.Client public override void OnExcute(OptionUI optionUI, ref bool cancelHide) { - if (m_savFile.IsBusy) + if (m_savFile.IsBusy) //取消同步进程 { - OverlayManager.PopTip("存档正在同步中"); - cancelHide = true; - return; + m_savFile.FSM.ChangeState(); } var stateData = m_ingameUI.Core.GetStateBytes(); var tex = m_ingameUI.Core.OutputPixel; var screenData = tex.ToJPG(m_ingameUI.Core.DrawCanvas.transform.localScale); - m_savFile.Save(m_savFile.Sequecen, stateData, screenData); + m_savFile.Save(m_savFile.Sequecen + 1, stateData, screenData); } } @@ -167,7 +165,6 @@ namespace AxibugEmuOnline.Client public override void OnExcute(OptionUI optionUI, ref bool cancelHide) { if (m_savFile.GetCurrentState() is not SaveFile.ConflictState) return; - cancelHide = true; m_savFile.FSM.ChangeState(); } } @@ -187,7 +184,6 @@ namespace AxibugEmuOnline.Client public override void OnExcute(OptionUI optionUI, ref bool cancelHide) { if (m_savFile.GetCurrentState() is not SaveFile.ConflictState) return; - cancelHide = true; m_savFile.FSM.ChangeState(); } }