| 
					
				 | 
			
			
				@@ -4,6 +4,7 @@ using FairyGUI; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using UI.ClothingFoster; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using UI.CommonGame; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using UnityEngine; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using ET; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -19,9 +20,12 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private List<int> _suitIds;//已解锁套装列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private SortedList _propertyList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private SortedList _addPropertyList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private int _suitId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private int _index; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private bool _canRenew; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public override void Dispose() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,13 +50,24 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _ui.m_btnBack.onClick.Add(OnClickBtnBack); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _ui.m_btnLeft.onClick.Add(() => { OnClickBtnDirection(-1); }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _ui.m_btnRight.onClick.Add(() => { OnClickBtnDirection(1); }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _ui.m_btnReward.target.onClick.Add(OnClickBtnReward); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_comFosterReward.target.onClick.Add(OnClickComFosterReward); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _ui.m_btnPropertyShow.onClick.Add(OnClickBtnPropertyShow); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _ui.m_listFoster.itemRenderer = ListFosterItemRender; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _ui.m_listFoster.onClickItem.Add(OnClickListFosterItem); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _ui.m_listProperty.itemRenderer = ListPropertyItemRender; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_listRenewMaterial.itemRenderer = ListRenewMaterialItemRender; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_listRenewMaterial.onClickItem.Add(OnListRenewMaterialsItem); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_btnRenew.onClick.Add(OnClickBtnRenew); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_c1.onChanged.Add(OnTabChange); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // EventAgent.AddEventListener(ConstMessage.GET_SUIT_INFOS) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            EventAgent.AddEventListener(ConstMessage.MAINTAIN_SUIT, OnListenerFoster); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            EventAgent.AddEventListener(ConstMessage.GET_MAINTAIN_SUIT_BONUS, OnListenerGetFosterReward); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            EventAgent.AddEventListener(ConstMessage.MAKE_NEW_SUIT, OnListenerRenew); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         protected override void OnShown() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -83,16 +98,26 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ViewManager.GoBackFrom(typeof(SuitView).FullName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void OnTabChange() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (_ui.m_c1.selectedIndex == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                UpdateFoster(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                UpdateRenew(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private void UpdateView() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             UpdateArrows(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             UpdateSuitView(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _ui.m_listFoster.numItems = SuitFosterCfgArray.Instance.GetCfgs(_suitId).Length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _propertyList = SuitFosterDataManager.Instance.GetPropertyData(_suitId, _index); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _ui.m_listProperty.numItems = _propertyList.Count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            UpdateFoster(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            UpdateRenew(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private void UpdateArrows() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             int index = _suitIds.IndexOf(_suitId); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -101,16 +126,7 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _ui.m_btnLeft.visible = (index - 1 >= 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private void OnClickBtnDirection(int direction) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int index = _suitIds.IndexOf(_suitId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int targetIndex = index + direction; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (targetIndex >= 0 && direction == -1 || targetIndex < _suitIds.Count && direction == 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                _suitId = _suitIds[targetIndex]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                UpdateView(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private void UpdateSuitView(bool isPic = true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _actionIsPic = isPic; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -137,8 +153,33 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 _wrapper.wrapTarget = _sceneObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void OnClickBtnDirection(int direction) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int index = _suitIds.IndexOf(_suitId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int targetIndex = index + direction; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (targetIndex >= 0 && direction == -1 || targetIndex < _suitIds.Count && direction == 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _suitId = _suitIds[targetIndex]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                UpdateView(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /*************************************************养护************************************************/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void UpdateFoster() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            UpdateFosterReward(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterDataManager.Instance.GetPropertyData(_suitId, _index, out _propertyList, out _addPropertyList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_listProperty.numItems = _propertyList.Count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_listFoster.numItems = SuitFosterCfgArray.Instance.GetCfgs(_suitId).Length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void UpdateFosterReward() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterDataManager.Instance.GetFosterRewardState(_suitId, out int state, out int index); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterCfg cfg = SuitFosterCfgArray.Instance.GetCfgs(_suitId)[index]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.rewardsArr[0][0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_comFosterReward.m_loaReward.url = ResPathUtil.GetIconPath(itemCfg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_comFosterReward.m_c1.selectedIndex = state; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private void ListFosterItemRender(int index, GObject obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -154,7 +195,7 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private void ListPropertyItemRender(int index, GObject obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             UI_ListPropertyItem item = UI_ListPropertyItem.Proxy(obj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            string score = (index + 1).ToString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int score = (int)_propertyList.GetKey(index); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             item.m_txtProperty.text = _propertyList[score].ToString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             item.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (score)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -169,21 +210,131 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             else if (state == 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ViewManager.Show<SuitFosterView>(new object[] { _suitId, index }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ViewManager.Show<SuitFosterView>(new object[] { _suitId, index, _propertyList, _addPropertyList }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 PromptController.Instance.ShowFloatTextPrompt(string.Format("请完成{0}阶段", SuitFosterDataManager.Instance.stepNames[_index])); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterHelper.SendMaintainSuit(_suitId, index + 1).Coroutine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private void OnClickBtnReward() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void OnClickComFosterReward() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ViewManager.Show<SuitRewardView>(_suitId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterDataManager.Instance.GetFosterRewardState(_suitId, out int state, out int index); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (state == 1 || state == 2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ViewManager.Show<SuitRewardView>(_suitId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                SuitFosterHelper.SendGetMaintainSuitBonus(_suitId, index + 1).Coroutine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private void OnClickBtnPropertyShow() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ViewManager.Show<SuitPropertyShowView>(new object[] { _suitId, _index }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void OnListenerFoster() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_comFosterAni.target.visible = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_comFosterAni.m_proFoster.value = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_comFosterAni.m_proFoster.TweenValue(100, 2f).OnComplete(() => 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 _ui.m_comFosterAni.target.visible = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 ViewManager.Show<SuitFosterFinishView>(_propertyList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 UpdateFoster(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void OnListenerGetFosterReward(EventContext context) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterCfg cfg = SuitFosterCfgArray.Instance.GetCfgs(_suitId)[(int)(context.data) - 1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ViewManager.Show<RewardView>(ItemUtil.CreateItemDataList(cfg.rewardsArr)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            UpdateFosterReward(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /*************************************************换新************************************************/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void UpdateRenew() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterData suitFosterData = SuitFosterDataManager.Instance.GetSuitFosterData(_suitId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (suitFosterData.makeNewState > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _ui.m_c2.selectedIndex = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                UpdateRenewFinish(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _ui.m_c2.selectedIndex = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                UpdateRenewView(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void UpdateRenewView() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int suitrarity = SuitCfgArray.Instance.GetCfg(_suitId).rarity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitRenewCfg renewCfg = SuitRenewCfgArray.Instance.GetCfg(suitrarity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterListCfg cfg = SuitFosterListCfgArray.Instance.GetCfg(_suitId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_comRenewReward.m_loaReward.visible = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (cfg.renewRewardsArr.Length > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _ui.m_comRenewReward.m_loaReward.visible = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.renewRewardsArr[0][0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _ui.m_comRenewReward.m_loaReward.url = ResPathUtil.GetIconPath(itemCfg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_txtRenewProperty.text = string.Format("套装所有部件属性+{0}%", renewCfg.addition * 100 / 10000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_txtRenewTips.text = string.Format("完成{0}阶段", SuitFosterDataManager.Instance.stepNames[cfg.renewOpenLv - 1]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_listRenewMaterial.numItems = renewCfg.materialsArr.Length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _canRenew = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            UI_ComConsumeCurrency comConsumeCurrency = UI_ComConsumeCurrency.Proxy(_ui.m_comRenewCost); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int has = ItemDataManager.GetItemNum(renewCfg.costId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int need = renewCfg.costNum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // comConsumeCurrency.m_txtHas.text = has.ToString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            comConsumeCurrency.m_txtNeed.text = need.ToString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (_canRenew && has < need) _canRenew = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void UpdateRenewFinish() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int suitrarity = SuitCfgArray.Instance.GetCfg(_suitId).rarity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitRenewCfg renewCfg = SuitRenewCfgArray.Instance.GetCfg(suitrarity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SuitFosterListCfg cfg = SuitFosterListCfgArray.Instance.GetCfg(_suitId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_txtRenewShow.text = string.Format("套装所有部件属性+{0}%", renewCfg.addition * 100 / 10000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.renewRewardsArr[0][0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _ui.m_comRenewRewardGet.m_loaReward.url = ResPathUtil.GetIconPath(itemCfg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void ListRenewMaterialItemRender(int index, GObject obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            UI_ListMaterialsItem item = UI_ListMaterialsItem.Proxy(obj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int suitrarity = SuitCfgArray.Instance.GetCfg(_suitId).rarity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int[][] materialsArr = SuitRenewCfgArray.Instance.GetCfg(suitrarity).materialsArr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(materialsArr[index][0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int has = ItemDataManager.GetItemNum(itemCfg.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.m_txtHas.text = has.ToString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int need = materialsArr[index][1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.m_txtNeed.text = StringUtil.GetColorText(need.ToString(), has >= need ? "#DD994A" : "#DD994A"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (_canRenew && has < need) _canRenew = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.target.data = materialsArr[index][0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void OnListRenewMaterialsItem(EventContext context) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int itemId = (int)(context.data as GComponent).data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            GoodsItemTipsController.ShowItemTips(itemId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void OnClickBtnRenew() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!_canRenew) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PromptController.Instance.ShowFloatTextPrompt("材料不足"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void OnListenerRenew() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ViewManager.Show<SuitRenewFinishView>(_suitId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            UpdateRenew(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |