From 01638bd36dd973e2e925b3b41045b157f3e64d4e Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 10 十月 2018 15:48:19 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Store/Logic/BuyItemInfoWin.cs | 56 ++++++++++++++++++++------------------------------------
1 files changed, 20 insertions(+), 36 deletions(-)
diff --git a/System/Store/Logic/BuyItemInfoWin.cs b/System/Store/Logic/BuyItemInfoWin.cs
index cca5a60..cbd06f1 100644
--- a/System/Store/Logic/BuyItemInfoWin.cs
+++ b/System/Store/Logic/BuyItemInfoWin.cs
@@ -326,16 +326,8 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig,out canBuyCnt,out addBuyCnt);
bool isReachUpper = false;
- buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
- if (itemTipsModel.curAttrData.itemConfig.PackCount > 1)
- {
- numberGo.gameObject.SetActive(true);
- }
- else
- {
- numberGo.gameObject.SetActive(false);
- }
-
+ buyCnt = buyItem.GetCurBuyCnt(1,buyItem.GetRemainBuyCnt(canBuyCnt,shopItemLimit, isVipBuy), out isReachUpper);
+
buyBtn.gameObject.SetActive(true);
if (isVipBuy)
@@ -357,7 +349,7 @@
else
{
buyBtn.gameObject.SetActive(false);
- buyCnt = buyItem.GetCurBuyCnt(0, canBuyCnt, isVipBuy, out isReachUpper);
+ buyCnt = buyItem.GetCurBuyCnt(0, canBuyCnt, out isReachUpper);
}
}
else
@@ -433,39 +425,31 @@
buyPriceText.text = UIHelper.GetTextColorByItemColor(TextColType.Green, _price.ToString());
}
- if(_price <= 0)
+ if (_price <= 0)
{
- numberGo.gameObject.SetActive(false);
moneyRect.gameObject.SetActive(false);
buyBtnText.text = Language.Get("MailReceive");
}
else
{
- numberGo.gameObject.SetActive(true);
- moneyRect.gameObject.SetActive(true);
buyBtnText.text = Language.Get("ItemHandle_buy");
+ moneyRect.gameObject.SetActive(true);
+ }
+
+ if (_price <= 0 || itemTipsModel.curAttrData.itemConfig.PackCount < 2)
+ {
+ numberGo.gameObject.SetActive(false);
+
+ }
+ else
+ {
+ numberGo.gameObject.SetActive(true);
+
}
}
#region 鐐瑰嚮浜嬩欢
- private int GetRemainBuyCnt()
- {
- int haveBuyCnt = 0;
- if(shopItemLimit != null)
- {
- haveBuyCnt = shopItemLimit.BuyCnt;
- }
- int remainCnt = canBuyCnt - haveBuyCnt;
- if(remainCnt >= 0)
- {
- return remainCnt;
- }
- else
- {
- return 0;
- }
- }
-
+
private void OnClickCountBtn()
{
numKeyboard.gameObject.SetActive(true);
@@ -474,7 +458,7 @@
private void OnClickNum()
{
bool isReachUpper = false;
- buyCnt = buyItem.GetCurBuyCnt(int.Parse(numKeyboard.Value), GetRemainBuyCnt(), isVipBuy, out isReachUpper);
+ buyCnt = buyItem.GetCurBuyCnt(int.Parse(numKeyboard.Value),buyItem.GetRemainBuyCnt(canBuyCnt,shopItemLimit, isVipBuy), out isReachUpper);
RefreshBuyPrice(buyCnt);
numKeyboard.Value = buyCnt.ToString();
if (isReachUpper)
@@ -496,7 +480,7 @@
{
bool isReachUpper = false;
buyCnt += 1;
- buyCnt = buyItem.GetCurBuyCnt(buyCnt, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
+ buyCnt = buyItem.GetCurBuyCnt(buyCnt, buyItem.GetRemainBuyCnt(canBuyCnt,shopItemLimit, isVipBuy), out isReachUpper);
buyCountText.text = buyCnt.ToString();
RefreshBuyPrice(buyCnt);
if (isReachUpper || buyCnt == 0)
@@ -509,7 +493,7 @@
{
bool isReachUpper = false;
buyCnt -= 1;
- buyCnt = buyItem.GetCurBuyCnt(buyCnt, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
+ buyCnt = buyItem.GetCurBuyCnt(buyCnt,buyItem.GetRemainBuyCnt(canBuyCnt,shopItemLimit, isVipBuy), out isReachUpper);
buyCountText.text = buyCnt.ToString();
RefreshBuyPrice(buyCnt);
}
--
Gitblit v1.8.0