瀏覽代碼

战斗音乐

zhaoyang 3 年之前
父節點
當前提交
a84030379a
共有 1 個文件被更改,包括 18 次插入0 次删除
  1. 18 0
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs

+ 18 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs

@@ -96,6 +96,15 @@ namespace GFGGame
         private void OnClickBtnFightOnce()
         {
             // int time = InstanceZonesDataManager.GetCanFightTime(_levelID);
+            int starCount = InstanceZonesDataManager.GetStarCountHistory(_levelID);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
+            StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
+
+            if (starCount < fightCfg.quickFightStart)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("挑战星数不足");
+                return;
+            }
             InstanceZonesDataManager.GetCanFightTime(_type, _storyType, _levelID, out int times, out string title);
             if (times > 0)
             {
@@ -110,6 +119,15 @@ namespace GFGGame
 
         private void OnClickBtnFightTimes()
         {
+            int starCount = InstanceZonesDataManager.GetStarCountHistory(_levelID);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
+            StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
+
+            if (starCount < fightCfg.quickFightStart)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("挑战星数不足");
+                return;
+            }
             InstanceZonesDataManager.GetCanFightTime(_type, _storyType, _levelID, out int times, out string title);
 
             if (_type == ConstInstanceZonesType.Story && _storyType == ConstInstanceZonesSubType.Normal)