feat(upserver): 保存M2客户端KV迁移至本人统计写检查点

保存独立KV用户服务、固定会话存档与原业务接线,以及C3d资料缓存和C3e本人统计写。
保留原PF/AGG路线、业务公式和时序;榜单读取、好友资料、公告、匹配及首场景闸仍待完成。

验证:ServiceHost两条件各33组646断言;Unity CLI Loop编译0错误269警告。
包含相关方案、评审裁决、测试及状态文档。未操作服务器、正式账号或打包。
This commit is contained in:
Liubing\LB
2026-09-30 19:19:05 +08:00
parent 1c0cdf7a99
commit 6813da149a
511 changed files with 151858 additions and 2376 deletions

View File

@@ -1,4 +1,4 @@
using asap.core;
using asap.core;
using cfg;
using game;
using GameCore;
@@ -9,6 +9,8 @@ using UnityEngine;
public class LuckyADTaskPopupPanel : LuckyTaskPanelBase
{
game.PlayerDataStorage.IPlayerSaveStore saveStore;
List<LuckyTaskItemData> taskList;
List<LuckyADTaskItem> taskItems = new List<LuckyADTaskItem>();
List<LuckyADTaskItemData> taskADList = new List<LuckyADTaskItemData>();
@@ -18,6 +20,7 @@ public class LuckyADTaskPopupPanel : LuckyTaskPanelBase
System.DateTime refreshTime;
protected override void Awake()
{
saveStore = GContext.container.Resolve<game.PlayerDataStorage.IPlayerSaveStore>();
base.Awake();
luckyTaskItem = transform.Find("root/hook_missions_object").GetComponent<LuckyADTask>();
text_time = transform.Find("root/text_time").GetComponent<TMP_Text>();
@@ -120,7 +123,7 @@ public class LuckyADTaskPopupPanel : LuckyTaskPanelBase
int round = taskData.GetValueOrDefault(-1, 0);
float inflationRate = taskData.GetValueOrDefault(-3, 0) / 100f;
int group = taskData.GetValueOrDefault(-4, 0);
string adData = PlayFabMgr.Instance.GetLocalData(LuckyTaskData.ADTaskADKey);
string adData = saveStore.Read(LuckyTaskData.ADTaskADKey).ValueOrThrow();
int index = 0;
int curDay = ZZTimeHelper.UtcNow().UtcNowOffset().DayOfYear;
if (!string.IsNullOrEmpty(adData))
@@ -134,13 +137,13 @@ public class LuckyADTaskPopupPanel : LuckyTaskPanelBase
else
{
adData = $"{index}|{curDay}";
PlayFabMgr.Instance.UpdateUserDataValue(LuckyTaskData.ADTaskADKey, adData);
saveStore.Write(LuckyTaskData.ADTaskADKey, adData).RequireAccepted();
}
}
else
{
adData = $"{index}|{curDay}";
PlayFabMgr.Instance.UpdateUserDataValue(LuckyTaskData.ADTaskADKey, adData);
saveStore.Write(LuckyTaskData.ADTaskADKey, adData).RequireAccepted();
}
List<LuckyADTaskItemData> taskADList = new List<LuckyADTaskItemData>();
TbEventLuckyTask eventLuckyTask = LuckyTaskData.GetTbEventLuckyTask(luckyModel.EventId, round, group);
@@ -180,7 +183,7 @@ public class LuckyADTaskPopupPanel : LuckyTaskPanelBase
luckyADTaskItem.Play();
string adData = PlayFabMgr.Instance.GetLocalData(LuckyTaskData.ADTaskADKey);
string adData = saveStore.Read(LuckyTaskData.ADTaskADKey).ValueOrThrow();
int index = 0;
int day = ZZTimeHelper.UtcNow().UtcNowOffset().DayOfYear;
if (!string.IsNullOrEmpty(adData))
@@ -195,7 +198,7 @@ public class LuckyADTaskPopupPanel : LuckyTaskPanelBase
//保存进度
index++;
adData = $"{index}|{day}";
PlayFabMgr.Instance.UpdateUserDataValue(LuckyTaskData.ADTaskADKey, adData);
saveStore.Write(LuckyTaskData.ADTaskADKey, adData).RequireAccepted();
RefreshADItemState(index);
canvasGroup.blocksRaycasts = true;
GContext.Publish(new ShowData());

View File

@@ -1,3 +1,4 @@
using asap.core;
using cfg;
using GameCore;
using TMPro;
@@ -6,6 +7,8 @@ using UnityEngine.UI;
public class LuckyTaskBtn : MonoBehaviour, IUIRedPoint
{
game.PlayerDataStorage.IPlayerSaveStore saveStore;
Button btn;
ILuckyTaskGetData model;
@@ -15,6 +18,7 @@ public class LuckyTaskBtn : MonoBehaviour, IUIRedPoint
public TMP_Text text_redpoint_big;
void Awake()
{
saveStore = GContext.container.Resolve<game.PlayerDataStorage.IPlayerSaveStore>();
btn = GetComponent<Button>();
btn.onClick.AddListener(OnClick);
}
@@ -29,6 +33,7 @@ public class LuckyTaskBtn : MonoBehaviour, IUIRedPoint
if (model != null)
{
GameObject taskPanelName = await UIManager.Instance.ShowUI(new UIType(model.TaskPanelName));
if (this == null || !saveStore.IsCurrent) return;
if (taskPanelName != null)
{
var panel = taskPanelName.GetComponent<LuckyTaskPanelBase>();
@@ -61,7 +66,7 @@ public class LuckyTaskBtn : MonoBehaviour, IUIRedPoint
int count = RedPointManager.Instance.GetRedPointCount(key);
if (!state)
{
string adData = PlayFabMgr.Instance.GetLocalData(LuckyTaskData.ADTaskADKey);
string adData = saveStore.Read(LuckyTaskData.ADTaskADKey).ValueOrThrow();
if (!string.IsNullOrEmpty(adData))
{
string[] strings = adData.Split("|");

View File

@@ -1,4 +1,4 @@
using asap.core;
using asap.core;
using cfg;
using game;
using GameCore;
@@ -7,13 +7,21 @@ using UnityEngine;
public class LuckyTaskPanel : LuckyTaskPanelBase
{
protected override void Awake()
{
saveStore = GContext.container.Resolve<game.PlayerDataStorage.IPlayerSaveStore>();
base.Awake();
}
game.PlayerDataStorage.IPlayerSaveStore saveStore;
/// <summary>
/// luckyModel 也作为是否自动全部领奖的标志
/// </summary>
List<LuckyTaskItem> taskItems = new List<LuckyTaskItem>();
protected override void SetItem()
{
string adData = PlayFabMgr.Instance.GetLocalData(LuckyTaskData.ADTaskADKey);
string adData = saveStore.Read(LuckyTaskData.ADTaskADKey).ValueOrThrow();
int curDay = ZZTimeHelper.UtcNow().UtcNowOffset().DayOfYear;
if (!string.IsNullOrEmpty(adData))
{
@@ -22,13 +30,13 @@ public class LuckyTaskPanel : LuckyTaskPanelBase
if (strings.Length != 2 || !int.TryParse(strings[1], out day) || day != curDay)
{
adData = $"{0}|{curDay}";
PlayFabMgr.Instance.UpdateUserDataValue(LuckyTaskData.ADTaskADKey, adData);
saveStore.Write(LuckyTaskData.ADTaskADKey, adData).RequireAccepted();
}
}
else
{
adData = $"{0}|{curDay}";
PlayFabMgr.Instance.UpdateUserDataValue(LuckyTaskData.ADTaskADKey, adData);
saveStore.Write(LuckyTaskData.ADTaskADKey, adData).RequireAccepted();
}
List<LuckyTaskItemData> taskList = new List<LuckyTaskItemData>();
int level = taskData.GetValueOrDefault(-2, 0);