Browse Source

战斗音乐

zhaoyang 3 years ago
parent
commit
a84030379a

+ 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)