feat(upserver): 保存M2客户端KV迁移至本人统计写检查点
保存独立KV用户服务、固定会话存档与原业务接线,以及C3d资料缓存和C3e本人统计写。 保留原PF/AGG路线、业务公式和时序;榜单读取、好友资料、公告、匹配及首场景闸仍待完成。 验证:ServiceHost两条件各33组646断言;Unity CLI Loop编译0错误269警告。 包含相关方案、评审裁决、测试及状态文档。未操作服务器、正式账号或打包。
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using asap.core;
|
||||
using asap.core;
|
||||
using cfg;
|
||||
using GameCore;
|
||||
using Newtonsoft.Json;
|
||||
@@ -15,6 +15,8 @@ using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
|
||||
public class DiggingGameModel
|
||||
{
|
||||
readonly game.PlayerDataStorage.IPlayerSaveStore saveStore = GContext.container.Resolve<game.PlayerDataStorage.IPlayerSaveStore>();
|
||||
|
||||
#region 协议Const区域
|
||||
|
||||
//工具个数
|
||||
@@ -78,8 +80,8 @@ public class DiggingGameModel
|
||||
redDot = cycle.RedDot;
|
||||
}
|
||||
DiggingGameManager.LogError("沙滩寻宝开启");
|
||||
string countJson = PlayFabMgr.Instance.GetLocalData(DigCountKey);
|
||||
string digGridDataJson = PlayFabMgr.Instance.GetLocalData(DigGridDataKey);
|
||||
string countJson = saveStore.Read(DigCountKey).ValueOrThrow();
|
||||
string digGridDataJson = saveStore.Read(DigGridDataKey).ValueOrThrow();
|
||||
if (string.IsNullOrEmpty(countJson))
|
||||
{
|
||||
SaveNull();
|
||||
@@ -105,8 +107,8 @@ public class DiggingGameModel
|
||||
MaxCount = digActivityConfig.StageCount;
|
||||
}
|
||||
|
||||
string countJson = PlayFabMgr.Instance.GetLocalData(DigCountKey);
|
||||
string digGridDataJson = PlayFabMgr.Instance.GetLocalData(DigGridDataKey);
|
||||
string countJson = saveStore.Read(DigCountKey).ValueOrThrow();
|
||||
string digGridDataJson = saveStore.Read(DigGridDataKey).ValueOrThrow();
|
||||
DoServerData(countJson, digGridDataJson);
|
||||
await InitClientData(ClientDataHandleEnum.Init);
|
||||
}
|
||||
@@ -460,7 +462,7 @@ public class DiggingGameModel
|
||||
dataJson.ActivityId = _curActivityId;
|
||||
dataJson.DigCount = _serverDigCount;
|
||||
string json = JsonConvert.SerializeObject(dataJson);
|
||||
PlayFabMgr.Instance.UpdateUserDataValue(DigCountKey, json);
|
||||
saveStore.Write(DigCountKey, json).RequireAccepted();
|
||||
GContext.container.Resolve<FishingEventData>().SaveTransitionData(dataJson.ActivityId, dataJson.DigCount);
|
||||
}
|
||||
void SetRedPoint()
|
||||
@@ -493,7 +495,7 @@ public class DiggingGameModel
|
||||
|
||||
string json = JsonConvert.SerializeObject(dataJson);
|
||||
//DiggingGameManager.LogError(json);
|
||||
PlayFabMgr.Instance.UpdateUserDataValue(DigGridDataKey, json);
|
||||
saveStore.Write(DigGridDataKey, json).RequireAccepted();
|
||||
}
|
||||
|
||||
public void SaveAll()
|
||||
@@ -509,7 +511,7 @@ public class DiggingGameModel
|
||||
{
|
||||
_serverDigCount = GContext.container.Resolve<FishingEventData>().GetInitWelcomeGift(_curActivityId);
|
||||
SaveDigCount();
|
||||
PlayFabMgr.Instance.UpdateUserDataValue(DigGridDataKey, string.Empty);
|
||||
saveStore.Write(DigGridDataKey, string.Empty).RequireAccepted();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user