zhaoyang 3 years ago
parent
commit
4e464c7686

+ 7 - 1
GameClient/Assets/Game/HotUpdate/Data/FunctionOpenDataManager.cs

@@ -64,6 +64,7 @@ namespace GFGGame
         /// </summary>
         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++)
@@ -81,8 +82,12 @@ namespace GFGGame
                 ViewManager.Show<FunctionOpenView>(listCfg);
             }
         }
-        public void CheckHasSpecialFunOpen()
+        public async void CheckHasSpecialFunOpen()
         {
+            if (StorageDataManager.Instance.GetStorangeDic().Count == 0)
+            {
+                await StorageSProxy.ReqGetClientValues();
+            }
             FunctionOpenCfg[] cfgs = FunctionOpenCfgArray.Instance.dataArray;
             List<string> listCfg = new List<string>();
             for (int i = 0; i < cfgs.Length; i++)
@@ -147,6 +152,7 @@ namespace GFGGame
             if (cfg.special <= 0) return true;
             if (cfg.id == typeof(SuitListView).Name)//服装升级获取第一套【天衣】套装后开启
             {
+
                 if (StorageDataManager.Instance.GetStorageValue(ConstStorageId.FUNCTION_OPEN + cfg.index) == 1) return true;
 
                 List<int> _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Data/StorageDataManager.cs

@@ -29,5 +29,9 @@ namespace GFGGame
 
             return _storangeInfoById[key];
         }
+        public Dictionary<int, int> GetStorangeDic()
+        {
+            return _storangeInfoById;
+        }
     }
 }

+ 22 - 55
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -865,61 +865,10 @@ namespace GFGGame
 
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
 
-
-            if (listTypeItem_SingleFight_Sy == null && GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0 || listTypeItem_SingleFight_Xz == null && GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0 || listTypeItem_BuyClothing == null && GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0)
-            {
-                // int len = _ui.m_comListType1.m_listType.numChildren;
-                for (int i = 0; i < _ui.m_comListType1.m_listType.numChildren; i++)
-                {
-                    UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType1.m_listType.GetChildAt(i));
-                    if (item != null)
-                    {
-                        int menuID = (int)item.target.data;
-                        DressUpMenuItemCfg1 dressUpMenuItemCfg1 = DressUpMenuItemCfg1Array.Instance.GetCfg(menuID);
-
-                        // if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
-                        // {
-
-                        //     if (dressUpMenuItemCfg1.type == ConstDressUpItemType.SHANG_YI)
-                        //     {
-                        //         listTypeItem_SingleFight_Sy = item;
-                        //         // _ui.m_comListType1.m_listType.ScrollToView(i);
-                        //         // break;
-                        //         syIndex = i;
-                        //     }
-                        //     if (dressUpMenuItemCfg1.type == ConstDressUpItemType.XIA_ZHUANG)
-                        //     {
-                        //         listTypeItem_SingleFight_Xz = item;
-                        //         // _ui.m_comListType1.m_listType.ScrollToView(i);
-                        //         // break;
-                        //         xzIndex = i;
-
-                        //     }
-                        // }
-                        // else 
-
-                        if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0)
-                        {
-                            int type = 0;
-                            if (_fightCfg.needItemId > 0) type = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
-
-                            if (_fightCfg.needSuitId > 0) type = ConstDressUpItemType.TAO_ZHUANG;
-
-
-                            if (listTypeItem_BuyClothing == null && dressUpMenuItemCfg1.type == type)
-                            {
-                                listTypeItem_BuyClothing = item;
-                                // _ui.m_comListType1.m_listType.ScrollToView(i);
-                                break;
-                            }
-                        }
-                    }
-                }
-            }
-
             int syIndex = 0;
             int xzIndex = 0;
             int buyClothingIndex = 0;
+            int buyClothingSubIndex = 0;
 
             int len = _ui.m_comListType1.m_listType.numChildren;
             for (int i = 0; i < len; i++)
@@ -940,13 +889,30 @@ namespace GFGGame
                     if (_fightCfg.needItemId > 0)
                     {
                         int type = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
-                        if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0 && dressUpMenuItemCfg1.type == type)
+
+
+                        if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0 && ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, dressUpMenuItemCfg1.id))
                         {
                             buyClothingIndex = i;
                         }
                     }
                 }
             }
+            int len1 = _ui.m_comListType2.m_listType.numChildren;
+            for (int i = 0; i < len1; i++)
+            {
+                UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType2.m_listType.GetChildAt(i));
+                if (item != null)
+                {
+                    int menuID = (int)item.target.data;
+                    DressUpMenuItemCfg2 dressUpMenuItemCfg2 = DressUpMenuItemCfg2Array.Instance.GetCfg(menuID);
+                    var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
+                    if (subType == dressUpMenuItemCfg2.type)
+                    {
+                        buyClothingSubIndex = i;
+                    }
+                }
+            }
             int djcId = 10476;//点绛唇Id
             int djcIndex = 0;
             int buyClothingIdIndex = 0;
@@ -971,8 +937,9 @@ namespace GFGGame
 
             GuideController.TryGuide(_ui.m_compNeed.target, ConstGuideId.BUY_CLOTHING, 1, "当提示有“必需品”时,需要穿上对应物品才能通关", -1, true, 170);
             GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.BUY_CLOTHING, 5, "按照指示就可以找到必需品啦", buyClothingIndex);
-            GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.BUY_CLOTHING, 6, "点击换上吧", buyClothingIdIndex, true, 170);
-            GuideController.TryCompleteGuide(ConstGuideId.BUY_CLOTHING, 6);
+            GuideController.TryGuide(_ui.m_comListType2.m_listType, ConstGuideId.BUY_CLOTHING, 6, "", buyClothingSubIndex);
+            GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.BUY_CLOTHING, 7, "点击换上吧", buyClothingIdIndex, true, 170);
+            GuideController.TryCompleteGuide(ConstGuideId.BUY_CLOTHING, 7);
 
             GuideController.TryGuide(_ui.m_btnHint, ConstGuideId.TARGET_FIGHT, 1, "这次换装需要获得别人的认可呢");
 

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

@@ -111,7 +111,10 @@ namespace GFGGame
                 _ui.m_rectFrameTemp.visible = false;
 
             }
-            _ui.m_comHolder.target.visible = showEffect;
+            if (!showEffect)
+            {
+                _ui.m_comHolder.target.visible = showEffect;
+            }
             _ui.m_compTxt.target.y = Math.Min(yTxt, GRoot.inst.height - _ui.m_compTxt.target.height - 3);
         }
 
@@ -179,10 +182,10 @@ namespace GFGGame
                     _ui.m_comHolder.target.visible = true;
                     _ui.m_mask.m_guideArea.visible = true;
                 }
-                // if (showEffect)
-                // {
-                _ui.m_comHolder.target.visible = showEffect;
-                // }
+                if (!showEffect)
+                {
+                    _ui.m_comHolder.target.visible = showEffect;
+                }
             }
         }
         private void OnClickTarget()

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

@@ -86,6 +86,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;
+            _gameObject.SetActive(true);
 
             TextFormat tf = _ui.m_txtScore.textFormat;
             UpdateToCheckGuide(null);

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes