yyl
2026-03-26 f4a702e212d1853735f8dae399da69d23bfa510e
Main/System/Store/BuyItemWin.cs
@@ -50,8 +50,15 @@
        maxCnt = shopConfig.LimitCnt - buyCnt;
        if (maxCnt == 0)
        {
            //没有限购,用货币可购买数量
            maxCnt = Math.Max(1, (int)(UIHelper.GetMoneyCnt(shopConfig.MoneyType)/shopConfig.MoneyNum));
            if (shopConfig.MoneyType <= 0)
            {
                maxCnt = Math.Max(1, (int)(PackManager.Instance.GetItemCountByID(PackType.Item, shopConfig.CostItemID) / shopConfig.MoneyNum));
            }
            else
            {
                //没有限购,用货币可购买数量
                maxCnt = Math.Max(1, (int)(UIHelper.GetMoneyCnt(shopConfig.MoneyType) / shopConfig.MoneyNum));
            }
        }
        OnSliderChange(useCnt);
@@ -97,8 +104,17 @@
        }
        limitText.text = limitStr;
        moneyIcon.SetIconWithMoneyType(shopConfig.MoneyType);
        moneyText.text = UIHelper.ShowUseMoney(shopConfig.MoneyType, shopConfig.MoneyNum * useCnt, false);
        if (shopConfig.MoneyType <= 0)
        {
            moneyIcon.SetItemSprite(shopConfig.CostItemID);
            moneyText.text = UIHelper.ShowUseItem(PackType.Item, shopConfig.CostItemID, shopConfig.MoneyNum * useCnt, false);
        }
        else
        {
            moneyIcon.SetIconWithMoneyType(shopConfig.MoneyType);
            moneyText.text = UIHelper.ShowUseMoney(shopConfig.MoneyType, shopConfig.MoneyNum * useCnt, false);
        }
    }