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

@@ -1,4 +1,4 @@
using asap.core;
using asap.core;
using cfg;
using game;
using GameCore;
@@ -63,44 +63,11 @@ public class FishingChallengeManager
private DateTime EndTime;
//
public FishingChallengeData fishingChallengeData { get; private set; }
internal bool IsInactiveForKVValidation => !IsInit && CurFishingEventData==null && eventChallengeMain==null &&
eventChallengeConfig==null && challengeMapData==null && _stageDropList.Count==0 && _eliminateListScore.Count==0;
internal static game.PlayerDataStorage.PlayerKVChallengeState DecodeForKVLoad(IReadOnlyDictionary<string,string> raw,
game.PlayerDataStorage.PlayerKVSchemaSnapshot snapshot,game.PlayerDataStorage.PlayerKVSchemaDiagnostics errors) =>
game.PlayerDataStorage.PlayerKVSaveSchema.DecodeChallenge(raw,snapshot,errors);
internal void ResetForKVLoad()
{
fishingChallengeData=null; IsInit=false; PrefabName=null;
#if UNITY_EDITOR
_cheatingScore=0;
#endif
TopRankTier=Rank=FullStep=PlayerFullNumber=PreScore=0;
CurFishingEventData=null; StartTime=EndTime=default; eventChallengeMain=null; eventChallengeConfig=null; challengeMapData=null; itemDataList=null;
_stageDropList.Clear(); _eliminateListScore.Clear(); _eventTrackStageList=new List<int>(); _eventTrackNormalRewardList=new List<int>(); InVisibleReason=string.Empty;
}
internal void ReplaceFromKVDecoded(game.PlayerDataStorage.PlayerKVChallengeState state)
{
if(state==null) throw new ArgumentNullException(nameof(state));
fishingChallengeData=!state.IsPresent || state.IsExplicitNull ? null : new FishingChallengeData
{
FirstOpen=state.FirstOpen,
EventId=state.EventId,
RankTierLevel=state.RankTierLevel,
Finished=state.Finished,
RedirectID=state.RedirectID,
Score=state.Score,
ProcessedScore=state.ProcessedScore,
step=state.step,
uiStep=state.uiStep,
index=state.index,
StartTime=state.StartTime,
EndTime=state.EndTime,
eliminateNumber=new List<int>(state.eliminateNumber),
robotAccountList=new List<int>(state.robotAccountList),
InflationRate=state.InflationRate
};
}
public EventChallengeMain eventChallengeMain { get; private set; }
public EventChallengeConfig eventChallengeConfig { get; private set; }
public MapData challengeMapData { get; private set; }