فهرست منبع

套装展示获取途径

zhaoyang 3 سال پیش
والد
کامیت
bfae040b05

+ 96 - 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 };
+            GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetZhaiXingApproach, GetStoryLevelApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach, CheckGiftBagApproach, CheckShopExchangeApproach, CheckClothingFosterApproach };
             Dictionary<SuitCfg, List<int>> suitDic = new Dictionary<SuitCfg, List<int>>();
             int suitPartTotalCount = 0;
             foreach (ItemCfg cfg in dataArray)
@@ -132,7 +132,23 @@ namespace GFGEditor
             {
                 if (cfg.itemID == itemId)
                 {
-                    return "FU_ZHUANG_DIAN";
+                    return "FU_ZHUANG_DIAN=" + ConstStoreId.CLOTHING_STORE_ID; ;
+                }
+            }
+            ShopCfg[] shopCfgCJs = ShopCfgCJArray.Instance.dataArray;
+            foreach (ShopCfg cfg in shopCfgCJs)
+            {
+                if (cfg.itemID == itemId)
+                {
+                    return "FU_ZHUANG_DIAN=" + ConstStoreId.LUCKY_BOX_STORE_ID;
+                }
+            }
+            ShopCfg[] shopCfgCJAs = ShopCfgCJAArray.Instance.dataArray;
+            foreach (ShopCfg cfg in shopCfgCJAs)
+            {
+                if (cfg.itemID == itemId)
+                {
+                    return "FU_ZHUANG_DIAN=" + ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID;
                 }
             }
             return null;
@@ -184,12 +200,17 @@ namespace GFGEditor
                 }
 
                 int dropId = cfg.dropId;
-                if (itemId == 3000028)
+                if (itemId == 10014)
                 {
+                    if (dropId == 11000008)
+                    {
+                        ET.Log.Debug("");
+                    }
                     ET.Log.Debug("");
                 }
+                int[] _dropIds = { dropId };
 
-                bool approach = CheckDropApproach(itemId, dropId);
+                bool approach = CheckItemInDropOut(itemId, _dropIds);
                 if (approach)
                 {
                     return "ZHAI_XING";
@@ -297,32 +318,35 @@ 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 (dropId == 11000006)
-                    {
-                        ET.Log.Debug("");
-                    }
-                    return CheckDropApproach(itemId, dataArray[i].item);
-                }
-            }
-            return false;
-        }
+        // /// <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)
         {
@@ -359,7 +383,12 @@ namespace GFGEditor
             }
             return false;
         }
-
+        /// <summary>
+        /// 检测掉落表是否产出该物品
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <param name="dropIds"></param>
+        /// <returns></returns>
         private static bool CheckItemInDropOut(int itemId, int[] dropIds)
         {
             List<ItemData> result = new List<ItemData>();
@@ -427,6 +456,42 @@ namespace GFGEditor
             }
             return null;
         }
+        /// <summary>
+        /// 检测服装升级是否产出该物品
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <returns></returns>
+        private static string CheckClothingFosterApproach(int itemId)
+        {
+            //培养
+            SuitFosterCfgArray manager = SuitFosterCfgArray.Instance;
+            SuitFosterCfg[] 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.SUIT_FOSTER;
+                    }
+                }
+            }
+            //换新
+            SuitFosterListCfgArray manager1 = SuitFosterListCfgArray.Instance;
+            SuitFosterListCfg[] dataArray1 = manager1.dataArray;
+            for (int i = 0; i < dataArray1.Length; i++)
+            {
+                for (int j = 0; j < dataArray1[i].renewRewardsArr.Length; j++)
+                {
+                    if (dataArray1[i].renewRewardsArr[j][0] == itemId)
+                    {
+                        return ConstFunctionId.SUIT_FOSTER;
+                    }
+                }
+            }
+
+            return null;
+        }
 
 
     }

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

@@ -46,6 +46,10 @@ namespace GFGGame
         /// 商城-礼包
         /// </summary>
         public const string SHOP_GIFT_BAG = "SHOP_GIFT_BAG";
+        /// <summary>
+        /// 套装培养
+        /// </summary>
+        public const string SUIT_FOSTER = "SUIT_FOSTER";
 
     }
 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -64,6 +64,7 @@ namespace GFGGame
         public const string NOTICE_SYSTOM_REMOVE = "NOTICE_SYSTOM_REMOVE";//删除公告
 
         public const string SUIT_GUIDE_BOX_BONUS = "SUIT_GUIDE_BOX_BONUS";//领取套装收集奖励
+        public const string JUMP_TO_SOURCE = "JUMP_TO_SOURCE";//跳转到来源
 
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs

@@ -162,7 +162,7 @@ namespace GFGGame
             {
                 _valueBarController.Controller(3);
             }
-            if (_selectedItemId > 0)
+            if (_selectedItemId > 0 && _selectedItemCount > 0)
             {
                 ShopDataManager.Instance.BuyItem(_cfgSelected.id, _selectedItemCount, _storeId, _cfgSelected);
             }

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

@@ -113,13 +113,15 @@ namespace GFGGame
             GObject listItem = context.data as GObject;
             string[] infos = listItem.data as string[];
             string functionId = infos[0];
+            bool isJump = true;
             switch (functionId)
             {
                 case ConstFunctionId.FU_ZHUANG_DIAN:
                     this.Hide();
                     object[] temp = viewData as object[];
-                    int count = temp.Length > 2 ? (int)temp[2] : 1;
-                    ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { null, null, _itemId, count }, _fromeViewDatas, true, true);
+                    int count = temp.Length > 2 ? (int)temp[2] : 0;
+                    int shopId = int.Parse(infos[1]);
+                    ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { shopId, null, _itemId, count }, _fromeViewDatas, true, true);
                     break;
                 case ConstFunctionId.FU_ZHUANG_DECOMPOSE:
                     this.Hide();
@@ -139,7 +141,7 @@ namespace GFGGame
                     string value = infos[1];
                     var levelCfgId = int.Parse(value);
                     var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-
+                    isJump = false;
                     if (levelCfg.type == ConstInstanceZonesType.Story)
                     {
                         if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(ViewName.STORY_CHAPTER_VIEW))
@@ -159,7 +161,7 @@ namespace GFGGame
                         }
                         ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, levelCfg.chapterId, _fromeViewDatas, true);
                         InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStoryLevel);
-
+                        isJump = true;
                     }
                     else if (levelCfg.type == ConstInstanceZonesType.Studio)
                     {
@@ -204,19 +206,22 @@ namespace GFGGame
                         ViewManager.Show(viewName, new object[] { type, 0 }, _fromeViewDatas);
                         StudioDataManager.Instance.VIEW_NAME = studioCfg.funId; ;
                         InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStoryLevel);
+                        isJump = true;
                         break;
                     }
+                    isJump = true;
                     StoryController.ShowLevelView(levelCfgId);
                     // StoryController.ShowLevelView(levelCfgId);
                     break;
                 case ConstFunctionId.FU_ZHUANG_HE_CHENG:
 
-
+                    isJump = false;
                     int suitId = SuitCfgManager.Instance.GetItemSuitId(_itemId);
                     if (suitId > 0)
                     {
                         this.Hide();
                         ViewManager.Show(ViewName.CLOTHING_SYNTHETIC_VIEW, new object[] { suitId, _itemId }, _fromeViewDatas);
+                        isJump = true;
                     }
                     break;
                 case ConstFunctionId.ZHAI_XING:
@@ -224,18 +229,30 @@ namespace GFGGame
                     ViewManager.Show(ViewName.LUCKY_BOX_VIEW, null, _fromeViewDatas);
                     break;
                 case ConstFunctionId.TAO_ZHUANG_TU_JIAN:
+                    isJump = false;
                     if (ViewManager.isViewOpen(ViewName.SUIT_GUIDE_VIEW))
                     {
+
                         this.Hide();
                         return;
                     }
                     this.Hide();
                     ViewManager.Show(ViewName.SUIT_GUIDE_VIEW, null, _fromeViewDatas);
+                    isJump = true;
+
                     break;
                 case ConstFunctionId.TAO_ZHUANG_HE_CHENG:
                     this.Hide();
                     ViewManager.Show(ViewName.SUIT_SYNTHETIC_LIST_VIEW);
                     break;
+                case ConstFunctionId.SUIT_FOSTER:
+                    this.Hide();
+                    ViewManager.Show<SuitListView>(null, _fromeViewDatas);
+                    break;
+            }
+            if (isJump)
+            {
+                EventAgent.DispatchEvent(ConstMessage.JUMP_TO_SOURCE);
             }
         }
         protected override void UpdateToCheckGuide(object param)

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ItemView.cs

@@ -14,6 +14,8 @@ namespace GFGGame
         private GImage _imgHas;
         private GLoader _loaShouTongRewardVisble;
         private GGroup _grpCount;
+        private bool _showTips = true;
+
 
         private ItemData _itemData;
 
@@ -149,7 +151,10 @@ namespace GFGGame
                 _grpCount.visible = value;
             }
         }
-        private bool _showTips = true;
+        /// <summary>
+        /// 展示详情tips
+        /// </summary>
+        /// <value></value>
         public bool ShowTips
         {
             get

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/FieldGuideView.cs

@@ -42,6 +42,8 @@ namespace GFGGame
             {
                 _ui.m_listGuide.numItems = _listGuideDatas.Length;
             });
+            EventAgent.AddEventListener(ConstMessage.JUMP_TO_SOURCE, this.Hide);
+
         }
 
         protected override void OnShown()

+ 4 - 2
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/SuitGuideView.cs

@@ -43,6 +43,8 @@ namespace GFGGame
             _ui.m_btnSwitch.onClick.Add(OnClickBtnSwitch);
             _ui.m_btnHaveGot.onChanged.Add(OnClickBtnHaveGot);
             _ui.m_btnNotGet.onChanged.Add(OnClickBtnNotGet);
+
+            EventAgent.AddEventListener(ConstMessage.JUMP_TO_SOURCE, this.Hide);
         }
 
         protected override void OnShown()
@@ -213,11 +215,11 @@ namespace GFGGame
             {
                 if (haveSuit)
                 {
-                    ViewManager.Show(ViewName.SUIT_SHOW_VIEW, new object[] { _suitTypeId, suitId, _suitIds }, new object[] { ViewName.SUIT_SHOW_VIEW, this.viewData });
+                    ViewManager.Show(ViewName.SUIT_SHOW_VIEW, new object[] { _suitTypeId, suitId, _suitIds }, new object[] { ViewName.SUIT_GUIDE_VIEW, this.viewData });
                 }
                 else
                 {
-                    ViewManager.Show(ViewName.SUIT_PARTS_DETAIL_VIEW, suitId, new object[] { ViewName.SUIT_PARTS_DETAIL_VIEW, this.viewData });
+                    ViewManager.Show(ViewName.SUIT_PARTS_DETAIL_VIEW, suitId, new object[] { ViewName.SUIT_GUIDE_VIEW, this.viewData });
                 }
             });
         }

+ 21 - 9
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/SuitPartsDetailView.cs

@@ -1,5 +1,6 @@
 using UI.CommonGame;
 using FairyGUI;
+using System.Collections.Generic;
 
 namespace GFGGame
 {
@@ -7,6 +8,7 @@ namespace GFGGame
     {
         private UI_SuitPartsDetailUI _ui;
         private int[] _items;
+        private List<ItemView> itemViews = new List<ItemView>();
 
         public override void Dispose()
         {
@@ -24,7 +26,9 @@ namespace GFGGame
             this.viewCom.Center();
 
             _ui.m_listParts.itemRenderer = ListPartsItemRenderer;
-            // _ui.m_listParts.onClickItem.Add(OnClickListPartsItem);
+            _ui.m_listParts.onClickItem.Add(OnClickListPartsItem);
+            EventAgent.AddEventListener(ConstMessage.JUMP_TO_SOURCE, this.Hide);
+
         }
 
         protected override void OnShown()
@@ -34,7 +38,7 @@ namespace GFGGame
             int suitId = (int)this.viewData;
             _items = SuitCfgManager.Instance.GetSuitItems(suitId);
             _ui.m_listParts.numItems = _items.Length;
-            if(_ui.m_listParts.numItems > 0)
+            if (_ui.m_listParts.numItems > 0)
             {
                 _ui.m_listParts.ScrollToView(0);
             }
@@ -50,28 +54,36 @@ namespace GFGGame
         private void ListPartsItemRenderer(int index, GObject obj)
         {
             int itemId = _items[index];
+            obj.data = itemId;
             ItemData reward = ItemUtil.createItemData(itemId, 1);
-            if (obj.data == null)
+            if (itemViews.Count <= index)
             {
-                obj.data = new ItemView(obj as GComponent);
+                // obj.data =
+                ItemView itemView = new ItemView(obj as GComponent);
+                itemViews.Add(itemView);
             }
-            (obj.data as ItemView).SetData(reward);
-            (obj.data as ItemView).TxtHasCountVisble = false;
+            itemViews[index].SetData(reward);
+            itemViews[index].TxtHasCountVisble = false;
             bool haveItem = DressUpMenuItemDataManager.CheckHasItem(itemId);
-            (obj.data as ItemView).ImgNotGotVisible = !haveItem;
+            itemViews[index].ImgNotGotVisible = !haveItem;
+            itemViews[index].ShowTips = false;
+
         }
         private void OnClickListPartsItem(EventContext context)
         {
             GComponent item = context.data as GComponent;
             int itemId = (int)item.data;
             bool haveItem = DressUpMenuItemDataManager.CheckHasItem(itemId);
-            if (haveItem)
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+
+            if (haveItem || itemCfg.approach.Length <= 0)
             {
                 GoodsItemTipsController.ShowItemTips(itemId);
             }
             else
             {
-                this.Hide();
+                // this.Hide();
+                object[] goBackDatas = ViewManager.GetGoBackDatas(typeof(SuitPartsDetailView).Name);
                 ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemId, new object[] { ViewName.SUIT_GUIDE_VIEW, this.viewData } });
             }
         }

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