Bläddra i källkod

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

leiyasi 1 år sedan
förälder
incheckning
e127bf9aed

+ 1 - 0
GameClient/Assets/GFGAsset/PreloadFiles.asset

@@ -21,3 +21,4 @@ MonoBehaviour:
   - Assets/Res/Texture/DressUp/shangyi_ys.png
   - Assets/Res/Texture/DressUp/xiazhuang_ys.png
   - Assets/Res/Texture/SceneBg/sanmiaoy_bg.jpg
+  - Assets/Res/Texture/SceneBg/bg_liuli.jpg

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Data/BagDataManager.cs

@@ -81,5 +81,10 @@ namespace GFGGame
                 return 0;
             }
         }
+
+        public Dictionary<int, ItemData> GetBagData() 
+        {
+            return _bagDataDic;
+        }
     }
 }

+ 33 - 7
GameClient/Assets/Game/HotUpdate/Data/DecomposeDataManager.cs

@@ -43,6 +43,11 @@ namespace GFGGame
                         if (materiarsCount> 0 && (materiarsCount + materiars[1] - DeductSynthesisNeedNum(materialId)) > 0)
                         {
                             rarity = ItemDataManager.GetItemRarity(materialId);
+                            if (!_decomposeData.ContainsKey(rarity))
+                            {
+                                _decomposeData.Add(rarity, new List<int>());
+                            }
+
                             if (_decomposeData[rarity].IndexOf(materialId) < 0)
                             {
                                 _decomposeData[rarity].Add(materialId);
@@ -111,13 +116,6 @@ namespace GFGGame
             return sum;
         }
 
-        public List<int> GetDecomposeDataByRarity(int rarity)
-        {
-            if (!_decomposeData.ContainsKey(rarity)) return null;
-            return _decomposeData[rarity];
-        }
-
-
         public List<int> GetRewardList()
         {
             if (_rewardList.Count == 0)
@@ -165,6 +163,34 @@ namespace GFGGame
             return ItemDataManager.GetItemNum(itemId) - synthesisNum;
         }
 
+        //整理分解物品数据
+        public void TidyDecomposeData()
+        {
+            foreach (var itemId in DressUpMenuItemDataManager.GetDressUpItemDatas())
+            {
+                if (!DressUpMenuItemCfg1Array.Instance.CheckIsBackGroundType(itemId))
+                {
+                    Add(itemId);
+                }
+            }
+
+            foreach (var info in BagDataManager.Instance.GetBagData())
+            {
+                if (info.Value.itemType == ConstItemType.ITEM && info.Value.subType == ConstItemSubType.MATERIAL_SKILL_BOOK)
+                {
+                    AddMaterial(info.Value.id);
+                }
+            }
+        }
+
+        //获得分解服装数据
+        public List<int> GetDecomposeDataByRarity(int rarity)
+        {
+            if (!_decomposeData.ContainsKey(rarity)) return null;
+            return _decomposeData[rarity];
+        }
+
+        //获得分解技能书数据
         public List<int> GetDecomposeMaterialByRarity(int rarity)
         {
             if (!_decomposeMaterialData.ContainsKey(rarity)) return null;

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Data/DressUpMenuItemDataManager.cs

@@ -86,6 +86,11 @@ namespace GFGGame
             return _itemDatas.Contains(itemID);
         }
 
+        public static List<int> GetDressUpItemDatas()
+        {
+            return _itemDatas;
+        }
+
         public static void Remove(int value)
         {
             if (_itemDatas == null)

+ 0 - 10
GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs

@@ -39,10 +39,6 @@ namespace GFGGame
             if (itemInfoProto.Type == ConstItemType.DRESS_UP && itemID % GameConst.MAX_COUNT_EVERY_TYPE_ITEM > 0)
             {
                 DressUpMenuItemDataManager.Add(itemInfoProto);
-                if (!DressUpMenuItemCfg1Array.Instance.CheckIsBackGroundType(itemInfoProto))
-                {
-                    DecomposeDataManager.Instance.Add(itemID);
-                }
 
                 //游戏角色初始数据完成后才执行
                 if (GameGlobal.DataInited)
@@ -56,17 +52,11 @@ namespace GFGGame
                         FunctionOpenDataManager.Instance.CheckHasSpecialFunOpen();
                     }
                 }
-                    
             }
             if ((itemInfoProto.Type == ConstItemType.ITEM || itemInfoProto.Type == ConstItemType.USEABLE) &&
                 itemData.num > 0)
             {
                 BagDataManager.Instance.Add(itemData);
-
-                if (itemInfoProto.Type == ConstItemType.ITEM && itemInfoProto.SubType == ConstItemSubType.MATERIAL_SKILL_BOOK)
-                {
-                    DecomposeDataManager.Instance.AddMaterial(itemID);
-                }
             }
 
             if (itemInfoProto.Type == ConstItemType.HEAD)

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

@@ -86,17 +86,18 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            DecomposeDataManager.Instance.TidyDecomposeData();
             _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 = 0;
-                OnClickBtnRarity(ConstDressRarity.Rarity_FANPIN);
-            }
+            //if (GuideDataManager.currentGuideId == GuideCfgArray.Instance.GetCfg(ConstGuideId.CLOTHING_DECOMPOSE).id)
+            //{
+            //    _ui.m_listTab.selectedIndex = 0;
+            //    OnClickBtnRarity(ConstDressRarity.Rarity_FANPIN);
+            //}
             Timers.inst.AddUpdate(CheckGuide);
         }
 
@@ -110,7 +111,7 @@ namespace GFGGame
         private void OnClickBtnRarity(int rarity)
         {
             _curRarity = rarity;
-            if(_ui.m_c1.selectedIndex == 0)
+            if (_ui.m_c1.selectedIndex == 0)
                 _clothingDatas = DecomposeDataManager.Instance.GetDecomposeDataByRarity(rarity);
             else if (_ui.m_c1.selectedIndex == 1)
                 _clothingDatas = DecomposeDataManager.Instance.GetDecomposeMaterialByRarity(rarity);
@@ -126,6 +127,7 @@ namespace GFGGame
         private void ListItemRander(int index, GObject obj) 
         {
             UI_ComItem item = UI_ComItem.Proxy(obj);
+
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_clothingDatas[index]);
             RarityIconController.UpdateRarityIcon(item.m_loaRarity, itemCfg.id, false);
             string ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);

+ 6 - 0
GameClient/Assets/Resources/BuildinFileManifest.asset

@@ -67,6 +67,7 @@ MonoBehaviour:
   - 2c92fce54dad8e6f3798dff97466de28.bundle
   - 2d58720d0433d0342f4666cbc5b10367.bundle
   - 2ea734d7783f8ece32f548eafac2de6f.bundle
+  - 2ebaf8122b91efa2fc55f8a6b0d84807.bundle
   - 2f4ff00b716a5603f600734fb2ed2e30.bundle
   - 2f8fa5b7bbc1b4e086b640a3fd89d256.bundle
   - 2fe2f431a63c70e91c743a39d59c1258.bundle
@@ -120,6 +121,7 @@ MonoBehaviour:
   - 63e6afa476fb0dc90b32a7e36baa2846.bundle
   - 65f0100281fc41568c0d83a8c1cffb4f.bundle
   - 665eb8f1705c6322eac0ee1618a1153b.bundle
+  - 667965edc224d9405b60a72e626ec022.bundle
   - 671ce69c0fe9aededdb2a116cb6221dc.rawfile
   - 67660b23b205cf12c4d150b1084bb36f.bundle
   - 678540a583e2ecd285dd83971123a7c6.bundle
@@ -133,6 +135,7 @@ MonoBehaviour:
   - 6de517a784934ca28386aad5bbbfae6b.bundle
   - 6e64e29925851284e20dbed4932a6ab1.bundle
   - 70c119f57c1b2bea00aadda63ea96818.bundle
+  - 71083bc729860116f6ba44495fbd4339.bundle
   - 723415e529d85280bb472c91098428ea.bundle
   - 73a721745314a855e511e02ab2164d39.bundle
   - 73fe61979b2e32408f986adecd35f545.bundle
@@ -157,6 +160,7 @@ MonoBehaviour:
   - 8ffd7c57e1051292e6b97e72537c6681.bundle
   - 912a433997ebe357a73112f86aeeda23.bundle
   - 9130d5c40b77a3f4af15647c9fa63810.bundle
+  - 91eacbd3f89615a6fe2828cede13ebf4.bundle
   - 92066a1f2d42811a0113839b1ffa72c2.bundle
   - 93b7bfcc5320be29164bf63023825c39.bundle
   - 940e60dfd9998cf3bc0f34f20557f72d.bundle
@@ -196,6 +200,7 @@ MonoBehaviour:
   - bbf6387e4b41785c318e5ad872af00b3.bundle
   - bc1be44372373d2d98bdf92012c5b5d6.bundle
   - bd3dae5c98990c12856001a0d886bd67.bundle
+  - bd67f05d981c3e399df85bea2c6b39c0.bundle
   - bd839c9a83c48f76869d72b3d5a9244b.bundle
   - bda34824195b9ba41e4e4b6eeafe061d.bundle
   - bec153fb84f6e1c7761c2f8db5a1755f.bundle
@@ -256,6 +261,7 @@ MonoBehaviour:
   - f347953d4854a4d0d3d3ffee2cf84646.bundle
   - f920d30ab7646549760dcc98423428a2.bundle
   - f930d2debe28c4ac2cf446767335d7cb.bundle
+  - f95d6490388c31ff116d9c2b32d699c0.bundle
   - fa03cce44cd6c7dfd5fcea8412c3ee16.bundle
   - fb7a3defd9337f5594bef798c5a86a4b.bundle
   - fc8eb31490afe1cfa4cbf033fcbd2815.bundle