zhaoyang 2 жил өмнө
parent
commit
bf231f6b2d

+ 38 - 24
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -232,6 +232,10 @@ namespace GFGEditor
             StoryLevelCfg[] dataArray = manager.dataArray;
             foreach (StoryLevelCfg cfg in dataArray)
             {
+                if (itemId == 3000041)
+                {
+                    ET.Log.Debug("");
+                }
                 bool result = CheckItemInBonus(itemId, cfg);
                 if (result)
                 {
@@ -273,11 +277,7 @@ namespace GFGEditor
             }
             return "FU_ZHUANG_HE_CHENG=" + suitCfg.id;
         }
-        /// <summary>
-        /// 套装图鉴
-        /// </summary>
-        /// <param name="itemId"></param>
-        /// <returns></returns>
+
         private static string GetSuitGuideApproach(int itemId)
         {
             SuitCfgArray manager = SuitCfgArray.Instance;
@@ -293,11 +293,6 @@ namespace GFGEditor
             return null;
         }
 
-        /// <summary>
-        /// 套装合成
-        /// </summary>
-        /// <param name="itemId"></param>
-        /// <returns></returns>
         private static string GetSuitSyntheticApproach(int itemId)
         {
 
@@ -327,20 +322,35 @@ namespace GFGEditor
             return null;
         }
 
-        private static string GetStudioFilingApproach(int itemId)
-        {
-            SuitCfgArray manager = SuitCfgArray.Instance;
-            SuitCfg[] dataArray = manager.dataArray;
-            foreach (SuitCfg cfg in dataArray)
-            {
-                bool result = CheckItemInBonus(itemId, cfg.guideBoxBonusArr);
-                if (result)
-                {
-                    return "TAO_ZHUANG_TU_JIAN";
-                }
-            }
-            return null;
-        }
+        // /// <summary>
+        // /// 检测掉落表是否产出该物品
+        // /// </summary>
+        // /// <param name="itemId"></param>
+        // /// <returns></returns>
+        // private static bool CheckDropApproach(int itemId, int dropId)
+        // {
+        //     DropOutCfgArray manager = DropOutCfgArray.Instance;
+        //     List<DropOutCfg> dataArray = manager.GetCfgs(dropId);
+        //     for (int i = 0; i < dataArray.Count; i++)
+        //     {
+        //         if (dataArray[i].item == itemId)
+        //         {
+        //             return true;
+        //         }
+        //         if (manager.GetCfgs(dataArray[i].item).Count > 0)
+        //         {
+        //             if (dataArray[i].item == 11000003)
+        //             {
+        //                 ET.Log.Debug("");
+        //             }
+        //             if (CheckDropApproach(itemId, dataArray[i].item))
+        //             {
+        //                 return true;
+        //             }
+        //         }
+        //     }
+        //     return false;
+        // }
 
         private static bool CheckItemInBonus(int itemId, StoryLevelCfg cfg)
         {
@@ -354,6 +364,10 @@ namespace GFGEditor
                 int[][] bonus = a.ToArray();
                 bool result = CheckItemInBonus(itemId, bonus);
 
+                if (storyFightCfg.id == "501")
+                {
+                    ET.Log.Debug("");
+                }
                 if (result)
                 {
                     return true;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs

@@ -116,7 +116,7 @@ namespace GFGGame
             if (!isRoleLv) content = string.Format("主角等级达到{0}级解锁", storyLevelCfg.needRoleLv);
             if (!isLastPast) content = string.Format("需通关{0}", storyLevelCfgs[index].name);
             StoryLevelCfg needStoryLevelCfg = StoryLevelCfgArray.Instance.GetCfg(storyLevelCfg.needStoryLevelId);
-            if (!isPass) content = string.Format("完成主线{0}-{1}解锁", needStoryLevelCfg.chapterId, needStoryLevelCfg.order);
+            if (!isPass && needStoryLevelCfg != null) content = string.Format("完成主线{0}-{1}解锁", needStoryLevelCfg.chapterId, needStoryLevelCfg.order);
             canFight = isPass && isRoleLv && isLastPast;
         }
 

+ 34 - 21
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachView.cs

@@ -20,10 +20,11 @@ namespace GFGGame
                 _ui.Dispose();
                 _ui = null;
             }
+            UI_ComTipsApproach.ProxyEnd();
         }
         public void OnHide()
         {
-            _ui.m_list.onClickItem.Remove(OnClickListApproachItem);
+            // _ui.m_list.onClickItem.Remove(OnClickListApproachItem);
             if (_ui.m_list.numItems > 0)
             {
                 _ui.m_list.ScrollToView(0);
@@ -31,16 +32,20 @@ namespace GFGGame
             }
             _approachDatas.Clear();
             _fromeViewDatas = null;
-            UI_ComTipsApproach.ProxyEnd();
         }
-        public void OnShow(GComponent component, object[] viewData)
+        public void OnInit(GComponent component)
         {
             _ui = UI_ComTipsApproach.Proxy(component);
+            _ui.m_list.itemRenderer = ListApproachItemRenderer;
+
+        }
+        public void OnShow(object[] viewData)
+        {
+
             _viewData = viewData;
             _itemId = (int)viewData[0];
             _fromeViewDatas = viewData[1] as object[];
             _needCount = viewData.Length > 2 ? (int)viewData[2] : 0;
-            _ui.m_list.itemRenderer = ListApproachItemRenderer;
             // _ui.m_list.onClickItem.Add(OnClickListApproachItem);
 
             SetData();
@@ -187,34 +192,42 @@ namespace GFGGame
                             PromptController.Instance.ShowFloatTextPrompt("关卡未开启");
                             break;
                         }
-                        // this.Hide();
                         if (!TimeUtil.CheckDayOfWeek(studioCfg.timeArr))
                         {
                             PromptController.Instance.ShowFloatTextPrompt("不在活动周期内");
                             break;
                         }
-
-                        int type = studioCfg.funId == typeof(StudioPropertyView).Name ? 1 : 0;
-                        StudioDataManager.Instance.TYPE_SELECT_INDEX = type;
-                        StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
-                        if (studioCfg.funId == typeof(StudioPropertyView).Name)
+                        if (studioCfg.funId == typeof(StudioFilingView).Name)
                         {
-                            List<StudioCfg> studioCfgs = StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioPropertyView).Name);
-                            for (int i = 0; i < studioCfgs.Count; i++)
+                            StudioDataManager.Instance.filingChapterId = studioCfg.id;
+                            ViewManager.Show<StudioFilingView>();
+                            MainStoryDataManager.currentLevelCfgId = levelCfg.id;
+                            InstanceZonesController.ShowLevelView(levelCfg.id, StudioDataManager.Instance.OnFinishFilingStoryLevel);
+                        }
+                        else
+                        {
+                            int type = studioCfg.funId == typeof(StudioPropertyView).Name ? 1 : 0;
+                            StudioDataManager.Instance.TYPE_SELECT_INDEX = type;
+                            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
+                            if (studioCfg.funId == typeof(StudioPropertyView).Name)
                             {
-                                if (studioCfgs[i].id == studioCfg.id)
+                                List<StudioCfg> studioCfgs = StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioPropertyView).Name);
+                                for (int i = 0; i < studioCfgs.Count; i++)
                                 {
-                                    StudioDataManager.Instance.PROPERTY_SELECT_INDEX = i;
-                                    break;
+                                    if (studioCfgs[i].id == studioCfg.id)
+                                    {
+                                        StudioDataManager.Instance.PROPERTY_SELECT_INDEX = i;
+                                        break;
+                                    }
                                 }
                             }
-                        }
-                        string viewName = "GFGGame." + studioCfg.funId;
+                            string viewName = "GFGGame." + studioCfg.funId;
 
-                        ViewManager.Show(viewName, new object[] { type, 0 }, _fromeViewDatas);
-                        StudioDataManager.Instance.VIEW_NAME = viewName;
-                        InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStudioStoryLevel, _itemId, _needCount);
-                        isJump = true;
+                            ViewManager.Show(viewName, new object[] { type, 0 }, _fromeViewDatas);
+                            StudioDataManager.Instance.VIEW_NAME = viewName;
+                            InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStudioStoryLevel, _itemId, _needCount);
+                            isJump = true;
+                        }
                         break;
                     }
                     else

+ 5 - 6
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GoodsItemTipsView.cs

@@ -33,6 +33,9 @@ namespace GFGGame
             this.viewCom = _ui.target;
             this.viewCom.Center();
             this.modal = true;
+
+            approachView = new ApproachView();
+            approachView.OnInit(_ui.m_comTipsApproach.target);
         }
         protected override void AddEventListener()
         {
@@ -58,7 +61,6 @@ namespace GFGGame
             if (approachView != null)
             {
                 approachView.OnHide();
-                approachView = null;
             }
             Timers.inst.Remove(CheckGuide);
             base.OnHide();
@@ -94,11 +96,8 @@ namespace GFGGame
         {
             _ui.m_comTipsApproach.target.visible = sourceDatas != null;
             if (sourceDatas == null) return;
-            if (approachView == null)
-            {
-                approachView = new ApproachView();
-            }
-            approachView.OnShow(_ui.m_comTipsApproach.target, sourceDatas);
+
+            approachView.OnShow(sourceDatas);
         }
 
         private void CheckGuide(object param)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -247,7 +247,7 @@ namespace GFGGame
         private void OnSwipe(EventContext context)
         {
             if (!MainDataManager.Instance.CanSwipe) return;
-            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.MAIN_SECOND_VIEW)) return;
+            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.MAIN_SECOND_VIEW, false)) return;
 
             SwipeGesture swipeture = (SwipeGesture)context.sender;
             if (MainDataManager.Instance.ViewType == 0 && swipeture.position.x < 0 && swipeture.position.y < -swipeture.position.x && swipeture.position.y > swipeture.position.x)

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