public void UpdateFromMoneyBundle(Network.Bundle bundle) { Network.BundleItem item = bundle.Items[0]; string quantityText = StoreManager.Get().GetProductQuantityText(item.Product, item.ProductData, item.Quantity); this.SetMoneyValue(bundle, quantityText); }
public void SetMoneyValue(Network.Bundle bundle, string quantityText) { if ((bundle != null) && !StoreManager.Get().IsProductAlreadyOwned(bundle)) { if (this.m_fullText != null) { this.m_quantityText.gameObject.SetActive(true); this.m_costText.gameObject.SetActive(true); this.m_fullText.gameObject.SetActive(false); } this.m_costText.Text = StoreManager.Get().FormatCostBundle(bundle); this.m_costText.TextColor = this.m_moneyCostTextColor; this.m_quantityText.Text = quantityText; this.m_quantityText.TextColor = this.m_moneyQuantityTextColor; } else { this.m_costText.Text = string.Empty; UberText fullText = this.m_quantityText; if (this.m_fullText != null) { this.m_quantityText.gameObject.SetActive(false); this.m_costText.gameObject.SetActive(false); this.m_fullText.gameObject.SetActive(true); fullText = this.m_fullText; } fullText.Text = GameStrings.Get("GLUE_STORE_PACK_BUTTON_TEXT_PURCHASED"); } this.m_isGold = false; this.UpdateButtonState(); }
private void InitMoneyOption(Network.Bundle bundle) { this.m_goldRoot.SetActive(false); this.m_realMoneyTextRoot.SetActive(true); this.m_bonusFrame.SetActive(false); this.m_cost.Text = string.Format(GameStrings.Get("GLUE_STORE_PRODUCT_PRICE"), StoreManager.Get().FormatCostBundle(bundle)); }
public bool IsAvailable() { Network.Bundle bundle = null; bool productExists = false; StoreManager.Get().GetAvailableAdventureBundle(this.m_adventureType, out bundle, out productExists); return(productExists); }
public void SetCurrentGoldBundle(NoGTAPPTransactionData bundle) { if (this.m_currentGoldBundle != bundle) { this.m_currentMoneyBundle = null; this.m_currentGoldBundle = bundle; this.OnBundleChanged(this.m_currentGoldBundle, this.m_currentMoneyBundle); this.FireBundleChangedEvent(); } }
public void SetCurrentMoneyBundle(Network.Bundle bundle, bool force = false) { if ((force || (this.m_currentMoneyBundle != bundle)) || (bundle == null)) { this.m_currentGoldBundle = null; this.m_currentMoneyBundle = bundle; this.OnBundleChanged(this.m_currentGoldBundle, this.m_currentMoneyBundle); this.FireBundleChangedEvent(); } }
private void OnDraftPurchaseAck(Network.Bundle bundle, PaymentMethod paymentMethod, object userData) { if (this.m_draftDeck != null) { StoreManager.Get().HideArenaStore(); } else { this.RequestDraftStart(); } }
public void SetAdventureProduct(ProductType product, int productData) { List <Network.BundleItem> items = new List <Network.BundleItem>(); Network.BundleItem item = new Network.BundleItem { Product = product, ProductData = productData, Quantity = 1 }; items.Add(item); string productName = StoreManager.Get().GetProductName(items); this.m_Headline.Text = productName; string str2 = string.Empty; switch (product) { case ProductType.PRODUCT_TYPE_NAXX: str2 = "NAXX"; break; case ProductType.PRODUCT_TYPE_BRM: str2 = "BRM"; break; case ProductType.PRODUCT_TYPE_LOE: str2 = "LOE"; break; } string key = string.Format("GLUE_STORE_PRODUCT_DETAILS_{0}_PART_1", str2); string str4 = string.Format("GLUE_STORE_PRODUCT_DETAILS_{0}_PART_2", str2); object[] args = new object[] { productName }; this.m_DetailsText1.Text = GameStrings.Format(key, args); this.m_DetailsText2.Text = GameStrings.Format(str4, new object[0]); bool productExists = false; List <Network.Bundle> list2 = StoreManager.Get().GetAvailableBundlesForProduct(product, out productExists, productData, NUM_BUNDLE_ITEMS_REQUIRED); if (list2.Count == 1) { this.m_bundle = list2[0]; } else { Debug.LogWarning(string.Format("AdventureStore.SetAdventureProduct(): expected to find 1 available bundle for product {0} productData {1}, found {2}", product, productData, list2.Count)); this.m_bundle = null; } StoreManager.Get().GetAvailableAdventureBundle(product, out this.m_fullDungeonBundle, out productExists); }
private string GetItemsText(string productID, int quantity) { string productName; Network.Bundle bundle = StoreManager.Get().GetBundle(productID); if (bundle == null) { productName = GameStrings.Get("GLUE_STORE_PRODUCT_NAME_MOBILE_UNKNOWN"); } else { productName = StoreManager.Get().GetProductName(bundle.Items); } object[] args = new object[] { quantity, productName }; return(GameStrings.Format("GLUE_STORE_SUMMARY_ITEM_ORDERED", args)); }
private void SetDetails(string productID, int quantity, string paymentMethodName) { this.m_bundle = StoreManager.Get().GetBundle(productID); this.m_quantity = quantity; this.m_itemsText.Text = this.GetItemsText(); this.m_priceText.Text = this.GetPriceText(); this.m_taxDisclaimerText.Text = StoreManager.Get().GetTaxText(); this.m_chargeDetailsText.Text = (paymentMethodName != null) ? GameStrings.Format("GLUE_STORE_SUMMARY_CHARGE_DETAILS", new object[] { paymentMethodName }) : string.Empty; string str = string.Empty; HashSet <ProductType> productsInBundle = StoreManager.Get().GetProductsInBundle(this.m_bundle); if (productsInBundle.Contains(ProductType.PRODUCT_TYPE_BOOSTER)) { if (this.m_bundle.IsPreOrder()) { str = GameStrings.Get("GLUE_STORE_SUMMARY_KOREAN_AGREEMENT_PACK_PREORDER"); } else { str = GameStrings.Get("GLUE_STORE_SUMMARY_KOREAN_AGREEMENT_EXPERT_PACK"); } } else if (productsInBundle.Contains(ProductType.PRODUCT_TYPE_DRAFT)) { str = GameStrings.Get("GLUE_STORE_SUMMARY_KOREAN_AGREEMENT_FORGE_TICKET"); } else if ((productsInBundle.Contains(ProductType.PRODUCT_TYPE_NAXX) || productsInBundle.Contains(ProductType.PRODUCT_TYPE_BRM)) || productsInBundle.Contains(ProductType.PRODUCT_TYPE_LOE)) { if (this.m_bundle.Items.Count == 1) { str = GameStrings.Get("GLUE_STORE_SUMMARY_KOREAN_AGREEMENT_ADVENTURE_SINGLE"); } else { str = GameStrings.Get("GLUE_STORE_SUMMARY_KOREAN_AGREEMENT_ADVENTURE_BUNDLE"); } } else if (productsInBundle.Contains(ProductType.PRODUCT_TYPE_HERO)) { str = GameStrings.Get("GLUE_STORE_SUMMARY_KOREAN_AGREEMENT_HERO"); } this.m_koreanAgreementTermsText.Text = str; }
private void SetUpBuyWithMoneyButton() { bool productExists = false; List <Network.Bundle> list = StoreManager.Get().GetAvailableBundlesForProduct(ProductType.PRODUCT_TYPE_DRAFT, out productExists, 0, NUM_BUNDLE_ITEMS_REQUIRED); string text = string.Empty; if (list.Count == 1) { this.m_bundle = list[0]; text = StoreManager.Get().FormatCostBundle(this.m_bundle); this.UpdateMoneyButtonState(); } else { Debug.LogWarning(string.Format("ForgeStore.SetUpBuyWithMoneyButton(): expecting 1 bundle for purchasing Forge, found {0}", list.Count)); text = GameStrings.Get("GLUE_STORE_PRODUCT_PRICE_NA"); base.SetMoneyButtonState(Store.BuyButtonState.DISABLED); } base.m_buyWithMoneyButton.SetText(text); }
private void SetupInitialSelectedAdventure() { AdventureDbId @int = (AdventureDbId)Options.Get().GetInt(Option.LAST_SELECTED_STORE_ADVENTURE_ID, 0); Network.Bundle bundle = null; bool productExists = false; StoreManager.Get().GetAvailableAdventureBundle(@int, out bundle, out productExists); if (!productExists) { @int = AdventureDbId.INVALID; } foreach (GeneralStoreAdventureSelectorButton button in this.m_adventureButtons) { if (button.GetAdventureType() == @int) { this.m_adventureContent.SetAdventureType(@int, false); button.Select(); break; } } }
public void InitMoneyOption(Network.Bundle bundle) { object[] objArray1 = new object[] { bundle }; base.method_8("InitMoneyOption", objArray1); }
public void UpdateCostDisplay(Network.Bundle moneyBundle) { Class272.Enum20[] enumArray1 = new Class272.Enum20[] { Class272.Enum20.Class }; object[] objArray1 = new object[] { moneyBundle }; base.method_9("UpdateCostDisplay", enumArray1, objArray1); }
public void UpdateCostAndButtonState(NoGTAPPTransactionData goldBundle, Network.Bundle moneyBundle) { object[] objArray1 = new object[] { goldBundle, moneyBundle }; base.method_8("UpdateCostAndButtonState", objArray1); }
public void SuccessfulPurchaseEvent(Network.Bundle bundle, PaymentMethod paymentMethod, object userData) { object[] objArray1 = new object[] { bundle, paymentMethod, userData }; base.method_8("SuccessfulPurchaseEvent", objArray1); }
public void OnBundleChanged(NoGTAPPTransactionData goldBundle, Network.Bundle moneyBundle) { object[] objArray1 = new object[] { goldBundle, moneyBundle }; base.method_8("OnBundleChanged", objArray1); }
public GeneralStoreHeroesSelectorButton CreateUnpurchasedHeroButton(string heroCardId, Network.Bundle heroBundle) { object[] objArray1 = new object[] { heroCardId, heroBundle }; return(base.method_14 <GeneralStoreHeroesSelectorButton>("CreateUnpurchasedHeroButton", objArray1)); }
public bool CanBuyBundle(Network.Bundle bundleToBuy) { object[] objArray1 = new object[] { bundleToBuy }; return(base.method_11 <bool>("CanBuyBundle", objArray1)); }
public void UpdateFromMoneyBundle(Network.Bundle bundle) { object[] objArray1 = new object[] { bundle }; base.method_8("UpdateFromMoneyBundle", objArray1); }
public void SetMoneyValue(Network.Bundle bundle, string quantityText) { object[] objArray1 = new object[] { bundle, quantityText }; base.method_8("SetMoneyValue", objArray1); }
public void UpdateRadioButtonText(Network.Bundle moneyBundle) { object[] objArray1 = new object[] { moneyBundle }; base.method_8("UpdateRadioButtonText", objArray1); }
public void UpdateAdventureDescription(Network.Bundle bundle) { object[] objArray1 = new object[] { bundle }; base.method_8("UpdateAdventureDescription", objArray1); }
public void ShowPreorderBuyButtons(Network.Bundle preOrderBundle) { object[] objArray1 = new object[] { preOrderBundle }; base.method_8("ShowPreorderBuyButtons", objArray1); }
public bool IsPreorder() { Network.Bundle preOrderBundle = null; return StoreManager.Get().IsBoosterPreorderActive((int) this.m_boosterId, out preOrderBundle); }
public string FormatCostBundle(Network.Bundle bundle) { object[] objArray1 = new object[] { bundle }; return(base.method_13("FormatCostBundle", objArray1)); }
public void OnItemPurchased(Network.Bundle bundle, PaymentMethod purchaseMethod, object userData) { object[] objArray1 = new object[] { bundle, purchaseMethod, userData }; base.method_8("OnItemPurchased", objArray1); }
public void OnDraftPurchaseAck(Network.Bundle bundle, PaymentMethod paymentMethod, object userData) { object[] objArray1 = new object[] { bundle, paymentMethod, userData }; base.method_8("OnDraftPurchaseAck", objArray1); }
public bool IsProductAlreadyOwned(Network.Bundle bundle) { object[] objArray1 = new object[] { bundle }; return(base.method_11 <bool>("IsProductAlreadyOwned", objArray1)); }
protected virtual void OnBundleChanged(NoGTAPPTransactionData goldBundle, Network.Bundle moneyBundle) { }