Exemplo n.º 1
0
        public static Task <PlayerData> GetConnectionArgsAsync(Client client)
        {
            ShopData     shopData     = null;
            PlayerObject playerObject = null;
            var          vaultTask    = client.PayVault.RefreshAsync()
                                        .Then(task => shopData = new ShopData(client.PayVault.Items));

            var playerObjectTask = client.BigDB.LoadMyPlayerObjectAsync()
                                   .Then(task => playerObject = new PlayerObject(task.Result));

            return(vaultTask
                   .Then(t => playerObjectTask)
                   .Then(t => new PlayerData(playerObject, shopData))
                   .ToSafeTask());
        }
Exemplo n.º 2
0
 public ConnectionArgs(ShopData shopData, PlayerObject playerObject)
 {
     this.ShopData     = shopData;
     this.PlayerObject = playerObject;
 }
Exemplo n.º 3
0
 public ConnectionArgs(ShopData shopData, PlayerObject playerObject)
 {
     this.ShopData = shopData;
     this.PlayerObject = playerObject;
 }
Exemplo n.º 4
0
 public PlayerData(PlayerObject playerObject, ShopData shopData)
 {
     this.PlayerObject = playerObject;
     this.ShopData     = shopData;
 }