|
@@ -55,11 +55,16 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private void OnClickBtnSure()
|
|
private void OnClickBtnSure()
|
|
{
|
|
{
|
|
- if (ItemDataManager.GetItemNum(GlobalCfgArray.globalCfg.costIdBuyFightTimes) < GlobalCfgArray.globalCfg.costNumBuyFightTimes)
|
|
|
|
|
|
+
|
|
|
|
+ int costId = GlobalCfgArray.globalCfg.costIdBuyFightTimes;
|
|
|
|
+ long hasNum = GlobalCfgArray.globalCfg.costNumBuyFightTimes;
|
|
|
|
+ if (!ItemUtil.CheckItemEnough(costId, hasNum))
|
|
{
|
|
{
|
|
- PromptController.Instance.ShowFloatTextPrompt("消耗不足");
|
|
|
|
|
|
+ long has = ItemDataManager.GetItemNum(costId);
|
|
|
|
+ ItemUtil.BuyCurrency(costId, hasNum - has);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
if (RoleDataManager.ArenaFightTimes >= GlobalCfgArray.globalCfg.fightTimesLimit)
|
|
if (RoleDataManager.ArenaFightTimes >= GlobalCfgArray.globalCfg.fightTimesLimit)
|
|
{
|
|
{
|
|
PromptController.Instance.ShowFloatTextPrompt("已达到最大存储次数");
|
|
PromptController.Instance.ShowFloatTextPrompt("已达到最大存储次数");
|