From 5d3c81b6bee461e078f5bcf15f3dbb0b83fb6966 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 09 十一月 2018 21:03:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/OpenServerActivity/FlashSaleItemCell.cs | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/System/OpenServerActivity/FlashSaleItemCell.cs b/System/OpenServerActivity/FlashSaleItemCell.cs
index 0a4cd61..1461bdd 100644
--- a/System/OpenServerActivity/FlashSaleItemCell.cs
+++ b/System/OpenServerActivity/FlashSaleItemCell.cs
@@ -102,7 +102,6 @@
{
if (rushToBuyModel.presentFlashShop == null) return;
- StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(saleItem.shopId);
flashSaleBtn.RemoveAllListeners();
var operation = rushToBuyModel.GetOperationFlashRushToBuy();
int seconds = 0;
@@ -132,13 +131,29 @@
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;
--
Gitblit v1.8.0