瀏覽代碼

添加每日任务来源

zhaoyang 2 年之前
父節點
當前提交
282c7d4f69

+ 22 - 31
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -19,7 +19,7 @@ namespace GFGEditor
         public static void startScan()
         {
             ItemCfg[] dataArray = ItemCfgArray.Instance.dataArray;
-            GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetZhaiXingApproach, GetStoryLevelApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach, CheckGiftBagApproach, CheckShopExchangeApproach, CheckClothingFosterApproach };
+            GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetZhaiXingApproach, GetStoryLevelApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach, CheckGiftBagApproach, CheckShopExchangeApproach, CheckClothingFosterApproach, CheckDailyTaskApproach };
             Dictionary<SuitCfg, List<int>> suitDic = new Dictionary<SuitCfg, List<int>>();
             int suitPartTotalCount = 0;
             foreach (ItemCfg cfg in dataArray)
@@ -330,36 +330,6 @@ namespace GFGEditor
             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)
         {
             if (cfg.fightID.Length > 0)
@@ -509,6 +479,27 @@ namespace GFGEditor
             return null;
         }
 
+        /// <summary>
+        /// 检测每日任务是否产出该物品
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <returns></returns>
+        private static string CheckDailyTaskApproach(int itemId)
+        {
+            DailyActiveRewardCfgArray manager = DailyActiveRewardCfgArray.Instance;
+            DailyActiveRewardCfg[] dataArray = manager.dataArray;
+            for (int i = 0; i < dataArray.Length; i++)
+            {
+                for (int j = 0; j < dataArray[i].rewardsArr.Length; j++)
+                {
+                    if (dataArray[i].rewardsArr[j][0] == itemId)
+                    {
+                        return ConstFunctionId.DAILY_TASK;
+                    }
+                }
+            }
 
+            return null;
+        }
     }
 }

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstFunctionId.cs

@@ -57,5 +57,10 @@ namespace GFGGame
         /// </summary>
         public const string MAIN_SECOND_VIEW = "MAIN_SECOND_VIEW";
 
+        /// <summary>
+        /// 每日任务
+        /// </summary>
+        public const string DAILY_TASK = "DAILY_TASK";
+
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/GoodsItemTipsController.cs

@@ -15,7 +15,7 @@ namespace GFGGame
             // }
             else
             {
-                // ViewManager.Show(ViewName.GOODS_ITEM_TIPS_VIEW, new object[] { id, sourceDatas });
+                //sourceDatas{物品id,gobackData,物品需求量}
                 ViewManager.Show<GoodsItemTipsView>(new object[] { id, sourceDatas });
             }
         }

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -56,7 +56,8 @@ namespace GFGGame
             }));
             _valueBar.m_btnTravel.onClick.Add(() =>
             {
-                GoodsItemTipsController.ShowItemTips(GlobalCfgArray.globalCfg.travelCostArr[0]);
+                object[] sourceDatas = new object[] { GlobalCfgArray.globalCfg.travelCostArr[0], new object[] { typeof(TravelView).FullName, null } };
+                GoodsItemTipsController.ShowItemTips(GlobalCfgArray.globalCfg.travelCostArr[0], sourceDatas);
             });
             _valueBar.m_btnGallery.onClick.Add(() =>
             {

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachView.cs

@@ -301,6 +301,9 @@ namespace GFGGame
                     // this.Hide();
                     isJump = ViewManager.Show<ClothingListView>(null, _fromeViewDatas);
                     break;
+                case ConstFunctionId.DAILY_TASK:
+                    isJump = ViewManager.Show<DailyTaskView>(null, _fromeViewDatas);
+                    break;
             }
             if (isJump)
             {

二進制
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes