test(upserver): 归档存档迁移与玩法闭环回归工具
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using asap.core;
|
||||
using GameCore;
|
||||
using game;
|
||||
using LitJson;
|
||||
if(!GContext.Ready || GContext.container==null) return "Bootstrap pending; "+KVGameplayLoopSetup.State();
|
||||
var u=GContext.container.Resolve<IUserService>();
|
||||
if(!u.IsLogin) return "Login pending; "+KVGameplayLoopSetup.State();
|
||||
var p=GContext.container.Resolve<PlayerData>();
|
||||
var f=GContext.container.Resolve<PlayerFishData>();
|
||||
var guide=GContext.container.Resolve<GuideDataCenter>();
|
||||
var source=SimpleJSON.JSON.Parse(System.IO.File.ReadAllText("C:/projects/ft/CodexOutput/upserver/KVGameplayLoopTests/backups/20260928T092418Z/101.json"))["data"];
|
||||
var mismatches=new System.Collections.Generic.List<string>();
|
||||
foreach(var key in source.Keys)if(!string.Equals(PlayFabMgr.Instance.GetLocalData(key),source[key].Value,System.StringComparison.Ordinal))mismatches.Add(key);
|
||||
var rawMap=JsonMapper.ToObject<System.Collections.Generic.Dictionary<string,string>>(PlayFabMgr.Instance.GetLocalData("Map_5_102"));
|
||||
var saved=guide.GuideSaveDataDic["EventPotion01"];
|
||||
var api=GContext.container.Resolve<ICustomServerMgr>().ApiBaseUri.ToString();
|
||||
bool valuesPass=u.CustomId=="101" && api=="http://s101.local:18080/" && (ulong)p.gold==36552317UL && (int)p.Energy==7300 && p.GetEnergyRM()==7236 && rawMap["10231"]=="6|9.23|54|5|False" && System.Math.Abs(f.GetDataMaxWeight(10231)-9.23f)<0.001f && f.GetDataLevel(10231)==6 && saved.guideSubIndex==4 && !saved.isFinish && guide.curDefine==null && guide.curGroupDefine==null && guide.curSaveData==null;
|
||||
return JsonMapper.ToJson(new {valuesPass,account=u.CustomId,internalId=u.InternalId,api,gold=(ulong)p.gold,energy=(int)p.Energy,energyRM=p.GetEnergyRM(),core=p.PlayerDataDic["newData"],fishId=10231,fishRaw=rawMap["10231"],liveMaxWeight=f.GetDataMaxWeight(10231),liveLevel=f.GetDataLevel(10231),liveNewFish=f.GetDataNewFish(10231),guide=saved.groupName+"|"+saved.guideSubIndex+"|"+saved.isFinish,comparedKeys=source.Count,mismatches,state=KVGameplayLoopSetup.State()});
|
||||
Reference in New Issue
Block a user