Ver Fonte

Merge remote-tracking branch 'remotes/origin/zhaoyang' into guodong

# Conflicts:
#	GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes
guodong há 3 anos atrás
pai
commit
c7b4bacae2
31 ficheiros alterados com 912 adições e 85 exclusões
  1. 6 0
      FGUIProject/assets/ClothingFoster/SuitRenewFinishUI.xml
  2. 35 9
      FGUIProject/assets/ClothingFoster/SuitUI.xml
  3. 13 0
      FGUIProject/assets/ClothingFoster/components/ComFosterReward.xml
  4. 7 0
      FGUIProject/assets/ClothingFoster/components/ComRenewReward.xml
  5. 7 0
      FGUIProject/assets/ClothingFoster/components/ComRenewRewardGet.xml
  6. 4 4
      FGUIProject/assets/ClothingFoster/components/ListFosterItem.xml
  7. 9 4
      FGUIProject/assets/ClothingFoster/components/ListMaterialsItem.xml
  8. 9 0
      FGUIProject/assets/ClothingFoster/components/comFosterAni.xml
  9. 1 1
      FGUIProject/assets/ClothingFoster/images/ProgressBar1.xml
  10. 6 1
      FGUIProject/assets/ClothingFoster/package.xml
  11. 8 1
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  12. 116 7
      GameClient/Assets/Game/HotUpdate/Data/SuitFosterDatamanager.cs
  13. 77 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComFosterReward.cs
  14. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComFosterReward.cs.meta
  15. 71 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComRenewReward.cs
  16. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComRenewReward.cs.meta
  17. 71 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComRenewRewardGet.cs
  18. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComRenewRewardGet.cs.meta
  19. 71 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitRenewFinishUI.cs
  20. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitRenewFinishUI.cs.meta
  21. 52 10
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitUI.cs
  22. 16 16
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_comFosterAni.cs
  23. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_comFosterAni.cs.meta
  24. 2 2
      GameClient/Assets/Game/HotUpdate/Utils/SuitUtil.cs
  25. 25 2
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitFosterView.cs
  26. 46 0
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitRenewFinishView.cs
  27. 11 0
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitRenewFinishView.cs.meta
  28. 10 7
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitRewardView.cs
  29. 194 20
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitView.cs
  30. BIN
      GameClient/Assets/ResIn/UI/ClothingFoster/ClothingFoster_atlas0.png
  31. BIN
      GameClient/Assets/ResIn/UI/ClothingFoster/ClothingFoster_fui.bytes

+ 6 - 0
FGUIProject/assets/ClothingFoster/SuitRenewFinishUI.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1080,1920">
+  <displayList>
+    <text id="n1_nk8d" name="txtProperty" xy="438,744" size="204,42" fontSize="30" text="套装属性+30%"/>
+  </displayList>
+</component>

+ 35 - 9
FGUIProject/assets/ClothingFoster/SuitUI.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
-  <controller name="c1" pages="0,,1," selected="0"/>
+  <controller name="c1" pages="0,,1," selected="1"/>
+  <controller name="c2" pages="0,,1," selected="0"/>
   <displayList>
     <loader id="n0_pjip" name="bg" xy="0,-240" size="1080,2400" url="ui://eg2y0ldpj539i"/>
     <graph id="n1_pjip" name="holder" xy="389,623" pivot="0.5,0.5" size="394,268" touchable="false">
@@ -18,20 +19,45 @@
     <loader id="n8_pjip" name="btnLeft" xy="49,912" pivot="0.5,0.5" size="72,95" scale="-1,1" url="ui://uicwtr5bpy5gk">
       <relation target="" sidePair="center-center,middle-middle"/>
     </loader>
-    <component id="n12_py5g" name="btnFoster" src="py5gm" fileName="components/Button5.xml" xy="382,1178">
-      <Button checked="true" controller="c1" page="0"/>
+    <component id="n12_py5g" name="btnTabFoster" src="py5gm" fileName="components/Button5.xml" xy="382,1178">
+      <Button controller="c1" page="0"/>
     </component>
-    <component id="n13_py5g" name="btnRenew" src="py5gm" fileName="components/Button5.xml" xy="565,1182">
-      <Button controller="c1" page="1"/>
+    <component id="n13_py5g" name="btnTabRenew" src="py5gm" fileName="components/Button5.xml" xy="565,1182">
+      <Button checked="true" controller="c1" page="1"/>
     </component>
-    <component id="n17_py5g" name="btnReward" src="py5go" fileName="components/Button7.xml" xy="898,1221"/>
-    <component id="n16_py5g" name="btnPropertyShow" src="py5gn" fileName="components/Button6.xml" xy="990,1442"/>
-    <list id="n11_py5g" name="listProperty" xy="145,1424" size="819,68" layout="row" colGap="10" defaultItem="ui://eg2y0ldpojlzk" align="center" autoClearItems="true">
+    <component id="n19_nk8d" name="comFosterReward" src="nk8d13" fileName="components/ComFosterReward.xml" xy="945,1070" group="n21_nk8d"/>
+    <component id="n16_py5g" name="btnPropertyShow" src="py5gn" fileName="components/Button6.xml" xy="990,1442" group="n21_nk8d"/>
+    <list id="n11_py5g" name="listProperty" xy="145,1424" size="819,68" group="n21_nk8d" layout="row" colGap="10" defaultItem="ui://eg2y0ldpojlzk" align="center" autoClearItems="true">
       <item/>
       <item/>
       <item/>
       <item/>
     </list>
-    <list id="n15_py5g" name="listFoster" xy="211,1681" size="716,42" layout="row" overflow="scroll" defaultItem="ui://uicwtr5bj5a512" align="center"/>
+    <list id="n15_py5g" name="listFoster" xy="211,1681" size="716,42" group="n21_nk8d" layout="row" overflow="scroll" defaultItem="ui://uicwtr5bj5a512" align="center"/>
+    <component id="n35_nk8d" name="comFosterAni" src="nk8d17" fileName="components/comFosterAni.xml" xy="424,746" group="n21_nk8d" visible="false"/>
+    <group id="n21_nk8d" name="grpFoster" xy="145,746" size="900,977" advanced="true">
+      <gearDisplay controller="c1" pages="0"/>
+    </group>
+    <text id="n22_nk8d" name="txtRenewProperty" xy="391,1264" size="322,42" group="n29_nk8d" fontSize="30" text="套装所有部件属性+10%"/>
+    <component id="n23_nk8d" name="comRenewReward" src="nk8d14" fileName="components/ComRenewReward.xml" xy="878,1292" group="n29_nk8d"/>
+    <list id="n25_nk8d" name="listRenewMaterial" xy="0,1470" size="654,202" group="n29_nk8d" layout="row" colGap="20" defaultItem="ui://uicwtr5bpy5gu">
+      <item/>
+      <item/>
+      <item/>
+    </list>
+    <component id="n26_nk8d" name="comRenewCost" src="ojlz61" fileName="components/ComConsumeCurrency.xml" pkg="eg2y0ldp" xy="656,1421" group="n29_nk8d"/>
+    <component id="n27_nk8d" name="btnRenew" src="ih7594" fileName="components/Button10.xml" pkg="mk0fwx0x" xy="624,1498" group="n29_nk8d"/>
+    <text id="n28_nk8d" name="txtRenewTips" xy="694,1650" size="182,42" group="n29_nk8d" fontSize="30" text="完成养护阶段"/>
+    <group id="n29_nk8d" name="grpRenew" xy="0,1264" size="1030,427" advanced="true">
+      <gearDisplay controller="c1" pages="1"/>
+      <gearDisplay2 controller="c2" pages="0" condition="0"/>
+    </group>
+    <text id="n30_nk8d" name="n30" xy="480,1372" size="152,42" group="n34_nk8d" fontSize="30" text="已完成换新"/>
+    <text id="n31_nk8d" name="txtRenewShow" xy="379,1466" size="322,42" group="n34_nk8d" fontSize="30" text="套装所有部件属性+10%"/>
+    <component id="n32_nk8d" name="comRenewRewardGet" src="nk8d15" fileName="components/ComRenewRewardGet.xml" xy="497,1594" group="n34_nk8d"/>
+    <group id="n34_nk8d" name="grpRenewFinish" xy="379,1372" size="322,322" advanced="true">
+      <gearDisplay controller="c1" pages="1"/>
+      <gearDisplay2 controller="c2" pages="1" condition="0"/>
+    </group>
   </displayList>
 </component>

+ 13 - 0
FGUIProject/assets/ClothingFoster/components/ComFosterReward.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="100,100">
+  <controller name="c1" pages="0,,1,,2," selected="0"/>
+  <displayList>
+    <loader id="n19_nk8d" name="loaReward" xy="0,0" size="100,100" fill="scale"/>
+    <image id="n20_nk8d" name="imgRed" src="py5g4" fileName="images/tujian_xzdg_1.png" xy="64,-12">
+      <gearDisplay controller="c1" pages="0"/>
+    </image>
+    <image id="n21_nk8d" name="n21" src="py5g3" fileName="images/tujian_xzdg.png" xy="29,29">
+      <gearDisplay controller="c1" pages="2"/>
+    </image>
+  </displayList>
+</component>

+ 7 - 0
FGUIProject/assets/ClothingFoster/components/ComRenewReward.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="152,119">
+  <displayList>
+    <loader id="n23_nk8d" name="loaReward" xy="27,0" pivot="0.5,0.5" size="100,100"/>
+    <text id="n24_nk8d" name="n24" xy="0,77" size="152,41" fontSize="30" text="换新后获得"/>
+  </displayList>
+</component>

+ 7 - 0
FGUIProject/assets/ClothingFoster/components/ComRenewRewardGet.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="100,100">
+  <displayList>
+    <loader id="n32_nk8d" name="loaReward" xy="0,0" size="100,100" fill="scale"/>
+    <image id="n33_nk8d" name="n33" src="py5g3" fileName="images/tujian_xzdg.png" xy="28,32"/>
+  </displayList>
+</component>

+ 4 - 4
FGUIProject/assets/ClothingFoster/components/ListFosterItem.xml

@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="42,42">
-  <controller name="finish" pages="1,未开始,2,进行中,3,已完成" selected="2"/>
+  <controller name="finish" pages="1,已完成,2,进行中,3,未开始" selected="0"/>
   <displayList>
     <image id="n3_py5g" name="n3" src="py5g3" fileName="images/tujian_xzdg.png" xy="0,0">
-      <gearDisplay controller="finish" pages="3"/>
+      <gearDisplay controller="finish" pages="1"/>
     </image>
-    <image id="n4_py5g" name="n4" src="py5g4" fileName="images/tujian_xzdg_1.png" xy="0,0">
+    <image id="n4_py5g" name="n4" src="py5g6" fileName="images/tujian_zkanniu.png" xy="0,-5">
       <gearDisplay controller="finish" pages="2"/>
     </image>
     <image id="n5_py5g" name="n5" src="py5g4" fileName="images/tujian_xzdg_1.png" xy="0,0">
-      <gearDisplay controller="finish" pages="1"/>
+      <gearDisplay controller="finish" pages="3"/>
     </image>
   </displayList>
 </component>

+ 9 - 4
FGUIProject/assets/ClothingFoster/components/ListMaterialsItem.xml

@@ -1,8 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="100,122">
+<component size="200,200">
   <displayList>
-    <loader id="n5_py5g" name="loaIcon" xy="7,0" size="80,80" aspect="true" fill="scale"/>
-    <text id="n7_py5g" name="txtNeed" xy="0,77" size="10,42" fontSize="30" ubb="true" text=""/>
-    <text id="n6_py5g" name="txtHas" xy="60,80" size="10,42" fontSize="30" ubb="true" text=""/>
+    <loader id="n5_py5g" name="loaIcon" xy="10,10" size="180,180" aspect="true" url="ui://uicwtr5bpy5ge" fill="scale"/>
+    <text id="n7_py5g" name="txtNeed" xy="48,139" pivot="1,0.5" size="41,42" fontSize="30" align="right" ubb="true" text="10">
+      <relation target="n8_nk8d" sidePair="right-left,top-top"/>
+    </text>
+    <text id="n8_nk8d" name="n8" xy="89,138" size="22,42" fontSize="30" ubb="true" text="/"/>
+    <text id="n6_py5g" name="txtHas" xy="112,139" pivot="0,0.5" size="41,42" fontSize="30" ubb="true" text="11">
+      <relation target="n8_nk8d" sidePair="left-right,top-top"/>
+    </text>
   </displayList>
 </component>

+ 9 - 0
FGUIProject/assets/ClothingFoster/components/comFosterAni.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="232,114">
+  <displayList>
+    <image id="n35_nk8d" name="n35" src="py5ge" fileName="images/zhuxian_shuoto.png" xy="80,0"/>
+    <component id="n36_nk8d" name="proFoster" src="py5ga" fileName="images/ProgressBar1.xml" xy="0,108">
+      <ProgressBar max="100"/>
+    </component>
+  </displayList>
+</component>

+ 1 - 1
FGUIProject/assets/ClothingFoster/images/ProgressBar1.xml

@@ -5,7 +5,7 @@
       <relation target="" sidePair="width-width,height-height"/>
     </image>
     <image id="n1_pjip" name="bar" src="py5gc" fileName="images/tujian_jdt_2.png" xy="0,0"/>
-    <text id="n2_pjip" name="title" xy="245,-11" size="66,29" fontSize="20" color="#b3805e" vAlign="middle" autoClearText="true" text="00/10"/>
+    <text id="n2_pjip" name="title" xy="245,-11" size="10,29" visible="false" fontSize="20" color="#b3805e" vAlign="middle" autoClearText="true" text=""/>
   </displayList>
   <ProgressBar titleType="valueAndmax"/>
 </component>

+ 6 - 1
FGUIProject/assets/ClothingFoster/package.xml

@@ -34,12 +34,17 @@
     <component id="py5gu" name="ListMaterialsItem.xml" path="/components/"/>
     <component id="py5gv" name="ListPropertyShowItem.xml" path="/components/"/>
     <component id="py5gw" name="ListRewardItem.xml" path="/components/"/>
-    <component id="j5a5x" name="ComboBox1.xml" path="/components/" exported="true"/>
+    <component id="j5a5x" name="ComboBox1.xml" path="/components/"/>
     <image id="j5a5y" name="tujian_anniu_1(1).png" path="/images/" scale="9grid" scale9grid="53,15,106,30"/>
     <image id="j5a5z" name="tujian_zkanniu(1).png" path="/images/"/>
     <component id="j5a510" name="ComboBox1_popup.xml" path="/components/"/>
     <component id="j5a511" name="ComboBox1_item.xml" path="/components/"/>
     <component id="j5a512" name="ListFosterItem.xml" path="/components/"/>
+    <component id="nk8d13" name="ComFosterReward.xml" path="/components/"/>
+    <component id="nk8d14" name="ComRenewReward.xml" path="/components/"/>
+    <component id="nk8d15" name="ComRenewRewardGet.xml" path="/components/"/>
+    <component id="nk8d16" name="SuitRenewFinishUI.xml" path="/" exported="true"/>
+    <component id="nk8d17" name="comFosterAni.xml" path="/components/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\ClothingFoster" packageCount="2" genCode="true"/>
 </packageDescription>

+ 8 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -110,6 +110,7 @@ namespace GFGGame
             DecomposeDataManager.Instance.Clear();
             PhotographDataManager.Instance.Clear();
             SkillDataManager.Instance.Clear();
+            SuitFosterDataManager.Instance.Clear();
             if (logout)
             {
                 Logout();
@@ -155,8 +156,13 @@ namespace GFGGame
                 }
             }
             Timers.inst.CallLater(AfterEnterGame);
-        }
+            SendGameProtocol();
 
+        }
+        private static void SendGameProtocol()
+        {
+            SuitFosterHelper.SendGetSuitInfos().Coroutine();
+        }
         private static void AfterEnterGame(object param)
         {
             //GameProxy.ReqGetStoryScoreList();
@@ -179,5 +185,6 @@ namespace GFGGame
             GameProxy.ReqUpdateTreasure();
         }
 
+
     }
 }

+ 116 - 7
GameClient/Assets/Game/HotUpdate/Data/SuitFosterDatamanager.cs

@@ -7,10 +7,10 @@ namespace GFGGame
 {
     public class SuitFosterDataManager : SingletonBase<SuitFosterDataManager>
     {
-
+        public string[] stepNames = { "浆洗", "晾晒", "熏香", "熨烫", "整饬" };
         private Dictionary<int, SuitFosterData> _suitInfoBySuitIdDic = new Dictionary<int, SuitFosterData>();
 
-        public void InitData()
+        public void Clear()
         {
             _suitInfoBySuitIdDic.Clear();
         }
@@ -29,7 +29,7 @@ namespace GFGGame
         public void SetMaintainBonusSteps(int suitId, int maintainBonusSteps)
         {
             _suitInfoBySuitIdDic[suitId].maintainBonusSteps.Add(maintainBonusSteps);
-            EventAgent.DispatchEvent(ConstMessage.GET_MAINTAIN_SUIT_BONUS);
+            EventAgent.DispatchEvent(ConstMessage.GET_MAINTAIN_SUIT_BONUS, maintainBonusSteps);
 
         }
 
@@ -42,7 +42,9 @@ namespace GFGGame
 
         public SuitFosterData GetSuitFosterData(int suitId)
         {
-            return _suitInfoBySuitIdDic[suitId];
+
+            return _suitInfoBySuitIdDic.ContainsKey(suitId) ? _suitInfoBySuitIdDic[suitId] : new SuitFosterData() { suitId = suitId, maintainStep = 0, maintainBonusSteps = new List<int>(), makeNewState = 0 };
+
         }
 
         //加成属性服装占比
@@ -86,9 +88,11 @@ namespace GFGGame
             return new List<KeyValuePair<string, int>>(_dataPercent);
         }
 
-        public SortedList GetPropertyData(int suitId, int index)
+        //获取当前阶段部件属性总值
+        public void GetPropertyData(int suitId, int index, out SortedList _propertyData, out SortedList _addPropertyData)
         {
             SortedList propertyData = new SortedList();
+            SortedList addPropertyData = new SortedList();
             int[][] partsArr = SuitFosterCfgArray.Instance.GetCfgs(suitId)[index].partsArr;
             for (int i = 0; i < partsArr.Length; i++)
             {
@@ -100,13 +104,118 @@ namespace GFGGame
                     if (propertyData.ContainsKey(score))
                     {
                         count = count + (int)propertyData[score];
+                        propertyData[score] = count;
+                    }
+                    else
+                    {
+                        propertyData.Add(score, count);
                     }
 
-                    propertyData.Add(score, count);
+                    int addCount = 0;
+                    if (score == itemCfg.mainScore)
+                    {
+                        addCount = partsArr[i][1];
+                    }
+                    if (addPropertyData.ContainsKey(score))
+                    {
+                        addCount = addCount + (int)addPropertyData[itemCfg.mainScore];
+                    }
+                    else
+                    {
+                        addPropertyData.Add(score, addCount);
+                    }
                 }
             }
-            return propertyData;
+            _propertyData = propertyData;
+            _addPropertyData = addPropertyData;
+        }
+
+        //0:已完成,1:养护中,2未养护
+        public int GetFosterState(int suitId, int index)
+        {
+            SuitFosterData suitFosterData = this.GetSuitFosterData(suitId);
+            if (index < suitFosterData.maintainStep)
+            {
+                return 0;
+            }
+            else if (index == suitFosterData.maintainStep)
+            {
+                return 1;
+            }
+
+            return 2;
         }
 
+        public SortedList GetSuitFosterRewards(int suitId)
+        {
+            SuitFosterCfg[] cfg = SuitFosterCfgArray.Instance.GetCfgs(suitId);
+            List<SuitFosterCfg> list = new List<SuitFosterCfg>(cfg);
+            list = SortRewardList(list, suitId);
+
+            SortedList sortedList = new SortedList();
+            for (int i = 0; i < list.Count; i++)
+            {
+                if (list[i].rewardsArr.Length > 0)
+                {
+                    sortedList.Add((i + 1), list[i]);
+                }
+            }
+
+            return sortedList;
+        }
+        private List<SuitFosterCfg> SortRewardList(List<SuitFosterCfg> list, int suitId)
+        {
+            SuitFosterData fosterData = GetSuitFosterData(suitId);
+            list.Sort((SuitFosterCfg a, SuitFosterCfg b) =>
+            {
+                int indexA = list.IndexOf(a) + 1;
+                int indexB = list.IndexOf(b) + 1;
+                if (fosterData.maintainBonusSteps.IndexOf(indexA) >= 0 && fosterData.maintainBonusSteps.IndexOf(indexB) < 0)
+                {
+                    return -1;
+                }
+                else if (fosterData.maintainBonusSteps.IndexOf(indexA) < 0 && fosterData.maintainBonusSteps.IndexOf(indexB) >= 0)
+                {
+                    return 1;
+                }
+                return 0;
+            });
+            return list;
+        }
+
+        //奖励领取状态
+        public bool GetRewardState(int suitId, int step)
+        {
+            SuitFosterData fosterData = GetSuitFosterData(suitId);
+
+            return fosterData.maintainBonusSteps.IndexOf(step) > 0;
+        }
+        //当前奖励状态:state 0:未领1:不可领2:已完成
+        //当前奖励Index
+        public void GetFosterRewardState(int suitId, out int state, out int index)
+        {
+            index = 0;
+            SuitFosterData fosterData = GetSuitFosterData(suitId);
+            int finishStep = fosterData.maintainStep;
+
+            SuitFosterCfg[] cfg = SuitFosterCfgArray.Instance.GetCfgs(suitId);
+            for (int i = 0; i < cfg.Length; i++)
+            {
+                if (cfg[i].rewardsArr.Length == 0) continue;
+                index = i;
+                int _step = i + 1;
+                if (_step <= finishStep && fosterData.maintainBonusSteps.IndexOf(_step) < 0)
+                {
+                    state = 0;
+                    return;
+                }
+                if (_step > finishStep)
+                {
+                    state = 1;
+                    return;
+                }
+            }
+            state = 2;
+        }
     }
 }

+ 77 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComFosterReward.cs

@@ -0,0 +1,77 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.ClothingFoster
+{
+    public partial class UI_ComFosterReward
+    {
+        public GComponent target;
+        public Controller m_c1;
+        public GLoader m_loaReward;
+        public GImage m_imgRed;
+        public const string URL = "ui://uicwtr5bnk8d13";
+        public const string PACKAGE_NAME = "ClothingFoster";
+        public const string RES_NAME = "ComFosterReward";
+        private static UI_ComFosterReward _proxy;
+
+        public static UI_ComFosterReward Create(GObject gObject = null)
+        {
+            var ui = new UI_ComFosterReward();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ComFosterReward Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComFosterReward();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_c1 = comp.GetController("c1");
+            m_loaReward = (GLoader)comp.GetChild("loaReward");
+            m_imgRed = (GImage)comp.GetChild("imgRed");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_c1 = null;
+            m_loaReward = null;
+            m_imgRed = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_Button7.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComFosterReward.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e0c6d38a6ed7a5c40b6e090808a1b0e4
+guid: 8646b42c8f97cb445bf59057d3ec46f3
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComRenewReward.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.ClothingFoster
+{
+    public partial class UI_ComRenewReward
+    {
+        public GComponent target;
+        public GLoader m_loaReward;
+        public const string URL = "ui://uicwtr5bnk8d14";
+        public const string PACKAGE_NAME = "ClothingFoster";
+        public const string RES_NAME = "ComRenewReward";
+        private static UI_ComRenewReward _proxy;
+
+        public static UI_ComRenewReward Create(GObject gObject = null)
+        {
+            var ui = new UI_ComRenewReward();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ComRenewReward Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComRenewReward();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_loaReward = (GLoader)comp.GetChild("loaReward");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaReward = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComRenewReward.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d4bc7cea0454e794ab9ead6a9c7f2c55
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComRenewRewardGet.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.ClothingFoster
+{
+    public partial class UI_ComRenewRewardGet
+    {
+        public GComponent target;
+        public GLoader m_loaReward;
+        public const string URL = "ui://uicwtr5bnk8d15";
+        public const string PACKAGE_NAME = "ClothingFoster";
+        public const string RES_NAME = "ComRenewRewardGet";
+        private static UI_ComRenewRewardGet _proxy;
+
+        public static UI_ComRenewRewardGet Create(GObject gObject = null)
+        {
+            var ui = new UI_ComRenewRewardGet();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ComRenewRewardGet Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComRenewRewardGet();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_loaReward = (GLoader)comp.GetChild("loaReward");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaReward = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ComRenewRewardGet.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8fd16ef696f4dce498920b7d9c2ee8ba
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitRenewFinishUI.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.ClothingFoster
+{
+    public partial class UI_SuitRenewFinishUI
+    {
+        public GComponent target;
+        public GTextField m_txtProperty;
+        public const string URL = "ui://uicwtr5bnk8d16";
+        public const string PACKAGE_NAME = "ClothingFoster";
+        public const string RES_NAME = "SuitRenewFinishUI";
+        private static UI_SuitRenewFinishUI _proxy;
+
+        public static UI_SuitRenewFinishUI Create(GObject gObject = null)
+        {
+            var ui = new UI_SuitRenewFinishUI();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_SuitRenewFinishUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_SuitRenewFinishUI();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_txtProperty = (GTextField)comp.GetChild("txtProperty");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_txtProperty = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitRenewFinishUI.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ceaae0af2c7bb6c4eac7c0a96795556b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 52 - 10
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitUI.cs

@@ -8,6 +8,7 @@ namespace UI.ClothingFoster
     {
         public GComponent target;
         public Controller m_c1;
+        public Controller m_c2;
         public GLoader m_bg;
         public GGraph m_holder;
         public GButton m_btnBack;
@@ -15,12 +16,24 @@ namespace UI.ClothingFoster
         public GLoader m_loaRarity;
         public GLoader m_btnRight;
         public GLoader m_btnLeft;
-        public GButton m_btnFoster;
-        public GButton m_btnRenew;
-        public UI_Button7 m_btnReward;
+        public GButton m_btnTabFoster;
+        public GButton m_btnTabRenew;
+        public UI_ComFosterReward m_comFosterReward;
         public GButton m_btnPropertyShow;
         public GList m_listProperty;
         public GList m_listFoster;
+        public UI_comFosterAni m_comFosterAni;
+        public GGroup m_grpFoster;
+        public GTextField m_txtRenewProperty;
+        public UI_ComRenewReward m_comRenewReward;
+        public GList m_listRenewMaterial;
+        public GComponent m_comRenewCost;
+        public GButton m_btnRenew;
+        public GTextField m_txtRenewTips;
+        public GGroup m_grpRenew;
+        public GTextField m_txtRenewShow;
+        public UI_ComRenewRewardGet m_comRenewRewardGet;
+        public GGroup m_grpRenewFinish;
         public const string URL = "ui://uicwtr5bpy5gf";
         public const string PACKAGE_NAME = "ClothingFoster";
         public const string RES_NAME = "SuitUI";
@@ -69,6 +82,7 @@ namespace UI.ClothingFoster
         private void Init(GComponent comp)
         {
             m_c1 = comp.GetController("c1");
+            m_c2 = comp.GetController("c2");
             m_bg = (GLoader)comp.GetChild("bg");
             m_holder = (GGraph)comp.GetChild("holder");
             m_btnBack = (GButton)comp.GetChild("btnBack");
@@ -76,16 +90,29 @@ namespace UI.ClothingFoster
             m_loaRarity = (GLoader)comp.GetChild("loaRarity");
             m_btnRight = (GLoader)comp.GetChild("btnRight");
             m_btnLeft = (GLoader)comp.GetChild("btnLeft");
-            m_btnFoster = (GButton)comp.GetChild("btnFoster");
-            m_btnRenew = (GButton)comp.GetChild("btnRenew");
-            m_btnReward = (UI_Button7)UI_Button7.Create(comp.GetChild("btnReward"));
+            m_btnTabFoster = (GButton)comp.GetChild("btnTabFoster");
+            m_btnTabRenew = (GButton)comp.GetChild("btnTabRenew");
+            m_comFosterReward = (UI_ComFosterReward)UI_ComFosterReward.Create(comp.GetChild("comFosterReward"));
             m_btnPropertyShow = (GButton)comp.GetChild("btnPropertyShow");
             m_listProperty = (GList)comp.GetChild("listProperty");
             m_listFoster = (GList)comp.GetChild("listFoster");
+            m_comFosterAni = (UI_comFosterAni)UI_comFosterAni.Create(comp.GetChild("comFosterAni"));
+            m_grpFoster = (GGroup)comp.GetChild("grpFoster");
+            m_txtRenewProperty = (GTextField)comp.GetChild("txtRenewProperty");
+            m_comRenewReward = (UI_ComRenewReward)UI_ComRenewReward.Create(comp.GetChild("comRenewReward"));
+            m_listRenewMaterial = (GList)comp.GetChild("listRenewMaterial");
+            m_comRenewCost = (GComponent)comp.GetChild("comRenewCost");
+            m_btnRenew = (GButton)comp.GetChild("btnRenew");
+            m_txtRenewTips = (GTextField)comp.GetChild("txtRenewTips");
+            m_grpRenew = (GGroup)comp.GetChild("grpRenew");
+            m_txtRenewShow = (GTextField)comp.GetChild("txtRenewShow");
+            m_comRenewRewardGet = (UI_ComRenewRewardGet)UI_ComRenewRewardGet.Create(comp.GetChild("comRenewRewardGet"));
+            m_grpRenewFinish = (GGroup)comp.GetChild("grpRenewFinish");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
+            m_c2 = null;
             m_bg = null;
             m_holder = null;
             m_btnBack = null;
@@ -93,13 +120,28 @@ namespace UI.ClothingFoster
             m_loaRarity = null;
             m_btnRight = null;
             m_btnLeft = null;
-            m_btnFoster = null;
-            m_btnRenew = null;
-            m_btnReward.Dispose();
-            m_btnReward = null;
+            m_btnTabFoster = null;
+            m_btnTabRenew = null;
+            m_comFosterReward.Dispose();
+            m_comFosterReward = null;
             m_btnPropertyShow = null;
             m_listProperty = null;
             m_listFoster = null;
+            m_comFosterAni.Dispose();
+            m_comFosterAni = null;
+            m_grpFoster = null;
+            m_txtRenewProperty = null;
+            m_comRenewReward.Dispose();
+            m_comRenewReward = null;
+            m_listRenewMaterial = null;
+            m_comRenewCost = null;
+            m_btnRenew = null;
+            m_txtRenewTips = null;
+            m_grpRenew = null;
+            m_txtRenewShow = null;
+            m_comRenewRewardGet.Dispose();
+            m_comRenewRewardGet = null;
+            m_grpRenewFinish = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 16 - 16
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_Button7.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_comFosterAni.cs

@@ -4,37 +4,37 @@ using FairyGUI;
 
 namespace UI.ClothingFoster
 {
-    public partial class UI_Button7
+    public partial class UI_comFosterAni
     {
-        public GButton target;
-        public Controller m_get;
-        public const string URL = "ui://uicwtr5bpy5go";
+        public GComponent target;
+        public GProgressBar m_proFoster;
+        public const string URL = "ui://uicwtr5bnk8d17";
         public const string PACKAGE_NAME = "ClothingFoster";
-        public const string RES_NAME = "Button7";
-        private static UI_Button7 _proxy;
+        public const string RES_NAME = "comFosterAni";
+        private static UI_comFosterAni _proxy;
 
-        public static UI_Button7 Create(GObject gObject = null)
+        public static UI_comFosterAni Create(GObject gObject = null)
         {
-            var ui = new UI_Button7();
+            var ui = new UI_comFosterAni();
             if(gObject == null)
-            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
-            	ui.target =  (GButton)gObject;
+            	ui.target =  (GComponent)gObject;
             ui.Init(ui.target);
             return ui;
         }
 
-        public static UI_Button7 Proxy(GObject gObject = null)
+        public static UI_comFosterAni Proxy(GObject gObject = null)
         {
             if(_proxy == null)
             {
-                _proxy = new UI_Button7();
+                _proxy = new UI_comFosterAni();
             }
             var ui = _proxy;
             if(gObject == null)
-            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
-            	ui.target =  (GButton)gObject;
+            	ui.target =  (GComponent)gObject;
             ui.Init(ui.target);
             return ui;
         }
@@ -55,11 +55,11 @@ namespace UI.ClothingFoster
 
         private void Init(GComponent comp)
         {
-            m_get = comp.GetController("get");
+            m_proFoster = (GProgressBar)comp.GetChild("proFoster");
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_get = null;
+            m_proFoster = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_comFosterAni.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d11a4466cdadb3f4b8f8fe44655662c1
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Utils/SuitUtil.cs

@@ -189,8 +189,8 @@ namespace GFGGame
                 }
             }
 
-            SuitFosterCfg[] dataArray = SuitFosterCfgArray.Instance.dataArray;
-            foreach (SuitFosterCfg suitCfg in dataArray)
+            SuitFosterListCfg[] dataArray = SuitFosterListCfgArray.Instance.dataArray;
+            foreach (SuitFosterListCfg suitCfg in dataArray)
             {
                 CheckToAdd(suitCfg.suitId);
             }

+ 25 - 2
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitFosterView.cs

@@ -1,3 +1,5 @@
+using System.Collections;
+using ET;
 using FairyGUI;
 using UI.ClothingFoster;
 using UI.CommonGame;
@@ -9,6 +11,8 @@ namespace GFGGame
 
         private int _suitId;
         private int _index;
+        private SortedList _propertyList;
+        private SortedList _addPropertyList;
         private bool _canFoster;
         public override void Dispose()
         {
@@ -24,10 +28,11 @@ namespace GFGGame
             _ui = UI_SuitFosterUI.Create();
             this.viewCom = _ui.target;
             this.viewCom.Center();
-            // this.modal = true;
+            this.modal = true;
             // viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
 
             _ui.m_listMaterials.itemRenderer = ListMaterialItemRender;
+            _ui.m_listMaterials.onClickItem.Add(OnListMaterialsItem);
             _ui.m_listPropertyAdd.itemRenderer = ListPropertyItemRender;
             _ui.m_btnFoster.onClick.Add(OnClickBtnFoster);
         }
@@ -37,7 +42,8 @@ namespace GFGGame
             base.OnShown();
             _suitId = (int)(this.viewData as object[])[0];
             _index = (int)(this.viewData as object[])[1];
-
+            _propertyList = (this.viewData as object[])[2] as SortedList;
+            _addPropertyList = (this.viewData as object[])[3] as SortedList;
             _canFoster = true;
 
             SuitFosterCfg cfg = SuitFosterCfgArray.Instance.GetCfgs(_suitId)[_index];
@@ -49,6 +55,7 @@ namespace GFGGame
             comConsume.m_txtNeed.text = need.ToString();
             if (_canFoster && has < need) _canFoster = false;
 
+            _ui.m_listPropertyAdd.numItems = _propertyList.Count;
         }
 
         protected override void OnHide()
@@ -67,10 +74,24 @@ namespace GFGGame
             int need = materialsArr[index][1];
             item.m_txtNeed.text = StringUtil.GetColorText(need.ToString(), has >= need ? "#DD994A" : "#DD994A");
             if (_canFoster && has < need) _canFoster = false;
+            item.target.data = materialsArr[index][0];
+        }
+        private void OnListMaterialsItem(EventContext context)
+        {
+            int itemId = (int)(context.data as GComponent).data;
+            GoodsItemTipsController.ShowItemTips(itemId);
         }
+
         private void ListPropertyItemRender(int index, GObject obj)
         {
             UI_ListPropertyAddItem item = UI_ListPropertyAddItem.Proxy(obj);
+            UI_ListPropertyItem comProperty = UI_ListPropertyItem.Proxy(item.m_comProperty);
+
+            int score = (int)_propertyList.GetKey(index);
+            comProperty.m_txtProperty.text = _propertyList[score].ToString();
+            comProperty.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (score));
+
+            item.m_txtAdd.text = _addPropertyList.GetByIndex(index).ToString();
         }
         private void OnClickBtnFoster()
         {
@@ -79,6 +100,8 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt("材料不足");
                 return;
             }
+            SuitFosterHelper.SendMaintainSuit(_suitId, _index + 1).Coroutine();
+
         }
     }
 }

+ 46 - 0
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitRenewFinishView.cs

@@ -0,0 +1,46 @@
+using FairyGUI;
+using UI.ClothingFoster;
+namespace GFGGame
+{
+    public class SuitRenewFinishView : BaseWindow
+    {
+        private UI_SuitRenewFinishUI _ui;
+        private int _suitId;
+        public override void Dispose()
+        {
+
+            base.Dispose();
+        }
+
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_SuitRenewFinishUI.PACKAGE_NAME;
+            _ui = UI_SuitRenewFinishUI.Create();
+            this.viewCom = _ui.target;
+            this.viewCom.Center();
+            this.modal = true;
+            // viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
+
+        }
+
+        protected override void OnShown()
+        {
+            base.OnShown();
+            _suitId = (int)this.viewData;
+            int suitrarity = SuitCfgArray.Instance.GetCfg(_suitId).rarity;
+            SuitRenewCfg renewCfg = SuitRenewCfgArray.Instance.GetCfg(suitrarity);
+            _ui.m_txtProperty.text = string.Format("套装所有部件属性+{0}%", renewCfg.addition * 100 / 10000);
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+
+            SuitFosterListCfg cfg = SuitFosterListCfgArray.Instance.GetCfg(_suitId);
+            ViewManager.Show<RewardView>(ItemUtil.CreateItemDataList(cfg.renewRewardsArr));
+
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitRenewFinishView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1fed0fac5105a6c40abe9ef251096979
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 10 - 7
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitRewardView.cs

@@ -1,3 +1,4 @@
+using System.Collections;
 using FairyGUI;
 using UI.ClothingFoster;
 namespace GFGGame
@@ -6,7 +7,7 @@ namespace GFGGame
     {
         private UI_SuitRewardUI _ui;
         private int _suitId;
-        private string[] stageNames = { "浆洗", "晾晒", "熏香", "熨烫", "整饬" };
+        private SortedList _rewardsList;
 
         public override void Dispose()
         {
@@ -24,14 +25,15 @@ namespace GFGGame
             this.viewCom.Center();
             this.modal = true;
 
-            _ui.m_listReward.itemRenderer = ListRewardRecder;
+            _ui.m_listReward.itemRenderer = ListRewardRender;
         }
 
         protected override void OnShown()
         {
             base.OnShown();
             _suitId = (int)this.viewData;
-            _ui.m_listReward.numItems = SuitFosterCfgArray.Instance.GetCfgs(_suitId).Length;
+            _rewardsList = SuitFosterDataManager.Instance.GetSuitFosterRewards(_suitId);
+            _ui.m_listReward.numItems = _rewardsList.Count;
         }
 
         protected override void OnHide()
@@ -39,11 +41,12 @@ namespace GFGGame
             base.OnHide();
         }
 
-        private void ListRewardRecder(int index, GObject obj)
+        private void ListRewardRender(int index, GObject obj)
         {
             UI_ListRewardItem item = UI_ListRewardItem.Proxy(obj);
-            SuitFosterCfg cfg = SuitFosterCfgArray.Instance.GetCfgs(_suitId)[index];
-            item.m_txtDiscribe.text = string.Format("完成套装{0}获得", stageNames[index]);
+            SuitFosterCfg cfg = (SuitFosterCfg)_rewardsList.GetByIndex(index);
+            int key = (int)_rewardsList.GetKey(index);
+            item.m_txtDiscribe.text = string.Format("完成套装{0}获得", SuitFosterDataManager.Instance.stepNames[key - 1]);
             ItemData itemData = new ItemData();
             itemData.id = cfg.rewardsArr[0][0];
             itemData.num = cfg.rewardsArr[0][1];
@@ -52,7 +55,7 @@ namespace GFGGame
                 obj.data = new ItemView(item.m_ComReward);
             }
             (obj.data as ItemView).SetData(itemData);
-            // (obj.data as ItemView).ImgGotVisible = data.isGet == 1 ? true : false;
+            (obj.data as ItemView).ImgGotVisible = SuitFosterDataManager.Instance.GetRewardState(_suitId, key);
         }
     }
 }

+ 194 - 20
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitView.cs

@@ -2,7 +2,9 @@ using System.Collections;
 using System.Collections.Generic;
 using FairyGUI;
 using UI.ClothingFoster;
+using UI.CommonGame;
 using UnityEngine;
+using ET;
 
 namespace GFGGame
 {
@@ -18,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()
         {
 
@@ -45,11 +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()
@@ -80,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);
@@ -98,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;
@@ -134,33 +153,188 @@ 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)
         {
             UI_ListFosterItem item = UI_ListFosterItem.Proxy(obj);
             item.target.data = index;
+            item.m_finish.selectedIndex = SuitFosterDataManager.Instance.GetFosterState(_suitId, index);
             if (SuitFosterDataManager.Instance.GetSuitFosterData(_suitId).maintainStep == index)
             {
                 _index = index;
             }
         }
+
+        private void ListPropertyItemRender(int index, GObject obj)
+        {
+            UI_ListPropertyItem item = UI_ListPropertyItem.Proxy(obj);
+            int score = (int)_propertyList.GetKey(index);
+            item.m_txtProperty.text = _propertyList[score].ToString();
+            item.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (score));
+        }
+
         private void OnClickListFosterItem(EventContext context)
         {
             int index = (int)(context.data as GObject).data;
-            if (index == _index)
+            int state = SuitFosterDataManager.Instance.GetFosterState(_suitId, index);
+            if (state == 0)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("已完成该阶段");
+            }
+            else if (state == 1)
+            {
+                ViewManager.Show<SuitFosterView>(new object[] { _suitId, index, _propertyList, _addPropertyList });
+            }
+            else
             {
-                ViewManager.Show<SuitFosterView>(new object[] { _suitId, index });
+                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();
+        }
     }
 }

BIN
GameClient/Assets/ResIn/UI/ClothingFoster/ClothingFoster_atlas0.png


BIN
GameClient/Assets/ResIn/UI/ClothingFoster/ClothingFoster_fui.bytes