chore(m2): 保存功能验收及后续清理前检查点

This commit is contained in:
Liubing\LB
2026-10-10 20:40:27 +08:00
parent d3c5394a55
commit 144e7f739f
110 changed files with 12672 additions and 7514 deletions

View File

@@ -21,18 +21,10 @@ public class EventPackData
}
private Data _data;
internal static game.PlayerDataStorage.PlayerKVEventPackState DecodeForKVLoad(System.Collections.Generic.IReadOnlyDictionary<string,string> raw,
game.PlayerDataStorage.PlayerKVSchemaSnapshot snapshot,game.PlayerDataStorage.PlayerKVSchemaDiagnostics errors) =>
game.PlayerDataStorage.PlayerKVSaveSchema.DecodeEventPack(raw,snapshot,errors);
internal void ResetForKVLoad() { _data=default(Data); }
internal void ReplaceFromKVDecoded(game.PlayerDataStorage.PlayerKVEventPackState state)
{
if (state == null) throw new System.ArgumentNullException(nameof(state));
_data=new Data { currentEventID=state.EventId,purchaseCount=state.PurchaseCount,
VIPLvlWhenEventActivate=state.VipLevel,redirectID=state.RedirectId };
}
internal game.PlayerDataStorage.PlayerKVEventPackState SnapshotForKVValidation() =>
new game.PlayerDataStorage.PlayerKVEventPackState(_data.currentEventID,_data.purchaseCount,_data.VIPLvlWhenEventActivate,_data.redirectID);
public int CurrentEventID { get { return _data.currentEventID; } }
public int PurchaseCount { get { return _data.purchaseCount; } }
public int VIPLvlWhenEventActivated { get { return _data.VIPLvlWhenEventActivate; } }