public void UpdateFromGTAPP(NoGTAPPTransactionData noGTAPPGoldPrice)
    {
        long   goldCostNoGTAPP = StoreManager.Get().GetGoldCostNoGTAPP(noGTAPPGoldPrice);
        string quantityText    = StoreManager.Get().GetProductQuantityText(noGTAPPGoldPrice.Product, noGTAPPGoldPrice.ProductData, noGTAPPGoldPrice.Quantity);

        this.SetGoldValue(goldCostNoGTAPP, quantityText);
    }
 protected void FireBuyWithGoldEventNoGTAPP(NoGTAPPTransactionData noGTAPPTransactionData)
 {
     foreach (BuyWithGoldNoGTAPPListener listener in this.m_buyWithGoldNoGTAPPListeners.ToArray())
     {
         listener.Fire(noGTAPPTransactionData);
     }
 }
    private void SetUpBuyWithGoldButton()
    {
        string text = string.Empty;
        NoGTAPPTransactionData noGTAPPTransactionData = new NoGTAPPTransactionData {
            Product     = ProductType.PRODUCT_TYPE_DRAFT,
            ProductData = 0,
            Quantity    = 1
        };
        long goldCostNoGTAPP = StoreManager.Get().GetGoldCostNoGTAPP(noGTAPPTransactionData);

        if (goldCostNoGTAPP > 0L)
        {
            this.m_goldTransactionData = noGTAPPTransactionData;
            text = goldCostNoGTAPP.ToString();
            NetCache.NetCacheGoldBalance netObject = NetCache.Get().GetNetObject <NetCache.NetCacheGoldBalance>();
            this.UpdateGoldButtonState(netObject);
        }
        else
        {
            Debug.LogWarning("ForgeStore.SetUpBuyWithGoldButton(): no gold price for purchase Arena without GTAPP");
            text = GameStrings.Get("GLUE_STORE_PRODUCT_PRICE_NA");
            base.SetGoldButtonState(Store.BuyButtonState.DISABLED);
        }
        base.m_buyWithGoldButton.SetText(text);
    }
예제 #4
0
    private void InitGoldOptionNoGTAPP(NoGTAPPTransactionData noGTAPPTransactionData)
    {
        this.m_goldRoot.SetActive(true);
        this.m_realMoneyTextRoot.SetActive(false);
        long goldCostNoGTAPP = StoreManager.Get().GetGoldCostNoGTAPP(noGTAPPTransactionData);

        this.m_goldButtonText.Text = base.m_text.Text;
        this.m_goldCostText.Text   = goldCostNoGTAPP.ToString();
    }
예제 #5
0
 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();
     }
 }
예제 #6
0
 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();
     }
 }
예제 #7
0
 protected virtual void OnBundleChanged(NoGTAPPTransactionData goldBundle, Network.Bundle moneyBundle)
 {
 }