Example #1
0
        private bool OnBuyGoodsRsp(BuyGoodsRsp rsp)
        {
            if (rsp.get_retcode() == null)
            {
                this.SetupView();
                Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(LocalizationGeneralLogic.GetText("Menu_ShopBuyGoodsSuccess", new object[0]), 2f), UIType.Any);

                base.view.transform.Find("ShopTab").gameObject.GetComponent <MonoShopStoreTab>().OnBuyGoodsRsp(rsp);
            }
            else
            {
                GeneralDialogContext dialogContext = new GeneralDialogContext {
                    type  = GeneralDialogContext.ButtonType.SingleButton,
                    title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0])
                };
                dialogContext.desc = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0]);
                if (!string.IsNullOrEmpty(dialogContext.desc))
                {
                    Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
                }
                if ((rsp.get_retcode() == 6) || (rsp.get_retcode() == 7))
                {
                    Singleton <NetworkManager> .Instance.RequestGetShopList();
                }
            }
            return(false);
        }
Example #2
0
 private bool OnBuyGoodsRsp(BuyGoodsRsp rsp)
 {
     if (rsp.get_retcode() == null)
     {
         Goods goods = this.GetGoods((int)rsp.get_shop_id(), (int)rsp.get_goods_id());
         if (goods != null)
         {
             goods.set_buy_times(rsp.get_goods_buy_times());
         }
         Singleton <NetworkManager> .Instance.RequestHasGotItemIdList();
     }
     return(false);
 }
Example #3
0
        public void OnBuyGoodsRsp(BuyGoodsRsp rsp)
        {
            this._storeDataItem = Singleton <StoreModule> .Instance.GetStoreDateItemByID(this._storeDataItem.shopID);

            if (rsp.get_retcode() == null)
            {
                if (this._shopType == UIShopType.SHOP_ACTIVITY)
                {
                    this.RefreshActivityScroller();
                }
                else
                {
                    this._scrollViewTrans.GetComponent <MonoGridScroller>().RefreshCurrent();
                }
                if (this._currentSelectedGoodsID != 0)
                {
                    Goods goodsByID = this.GetGoodsByID(this._currentSelectedGoodsID);
                    if (goodsByID != null)
                    {
                        this.OnSelectGoods(goodsByID);
                    }
                }
            }
        }