zhaoyang 3 ani în urmă
părinte
comite
30aa9a0047

+ 19 - 19
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -39,7 +39,7 @@ namespace GFGGame
             {
                 if (guideCfgs[i].roleLv <= 0) continue;
                 bool isFinishCurId = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_GUIDE + guideCfgs[i].id) > 0;
-                if (!isFinishCurId)
+                if (!isFinishCurId && guideCfgs[i].roleLv <= RoleDataManager.lvl)
                 {
                     return guideCfgs[i].viewName;
                 }
@@ -63,37 +63,37 @@ namespace GFGGame
 
         }
 
-        public static bool TryGuide(GObject target, string guideKey, int index, string guideStr = null, int listIndex = -1, bool checkPriorIndex = true, int yTxt = 0, float devWidth = 0, float devHeight = 0, bool showAni = true, bool checkChapterPass = false, bool isOptionalGuide = false)
+        public static bool TryGuide(GObject target, string guideKey, int index, string guideStr = null, int listIndex = -1, bool checkPriorIndex = true, int yTxt = 0, float devWidth = 0, float devHeight = 0, bool showAni = true, bool showEffect = true, bool isOptionalGuide = false)
         {
-
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
+            if (GuideDataManager.currentGuideId != 0 && GuideDataManager.currentGuideId != cfg.id) return false;
 
             bool isStoryLevelGuide = cfg.storyLevelId > 0;
             bool isFinishCurId = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_GUIDE + cfg.id) > 0;//当前引导未完成
             bool isFinishPriorId = cfg.priorId <= 0 || StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_GUIDE + cfg.priorId) > 0;//前置引导已完成
             bool isFinishCurIndex = GuideDataManager.IsGuideIndexFinish(cfg.id, index) == true;//当前index未完成
             bool isFinishPriorIndex = !checkPriorIndex || checkPriorIndex && GuideDataManager.IsGuideIndexFinish(cfg.id, index - 1) == true;//前置index已完成
-            bool isCfgChapterOpen = MainStoryDataManager.CheckLevelUnlock(cfg.storyLevelId);//引导配置关卡已开启
-            if (checkChapterPass && !isCfgChapterOpen)
-            {//cfg.storyLevelId为当前关卡,通关时 MainStoryDataManager.currentLevelCfgId为下一章的第一关,但下一章有可能因为角色等级不足未开启,会导致引导无法正常开启,所以添加是否通关检测
-                StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(cfg.storyLevelId);
-                if (levelCfg.chapterId - 1 > 0)
-                {
-                    isCfgChapterOpen = MainStoryDataManager.CheckNeedChapterPass(levelCfg.chapterId - 1, out int needChapterId);
-                }
-            }
+            bool isCfgChapterOpen = MainStoryDataManager.CheckLevelUnlock(cfg.storyLevelId, false);//引导配置关卡已开启
+            // if (checkChapterPass && !isCfgChapterOpen)
+            // {//cfg.storyLevelId为当前关卡,通关时 MainStoryDataManager.currentLevelCfgId为下一章的第一关,但下一章有可能因为角色等级不足未开启,会导致引导无法正常开启,所以添加是否通关检测
+            //     StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(cfg.storyLevelId);
+            //     if (levelCfg.chapterId - 1 > 0)
+            //     {
+            //         isCfgChapterOpen = MainStoryDataManager.CheckNeedChapterPass(levelCfg.chapterId - 1, out int needChapterId);
+            //     }
+            // }
             bool isCfgChapter = MainStoryDataManager.currentLevelCfgId == 0 || MainStoryDataManager.currentLevelCfgId == cfg.storyLevelId;//无选择(进入游戏时无选择)或当前所选择为配置关卡
 
             bool isRoleLvGuide = cfg.roleLv > 0;
             bool iscurRoleLv = RoleDataManager.lvl >= cfg.roleLv;
 
-            bool isSpecial = cfg.special > 0 && CheckSpecialGuideOpen(cfg);//特殊条件开启的引导
-
+            bool isSpecial = cfg.special > 0; //特殊条件开启的引导
+            bool specialOpen = CheckSpecialGuideOpen(cfg);
 
+            bool noneType = !isStoryLevelGuide && !isFinishCurId && isFinishPriorId && !isFinishCurIndex && isFinishPriorIndex && !isRoleLvGuide && !isSpecial;
             bool storyType = isStoryLevelGuide && !isFinishCurId && isFinishPriorId && !isFinishCurIndex && isFinishPriorIndex && isCfgChapterOpen && isCfgChapter;
             bool roleLvType = isRoleLvGuide && !isFinishCurId && isFinishPriorId && !isFinishCurIndex && isFinishPriorIndex && iscurRoleLv;
-            bool specialType = isSpecial && !isFinishCurId && isFinishPriorId && !isFinishCurIndex && isFinishPriorIndex;
-            bool noneType = !isStoryLevelGuide && !isFinishCurId && !isRoleLvGuide && !isSpecial;
+            bool specialType = isSpecial && !isFinishCurId && isFinishPriorId && !isFinishCurIndex && isFinishPriorIndex && specialOpen;
             if (storyType || roleLvType || specialType || noneType)
             {
                 GuideDataManager.currentGuideId = cfg.id;
@@ -118,7 +118,7 @@ namespace GFGGame
                     }
                 }
                 bool _isOptionalGuide = isOptionalGuide ? isOptionalGuide : cfg.optionalGuide == 1;
-                ShowGuideByIndex(target, guideStr, yTxt, _isOptionalGuide, devWidth, devHeight, GuideDataManager.currentGuideId, GuideDataManager.currentGuideIdIndex, showAni);
+                ShowGuideByIndex(target, guideStr, yTxt, _isOptionalGuide, devWidth, devHeight, GuideDataManager.currentGuideId, GuideDataManager.currentGuideIdIndex, showAni, showEffect);
                 if (!checkPriorIndex)
                 {
                     for (int i = 1; i < index; i++)
@@ -130,7 +130,7 @@ namespace GFGGame
             }
             return false;
         }
-        private static void ShowGuideByIndex(GObject target, string guideStr = null, int yTxt = 0, bool isOptionalGuide = false, float devWidth = 0, float devHeight = 0, int guideId = 0, int index = 0, bool showAni = true)
+        private static void ShowGuideByIndex(GObject target, string guideStr = null, int yTxt = 0, bool isOptionalGuide = false, float devWidth = 0, float devHeight = 0, int guideId = 0, int index = 0, bool showAni = true, bool showEffect = true)
         {
             HideGuide();
             if (GameGlobal.skipGuide)
@@ -138,7 +138,7 @@ namespace GFGGame
                 return;
             }
 
-            ViewManager.Show(ViewName.GUIDE_VIEW, new List<object> { target, guideStr, yTxt, isOptionalGuide, devWidth, devHeight, guideId, index, showAni });
+            ViewManager.Show(ViewName.GUIDE_VIEW, new List<object> { target, guideStr, yTxt, isOptionalGuide, devWidth, devHeight, guideId, index, showAni, showEffect });
         }
         public static bool TryCompleteGuideIndex(int guideId, int index)
         {

+ 15 - 8
GameClient/Assets/Game/HotUpdate/Data/FunctionOpenDataManager.cs

@@ -31,7 +31,7 @@ namespace GFGGame
             }
             if (!CheckIsChapterFunOpen(cfg, showTips)) return false;
             if (!CheckIsLvFunOpen(cfg, showTips)) return false;
-            if (!CheckSpecialFunOpen(cfg, showTips)) return false;
+            if (!CheckIsSpecialFunOpen(cfg, showTips)) return false;
             return true;
         }
 
@@ -45,8 +45,10 @@ namespace GFGGame
             for (int i = 0; i < cfgs.Length; i++)
             {
                 if (cfgs[i].show == 0) continue;
+                if (cfgs[i].special > 0) continue;
+                if (cfgs[i].lv > 0) continue;
                 if (cfgs[i].storyLevelId != storyLevelCfgId || !CheckIsChapterFunOpen(cfgs[i], false)) continue;
-                if (!CheckIsLvFunOpen(cfgs[i], false)) continue;
+                // if (CheckIsLvFunOpen(cfgs[i], false)) continue;
                 listCfg.Add(cfgs[i].id);
             }
             if (listCfg.Count > 0)
@@ -60,15 +62,18 @@ namespace GFGGame
         /// <summary>
         /// 根据角色Lv检测是否有新功能开启
         /// </summary>
-        public void CheckHasLvFunOpen(int lv)
+        public void CheckHasLvFunOpen(int lv, int oldLv)
         {
             FunctionOpenCfg[] cfgs = FunctionOpenCfgArray.Instance.dataArray;
             List<string> listCfg = new List<string>();
             for (int i = 0; i < cfgs.Length; i++)
             {
+                if ((cfgs[i].special > 0)) continue;
                 if (cfgs[i].show == 0) continue;
-                if (lv < cfgs[i].lv || !CheckIsLvFunOpen(cfgs[i], false)) continue;
-                if (!CheckIsChapterFunOpen(cfgs[i], false)) continue;
+                if (lv <= 0) continue;
+                if (cfgs[i].storyLevelId > 0) continue;
+                if (cfgs[i].lv > oldLv && lv < cfgs[i].lv || !CheckIsLvFunOpen(cfgs[i], false)) continue;
+                // if (CheckIsChapterFunOpen(cfgs[i], false)) continue;
                 listCfg.Add(cfgs[i].id);
             }
             if (listCfg.Count > 0)
@@ -83,9 +88,11 @@ namespace GFGGame
             for (int i = 0; i < cfgs.Length; i++)
             {
                 if (cfgs[i].show == 0) continue;
+                if (cfgs[i].storyLevelId > 0) continue;
+                if (cfgs[i].lv > 0) continue;
                 if ((cfgs[i].special <= 0)) continue;
                 if (StorageDataManager.Instance.GetStorageValue(ConstStorageId.FUNCTION_OPEN + cfgs[i].index) == 1) continue;
-                if (CheckSpecialFunOpen(cfgs[i], false))
+                if (CheckIsSpecialFunOpen(cfgs[i], false))
                 {
                     listCfg.Add(cfgs[i].id);
                 }
@@ -135,7 +142,7 @@ namespace GFGGame
 
 
 
-        private bool CheckSpecialFunOpen(FunctionOpenCfg cfg, bool showTips = true)
+        private bool CheckIsSpecialFunOpen(FunctionOpenCfg cfg, bool showTips = true)
         {
             if (cfg.special <= 0) return true;
             if (cfg.id == typeof(SuitListView).Name)//服装升级获取第一套【天衣】套装后开启
@@ -150,7 +157,7 @@ namespace GFGGame
                     StorageSProxy.ReqSetClientValue(ConstStorageId.FUNCTION_OPEN + cfg.index, 1).Coroutine();
                     return true;
                 }
-
+                if (showTips) PromptController.Instance.ShowFloatTextPrompt(string.Format("收集一套“天衣”套装后开启"));
             }
             return false;
 

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Data/MainStoryDataManager.cs

@@ -108,10 +108,10 @@ namespace GFGGame
             return true;
         }
 
-        public static bool CheckChapterUnlock(int chapterId)
+        public static bool CheckChapterUnlock(int chapterId, bool checkRoleLv = true)
         {
             StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(chapterId);
-            if (GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) < chapterCfg.lvl)
+            if (checkRoleLv && GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) < chapterCfg.lvl)
             {
                 return false;
             }
@@ -126,12 +126,12 @@ namespace GFGGame
             return CheckNeedChapterPass(chapterId, out var needChapterId);
         }
 
-        public static bool CheckLevelUnlock(int levelCfgId)
+        public static bool CheckLevelUnlock(int levelCfgId, bool checkRoleLv = true)
         {
             var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
             if (levelCfg != null)
             {
-                if (!CheckChapterUnlock(levelCfg.chapterId))
+                if (!CheckChapterUnlock(levelCfg.chapterId, checkRoleLv))
                 {
                     return false;
                 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs

@@ -13,7 +13,7 @@ namespace ET
             switch (message.NumericType)
             {
                 case NumericType.Lvl:
-                    FunctionOpenDataManager.Instance.CheckHasLvFunOpen((int)message.NewValue);//等级变化要加测是否有功能开启
+                    FunctionOpenDataManager.Instance.CheckHasLvFunOpen((int)message.NewValue,oldValue);//等级变化要加测是否有功能开启
                     RoleDataManager.RoleLvUp(oldValue);
                     break;
                 case NumericType.Power:

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingDecompose/ClothingDecomposeView.cs

@@ -60,10 +60,15 @@ namespace GFGGame
             base.OnShown();
             _ui.m_c1.selectedIndex = 0;
             _ui.m_listTab.selectedIndex = 0;
+
             _valueBarController.OnShown();
             _valueBarController.Controller(6);
             OnClickBtnRarity(ConstDressRarity.Rarity_FANPIN);
-
+            if (GuideDataManager.currentGuideId == GuideCfgArray.Instance.GetCfg(ConstGuideId.CLOTHING_DECOMPOSE).id)
+            {
+                _ui.m_listTab.selectedIndex = 1;
+                OnClickBtnRarity(ConstDressRarity.Rarity_ZHENXI);
+            }
         }
 
         protected override void OnHide()

+ 1 - 3
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -576,9 +576,7 @@ namespace GFGGame
         protected override void UpdateToCheckGuide(object param)
         {
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
-            GuideController.TryGuide(_ui.m_ComSelectRes.m_comBtnTab.target, ConstGuideId.PHOTOGRAPH, 2, "在这里可以选择已获得的背景、道具等,也可以放大缩小物品,增加画面丰富度");
-            // GuideController.TryGuide(_ui.m_loaGuide, ConstGuideId.PHOTOGRAPH, 5, "点击空白处查看整体效果", -1, true, (int)(_ui.m_loaGuide.y + _ui.m_loaGuide.height - 250), 0, 0, false);
-            // GuideController.TryGuide(_ui.m_loaGuide1, ConstGuideId.PHOTOGRAPH, 6, "双指可控制放大缩小,或点击边框上的按键控制", -1, true, (int)(_ui.m_loaGuide1.y + _ui.m_loaGuide1.height - 250), 0, 0, false);
+            GuideController.TryGuide(_ui.m_ComSelectRes.m_comBtnTab.m_btn0, ConstGuideId.PHOTOGRAPH, 2, "在这里可以选择已获得的背景、道具等,也可以放大缩小物品,增加画面丰富度");
             GuideController.TryGuide(_ui.m_btnPhotograph, ConstGuideId.PHOTOGRAPH, 3, "来记录下这一刻吧~~");
             GuideController.TryCompleteGuide(ConstGuideId.PHOTOGRAPH, 3);
         }

+ 8 - 3
GameClient/Assets/Game/HotUpdate/Views/Guide/GuideView.cs

@@ -16,6 +16,7 @@ namespace GFGGame
         private float devHeight;
         private int yTxt;
         private bool showAni;
+        private bool showEffect;
 
         private int guideId;
         private int guideIndex;
@@ -66,6 +67,7 @@ namespace GFGGame
             guideId = (int)dataList[6];
             guideIndex = (int)dataList[7];
             showAni = (bool)dataList[8];
+            showEffect = (bool)dataList[9];
 
             if (txtContent != null && txtContent.Length > 0)
             {
@@ -105,10 +107,11 @@ namespace GFGGame
             else
             {
                 _ui.m_comHolder.target.visible = false;
-                // _ui.m_mask.target.visible = false;
+                _ui.m_mask.target.visible = false;
                 _ui.m_rectFrameTemp.visible = false;
 
             }
+            _ui.m_comHolder.target.visible = showEffect;
             _ui.m_compTxt.target.y = Math.Min(yTxt, GRoot.inst.height - _ui.m_compTxt.target.height - 3);
         }
 
@@ -175,9 +178,11 @@ namespace GFGGame
                 {
                     _ui.m_comHolder.target.visible = true;
                     _ui.m_mask.m_guideArea.visible = true;
-
-
                 }
+                // if (showEffect)
+                // {
+                _ui.m_comHolder.target.visible = showEffect;
+                // }
             }
         }
         private void OnClickTarget()

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

@@ -271,7 +271,7 @@ namespace GFGGame
             //     _ui.m_btnStart.touchable = false;
             // }
             // GuideController.TryGuide(null, ConstGuideId.CLOTHING_SYNTHETIC, 3, "点击空白处关闭", -1, true, (int)(this.viewCom.y + _ui.m_txtPowerDesc.y), 0, 0, false);
-            GuideController.TryGuide(_ui.m_listTag, ConstGuideId.OPEN_TAGS, 1, "选择相应的关卡标签,可提高分数", -1, true, 0);
+            GuideController.TryGuide(_ui.m_listTag, ConstGuideId.OPEN_TAGS, 1, "选择相应的关卡标签,可提高分数", -1, true, (int)(this.viewCom.y + _ui.m_listBonus.y), 0, 0, false);
             GuideController.TryCompleteGuide(ConstGuideId.OPEN_TAGS, 1);
 
 

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -85,6 +85,7 @@ namespace GFGGame
 
             string resPath = ResPathUtil.GetViewEffectPath("ui_zhandou", string.Format("zd_zdjs_{0}", _resultData.Star));
             SceneController.AddObjectToView(_gameObject, _wrapper, _ui.m_holder, resPath, out _gameObject, out _wrapper, 120);
+            _ui.m_holder.visible = true;
 
             TextFormat tf = _ui.m_txtScore.textFormat;
             UpdateToCheckGuide(null);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioView.cs

@@ -76,7 +76,7 @@ namespace GFGGame
         protected override void UpdateToCheckGuide(object param)
         {
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
-            GuideController.TryGuide(null, ConstGuideId.STUDIO_OPEN, 2, "通关相应副本,可以获得各种升级材料哦,快开始今天的日常工作吧~~", -1, true, (int)(this.viewCom.height - 280), 0, 0, true, false, true);
+            GuideController.TryGuide(_ui.target, ConstGuideId.STUDIO_OPEN, 2, "通关相应副本,可以获得各种升级材料哦,快开始今天的日常工作吧~~", -1, true, (int)(this.viewCom.height - 280), 0, 0, false, false);
             GuideController.TryCompleteGuide(ConstGuideId.STUDIO_OPEN, 2);
 
         }