feat(upserver): 接入认证与KV存档并完成限定钓鱼闭环
This commit is contained in:
@@ -19,6 +19,19 @@ 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; } }
|
||||
|
||||
Reference in New Issue
Block a user