| 
					
				 | 
			
			
				@@ -3,6 +3,7 @@ using System.Collections.Generic; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using System; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using UnityEngine; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using ET; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using FairyGUI; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -26,7 +27,8 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public static Dictionary<int, List<int>> ItemDatasBySubTypeDic { get { return _itemDatasBySubTypeDic; } } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private static Dictionary<int, List<int>> _newItemdata = new Dictionary<int, List<int>>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private static Dictionary<int, List<int>> _itemDatasByRarityDic = new Dictionary<int, List<int>>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private static List<int> _newSuitData = new List<int>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //存储初始化时的衣服,用于性能优化,逐帧加载配置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public static List<int> itemIDListInited = new List<int>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public static void InitData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -47,7 +49,7 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public static void Add(ItemInfoProto itemInfoProto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var value = itemInfoProto.ConfigId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //游戏初始化禁止使用ItemCfg 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //初始化时禁止使用物品配置,会造成卡顿!!! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!_itemDatas.Contains(value)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 _itemDatas.Add(value); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -72,6 +74,10 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     AddNewDressItem(value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     DressUpMenuSuitDataManager.CheckItemInSuit(value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    itemIDListInited.Add(value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public static bool CheckHasItem(int itemID) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -585,5 +591,36 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             int subType = ItemUtilCS.GetItemSubType(itemId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return _newItemdata.ContainsKey(subType) && _newItemdata[subType].IndexOf(itemId) >= 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //预加载服装配置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public static void StartPreLoadItemCfg() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Timers.inst.AddUpdate(updateOnPreLoad); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private static void updateOnPreLoad(object param = null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for(var i = 0; i < 3; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PreLoadOneItemCfg(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (itemIDListInited.Count <= 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Timers.inst.Remove(updateOnPreLoad); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private static void PreLoadOneItemCfg() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var itemIDListInited = DressUpMenuItemDataManager.itemIDListInited; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (itemIDListInited.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                int lasetIndex = itemIDListInited.Count - 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                int itemId = itemIDListInited[lasetIndex]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                itemIDListInited.RemoveAt(lasetIndex); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ItemCfgArray.Instance.GetCfg(itemId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |