Browse Source

关卡未开启不能从来源跳转

zhaoyang 3 years ago
parent
commit
66495332bf

+ 5 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs

@@ -116,7 +116,11 @@ namespace GFGGame
                     string value = infos[1];
                     string value = infos[1];
                     var levelCfgId = int.Parse(value);
                     var levelCfgId = int.Parse(value);
                     var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
                     var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-
+                    if (!MainStoryDataManager.CheckLevelUnlock(levelCfgId))
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt("关卡未开启");
+                        break;
+                    }
                     if (levelCfg.type == ConstInstanceZonesType.Story)
                     if (levelCfg.type == ConstInstanceZonesType.Story)
                     {
                     {
                         if ((string)_fromeViewDatas[0] == ViewName.DRESS_UP_FIGHT_VIEW)
                         if ((string)_fromeViewDatas[0] == ViewName.DRESS_UP_FIGHT_VIEW)