feat(upserver): 接入认证与KV存档并完成限定钓鱼闭环
This commit is contained in:
@@ -13,6 +13,20 @@ public class FishingBoxData
|
||||
public Dictionary<int, int> FishingNewBoxs = new();
|
||||
public Dictionary<int, int> FishingBoxOpenNum = new();
|
||||
|
||||
internal static game.PlayerDataStorage.PlayerKVIntMapState DecodeForKVLoad(IReadOnlyDictionary<string,string> raw,
|
||||
IReadOnlyDictionary<string,string> modern, game.PlayerDataStorage.PlayerKVSchemaDiagnostics errors) =>
|
||||
game.PlayerDataStorage.PlayerKVSaveSchema.DecodeFishingBox(raw,modern,errors);
|
||||
internal void ResetForKVLoad()
|
||||
{
|
||||
FishingNewBoxs = new Dictionary<int,int>();
|
||||
FishingBoxOpenNum = new Dictionary<int,int>();
|
||||
}
|
||||
internal void ReplaceFromKVDecoded(game.PlayerDataStorage.PlayerKVIntMapState state)
|
||||
{
|
||||
if (state == null) throw new ArgumentNullException(nameof(state));
|
||||
FishingBoxOpenNum = state.Values.ToDictionary(p=>p.Key,p=>p.Value);
|
||||
}
|
||||
|
||||
public void InitData(string data)
|
||||
{
|
||||
if (string.IsNullOrEmpty(data) == false)
|
||||
|
||||
Reference in New Issue
Block a user