Browse Source

副本无配置提示

zhaoyang 3 years ago
parent
commit
9448db0ca2

+ 12 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs

@@ -22,10 +22,22 @@ namespace GFGGame
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
             if (levelCfg.fightID.Length > 0)
             {
+                StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
+                if (storyFightCfg == null)
+                {
+                    Debug.LogError(string.Format("战斗id:{0}无配置", levelCfg.fightID));
+                    return;
+                }
                 ViewManager.Show(ViewName.STORY_LEVEL_INFO_VIEW, levelCfgId);
             }
             else if (!string.IsNullOrEmpty(levelCfg.storyStartID))
             {
+                List<StoryDialogCfg> storyDialogCfg = StoryDialogCfgArray.Instance.GetCfgs(levelCfg.storyStartID);
+                if (storyDialogCfg.Count <= 0)
+                {
+                    Debug.LogError(string.Format("剧情id:{0}无配置", levelCfg.storyStartID));
+                    return;
+                }
                 bool skipable = MainStoryDataManager.CheckCurrentLevelPass();
                 ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { levelCfg.storyStartID, skipable, new OnCompleteStoryDialogCall(OnCompleteChapterStoryDialog) }, null, true);
             }