test(upserver): 归档存档迁移与玩法闭环回归工具

This commit is contained in:
Liubing\LB
2026-09-28 18:16:14 +08:00
parent c4ae02def9
commit a6f5e107f8
232 changed files with 12903 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
--- Client/Assets/Scripts/DataCenter/DataCenter.PlayerData.cs (reviewed baseline)
+++ Client/Assets/Scripts/DataCenter/DataCenter.PlayerData.cs
@@ -1139,6 +1139,30 @@
public void SavePlayerData(bool remote = true)
{
GContext.Publish<PlayerData>(this);
+ SerializeAndSavePlayerData(remote);
+ }
+
+#if UNITY_EDITOR && !SERVICE_HOST
+ internal async System.Threading.Tasks.Task SetEquipRodIDForKVLoopAsync(int id)
+ {
+ var batch=game.PlayerDataStorage.PlayerKVGameplayLoop.BeginEquip();
+ game.PlayerDataStorage.PlayerKVEditResult primary;
+ try
+ {
+ using(batch)
+ {
+ equipRodID=id;
+ GContext.container.Resolve<PlayerFishData>().SetRedPoint();
+ GContext.Publish<PlayerData>(this);
+ primary=SerializeAndSavePlayerData(true);
+ }
+ await game.PlayerDataStorage.PlayerKVGameplayLoop.ConfirmEquipAsync(batch,primary);
+ }
+ catch(System.Exception e) { game.PlayerDataStorage.PlayerKVGameplayLoop.Fault(e.Message); throw; }
+ }
+#endif
+ private game.PlayerDataStorage.PlayerKVEditResult SerializeAndSavePlayerData(bool remote)
+ {
StringBuilder sb = new StringBuilder();
sb.Append(lv).Append(",");
sb.Append(gold).Append(",");
@@ -1179,7 +1203,11 @@
NewPlayerDataDic["ct"] = GContext.container.Resolve<FishingEventData>().CTSerialize();
NewPlayerDataDic["rt"] = GContext.container.Resolve<FishingEventData>().RTSerialize(); ;
+#if UNITY_EDITOR && !SERVICE_HOST
+ if(game.PlayerDataStorage.PlayerKVGameplayLoop.Enabled) return game.PlayerDataStorage.PlayerKVGameplayLoop.Write("NewPlayerDataDic",Newtonsoft.Json.JsonConvert.SerializeObject(NewPlayerDataDic),remote);
+#endif
PlayFabMgr.Instance.UpdateUserDataValue("NewPlayerDataDic", Newtonsoft.Json.JsonConvert.SerializeObject(NewPlayerDataDic), remote);
+ return null;
}
public void Init()
{