| | |
| | | {
|
| | | if (rushToBuyModel.presentFlashShop == null) return;
|
| | |
|
| | | StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(saleItem.shopId);
|
| | | flashSaleBtn.RemoveAllListeners();
|
| | | var operation = rushToBuyModel.GetOperationFlashRushToBuy();
|
| | | int seconds = 0;
|
| | |
| | | break;
|
| | | case 0:
|
| | | btnStateText.text = Language.Get("FlashRushToBuy102");
|
| | | flashSaleBtn.AddListener(() => {
|
| | | storeModel.SendBuyShopItem(storeConfig,1);
|
| | | });
|
| | | flashSaleBtn.AddListener(SendBuyShopItem);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SendBuyShopItem()
|
| | | {
|
| | | if (saleItem == null) return;
|
| | |
|
| | | if(UIHelper.GetMoneyCnt(saleItem.moneyType) >= (ulong)saleItem.moneyNumber)
|
| | | {
|
| | | C0803_tagCBuyItemList buyShop = new C0803_tagCBuyItemList();
|
| | | buyShop.NPCID = 0;
|
| | | buyShop.BuyItemIndex = (ushort)saleItem.shopId;
|
| | | buyShop.BuyCount = (ushort)1;
|
| | | GameNetSystem.Instance.SendInfo(buyShop);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshCD(int code,int time)
|
| | | {
|
| | | if (this.code != code) return;
|