瀏覽代碼

金币、体力和马蹄金不足时取消提示语,换成弹出购买弹窗

zhaoyang 2 年之前
父節點
當前提交
81d6b05d43
共有 1 個文件被更改,包括 12 次插入1 次删除
  1. 12 1
      GameClient/Assets/Game/HotUpdate/Views/League/LeaguePrayView.cs

+ 12 - 1
GameClient/Assets/Game/HotUpdate/Views/League/LeaguePrayView.cs

@@ -101,7 +101,18 @@ namespace GFGGame
             long needCount = prayCfg.consumeArr[0][1];
             long needCount = prayCfg.consumeArr[0][1];
             if (type == LeaguePrayType.First && curTimes != 0 && hasCount < needCount || type != LeaguePrayType.First && hasCount < needCount)
             if (type == LeaguePrayType.First && curTimes != 0 && hasCount < needCount || type != LeaguePrayType.First && hasCount < needCount)
             {
             {
-                PromptController.Instance.ShowFloatTextPrompt("消耗不足");
+                if (prayCfg.consumeArr[0][0] == ConstItemID.GOLD)
+                {
+                    ItemUtil.AddGold(0, null, 1);
+                }
+                else if (prayCfg.consumeArr[0][0] == ConstItemID.DIAMOND_RED)
+                {
+                    ItemUtil.AddDiamondRed();
+                }
+                else
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("消耗不足");
+                }
                 return;
                 return;
             }
             }
             LeagueSproxy.ReqPrayLeague(type).Coroutine();
             LeagueSproxy.ReqPrayLeague(type).Coroutine();