|
@@ -124,7 +124,9 @@ namespace GFGGame
|
|
int maxBuyCount = (int)Math.Floor((decimal)(ItemDataManager.GetItemNum(itemExchangeCfg.costId) / itemExchangeCfg.costNumArr[0]));
|
|
int maxBuyCount = (int)Math.Floor((decimal)(ItemDataManager.GetItemNum(itemExchangeCfg.costId) / itemExchangeCfg.costNumArr[0]));
|
|
_maxCanBuy = Math.Min(Math.Min(maxCount, maxBuyCount), itemExchangeCfg.maxLimit == 0 ? maxCount : itemExchangeCfg.maxLimit - ItemDataManager.GetItemExchangeTimes(buyId));
|
|
_maxCanBuy = Math.Min(Math.Min(maxCount, maxBuyCount), itemExchangeCfg.maxLimit == 0 ? maxCount : itemExchangeCfg.maxLimit - ItemDataManager.GetItemExchangeTimes(buyId));
|
|
_itemId = buyId;
|
|
_itemId = buyId;
|
|
-
|
|
|
|
|
|
+ ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemExchangeCfg.id);
|
|
|
|
+ ItemCfg itemCostCfg = ItemCfgArray.Instance.GetCfg(itemExchangeCfg.costId);
|
|
|
|
+ _ui.m_txtBuyTips.text = string.Format("消耗{0}{1},可兑换{2}{3}", itemExchangeCfg.costNumArr[0], itemCostCfg.name, itemExchangeCfg.num, itemCfg.name);
|
|
}
|
|
}
|
|
GetMoneyIdAndNum(minBuyCount, out _costId, out _costNum, out _buyNum);
|
|
GetMoneyIdAndNum(minBuyCount, out _costId, out _costNum, out _buyNum);
|
|
|
|
|
|
@@ -151,7 +153,6 @@ namespace GFGGame
|
|
ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(_costId);
|
|
ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(_costId);
|
|
_ui.m_iconPrice.url = ResPathUtil.GetCommonGameResPath(costItemCfg.res);
|
|
_ui.m_iconPrice.url = ResPathUtil.GetCommonGameResPath(costItemCfg.res);
|
|
_ui.m_txtBuyTips.visible = false;
|
|
_ui.m_txtBuyTips.visible = false;
|
|
- _ui.m_txtBuyTips.text = string.Format("消耗{0}{1},可兑换{2}{3}", _costNum, costItemCfg.name, _buyNum, itemCfg.name);
|
|
|
|
UpdateCost();
|
|
UpdateCost();
|
|
}
|
|
}
|
|
private void UpdateCost()
|
|
private void UpdateCost()
|