|
@@ -98,9 +98,9 @@ namespace GFGGame
|
|
|
int type = (int)(context.sender as GObject).data;
|
|
|
LeaguePrayCfg prayCfg = LeaguePrayCfgArray.Instance.GetCfg(type);
|
|
|
int curTimes = LeagueDataManager.Instance.GetPrayTimesByType(type);
|
|
|
- long hasCount = ItemDataManager.GetItemNum(prayCfg.consumeArr[0][0]);
|
|
|
- long needCount = prayCfg.consumeArr[0][1];
|
|
|
- if (type == LeaguePrayType.First && curTimes != 0 && hasCount < needCount || type != LeaguePrayType.First && hasCount < needCount)
|
|
|
+ // long hasCount = ItemDataManager.GetItemNum(prayCfg.consumeArr[0][0]);
|
|
|
+ // long needCount = prayCfg.consumeArr[0][1];
|
|
|
+ if (type == LeaguePrayType.First && curTimes != 0 || type != LeaguePrayType.First)
|
|
|
{
|
|
|
if (prayCfg.consumeArr[0][0] == ConstItemID.GOLD)
|
|
|
{
|
|
@@ -114,6 +114,13 @@ namespace GFGGame
|
|
|
{
|
|
|
PromptController.Instance.ShowFloatTextPrompt("消耗不足");
|
|
|
}
|
|
|
+
|
|
|
+ if (!ItemUtil.CheckItemEnough(prayCfg.consumeArr[0][0], prayCfg.consumeArr[0][1]))
|
|
|
+ {
|
|
|
+ long has = ItemDataManager.GetItemNum(prayCfg.consumeArr[0][0]);
|
|
|
+ ItemUtil.BuyCurrency(prayCfg.consumeArr[0][0], prayCfg.consumeArr[0][1] - has);
|
|
|
+ return;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
LeagueSproxy.ReqPrayLeague(type).Coroutine();
|