|
@@ -56,13 +56,13 @@ namespace GFGGame
|
|
|
_shopCfg = ShopCfgArray.Instance.GetCfg(_goodIds);
|
|
|
|
|
|
_buyCount = 1;
|
|
|
- if (_shopCfg.costType == CostType.RMB)
|
|
|
+ if (_shopCfg.CostTypeReal == CostType.RMB)
|
|
|
{
|
|
|
_maxCanBuy = 1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- long itemCount = ItemDataManager.GetItemNum(_shopCfg.costId);
|
|
|
+ long itemCount = ItemDataManager.GetItemNum(_shopCfg.CostIdReal);
|
|
|
long curMoneyCanBuy = itemCount / _shopCfg.Price;
|
|
|
if (_shopCfg.menu1 == ConstStoreTabId.STORE_ARENA)
|
|
|
{
|
|
@@ -151,14 +151,14 @@ namespace GFGGame
|
|
|
_ui.m_btnMinus.m_c1.selectedIndex = _buyCount == 1 ? 1 : 0;
|
|
|
_ui.m_btnMinus.target.touchable = _buyCount == 1 ? false : true;
|
|
|
// int hasCount = ItemDataManager.GetItemNum(cfg.itemId);
|
|
|
- _ui.m_btnAdd.m_c1.selectedIndex = _shopCfg.costType == CostType.RMB || _buyCount == _maxCanBuy ? 1 : 0;
|
|
|
- _ui.m_btnAdd.target.touchable = _shopCfg.costType == CostType.RMB || _buyCount == _maxCanBuy ? false : true;
|
|
|
- _ui.m_btnMax.m_c1.selectedIndex = _shopCfg.costType == CostType.RMB || _buyCount == _maxCanBuy ? 1 : 0;
|
|
|
- _ui.m_btnMax.target.touchable = _shopCfg.costType == CostType.RMB || _buyCount == _maxCanBuy ? false : true;
|
|
|
+ _ui.m_btnAdd.m_c1.selectedIndex = _shopCfg.CostTypeReal == CostType.RMB || _buyCount == _maxCanBuy ? 1 : 0;
|
|
|
+ _ui.m_btnAdd.target.touchable = _shopCfg.CostTypeReal == CostType.RMB || _buyCount == _maxCanBuy ? false : true;
|
|
|
+ _ui.m_btnMax.m_c1.selectedIndex = _shopCfg.CostTypeReal == CostType.RMB || _buyCount == _maxCanBuy ? 1 : 0;
|
|
|
+ _ui.m_btnMax.target.touchable = _shopCfg.CostTypeReal == CostType.RMB || _buyCount == _maxCanBuy ? false : true;
|
|
|
|
|
|
_ui.m_txtShow.text = "选择购买数量";
|
|
|
_ui.m_txtTips.text = string.Format("确定购买{0}个【{1}】?", _buyCount, _shopCfg.itemName);
|
|
|
- if (_shopCfg.costType == CostType.RMB)
|
|
|
+ if (_shopCfg.CostTypeReal == CostType.RMB)
|
|
|
{
|
|
|
_ui.m_comCost.target.visible = false;
|
|
|
_ui.m_txtRmbCost.visible = true;
|
|
@@ -169,7 +169,7 @@ namespace GFGGame
|
|
|
{
|
|
|
_ui.m_comCost.target.visible = true;
|
|
|
_ui.m_txtRmbCost.visible = false;
|
|
|
- ItemUtil.UpdateItemNeedNum(_ui.m_comCost.target, _shopCfg.costId, (int)_buyCount * _shopCfg.Price);
|
|
|
+ ItemUtil.UpdateItemNeedNum(_ui.m_comCost.target, _shopCfg.CostIdReal, (int)_buyCount * _shopCfg.Price);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -203,9 +203,9 @@ namespace GFGGame
|
|
|
{
|
|
|
ShopCfg cfg = ShopCfgArray.Instance.GetCfg(_goodIds);
|
|
|
|
|
|
- if (cfg.costType != CostType.RMB)
|
|
|
+ if (cfg.CostTypeReal != CostType.RMB)
|
|
|
{
|
|
|
- int costId = cfg.costId;
|
|
|
+ int costId = cfg.CostIdReal;
|
|
|
if (cfg.menu1 == ConstStoreTabId.STORE_ARENA && cfg.menu2 != ArenaDataManager.Instance.SeasonId && cfg.menu2 != ConstStoreSubId.STORE_ARENA_ITEM)
|
|
|
{
|
|
|
costId = cfg.oldSeasonCostId;
|