feat(upserver): 保存M2客户端KV迁移至本人统计写检查点
保存独立KV用户服务、固定会话存档与原业务接线,以及C3d资料缓存和C3e本人统计写。 保留原PF/AGG路线、业务公式和时序;榜单读取、好友资料、公告、匹配及首场景闸仍待完成。 验证:ServiceHost两条件各33组646断言;Unity CLI Loop编译0错误269警告。 包含相关方案、评审裁决、测试及状态文档。未操作服务器、正式账号或打包。
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using asap.core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
@@ -5,6 +6,8 @@ using UnityEngine;
|
||||
|
||||
public class EventPartnerStatuePlayfabData
|
||||
{
|
||||
readonly game.PlayerDataStorage.IPlayerSaveStore saveStore = GContext.container.Resolve<game.PlayerDataStorage.IPlayerSaveStore>();
|
||||
|
||||
public int EventId;
|
||||
public int TicketCount;
|
||||
public int BuffFreeMultiplier;
|
||||
@@ -96,14 +99,14 @@ public class EventPartnerStatuePlayfabData
|
||||
|
||||
public static EventPartnerStatuePlayfabData Load()
|
||||
{
|
||||
var s = PlayFabMgr.Instance.GetLocalData(Key);
|
||||
var s = GContext.container.Resolve<game.PlayerDataStorage.IPlayerSaveStore>().Read(Key).ValueOrThrow();
|
||||
return Deserialize(s);
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
var s = Serialized();
|
||||
PlayFabMgr.Instance.UpdateUserDataValue(Key, s);
|
||||
saveStore.Write(Key, s).RequireAccepted();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using asap.core;
|
||||
using System.Collections.Generic;
|
||||
using UniRx;
|
||||
@@ -40,6 +40,8 @@ public class EventPartnerStatueTokenExchangeFishRaid
|
||||
|
||||
public class EventPartnerStatueTokenExchangeData
|
||||
{
|
||||
readonly game.PlayerDataStorage.IPlayerSaveStore saveStore = GContext.container.Resolve<game.PlayerDataStorage.IPlayerSaveStore>();
|
||||
|
||||
#region State
|
||||
private int _eventId = 0;
|
||||
private int _tokenGiven = 0;
|
||||
@@ -189,12 +191,12 @@ public class EventPartnerStatueTokenExchangeData
|
||||
|
||||
public void SaveData()
|
||||
{
|
||||
PlayFabMgr.Instance.UpdateUserDataValue(PlayfabKey, $"{_eventId}|{_tokenGiven}|{_currentScore}");
|
||||
saveStore.Write(PlayfabKey, $"{_eventId}|{_tokenGiven}|{_currentScore}").RequireAccepted();
|
||||
}
|
||||
|
||||
public bool LoadData()
|
||||
{
|
||||
var s = PlayFabMgr.Instance.GetLocalData(PlayfabKey);
|
||||
var s = saveStore.Read(PlayfabKey).ValueOrThrow();
|
||||
if (s == null)
|
||||
return false;
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user