コード例 #1
0
ファイル: FluidClient.cs プロジェクト: AustinJGreen/Fluid
        /// <summary>
        /// Loads all shop items owned
        /// </summary>
        public VaultShopItem[] LoadPlayerItems()
        {
            m_Client.PayVault.Refresh();
            VaultItem[]     vaultItems = m_Client.PayVault.Items;
            VaultShopItem[] shopItems  = new VaultShopItem[vaultItems.Length];
            for (int i = 0; i < vaultItems.Length; i++)
            {
                VaultItem     cur      = vaultItems[i];
                VaultShopItem shopItem = new VaultShopItem()
                {
                    ID                 = cur.Id,
                    Type               = cur.ItemKey,
                    PriceCoins         = m_Toolbelt.GetValueIfExists <int>(cur, "PriceCoins"),
                    Enabled            = m_Toolbelt.GetValueIfExists <bool>(cur, "Enabled"),
                    IsFeatured         = m_Toolbelt.GetValueIfExists <bool>(cur, "IsFeatured"),
                    Span               = m_Toolbelt.GetValueIfExists <int>(cur, "Span"),
                    BitmapSheetOffset  = m_Toolbelt.GetValueIfExists <int>(cur, "BitmapSheetOffset"),
                    HeaderText         = m_Toolbelt.GetValueIfExists <string>(cur, "Header"),
                    BodyText           = m_Toolbelt.GetValueIfExists <string>(cur, "Body"),
                    IsGridFeatured     = m_Toolbelt.GetValueIfExists <bool>(cur, "IsGridFeatured"),
                    PriceUSD           = m_Toolbelt.GetValueIfExists <int>(cur, "PriceUSD"),
                    PriceEnergy        = m_Toolbelt.GetValueIfExists <int>(cur, "PriceEnergy"),
                    EnergyPerClick     = m_Toolbelt.GetValueIfExists <int>(cur, "EnergyPerClick"),
                    InPlayerWorldsOnly = m_Toolbelt.GetValueIfExists <bool>(cur, "PWOnly"),
                    MinimumClass       = m_Toolbelt.GetValueIfExists <int>(cur, "MinClass"),
                    IsClassic          = m_Toolbelt.GetValueIfExists <bool>(cur, "IsClassic"),
                    OnSale             = m_Toolbelt.GetValueIfExists <bool>(cur, "OnSale"),
                    BetaOnly           = m_Toolbelt.GetValueIfExists <bool>(cur, "BetaOnly"),
                    BitmapSheetID      = m_Toolbelt.GetValueIfExists <string>(cur, "BitmapSheetId"),
                    Reusable           = m_Toolbelt.GetValueIfExists <bool>(cur, "Reusable"),
                    IsNew              = m_Toolbelt.GetValueIfExists <bool>(cur, "IsNew"),
                    IsDevOnly          = m_Toolbelt.GetValueIfExists <bool>(cur, "DevOnly")
                };

                shopItems[i] = shopItem;
            }

            return(shopItems);
        }
コード例 #2
0
ファイル: LobbyConnection.cs プロジェクト: AustinJGreen/Fluid
 /// <summary>
 /// Use's gems on a shop item
 /// </summary>
 /// <param name="item">The item</param>
 /// <returns>Whether gems were spent</returns>
 public bool UseGems(VaultShopItem item)
 {
     return(this.UseGems(item.ID));
 }
コード例 #3
0
ファイル: LobbyConnection.cs プロジェクト: AustinJGreen/Fluid
 /// <summary>
 /// Use's gems on a shop item
 /// </summary>
 /// <param name="item">The item</param>
 public void RequestUseGems(VaultShopItem item)
 {
     this.RequestUseGems(item.ID);
 }
コード例 #4
0
ファイル: LobbyConnection.cs プロジェクト: AustinJGreen/Fluid
 /// <summary>
 /// Requests to use energy on a
 /// </summary>
 /// <param name="item">The item</param>
 /// <returns>Whether the energy was spent</returns>
 public bool UseEnergy(VaultShopItem item)
 {
     return(this.UseEnergy(item.ID));
 }
コード例 #5
0
ファイル: LobbyConnection.cs プロジェクト: AustinJGreen/Fluid
 /// <summary>
 /// Requests to use energy on a shop item
 /// </summary>
 /// <param name="item">The item</param>
 public void RequestUseEnergy(VaultShopItem item)
 {
     this.RequestUseEnergy(item.ID);
 }