Browse Source

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

# Conflicts:
#	GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes
guodong 3 years ago
parent
commit
2bfffb3b69
56 changed files with 725 additions and 417 deletions
  1. 3 3
      FGUIProject/assets/Common/FloatingTextPromptErrUI.xml
  2. 4 4
      FGUIProject/assets/Common/FloatingTextPromptNarmalUI.xml
  3. BIN
      FGUIProject/assets/Common/imagesExport/zx_jq_rwbszik_normal.png
  4. 1 1
      FGUIProject/assets/Common/package.xml
  5. 1 1
      FGUIProject/assets/Studio/StudioEctypeUI.xml
  6. 2 2
      FGUIProject/assets/Studio/StudioUI.xml
  7. 4 6
      FGUIProject/assets/Studio/components/ListPropertyItem.xml
  8. 12 12
      FGUIProject/assets/Studio/package.xml
  9. 10 0
      GameClient/Assets/Game/HotUpdate/Constant/ConstBuyType.cs
  10. 1 1
      GameClient/Assets/Game/HotUpdate/Constant/ConstBuyType.cs.meta
  11. 4 0
      GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs
  12. 15 15
      GameClient/Assets/Game/HotUpdate/Constant/ConstStoreId.cs
  13. 2 2
      GameClient/Assets/Game/HotUpdate/Controller/BuyConfirmController.cs
  14. 2 2
      GameClient/Assets/Game/HotUpdate/Controller/BuyItemConteoller.cs
  15. 2 2
      GameClient/Assets/Game/HotUpdate/Controller/BuyTipsController.cs
  16. 8 1
      GameClient/Assets/Game/HotUpdate/Controller/ErrorCodeController.cs
  17. 19 17
      GameClient/Assets/Game/HotUpdate/Controller/PromptController.cs
  18. 5 5
      GameClient/Assets/Game/HotUpdate/Data/Cache/LuckyBoxBonusDataCache.cs
  19. 24 3
      GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs
  20. 1 3
      GameClient/Assets/Game/HotUpdate/Data/ScoreSystemData.cs
  21. 12 0
      GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs
  22. 11 0
      GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs.meta
  23. 14 0
      GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs
  24. 59 55
      GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager/ClothingShopCfgManager.cs
  25. 77 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListPropertyItem.cs
  26. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListPropertyItem.cs.meta
  27. 24 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/ItemExchangeSProxy.cs
  28. 11 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/ItemExchangeSProxy.cs.meta
  29. 18 2
      GameClient/Assets/Game/HotUpdate/ServerProxy/MainStorySProxy.cs
  30. 23 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs
  31. 11 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs.meta
  32. 1 1
      GameClient/Assets/Game/HotUpdate/ServerProxy/StudioSProxy.cs
  33. 11 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/StudioSProxy.cs.meta
  34. 13 81
      GameClient/Assets/Game/HotUpdate/Utils/ItemUtil.cs
  35. 12 4
      GameClient/Assets/Game/HotUpdate/Utils/NumberUtil.cs
  36. 5 3
      GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs
  37. 2 2
      GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs
  38. 39 34
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyConfirmView.cs
  39. 131 83
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyCountView.cs
  40. 15 15
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyTipsView.cs
  41. 1 1
      GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs
  42. 21 11
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterView.cs
  43. 10 10
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs
  44. 14 14
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs
  45. 5 3
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBaseView.cs
  46. 5 5
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBuyNumView.cs
  47. 2 0
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFabricView.cs
  48. 2 0
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioMetalView.cs
  49. 44 12
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioPropertyView.cs
  50. 1 1
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioView.cs
  51. BIN
      GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes
  52. BIN
      GameClient/Assets/ResIn/UI/Common/Common_atlas0!a.png
  53. BIN
      GameClient/Assets/ResIn/UI/Common/Common_atlas0.png
  54. BIN
      GameClient/Assets/ResIn/UI/Common/Common_fui.bytes
  55. BIN
      GameClient/Assets/ResIn/UI/Studio/Studio_atlas0.png
  56. BIN
      GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes

+ 3 - 3
FGUIProject/assets/Common/FloatingTextPromptErrUI.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<component size="354,40" opaque="false">
+<component size="376,70" opaque="false">
   <displayList>
   <displayList>
-    <image id="n2_s2cc" name="n2" src="s2cc4l" fileName="imagesExport/zx_jq_rwbszik.png" xy="0,0" size="354,40">
+    <image id="n2_s2cc" name="n2" src="s2cc4l" fileName="imagesExport/zx_jq_rwbszik.png" xy="0,15">
       <relation target="n4_s2cc" sidePair="width-width"/>
       <relation target="n4_s2cc" sidePair="width-width"/>
     </image>
     </image>
-    <text id="n4_s2cc" name="txtMessage" xy="85,-1" size="184,41" fontSize="30" color="#ffffff" align="center" singleLine="true" autoClearText="true" text="这是一个提示">
+    <text id="n4_s2cc" name="txtMessage" xy="96,13" size="182,42" fontSize="30" color="#ffffff" align="center" singleLine="true" autoClearText="true" text="这是一个提示">
       <relation target="n2_s2cc" sidePair="center-center"/>
       <relation target="n2_s2cc" sidePair="center-center"/>
     </text>
     </text>
   </displayList>
   </displayList>

+ 4 - 4
FGUIProject/assets/Common/FloatingTextPromptNarmalUI.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<component size="354,40" opaque="false">
+<component size="1040,70" pivot="0.5,0.5" anchor="true" opaque="false">
   <displayList>
   <displayList>
-    <image id="n2_s2cc" name="n2" src="qp4l4q" fileName="imagesExport/zx_jq_rwbszik_normal.png" xy="0,0" size="354,40">
-      <relation target="n4_s2cc" sidePair="width-width"/>
+    <image id="n2_s2cc" name="n2" src="qp4l4q" fileName="imagesExport/zx_jq_rwbszik_normal.png" xy="520,35" pivot="0.5,0.5" anchor="true">
+      <relation target="" sidePair="center-center"/>
     </image>
     </image>
-    <text id="n4_s2cc" name="txtMessage" xy="85,-1" size="184,41" fontSize="30" color="#ffffff" align="center" singleLine="true" autoClearText="true" text="这是一个提示">
+    <text id="n4_s2cc" name="txtMessage" xy="520,35" pivot="0.5,0.5" anchor="true" size="324,44" fontSize="32" color="#e8dbb3" align="center" singleLine="true" autoClearText="true" text="今日购买次数已达上限">
       <relation target="n2_s2cc" sidePair="center-center"/>
       <relation target="n2_s2cc" sidePair="center-center"/>
     </text>
     </text>
   </displayList>
   </displayList>

BIN
FGUIProject/assets/Common/imagesExport/zx_jq_rwbszik_normal.png


+ 1 - 1
FGUIProject/assets/Common/package.xml

@@ -4,7 +4,7 @@
     <component id="q08x7" name="Button2.xml" path="/components/" exported="true"/>
     <component id="q08x7" name="Button2.xml" path="/components/" exported="true"/>
     <component id="q08x6" name="Button1.xml" path="/components/" exported="true"/>
     <component id="q08x6" name="Button1.xml" path="/components/" exported="true"/>
     <component id="s2cc4k" name="FloatingTextPromptErrUI.xml" path="/" exported="true"/>
     <component id="s2cc4k" name="FloatingTextPromptErrUI.xml" path="/" exported="true"/>
-    <image id="s2cc4l" name="zx_jq_rwbszik.png" path="/imagesExport/" exported="true" scale="9grid" scale9grid="197,10,6,20"/>
+    <image id="s2cc4l" name="zx_jq_rwbszik.png" path="/imagesExport/" exported="true" scale="9grid" scale9grid="153,7,76,19"/>
     <component id="d4iw4m" name="ModalStatusUI.xml" path="/" exported="true"/>
     <component id="d4iw4m" name="ModalStatusUI.xml" path="/" exported="true"/>
     <image id="q08xo" name="ANNIU_3.png" path="/imagesExport/" exported="true"/>
     <image id="q08xo" name="ANNIU_3.png" path="/imagesExport/" exported="true"/>
     <component id="q08xu" name="Button3.xml" path="/components/" exported="true"/>
     <component id="q08xu" name="Button3.xml" path="/components/" exported="true"/>

+ 1 - 1
FGUIProject/assets/Studio/StudioEctypeUI.xml

@@ -19,7 +19,7 @@
       <item/>
       <item/>
       <item/>
       <item/>
     </list>
     </list>
-    <list id="n16_n3xh" name="list" xy="39,516" pivot="0.5,0" size="1002,1406" overflow="scroll" lineGap="63" defaultItem="ui://xz8kxrecn3xha" align="center">
+    <list id="n16_n3xh" name="list" xy="39,516" pivot="0.5,0" size="1002,1406" overflow="scroll" scrollBarFlags="2" lineGap="63" defaultItem="ui://xz8kxrecn3xha" align="center">
       <gearXY controller="c1" pages="0,1" values="39,320|39,516"/>
       <gearXY controller="c1" pages="0,1" values="39,320|39,516"/>
       <gearSize controller="c1" pages="0,1" values="1002,1600,1,1|1002,1406,1,1"/>
       <gearSize controller="c1" pages="0,1" values="1002,1600,1,1|1002,1406,1,1"/>
       <relation target="" sidePair="bottomext-bottom"/>
       <relation target="" sidePair="bottomext-bottom"/>

+ 2 - 2
FGUIProject/assets/Studio/StudioUI.xml

@@ -7,11 +7,11 @@
     <component id="n1_rbxq" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n1_rbxq" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n2_rbxq" name="comMetal" src="rbxq5" fileName="components/ComEctype.xml" xy="840,910">
     <component id="n2_rbxq" name="comMetal" src="rbxq5" fileName="components/ComEctype.xml" xy="840,910">
       <relation target="" sidePair="right-right,bottom-bottom"/>
       <relation target="" sidePair="right-right,bottom-bottom"/>
-      <property target="icon" propertyId="1" value="ui://xz8kxreckqhd19"/>
+      <property target="icon" propertyId="1" value="ui://xz8kxreckqhd17"/>
     </component>
     </component>
     <component id="n3_rbxq" name="comFabric" src="rbxq5" fileName="components/ComEctype.xml" xy="30,1064">
     <component id="n3_rbxq" name="comFabric" src="rbxq5" fileName="components/ComEctype.xml" xy="30,1064">
       <relation target="" sidePair="left-left,bottom-bottom"/>
       <relation target="" sidePair="left-left,bottom-bottom"/>
-      <property target="icon" propertyId="1" value="ui://xz8kxreckqhd17"/>
+      <property target="icon" propertyId="1" value="ui://xz8kxreckqhd19"/>
     </component>
     </component>
     <component id="n4_rbxq" name="comProperty" src="rbxq5" fileName="components/ComEctype.xml" xy="30,1345">
     <component id="n4_rbxq" name="comProperty" src="rbxq5" fileName="components/ComEctype.xml" xy="30,1345">
       <relation target="" sidePair="left-left,bottom-bottom"/>
       <relation target="" sidePair="left-left,bottom-bottom"/>

+ 4 - 6
FGUIProject/assets/Studio/components/ListPropertyItem.xml

@@ -1,16 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="174,174" extention="Button">
 <component size="174,174" extention="Button">
-  <controller name="button" pages="0,up,1,down,2,lock" selected="1"/>
+  <controller name="button" pages="0,up,1,down" selected="1"/>
   <displayList>
   <displayList>
-    <loader id="n8_kqhd" name="n8" xy="1,1" size="172,172" url="ui://xz8kxreckqhdu" autoSize="true">
+    <loader id="n8_kqhd" name="icon0" xy="1,1" size="172,172" url="ui://xz8kxreckqhdu" autoSize="true">
       <gearDisplay controller="button" pages="1"/>
       <gearDisplay controller="button" pages="1"/>
     </loader>
     </loader>
-    <loader id="n9_kqhd" name="n9" xy="1,0" size="172,173" url="ui://xz8kxreckqhdq" autoSize="true">
+    <loader id="n9_kqhd" name="icon1" xy="1,0" size="172,173" url="ui://xz8kxreckqhdq" autoSize="true">
       <gearDisplay controller="button" pages="0"/>
       <gearDisplay controller="button" pages="0"/>
     </loader>
     </loader>
-    <loader id="n10_kqhd" name="n10" xy="0,0" size="174,174" url="ui://xz8kxreckqhd12" autoSize="true">
-      <gearDisplay controller="button" pages="2"/>
-    </loader>
+    <loader id="n10_kqhd" name="icon2" xy="0,0" size="174,174" url="ui://xz8kxreckqhd12" autoSize="true"/>
   </displayList>
   </displayList>
   <Button mode="Radio"/>
   <Button mode="Radio"/>
 </component>
 </component>

+ 12 - 12
FGUIProject/assets/Studio/package.xml

@@ -12,22 +12,22 @@
     <component id="n3xhn" name="ListPropertyItem.xml" path="/components/"/>
     <component id="n3xhn" name="ListPropertyItem.xml" path="/components/"/>
     <image id="kqhdo" name="zpsxian_1.png" path="/images/"/>
     <image id="kqhdo" name="zpsxian_1.png" path="/images/"/>
     <image id="kqhdp" name="gzs_bjbj.png" path="/images/" atlas="alone_npot"/>
     <image id="kqhdp" name="gzs_bjbj.png" path="/images/" atlas="alone_npot"/>
-    <image id="kqhdq" name="gzsatb_1.png" path="/images/"/>
-    <image id="kqhdr" name="gzsatb_2.png" path="/images/"/>
+    <image id="kqhdq" name="gzsatb_1.png" path="/images/" exported="true"/>
+    <image id="kqhdr" name="gzsatb_2.png" path="/images/" exported="true"/>
     <image id="kqhds" name="gzsdi_1.png" path="/images/"/>
     <image id="kqhds" name="gzsdi_1.png" path="/images/"/>
     <image id="kqhdt" name="gzsdi_2.png" path="/images/"/>
     <image id="kqhdt" name="gzsdi_2.png" path="/images/"/>
-    <image id="kqhdu" name="gzsltb_1.png" path="/images/"/>
-    <image id="kqhdv" name="gzsltb_2.png" path="/images/"/>
-    <image id="kqhdw" name="gzsltb_3.png" path="/images/"/>
-    <image id="kqhdx" name="gzsltb_4.png" path="/images/"/>
+    <image id="kqhdu" name="gzsltb_1.png" path="/images/" exported="true"/>
+    <image id="kqhdv" name="gzsltb_2.png" path="/images/" exported="true"/>
+    <image id="kqhdw" name="gzsltb_3.png" path="/images/" exported="true"/>
+    <image id="kqhdx" name="gzsltb_4.png" path="/images/" exported="true"/>
     <image id="kqhdy" name="gzssuo.png" path="/images/"/>
     <image id="kqhdy" name="gzssuo.png" path="/images/"/>
     <image id="kqhdz" name="gzsxian_2.png" path="/images/" scale="9grid" scale9grid="0,635,0,681"/>
     <image id="kqhdz" name="gzsxian_2.png" path="/images/" scale="9grid" scale9grid="0,635,0,681"/>
-    <image id="kqhd10" name="gzsatb_3.png" path="/images/"/>
-    <image id="kqhd11" name="gzsatb_4.png" path="/images/"/>
-    <image id="kqhd12" name="gzswtb_1.png" path="/images/"/>
-    <image id="kqhd13" name="gzswtb_2.png" path="/images/"/>
-    <image id="kqhd14" name="gzswtb_3.png" path="/images/"/>
-    <image id="kqhd15" name="gzswtb_4.png" path="/images/"/>
+    <image id="kqhd10" name="gzsatb_3.png" path="/images/" exported="true"/>
+    <image id="kqhd11" name="gzsatb_4.png" path="/images/" exported="true"/>
+    <image id="kqhd12" name="gzswtb_1.png" path="/images/" exported="true"/>
+    <image id="kqhd13" name="gzswtb_2.png" path="/images/" exported="true"/>
+    <image id="kqhd14" name="gzswtb_3.png" path="/images/" exported="true"/>
+    <image id="kqhd15" name="gzswtb_4.png" path="/images/" exported="true"/>
     <image id="kqhd16" name="zjm_rk_11.png" path="/images/"/>
     <image id="kqhd16" name="zjm_rk_11.png" path="/images/"/>
     <image id="kqhd17" name="zjm_rk_8.png" path="/images/"/>
     <image id="kqhd17" name="zjm_rk_8.png" path="/images/"/>
     <image id="kqhd18" name="zjm_rk_9.png" path="/images/"/>
     <image id="kqhd18" name="zjm_rk_9.png" path="/images/"/>

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstBuyType.cs

@@ -0,0 +1,10 @@
+namespace GFGGame
+{
+    public class ConstBuyType
+    {
+        public const int TYPE_NORMAL = 0;//无类型兑换,无表格
+        public const int TYPE_ITEM = 1;//物品兑换,对应兑换表
+        public const int TYPE_SHOP = 2;//商店兑换,对应商店表
+
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/StudioProxy.cs.meta → GameClient/Assets/Game/HotUpdate/Constant/ConstBuyType.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
 fileFormatVersion: 2
-guid: 432ba2f20ee9b84479571e66d99caeee
+guid: b23433def6fb3d647b0aed7d6b9ac45d
 MonoImporter:
 MonoImporter:
   externalObjects: {}
   externalObjects: {}
   serializedVersion: 2
   serializedVersion: 2

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

@@ -36,5 +36,9 @@ namespace GFGGame
         public const string BUY_STUDIO_PLAY_TIMES = "BUY_STUDIO_PLAY_TIMES";
         public const string BUY_STUDIO_PLAY_TIMES = "BUY_STUDIO_PLAY_TIMES";
         public const string NOTICE_STUDIO_PLAY_TIMES = "NOTICE_STUDIO_PLAY_TIMES";
         public const string NOTICE_STUDIO_PLAY_TIMES = "NOTICE_STUDIO_PLAY_TIMES";
 
 
+        public const string NOTICE_MAINSTORY_BOXBONUS_STATE = "NOTICE_MAINSTORY_BOXBONUS_STATE";
+
+        public const string SHOP_BUY = "SHOP_BUY";
+
     }
     }
 }
 }

+ 15 - 15
GameClient/Assets/Game/HotUpdate/Constant/ConstStoreId.cs

@@ -5,10 +5,10 @@ namespace GFGGame
 {
 {
     public class ConstStoreId
     public class ConstStoreId
     {
     {
+        public const int CLOTHING_STORE_ID = 1;//服装店
+        public const int LUCKY_BOX_STORE_ID = 2;//抽卡兑换商店
+        public const int LUCKY_BOX_ACTIVITY_STORE_ID = 3;//抽卡活动兑换商店
         public const int DIAMOND_STORE_ID = 1;//钻石商店
         public const int DIAMOND_STORE_ID = 1;//钻石商店
-        public const int CLOTHING_STORE_ID = 2;//服装店
-        public const int LUCKY_BOX_STORE_ID = 3;//抽卡兑换商店
-        public const int LUCKY_BOX_ACTIVITY_STORE_ID = 4;//抽卡活动兑换商店
 
 
         public const string DIAMOND_STORE_TITLE = "钻石商城";//钻石商店
         public const string DIAMOND_STORE_TITLE = "钻石商城";//钻石商店
         public const string CLOTHING_STORE_TITLE = "服装店";//服装店
         public const string CLOTHING_STORE_TITLE = "服装店";//服装店
@@ -17,18 +17,18 @@ namespace GFGGame
 
 
         private static SortedList _storeTitleList;
         private static SortedList _storeTitleList;
 
 
-        public static SortedList CardStateList()
-        {
-            if (ConstStoreId._storeTitleList == null)
-            {
-                ConstStoreId._storeTitleList = new SortedList();
-                ConstStoreId._storeTitleList.Add(ConstStoreId.DIAMOND_STORE_ID, ConstStoreId.DIAMOND_STORE_TITLE);
-                ConstStoreId._storeTitleList.Add(ConstStoreId.CLOTHING_STORE_ID, ConstStoreId.CLOTHING_STORE_TITLE);
-                ConstStoreId._storeTitleList.Add(ConstStoreId.LUCKY_BOX_STORE_ID, ConstStoreId.LUCKY_BOX_STORE_TITLE);
-                ConstStoreId._storeTitleList.Add(ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID, ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_TITLE);
+        // public static SortedList CardStateList()
+        // {
+        //     if (ConstStoreId._storeTitleList == null)
+        //     {
+        //         ConstStoreId._storeTitleList = new SortedList();
+        //         ConstStoreId._storeTitleList.Add(ConstStoreId.DIAMOND_STORE_ID, ConstStoreId.DIAMOND_STORE_TITLE);
+        //         ConstStoreId._storeTitleList.Add(ConstStoreId.CLOTHING_STORE_ID, ConstStoreId.CLOTHING_STORE_TITLE);
+        //         ConstStoreId._storeTitleList.Add(ConstStoreId.LUCKY_BOX_STORE_ID, ConstStoreId.LUCKY_BOX_STORE_TITLE);
+        //         ConstStoreId._storeTitleList.Add(ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID, ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_TITLE);
 
 
-            }
-            return ConstStoreId._storeTitleList;
-        }
+        //     }
+        //     return ConstStoreId._storeTitleList;
+        // }
     }
     }
 }
 }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Controller/BuyConfirmController.cs

@@ -7,13 +7,13 @@ namespace GFGGame
     {
     {
         private static BuyConfirmView _buyConfirmView;
         private static BuyConfirmView _buyConfirmView;
 
 
-        public static void Show(int itemId, int count, int costId, int costCount, Action onSuccess, int times = 0, int maxTimes = 0, string message = "")
+        public static void Show(int itemId, int count, Action onSuccess = null, string message = "")
         {
         {
             if (_buyConfirmView == null)
             if (_buyConfirmView == null)
             {
             {
                 _buyConfirmView = new BuyConfirmView();
                 _buyConfirmView = new BuyConfirmView();
             }
             }
-            _buyConfirmView.SetParams(itemId, count, costId, costCount, onSuccess, times, maxTimes, message);
+            _buyConfirmView.SetParams(itemId, count, onSuccess, message);
             _buyConfirmView.Show();
             _buyConfirmView.Show();
         }
         }
 
 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Controller/BuyItemConteoller.cs

@@ -20,14 +20,14 @@ namespace GFGGame
         /// <param name="showTips">是否弹购买成功飘字,默认是</param>
         /// <param name="showTips">是否弹购买成功飘字,默认是</param>
         /// <param name="openSource">是否打开来源界面。默认否</param>
         /// <param name="openSource">是否打开来源界面。默认否</param>
         /// <param name="count">兑换总量</param>
         /// <param name="count">兑换总量</param>
-        public static void Show(int itemId, int costId, int perCount, int perCostCount, int count, Action onSuccess = null, bool showTips = true, bool openSource = false, int maxCount = 9990)
+        public static void Show(int itemId, int count, int buyType = ConstBuyType.TYPE_NORMAL, int shopType = 0, Action onSuccess = null, bool showTips = true, bool openSource = false, int maxCount = 9990)
         {
         {
             if (_buyCountView == null)
             if (_buyCountView == null)
             {
             {
                 _buyCountView = new BuyCountView();
                 _buyCountView = new BuyCountView();
             }
             }
             _buyCountView.Reset();
             _buyCountView.Reset();
-            _buyCountView.SetParams(itemId, costId, perCount, perCostCount, count, onSuccess, showTips, openSource, maxCount);
+            _buyCountView.SetParams(itemId, count, buyType, shopType, onSuccess, showTips, openSource, maxCount);
             _buyCountView.Show();
             _buyCountView.Show();
 
 
         }
         }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Controller/BuyTipsController.cs

@@ -7,13 +7,13 @@ namespace GFGGame
     {
     {
         private static BuyTipsView _buyTipsView;
         private static BuyTipsView _buyTipsView;
 
 
-        public static void Show(int itemId, int count, int costId, int costCount, Action onSuccess = null)
+        public static void Show(int itemId, int count, Action onSuccess = null)
         {
         {
             if (_buyTipsView == null)
             if (_buyTipsView == null)
             {
             {
                 _buyTipsView = new BuyTipsView();
                 _buyTipsView = new BuyTipsView();
             }
             }
-            _buyTipsView.SetParams(itemId, count, costId, costCount, onSuccess);
+            _buyTipsView.SetParams(itemId, count, onSuccess);
             _buyTipsView.Show();
             _buyTipsView.Show();
         }
         }
 
 

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

@@ -26,7 +26,8 @@ namespace GFGGame
             else if (errorCode == ET.ErrorCode.ERR_ClientVersionError)
             else if (errorCode == ET.ErrorCode.ERR_ClientVersionError)
             {
             {
                 Alert.Show("版本已更新,请联系研发获取最新版本")
                 Alert.Show("版本已更新,请联系研发获取最新版本")
-                    .SetLeftButton(true, "知道了", (data) => {
+                    .SetLeftButton(true, "知道了", (data) =>
+                    {
                         Application.Quit();
                         Application.Quit();
                     });
                     });
             }
             }
@@ -39,6 +40,12 @@ namespace GFGGame
 
 
                     });
                     });
             }
             }
+            else if (ErrorCodeCfgArray.Instance.GetCfg(errorCode) != null)
+            {
+                PromptController.Instance.ShowFloatTextPrompt(errorCode.ToString() + ErrorCodeCfgArray.Instance.GetCfg(errorCode).tips);
+                ET.Log.Error("errorCode" + errorCode.ToString());
+                return true;
+            }
             else
             else
             {
             {
                 PromptController.Instance.ShowFloatTextPrompt("errorCode " + errorCode.ToString());
                 PromptController.Instance.ShowFloatTextPrompt("errorCode " + errorCode.ToString());

+ 19 - 17
GameClient/Assets/Game/HotUpdate/Controller/PromptController.cs

@@ -26,7 +26,8 @@ namespace GFGGame
                 {
                 {
                     _uis.Remove(ui);
                     _uis.Remove(ui);
                     GTweener gTweener = ui.TweenFade(0, 0.5f);
                     GTweener gTweener = ui.TweenFade(0, 0.5f);
-                    gTweener.OnComplete(() => { 
+                    gTweener.OnComplete(() =>
+                    {
                         ui.RemoveFromParent();
                         ui.RemoveFromParent();
                         ui.Dispose();
                         ui.Dispose();
                     });
                     });
@@ -38,22 +39,23 @@ namespace GFGGame
         public void ShowFloatTextPrompt(string message, MessageType messageType = MessageType.ERR)
         public void ShowFloatTextPrompt(string message, MessageType messageType = MessageType.ERR)
         {
         {
             GComponent ui;
             GComponent ui;
-            switch(messageType)
-            {
-                case MessageType.WARNING:
-                    ui = UI_FloatingTextPromptWarningUI.Proxy().target;
-                    break;
-                case MessageType.NORMAL:
-                    ui = UI_FloatingTextPromptNarmalUI.Proxy().target;
-                    break;
-                case MessageType.SUCCESS:
-                    ui = UI_FloatingTextPromptSuccessUI.Proxy().target;
-                    break;
-                default:
-                    ui = UI_FloatingTextPromptErrUI.Proxy().target;
-                    break;
+            // switch(messageType)
+            // {
+            //     case MessageType.WARNING:
+            //         ui = UI_FloatingTextPromptWarningUI.Proxy().target;
+            //         break;
+            //     case MessageType.NORMAL:
+            //         ui = UI_FloatingTextPromptNarmalUI.Proxy().target;
+            //         break;
+            //     case MessageType.SUCCESS:
+            //         ui = UI_FloatingTextPromptSuccessUI.Proxy().target;
+            //         break;
+            //     default:
+            //         ui = UI_FloatingTextPromptErrUI.Proxy().target;
+            //         break;
 
 
-            }
+            // }
+            ui = UI_FloatingTextPromptNarmalUI.Proxy().target;
             ViewManager.AddChildToTopLayer(ui);
             ViewManager.AddChildToTopLayer(ui);
             GTextField textField = ui.GetChild("txtMessage") as GTextField;
             GTextField textField = ui.GetChild("txtMessage") as GTextField;
             textField.text = message;
             textField.text = message;
@@ -66,7 +68,7 @@ namespace GFGGame
                 MoveAllUp();
                 MoveAllUp();
                 GComponent preui = _uis[_uis.Count - 1];
                 GComponent preui = _uis[_uis.Count - 1];
                 ui.x = preui.x;
                 ui.x = preui.x;
-                ui.y = preui.y + 50;
+                ui.y = preui.y + 100;
             }
             }
             ui.data = ET.TimeHelper.ClientNow() + 3000;
             ui.data = ET.TimeHelper.ClientNow() + 3000;
             _uis.Add(ui);
             _uis.Add(ui);

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Data/Cache/LuckyBoxBonusDataCache.cs

@@ -149,9 +149,9 @@ namespace GFGGame
             }
             }
             else
             else
             {
             {
-                ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(itemId);
-                int costHasNum = ItemDataManager.GetItemNum(currencyRatioCfg.costId);
-                int costNeedNum = ItemUtil.GetCostItemCount(itemId, count - hasNum);
+
+                ItemExchangeCfgArray.Instance.GetMoneyIdAndNum(itemId, ItemDataManager.GetItemExchangeTimes(itemId), count, out int costId, out int costNeedNum, out int buyNum);
+                int costHasNum = ItemDataManager.GetItemNum(costId);
                 if (costHasNum >= costNeedNum)
                 if (costHasNum >= costNeedNum)
                 {
                 {
                     if (itemId == ConstItemID.GOLD)
                     if (itemId == ConstItemID.GOLD)
@@ -160,12 +160,12 @@ namespace GFGGame
                     }
                     }
                     else
                     else
                     {
                     {
-                        BuyTipsController.Show(itemId, count - hasNum, currencyRatioCfg.costId, costNeedNum, onSuccess);
+                        BuyTipsController.Show(itemId, count - hasNum, onSuccess);
                     }
                     }
                 }
                 }
                 else
                 else
                 {
                 {
-                    ItemUtil.ExchangeItemById(currencyRatioCfg.costId, costNeedNum - costHasNum, true, null, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED, true);
+                    ItemUtil.ExchangeItemById(costId, costNeedNum - costHasNum, true, null, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED, true);
                 }
                 }
             }
             }
         }
         }

+ 24 - 3
GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs

@@ -11,6 +11,7 @@ namespace GFGGame
     public class ItemDataManager
     public class ItemDataManager
     {
     {
         private static Dictionary<int, ItemData> _dataDic = new Dictionary<int, ItemData>();
         private static Dictionary<int, ItemData> _dataDic = new Dictionary<int, ItemData>();
+        private static Dictionary<int, int> _itemExchangeDic = new Dictionary<int, int>();
         delegate object MemberGetDelegate(ItemCfg p);
         delegate object MemberGetDelegate(ItemCfg p);
 
 
         public static void Add(int itemID, int itemNum)
         public static void Add(int itemID, int itemNum)
@@ -108,14 +109,34 @@ namespace GFGGame
 
 
         public static void InitServerDataItemAttribute(List<ItemAttributeProto> infos)
         public static void InitServerDataItemAttribute(List<ItemAttributeProto> infos)
         {
         {
-            foreach(var info in infos)
+            foreach (var info in infos)
             {
             {
-                if(_dataDic.TryGetValue(info.ConfigId, out var itemData))
+                if (_dataDic.TryGetValue(info.ConfigId, out var itemData))
                 {
                 {
                     itemData.SetAttributes(info.Ks, info.Vs);
                     itemData.SetAttributes(info.Ks, info.Vs);
                 }
                 }
             }
             }
         }
         }
+        public static void InitItemExchange(int itemId, int exchangTimes)
+        {
+            if (_itemExchangeDic.ContainsKey(itemId))
+            {
+                _itemExchangeDic[itemId] = exchangTimes;
+            }
+            else
+            {
+                _itemExchangeDic.Add(itemId, exchangTimes);
+            }
+        }
+        //»ñÈ¡ÎïÆ·ÒѶһ»´ÎÊý
+        public static int GetItemExchangeTimes(int itemId)
+        {
+            if (_itemExchangeDic.ContainsKey(itemId) == false)
+            {
+                InitItemExchange(itemId, 0);
+            }
+            return _itemExchangeDic[itemId];
+        }
 
 
         public static void SetAttribute(int itemId, int key, int value)
         public static void SetAttribute(int itemId, int key, int value)
         {
         {
@@ -177,7 +198,7 @@ namespace GFGGame
 
 
         public static int GetScore(int itemId, int scoreType)
         public static int GetScore(int itemId, int scoreType)
         {
         {
-            if(_dataDic.TryGetValue(itemId, out var itemData))
+            if (_dataDic.TryGetValue(itemId, out var itemData))
             {
             {
                 return itemData.GetScore(scoreType);
                 return itemData.GetScore(scoreType);
             }
             }

+ 1 - 3
GameClient/Assets/Game/HotUpdate/Data/ScoreSystemData.cs

@@ -153,12 +153,10 @@ namespace GFGGame
         {
         {
             skillScore = 0;
             skillScore = 0;
             showCard = false;
             showCard = false;
-            if (InstanceZonesDataManager.currentCardId <= 0)
+            if (!SkillDataManager.Instance.dicPassivitySkill.TryGetValue(InstanceZonesDataManager.currentCardId, out Dictionary<int, List<PassivitySkillCfg>> cfgs))
             {
             {
                 return;
                 return;
             }
             }
-            Dictionary<int, List<PassivitySkillCfg>> cfgs = SkillDataManager.Instance.dicPassivitySkill[InstanceZonesDataManager.currentCardId];
-
 
 
             foreach (int key in cfgs.Keys)
             foreach (int key in cfgs.Keys)
             {
             {

+ 12 - 0
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -0,0 +1,12 @@
+namespace GFGGame
+{
+    public class ShopDataManager : SingletonBase<ShopDataManager>
+    {
+        // public int SHOP_TYPE;
+
+        public void BuyItem(int itemId, int itemCount, int shopType, ShopCfg shopCfg)
+        {
+            BuyItemConteoller.Show(itemId, itemCount, ConstBuyType.TYPE_SHOP, shopType, null, true, false, GameConst.MAX_COUNT_TO_BUY_ITEMS);
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs.meta

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

+ 14 - 0
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs

@@ -103,6 +103,20 @@ namespace GFGGame
                 _autoPlay = value;
                 _autoPlay = value;
             }
             }
         }
         }
+        public int maxFightSpeed = 8;
+        private int _fightSpeed = 1;
+        public int fightSpeed
+        {
+            get
+            {
+                return _fightSpeed;
+            }
+            set
+            {
+
+                _fightSpeed = value;
+            }
+        }
         public void Dispose()
         public void Dispose()
         {
         {
             _sceneObj = null;
             _sceneObj = null;

+ 59 - 55
GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager/ClothingShopCfgManager.cs

@@ -4,21 +4,74 @@ namespace GFGGame
 {
 {
     public class ClothingShopCfgManager : SingletonBase<ClothingShopCfgManager>
     public class ClothingShopCfgManager : SingletonBase<ClothingShopCfgManager>
     {
     {
-        private bool _inited;
+
         private Dictionary<int, Dictionary<int, List<ShopCfg>>> _dataDic = new Dictionary<int, Dictionary<int, List<ShopCfg>>>();
         private Dictionary<int, Dictionary<int, List<ShopCfg>>> _dataDic = new Dictionary<int, Dictionary<int, List<ShopCfg>>>();
 
 
         public List<ShopCfg> GetList(int storeId, int typeIndex, int scoreType)
         public List<ShopCfg> GetList(int storeId, int typeIndex, int scoreType)
         {
         {
-            List<ShopCfg> list = new List<ShopCfg>();
-            InitData();
-            if (_dataDic.ContainsKey(storeId) && _dataDic[storeId].ContainsKey(typeIndex))
+            ShopCfg[] shopCfgs = null;
+            switch (storeId)
             {
             {
-                list = _dataDic[storeId][typeIndex];
-                SortItemListByScore(list, scoreType);
+                case ConstStoreId.CLOTHING_STORE_ID:
+                    shopCfgs = ShopCfgClothingArray.Instance.GetCfgs(typeIndex);
+                    break;
+                case ConstStoreId.LUCKY_BOX_STORE_ID:
+                    shopCfgs = ShopCfgCJArray.Instance.GetCfgs(typeIndex);
+
+                    break;
+                case ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID:
+                    shopCfgs = ShopCfgCJAArray.Instance.GetCfgs(typeIndex);
+                    break;
             }
             }
+            List<ShopCfg> list = new List<ShopCfg>(shopCfgs);
+            SortItemListByScore(list, scoreType);
             return list;
             return list;
         }
         }
 
 
+        private List<ShopCfg> ShopCfgs(int storeId)
+        {
+            ShopCfg[] shopCfgs = null;
+            switch (storeId)
+            {
+                case ConstStoreId.CLOTHING_STORE_ID:
+                    shopCfgs = ShopCfgClothingArray.Instance.dataArray;
+                    break;
+                case ConstStoreId.LUCKY_BOX_STORE_ID:
+                    shopCfgs = ShopCfgCJArray.Instance.dataArray;
+
+                    break;
+                case ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID:
+                    shopCfgs = ShopCfgCJAArray.Instance.dataArray;
+                    break;
+            }
+            return new List<ShopCfg>(shopCfgs);
+        }
+        public ShopCfg GetShopCfg(int buyId, int shopType)
+        {
+            switch (shopType)
+            {
+                case ConstStoreId.CLOTHING_STORE_ID:
+                    return ShopCfgClothingArray.Instance.GetCfg(buyId);
+
+                case ConstStoreId.LUCKY_BOX_STORE_ID:
+
+                    return ShopCfgCJArray.Instance.GetCfg(buyId);
+                case ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID:
+                    return ShopCfgCJAArray.Instance.GetCfg(buyId);
+            }
+            return null;
+        }
+
+        public void GetMoneyIdAndNum(int buyId, int count, int shopType, out int costId, out int costNum, out int buyNum)
+        {
+            ShopCfg shopCfg = GetShopCfg(buyId, shopType);
+
+            costId = shopCfg.costID;
+            costNum = shopCfg.costNum * count;
+            buyNum = count;
+        }
+
+
         private List<ShopCfg> SortItemListByScore(List<ShopCfg> arrayList, int scoreType)
         private List<ShopCfg> SortItemListByScore(List<ShopCfg> arrayList, int scoreType)
         {
         {
             arrayList.Sort((ShopCfg a, ShopCfg b) =>
             arrayList.Sort((ShopCfg a, ShopCfg b) =>
@@ -52,54 +105,5 @@ namespace GFGGame
             });
             });
             return arrayList;
             return arrayList;
         }
         }
-
-        private void InitData()
-        {
-            if (_inited)
-            {
-                return;
-            }
-            _inited = true;
-            ShopCfg[] clotiongDataArray = ShopCfgClothingArray.Instance.dataArray;
-            foreach (ShopCfg cfg in clotiongDataArray)
-            {
-                if (_dataDic.ContainsKey(ConstStoreId.CLOTHING_STORE_ID)==false){
-                    _dataDic[ConstStoreId.CLOTHING_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
-                }
-                if (_dataDic[ConstStoreId.CLOTHING_STORE_ID].ContainsKey(cfg.typeIndex)==false)
-                {
-                    _dataDic[ConstStoreId.CLOTHING_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
-                }
-                _dataDic[ConstStoreId.CLOTHING_STORE_ID][cfg.typeIndex].Add(cfg);
-            }
-
-            ShopCfg[] clothingCJDataArray = ShopCfgCJArray.Instance.dataArray;
-            foreach (ShopCfg cfg in clothingCJDataArray)
-            {
-                if (_dataDic.ContainsKey(ConstStoreId.LUCKY_BOX_STORE_ID) == false)
-                {
-                    _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
-                }
-                if (_dataDic[ConstStoreId.LUCKY_BOX_STORE_ID].ContainsKey(cfg.typeIndex) == false)
-                {
-                    _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
-                }
-                _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID][cfg.typeIndex].Add(cfg);
-            }
-
-            ShopCfg[] clothingCJADataArray = ShopCfgCJArray.Instance.dataArray;
-            foreach (ShopCfg cfg in clothingCJADataArray)
-            {
-                if (_dataDic.ContainsKey(ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID) == false)
-                {
-                    _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
-                }
-                if (_dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID].ContainsKey(cfg.typeIndex) == false)
-                {
-                    _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
-                }
-                _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID][cfg.typeIndex].Add(cfg);
-            }
-        }
     }
     }
 }
 }

+ 77 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListPropertyItem.cs

@@ -0,0 +1,77 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Studio
+{
+    public partial class UI_ListPropertyItem
+    {
+        public GButton target;
+        public GLoader m_icon0;
+        public GLoader m_icon1;
+        public GLoader m_icon2;
+        public const string URL = "ui://xz8kxrecn3xhn";
+        public const string PACKAGE_NAME = "Studio";
+        public const string RES_NAME = "ListPropertyItem";
+        private static UI_ListPropertyItem _proxy;
+
+        public static UI_ListPropertyItem Create(GObject gObject = null)
+        {
+            var ui = new UI_ListPropertyItem();
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ListPropertyItem Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ListPropertyItem();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)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_icon0 = (GLoader)comp.GetChild("icon0");
+            m_icon1 = (GLoader)comp.GetChild("icon1");
+            m_icon2 = (GLoader)comp.GetChild("icon2");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_icon0 = null;
+            m_icon1 = null;
+            m_icon2 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListPropertyItem.cs.meta

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

+ 24 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ItemExchangeSProxy.cs

@@ -0,0 +1,24 @@
+using ET;
+
+namespace GFGGame
+{
+    public class ItemExchangeSProxy
+    {
+        public static async ETTask<bool> ItemExchange(int buyId, int buyCount)
+        {
+            M2C_ItemExchange response = null;
+            response = (M2C_ItemExchange)await MessageHelper.SendToServer(new C2M_ItemExchange() { ItemId = buyId, times = buyCount });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    ItemDataManager.InitItemExchange(response.ItemId, response.times);
+                    EventAgent.DispatchEvent(ConstMessage.SHOP_BUY);
+                    return true;
+                }
+            }
+            return false;
+
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ItemExchangeSProxy.cs.meta

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

+ 18 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/MainStorySProxy.cs

@@ -12,8 +12,8 @@ namespace ET
     {
     {
         protected override async ETTask Run(Session session, M2C_NoticeMainStoryBoxBonusState message)
         protected override async ETTask Run(Session session, M2C_NoticeMainStoryBoxBonusState message)
         {
         {
-            var levelCfg = StoryLevelCfgArray.Instance.GetCfg(message.LevelCfgId);
-            MainStoryDataManager.UpdateBoxBonusStates(levelCfg.chapterId, message.BoxStates);
+            MainStoryDataManager.UpdateBoxBonusStates(message.ChapterId, message.BoxStates);
+            EventAgent.DispatchEvent(ConstMessage.NOTICE_MAINSTORY_BOXBONUS_STATE);
             await ETTask.CompletedTask;
             await ETTask.CompletedTask;
         }
         }
     }
     }
@@ -37,5 +37,21 @@ namespace GFGGame
             }
             }
         }
         }
 
 
+        //请求剧情关卡数据
+        public static async ETTask<bool> GetMainStoryBoxBonus(int chapterId, int index)
+        {
+            M2C_GetMainStoryBoxBonus response = null;
+            response = (M2C_GetMainStoryBoxBonus)await MessageHelper.SendToServer(new C2M_GetMainStoryBoxBonus() { ChapterId = chapterId, Index = index });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    MainStoryDataManager.UpdateBoxBonusStates(response.ChapterId, response.BoxStates);
+                    return true;
+                }
+            }
+            return false;
+        }
+
     }
     }
 }
 }

+ 23 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs

@@ -0,0 +1,23 @@
+using ET;
+
+namespace GFGGame
+{
+    public class ShopSProxy
+    {
+        public static async ETTask<bool> ShopBuy(int shopType, int buyId, int buyCount)
+        {
+            M2C_ShopBuy response = null;
+            response = (M2C_ShopBuy)await MessageHelper.SendToServer(new C2M_ShopBuy() { ShopType = shopType, BuyId = buyId, BuyCount = buyCount });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+
+                    EventAgent.DispatchEvent(ConstMessage.SHOP_BUY);
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs.meta

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

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/StudioProxy.cs → GameClient/Assets/Game/HotUpdate/ServerProxy/StudioSProxy.cs

@@ -17,7 +17,7 @@ namespace ET
 }
 }
 namespace GFGGame
 namespace GFGGame
 {
 {
-    public class StudioProxy
+    public class StudioSProxy
     {
     {
 
 
         //请求工作室副本数据
         //请求工作室副本数据

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/StudioSProxy.cs.meta

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

+ 13 - 81
GameClient/Assets/Game/HotUpdate/Utils/ItemUtil.cs

@@ -8,13 +8,13 @@ namespace GFGGame
 {
 {
     public class ItemUtil
     public class ItemUtil
     {
     {
-        
+
         /// <param name="showTips">是否弹购买成功飘字,默认是</param>
         /// <param name="showTips">是否弹购买成功飘字,默认是</param>
         /// <param name="openSource">是否打开来源界面。默认否</param>
         /// <param name="openSource">是否打开来源界面。默认否</param>
         /// <param name="showTxtBuyTips">是否显示购买提示</param>
         /// <param name="showTxtBuyTips">是否显示购买提示</param>
         public static void ExchangeItemById(int itemId, int num, bool showTips = true, Action onSuccess = null, bool openSource = false, int maxCount = 9990, bool showTxtBuyTips = false, string prefix = "")
         public static void ExchangeItemById(int itemId, int num, bool showTips = true, Action onSuccess = null, bool openSource = false, int maxCount = 9990, bool showTxtBuyTips = false, string prefix = "")
         {
         {
-            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
+
             if (itemId == ConstItemID.GOLD)
             if (itemId == ConstItemID.GOLD)
             {
             {
                 AddGold(num, onSuccess);
                 AddGold(num, onSuccess);
@@ -25,72 +25,35 @@ namespace GFGGame
             }
             }
             else
             else
             {
             {
-                BuyItemConteoller.Show(itemId, currencyRatioCfg.costId, currencyRatioCfg.num, currencyRatioCfg.costNum, num, onSuccess, showTips, openSource, maxCount);
+                BuyItemConteoller.Show(itemId, num, ConstBuyType.TYPE_ITEM, 0, onSuccess, showTips, openSource, maxCount);
                 BuyItemConteoller.showTxtBuyTips = showTxtBuyTips;
                 BuyItemConteoller.showTxtBuyTips = showTxtBuyTips;
             }
             }
         }
         }
 
 
-        public static ItemExchangeCfg GetCurrencyRatioCfgById(int itemId)
-        {
-            ItemExchangeCfg[] currencyRatioCfgs = ItemExchangeCfgArray.Instance.GetCfgs(itemId);
-            if (currencyRatioCfgs.Length == 0)
-            {
-                UnityEngine.Debug.LogWarning(itemId + "在h货币换算.xlsx中没有配置");
-                return null;
-            }
-            ItemExchangeCfg currencyRatioCfg;
-            if (itemId == ConstItemID.POWER)
-            {
-                int powerBuyTimes = GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerBuyTimes);
-                //体力购买次数不同,对应消耗配置不同
-                if (powerBuyTimes < currencyRatioCfgs.Length)
-                {
-                    currencyRatioCfg = currencyRatioCfgs[powerBuyTimes];
-                }
-                else
-                {
-                    currencyRatioCfg = currencyRatioCfgs[currencyRatioCfgs.Length - 1];
-                }
-            }
-            else
-            {
-                currencyRatioCfg = currencyRatioCfgs[currencyRatioCfgs.Length - 1];
-            }
-            return currencyRatioCfg;
-        }
         public static void AddPower(string prefix = "", Action onSuccess = null)
         public static void AddPower(string prefix = "", Action onSuccess = null)
         {
         {
-            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.POWER);
-            int count = GetCostItemCount(ConstItemID.POWER, currencyRatioCfg.num);
-            int powerBuyTimes = GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerBuyTimes);
-            int lastBuyCount = currencyRatioCfg.maxLimit - powerBuyTimes;
-
-            string showTxt = string.Format("每5分钟回复1点体力\n今日剩余购买{0}/{1}次", lastBuyCount, currencyRatioCfg.maxLimit);
-            BuyConfirmController.Show(ConstItemID.POWER, currencyRatioCfg.num, currencyRatioCfg.costId, currencyRatioCfg.costNum, () =>
+            int maxLimit = ItemExchangeCfgArray.Instance.GetCfg(ConstItemID.POWER).maxLimit;
+            int lastBuyCount = maxLimit - ItemDataManager.GetItemExchangeTimes(ConstItemID.POWER);
+            string showTxt = string.Format("每5分钟回复1点体力\n今日剩余购买{0}/{1}次", lastBuyCount, maxLimit);
+            BuyConfirmController.Show(ConstItemID.POWER, 1, () =>
             {
             {
-                NumericHelper.RequestAddAttributePoint(GameGlobal.zoneScene , NumericType.PowerBuyTimes).Coroutine();
                 if (onSuccess != null)
                 if (onSuccess != null)
                 {
                 {
                     onSuccess();
                     onSuccess();
                 }
                 }
-            }, lastBuyCount, powerBuyTimes, showTxt);
-
+            }, showTxt);
         }
         }
 
 
         public static void AddGold(int value = 0, Action onSuccess = null)
         public static void AddGold(int value = 0, Action onSuccess = null)
         {
         {
-            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.GOLD);
-            int count = value > 0 ? value : currencyRatioCfg.num;
-            int costCount = GetCostItemCount(ConstItemID.GOLD, count);
-            int lastBuyCount = currencyRatioCfg.maxLimit - GameGlobal.myNumericComponent.GetAsInt(NumericType.GoldBuyTimes);
-            BuyConfirmController.Show(ConstItemID.GOLD, count, currencyRatioCfg.costId, costCount, () =>
+
+            BuyConfirmController.Show(ConstItemID.GOLD, 1, () =>
             {
             {
-                NumericHelper.RequestAddAttributePoint(GameGlobal.zoneScene, NumericType.GoldBuyTimes).Coroutine();
                 if (onSuccess != null)
                 if (onSuccess != null)
                 {
                 {
                     onSuccess();
                     onSuccess();
                 }
                 }
-            }, lastBuyCount, currencyRatioCfg.maxLimit);
+            });
         }
         }
 
 
         public static void AddDiamondPurple()
         public static void AddDiamondPurple()
@@ -102,41 +65,10 @@ namespace GFGGame
         public static void AddDiamondRed(int value = 0, Action onSuccess = null)
         public static void AddDiamondRed(int value = 0, Action onSuccess = null)
         {
         {
 
 
-            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.DIAMOND_RED);
-            BuyItemConteoller.Show(currencyRatioCfg.id, currencyRatioCfg.costId, currencyRatioCfg.num, currencyRatioCfg.costNum, value > 0 ? value : currencyRatioCfg.num, onSuccess, true, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED);
+            ItemExchangeCfg currencyRatioCfg = ItemExchangeCfgArray.Instance.GetCfg(ConstItemID.DIAMOND_RED);// GetCurrencyRatioCfgById(ConstItemID.DIAMOND_RED);
+            BuyItemConteoller.Show(currencyRatioCfg.id, value > 0 ? value : 1, ConstBuyType.TYPE_ITEM, 0, onSuccess, true, true);
             BuyItemConteoller.showTxtBuyTips = true;
             BuyItemConteoller.showTxtBuyTips = true;
         }
         }
-        /// <summary>
-        /// 根据物品id和需求量获取兑换消耗品的消耗量
-        /// </summary>
-        public static int GetCostItemCount(int itemId, int count)
-        {
-            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
-            if (currencyRatioCfg != null)
-            {
-                return (int)Math.Ceiling((decimal)count / currencyRatioCfg.num * currencyRatioCfg.costNum);
-
-            }
-            else
-            {
-                return 0;
-            }
-        }
-        /// <summary>
-        /// 根据物品id和兑换消耗品的消耗量获取物品兑换量
-        /// </summary>
-        public static int GetItemExChangeCount(int itemId, int costCount)
-        {
-            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
-            if (currencyRatioCfg != null)
-            {
-                return (int)Math.Floor((decimal)costCount / currencyRatioCfg.costNum * currencyRatioCfg.num);
-            }
-            else
-            {
-                return 0;
-            }
-        }
 
 
         /// <summary>
         /// <summary>
         /// 添加物品,会消耗物品
         /// 添加物品,会消耗物品

+ 12 - 4
GameClient/Assets/Game/HotUpdate/Utils/NumberUtil.cs

@@ -4,7 +4,7 @@ namespace GFGGame
 {
 {
     public class NumberUtil
     public class NumberUtil
     {
     {
-        
+
         public static string GetChiniseNumberText(int num)
         public static string GetChiniseNumberText(int num)
         {
         {
             int numInUnit = 0;
             int numInUnit = 0;
@@ -15,18 +15,18 @@ namespace GFGGame
             {
             {
                 return GameConst.CHINESE_NUMBER[num - 1];
                 return GameConst.CHINESE_NUMBER[num - 1];
             }
             }
-            else if(num < 20)
+            else if (num < 20)
             {
             {
                 numInUnit = num - 10;
                 numInUnit = num - 10;
                 strInUnit = GameConst.CHINESE_NUMBER[numInUnit - 1];
                 strInUnit = GameConst.CHINESE_NUMBER[numInUnit - 1];
                 return "十" + strInUnit;
                 return "十" + strInUnit;
             }
             }
-            else if(num < 100)
+            else if (num < 100)
             {
             {
                 numInTen = Mathf.FloorToInt(num / 10);
                 numInTen = Mathf.FloorToInt(num / 10);
                 strInTen = GameConst.CHINESE_NUMBER[numInTen - 1];
                 strInTen = GameConst.CHINESE_NUMBER[numInTen - 1];
                 numInUnit = num % 10;
                 numInUnit = num % 10;
-                if(numInUnit == 0)
+                if (numInUnit == 0)
                 {
                 {
                     return strInTen + "十";
                     return strInTen + "十";
                 }
                 }
@@ -38,6 +38,14 @@ namespace GFGGame
             }
             }
             return "未知";
             return "未知";
         }
         }
+        public static string GetChiniseNumberWeekText(int num)
+        {
+            if (num >= 0 && num < GameConst.CHINESE_NUMBER.Length)
+            {
+                return GameConst.CHINESE_WEEK_NUMBER[num];
+            }
+            return "未知";
+        }
 
 
     }
     }
 }
 }

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

@@ -161,7 +161,9 @@ namespace GFGGame
             }
             }
             if (_selectedItemId > 0)
             if (_selectedItemId > 0)
             {
             {
-                BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, _selectedItemCount, null, true, false, MAX_COUNT);
+                // BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, _selectedItemCount, null, true, false, MAX_COUNT);
+                ShopDataManager.Instance.BuyItem(_cfgSelected.id, _selectedItemCount, _storeId, _cfgSelected);
+
             }
             }
             // GuideController.TryGuideClothingShopViewBtnBug(_ui.m_compItemInfo.m_btnBuy);
             // GuideController.TryGuideClothingShopViewBtnBug(_ui.m_compItemInfo.m_btnBuy);
         }
         }
@@ -193,8 +195,8 @@ namespace GFGGame
         private void OnclickBtnBuy()
         private void OnclickBtnBuy()
         {
         {
             int count = _selectedItemId > 0 && _cfgSelected.itemID == _selectedItemId ? _selectedItemCount : INIT_COUNT;
             int count = _selectedItemId > 0 && _cfgSelected.itemID == _selectedItemId ? _selectedItemCount : INIT_COUNT;
-            BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, count, null, true, false, MAX_COUNT);
-
+            // BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, count, null, true, false, MAX_COUNT);
+            ShopDataManager.Instance.BuyItem(_cfgSelected.id, count, _storeId, _cfgSelected);
         }
         }
         private void UpdateItemChange()
         private void UpdateItemChange()
         {
         {

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -50,8 +50,8 @@ namespace GFGGame
             {
             {
                 int luckyBoxId = LuckyBoxBonusDataCache.currentBoxId;
                 int luckyBoxId = LuckyBoxBonusDataCache.currentBoxId;
                 LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
                 LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
-                ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(luckyBoxCfg.costID);
-                ItemUtil.ExchangeItemById(luckyBoxCfg.costID, (int)(currencyRatioCfg != null ? currencyRatioCfg.num : 20), true);
+
+                ItemUtil.ExchangeItemById(luckyBoxCfg.costID, 10, true);
 
 
             }));
             }));
         }
         }

+ 39 - 34
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyConfirmView.cs

@@ -1,5 +1,6 @@
 using System;
 using System;
 using UI.CommonGame;
 using UI.CommonGame;
+using UnityEngine;
 
 
 namespace GFGGame
 namespace GFGGame
 {
 {
@@ -8,9 +9,10 @@ namespace GFGGame
         private UI_BuyConfirmUI _ui;
         private UI_BuyConfirmUI _ui;
 
 
         private int _itemId;
         private int _itemId;
-        private int _costId;
-        private int _count;
-        private int _costCount;
+        private int _count;//本次购买次数
+        private int _buyTimes = 0;//已购次数
+
+
         private Action _onSuccess;
         private Action _onSuccess;
         private int _times = 0;
         private int _times = 0;
         private int _maxTimes = 0;
         private int _maxTimes = 0;
@@ -32,14 +34,11 @@ namespace GFGGame
             _ui.m_btnSure.onClick.Add(OnClickBtnSure);
             _ui.m_btnSure.onClick.Add(OnClickBtnSure);
             _ui.m_btnCancel.onClick.Add(OnClickBtnCancel);
             _ui.m_btnCancel.onClick.Add(OnClickBtnCancel);
         }
         }
-        public void SetParams(int itemId, int count, int costId, int costCount, Action onSuccess, int times = 0, int maxTimes = 0, string message = "")
+        public void SetParams(int itemId, int count, Action onSuccess, string message = "")
         {
         {
             _itemId = itemId;
             _itemId = itemId;
             _count = count;
             _count = count;
-            _costId = costId;
-            _costCount = costCount;
-            _times = times;
-            _maxTimes = maxTimes;
+
             _onSuccess = onSuccess;
             _onSuccess = onSuccess;
             _message = message;
             _message = message;
 
 
@@ -51,59 +50,65 @@ namespace GFGGame
         }
         }
         private void UpdateView()
         private void UpdateView()
         {
         {
+            _buyTimes = ItemDataManager.GetItemExchangeTimes(_itemId);
+
+            ItemExchangeCfgArray.Instance.GetMoneyIdAndNum(_itemId, _buyTimes, _count, out int costId, out int coustNum, out int buyNum);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemId);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemId);
-            ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(_costId);
-            _ui.m_txtNeed.text = string.Format("是否花费{0}{1} 购买{2}{3}", _costCount, costCfg.name, _count, itemCfg.name);
+            ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(costId);
+            _ui.m_txtNeed.text = string.Format("是否花费{0}{1} 购买{2}{3}", coustNum, costCfg.name, buyNum, itemCfg.name);
+
             _ui.m_txtNum.text = "";
             _ui.m_txtNum.text = "";
-            if (_message != "")
+            _maxTimes = ItemExchangeCfgArray.Instance.GetCfg(_itemId).maxLimit;
+            if (_maxTimes != 0)
             {
             {
-                _ui.m_txtNum.text = _message;
+                _ui.m_txtNum.text = string.Format("今日剩余购买次数{0}/{1}", _buyTimes, _maxTimes);
             }
             }
-            else if (_maxTimes != 0)
+            if (_message != "")
             {
             {
-                _ui.m_txtNum.text = string.Format("今日剩余购买次数{0}/{1}", _times, _maxTimes);
+                _ui.m_txtNum.text = _message;
             }
             }
-
         }
         }
-        private void OnClickBtnSure()
+        private async void OnClickBtnSure()
         {
         {
-            if (_times <= 0 && _maxTimes != 0)
+            if ((_buyTimes + _count) <= 0 && _maxTimes != 0)
             {
             {
                 PromptController.Instance.ShowFloatTextPrompt("购买次数不足!");
                 PromptController.Instance.ShowFloatTextPrompt("购买次数不足!");
                 return;
                 return;
             }
             }
-            if (ItemDataManager.GetItemNum(_costId) < _costCount)
+            ItemExchangeCfgArray.Instance.GetMoneyIdAndNum(_itemId, _buyTimes, _count, out int costId, out int coustNum, out int buyNum);
+
+            Debug.Log(costId + "数量:" + ItemDataManager.GetItemNum(costId));
+            if (ItemDataManager.GetItemNum(costId) < coustNum)
             {
             {
-                ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(_costId);
+                ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(costId);
                 if (_itemId == ConstItemID.GOLD)
                 if (_itemId == ConstItemID.GOLD)
                 {
                 {
-                    PromptController.Instance.ShowFloatTextPrompt("鲛绡不足,请前往商城选购");
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("{0}不足,请前往商城选购", costCfg.name));
+
                 }
                 }
                 else
                 else
                 {
                 {
-
-                    // PromptController.Instance.ShowFloatTextPrompt(costCfg.name + "不足!");
                     Alert.Show(costCfg.name + "不足,是否前往购买?").SetLeftButton(true).SetRightButton(true, "确认", (AlertWindow.AlertCallback)((object data) =>
                     Alert.Show(costCfg.name + "不足,是否前往购买?").SetLeftButton(true).SetRightButton(true, "确认", (AlertWindow.AlertCallback)((object data) =>
-                                       {
-                                           int costNeedCount = _costCount - ItemDataManager.GetItemNum(_costId);
-                                           ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_costId);
-                                           BuyItemConteoller.Show(_costId, (int)currencyRatioCfg.costId, (int)currencyRatioCfg.num, (int)currencyRatioCfg.costNum, costNeedCount, null, true, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED);
-                                       }));
+                    {
+                        int costNeedCount = coustNum - ItemDataManager.GetItemNum(costId);
+                        BuyItemConteoller.Show(costId, costNeedCount, ConstBuyType.TYPE_ITEM, 0, null, true, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED);
+                    }));
                     OnClickBtnCancel();
                     OnClickBtnCancel();
                 }
                 }
 
 
                 return;
                 return;
             }
             }
-            ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_itemId);
 
 
-            // int count = (int)Math.Ceiling((decimal)_costCount / currencyRatioCfg.costNum * currencyRatioCfg.num);
-            int count = ItemUtil.GetItemExChangeCount(_itemId, _costCount);
-            ItemUtil.AddItemUseCost(_itemId, count, _costId, _costCount);
-            if (_onSuccess != null)
+            bool result = await ItemExchangeSProxy.ItemExchange(_itemId, _count);
+
+            if (result)
             {
             {
-                _onSuccess();
+                PromptController.Instance.ShowFloatTextPrompt("购买成功!", MessageType.SUCCESS);
+                if (_onSuccess != null)
+                {
+                    _onSuccess();
+                }
             }
             }
-            PromptController.Instance.ShowFloatTextPrompt("购买成功!");
 
 
             this.Hide();
             this.Hide();
         }
         }

+ 131 - 83
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyCountView.cs

@@ -15,16 +15,45 @@ namespace GFGGame
         private float _delay = 300;
         private float _delay = 300;
         private float longpress = 900;//大于900毫秒才算长按
         private float longpress = 900;//大于900毫秒才算长按
 
 
-        private int _itemId;
-        private int _costId;
-        private int _perCount;
-        private int _perCostCount;
+        /// <summary>
+        /// 购买物品编号
+        /// </summary>
+        private int _buyId;
+        /// <summary>
+        /// 最低购买次数
+        /// </summary>
+        private int _minBuyCount;
+        /// <summary>
+        /// 当前购买次数
+        /// </summary>
         private int _count;
         private int _count;
-        private int _maxCount;
+        /// <summary>
+        /// 购买消耗Id
+        /// </summary>
+        private int _costId;//购买消耗Id
+        /// <summary>
+        /// 购买物品数量
+        /// </summary>
+        private int _buyNum;
+        /// <summary>
+        /// 购买物品消耗数量
+        /// </summary>
+        private int _costNum;
+        /// <summary>
+        /// 最大购买量
+        /// </summary>
+        private int _maxCanBuy;
+        // private int _perCount;
+        // private int _perCostCount;
+        // private int _maxCount;
         private bool _openSource;
         private bool _openSource;
         private bool _showTips;
         private bool _showTips;
+        private int _buyType;
+        private int _shopType;
+        private int _itemId;
         private Action _onSuccess;
         private Action _onSuccess;
 
 
+
         public override void Dispose()
         public override void Dispose()
         {
         {
             base.Dispose();
             base.Dispose();
@@ -49,65 +78,79 @@ namespace GFGGame
             _ui.m_btnSure.onClick.Add(OnClickBtnSure);
             _ui.m_btnSure.onClick.Add(OnClickBtnSure);
             _ui.m_btnCancel.onClick.Add(OnClickBtnCancel);
             _ui.m_btnCancel.onClick.Add(OnClickBtnCancel);
         }
         }
+
         /// <summary>
         /// <summary>
         /// 
         /// 
         /// </summary>
         /// </summary>
-        /// <param name="itemId">物品id</param>
-        /// <param name="costId">消耗品id</param>
-        /// <param name="perCount">单位兑换数量</param>
-        /// <param name="perCostCount">单位消耗数量</param>
-        /// <param name="onSuccess">购买完成回调</param>
+        /// <param name="buyId">购买物品对应的编号,非必须为物品Id</param>
+        /// <param name="minBuyCount">最低兑换次数</param>
+        /// <param name="buyType">购买类型,对应ConstBuyType</param>
+        /// <param name="shopType">商店类型,仅buytype为TYPE_SHOP时有用</param>
+        /// <param name="onSuccess"></param>
         /// <param name="showTips">是否弹购买成功飘字,默认是</param>
         /// <param name="showTips">是否弹购买成功飘字,默认是</param>
         /// <param name="openSource">是否打开来源界面。默认否</param>
         /// <param name="openSource">是否打开来源界面。默认否</param>
-        /// <param name="count">兑换总量</param>
-        public void SetParams(int itemId, int costId, int perCount, int perCostCount, int count, Action onSuccess = null, bool showTips = true, bool openSource = false, int maxCount = 9990)
+        /// <param name="maxCount"></param>
+        public void SetParams(int buyId, int minBuyCount, int buyType, int shopType = 0, Action onSuccess = null, bool showTips = true, bool openSource = false, int maxCount = 9990)
         {
         {
-            _itemId = itemId;
-            _costId = costId;
-            _perCount = perCount;
-            _perCostCount = perCostCount;
-            _count = count;
+            _buyId = buyId;
+            _itemId = buyId;
+            _minBuyCount = minBuyCount;
+            _count = _minBuyCount;
             _onSuccess = onSuccess;
             _onSuccess = onSuccess;
-            _maxCount = maxCount;
             _openSource = openSource;
             _openSource = openSource;
             _showTips = showTips;
             _showTips = showTips;
+            _buyType = buyType;
+            _shopType = shopType;
+            if (buyType == ConstBuyType.TYPE_SHOP)
+            {
+                ShopCfg shopCfg = ClothingShopCfgManager.Instance.GetShopCfg(buyId, shopType);
+                int maxBuyCount = (int)Math.Floor((decimal)(ItemDataManager.GetItemNum(shopCfg.costID) / shopCfg.costNum));
+                _maxCanBuy = Math.Min(maxCount, maxBuyCount);
+                _itemId = shopCfg.itemID;
+
+            }
+            else if (buyType == ConstBuyType.TYPE_ITEM)
+            {
+                ItemExchangeCfg itemExchangeCfg = ItemExchangeCfgArray.Instance.GetCfg(buyId);
+                int maxBuyCount = (int)Math.Floor((decimal)(ItemDataManager.GetItemNum(itemExchangeCfg.costId) / itemExchangeCfg.costNumArr[0]));
+
+                _maxCanBuy = Math.Min(Math.Min(maxCount, maxBuyCount), itemExchangeCfg.maxLimit == 0 ? maxCount : itemExchangeCfg.maxLimit - ItemDataManager.GetItemExchangeTimes(buyId));
+                _itemId = buyId;
+
+            }
+            GetMoneyIdAndNum(minBuyCount, out _costId, out _costNum, out _buyNum);
+
+
         }
         }
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            _ui.m_txtCount.text = "" + _count;
             UpdateView();
             UpdateView();
         }
         }
         private void UpdateView()
         private void UpdateView()
         {
         {
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemId);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemId);
             _ui.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
             _ui.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
-            string itemName = itemCfg.name;
-            _ui.m_txtName.text = itemName;
+            _ui.m_txtName.text = itemCfg.name;
+            _ui.m_rarity.visible = false;
+
             if (ItemUtilCS.IsDressUpItem(_itemId))
             if (ItemUtilCS.IsDressUpItem(_itemId))
             {
             {
                 _ui.m_rarity.visible = true;
                 _ui.m_rarity.visible = true;
                 RarityIconController.UpdateRarityIcon(_ui.m_rarity, _itemId, false);
                 RarityIconController.UpdateRarityIcon(_ui.m_rarity, _itemId, false);
             }
             }
-            else
-            {
-                _ui.m_rarity.visible = false;
-            }
-            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(_costId);
-            _ui.m_iconPrice.url = "ui://CommonGame/" + costItemCfg.res;
 
 
-            _ui.m_txtBuyTips.text = string.Format("消耗{0}{1},可兑换{2}{3}", _perCostCount, costItemCfg.name, _perCount, itemCfg.name);
+            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(_costId);
+            _ui.m_iconPrice.url = ResPathUtil.GetCommonGameResPath(costItemCfg.res);
             _ui.m_txtBuyTips.visible = false;
             _ui.m_txtBuyTips.visible = false;
+
             UpdateCost();
             UpdateCost();
         }
         }
         private void UpdateCost()
         private void UpdateCost()
         {
         {
-            int count = int.Parse(_ui.m_txtCount.text.Trim());
-
-            int price = (int)Math.Ceiling((decimal)count / _perCount) * _perCostCount;
-            // int price = ItemUtil.CostItemCount(_itemId, count);
-
-            _ui.m_txtPrice.text = "" + price;
+            GetMoneyIdAndNum(_count, out _costId, out _costNum, out _buyNum);
+            _ui.m_txtCount.text = _buyNum.ToString();
+            _ui.m_txtPrice.text = _costNum.ToString();
             SetBtnState();
             SetBtnState();
         }
         }
 
 
@@ -125,7 +168,7 @@ namespace GFGGame
         }
         }
         private void OnTimedEvent(object param)
         private void OnTimedEvent(object param)
         {
         {
-            _selectTimeCount += _delay; //_timer.Interval;
+            _selectTimeCount += _delay;
 
 
             if (_selectTimeCount >= longpress)
             if (_selectTimeCount >= longpress)
             {
             {
@@ -151,48 +194,29 @@ namespace GFGGame
         }
         }
         private void OnClickBtnAll()
         private void OnClickBtnAll()
         {
         {
-            int costHasNum = ItemDataManager.GetItemNum(_costId);
-            int value = (int)Math.Floor((decimal)(costHasNum / _perCostCount * _perCount));
-            // int value = ItemUtil.ItemExChangeCount(_itemId, costHasNum);
-            value = Math.Min(_maxCount, value);
-
-            _ui.m_txtCount.text = value.ToString();
+            _count = _maxCanBuy;
             UpdateCost();
             UpdateCost();
         }
         }
         private void OnClickBtnPlus()
         private void OnClickBtnPlus()
         {
         {
-            string inputStr = _ui.m_txtCount.text.Trim();
-            int value = _count;
-            if (inputStr.Length > 0)
+            if (_count < _maxCanBuy)
             {
             {
-                value = int.Parse(inputStr);
+                _count += 1;
             }
             }
-            if (value < _maxCount)
-            {
-                value += _perCount;
-            }
-            _ui.m_txtCount.text = "" + value;
             UpdateCost();
             UpdateCost();
         }
         }
 
 
         private void OnClickBtnMinus()
         private void OnClickBtnMinus()
         {
         {
-            string inputStr = _ui.m_txtCount.text.Trim();
-            int value = _count;
-            if (inputStr.Length > 0)
-            {
-                value = int.Parse(inputStr);
-            }
-            value -= _perCount;
-            value = Math.Max(_count, value);
-            _ui.m_txtCount.text = "" + value;
+            _count -= 1;
+            _count = Math.Max(_minBuyCount, _count);
             UpdateCost();
             UpdateCost();
         }
         }
         private void SetBtnState()
         private void SetBtnState()
         {
         {
             string inputStr = _ui.m_txtCount.text.Trim();
             string inputStr = _ui.m_txtCount.text.Trim();
 
 
-            if (inputStr == null || int.Parse(inputStr) <= _count)
+            if (inputStr == null || int.Parse(inputStr) <= _minBuyCount)
             {
             {
                 _ui.m_btnMinus.enabled = false;
                 _ui.m_btnMinus.enabled = false;
             }
             }
@@ -201,10 +225,8 @@ namespace GFGGame
                 _ui.m_btnMinus.enabled = true;
                 _ui.m_btnMinus.enabled = true;
 
 
             }
             }
-            int costHasNum = ItemDataManager.GetItemNum(_costId);
-            int maxCanBuy = (int)Math.Floor((decimal)(costHasNum / _perCostCount * _perCount));
-            // int maxCanBuy = ItemUtil.ItemExChangeCount(_itemId, costHasNum);
-            if (inputStr != null && (int.Parse(inputStr) >= maxCanBuy))
+
+            if (inputStr != null && (int.Parse(inputStr) >= _maxCanBuy))
             {
             {
                 _ui.m_btnPlus.enabled = false;
                 _ui.m_btnPlus.enabled = false;
                 _ui.m_btnAll.enabled = false;
                 _ui.m_btnAll.enabled = false;
@@ -216,7 +238,7 @@ namespace GFGGame
             }
             }
 
 
         }
         }
-        private void OnClickBtnSure()
+        private async void OnClickBtnSure()
         {
         {
             int count = int.Parse(_ui.m_txtCount.text.Trim());
             int count = int.Parse(_ui.m_txtCount.text.Trim());
             int price = int.Parse(_ui.m_txtPrice.text.Trim());
             int price = int.Parse(_ui.m_txtPrice.text.Trim());
@@ -229,7 +251,7 @@ namespace GFGGame
 
 
                     if (_openSource)
                     if (_openSource)
                     {
                     {
-                        if (_itemId == ConstItemID.DIAMOND_RED)
+                        if (_buyId == ConstItemID.DIAMOND_RED)
                         {
                         {
                             ItemUtil.AddDiamondPurple();
                             ItemUtil.AddDiamondPurple();
                         }
                         }
@@ -242,14 +264,24 @@ namespace GFGGame
                 }
                 }
                 else
                 else
                 {
                 {
-                    int buyCount = price / _perCostCount * _perCount;
-                    ItemUtil.AddItemUseCost(_itemId, buyCount, _costId, price);
-                    // GuideController.HideGuide();
+
+                    bool result = false;
+                    switch (_buyType)
+                    {
+                        case ConstBuyType.TYPE_NORMAL:
+                            break;
+                        case ConstBuyType.TYPE_ITEM:
+                            result = await ItemExchangeSProxy.ItemExchange(_buyId, count);
+                            break;
+                        case ConstBuyType.TYPE_SHOP:
+                            result = await ShopSProxy.ShopBuy(_shopType, _buyId, count);
+                            break;
+                    }
                     if (_onSuccess != null)
                     if (_onSuccess != null)
                     {
                     {
                         _onSuccess();
                         _onSuccess();
                     }
                     }
-                    if (_showTips)
+                    if (result && _showTips)
                     {
                     {
                         PromptController.Instance.ShowFloatTextPrompt("购买成功", MessageType.SUCCESS);
                         PromptController.Instance.ShowFloatTextPrompt("购买成功", MessageType.SUCCESS);
                     }
                     }
@@ -268,17 +300,34 @@ namespace GFGGame
             this.Hide();
             this.Hide();
         }
         }
 
 
+        private void GetMoneyIdAndNum(int count, out int _costId, out int _costNum, out int _buyNum)
+        {
+            _costId = 0;
+            _costNum = 0;
+            _buyNum = 0;
+            if (_buyType == ConstBuyType.TYPE_SHOP)
+            {
+
+                ClothingShopCfgManager.Instance.GetMoneyIdAndNum(_buyId, count, _shopType, out _costId, out _costNum, out _buyNum);
+
+            }
+            else if (_buyType == ConstBuyType.TYPE_ITEM)
+            {
+
+                ItemExchangeCfgArray.Instance.GetMoneyIdAndNum(_itemId, ItemDataManager.GetItemExchangeTimes(_itemId), count, out _costId, out _costNum, out _buyNum);
 
 
+            }
+        }
 
 
 
 
         public void Reset()
         public void Reset()
         {
         {
-            _itemId = 0;
+            _buyId = 0;
             _costId = 0;
             _costId = 0;
-            _perCount = 0;
-            _perCostCount = 0;
-            _count = 0;
-            _maxCount = 0;
+            // _perCount = 0;
+            // _perCostCount = 0;
+            _minBuyCount = 0;
+            // _maxCount = 0;
         }
         }
         protected override void OnHide()
         protected override void OnHide()
         {
         {
@@ -287,14 +336,6 @@ namespace GFGGame
             Reset();
             Reset();
 
 
         }
         }
-        protected override void UpdateToCheckGuide(object param)
-        {
-            if (!ViewManager.CheckIsTopView(this.viewCom)) return;
-
-            GuideController.TryGuide(_ui.m_btnSure, ConstGuideId.BUY_CLOTHING, 3, "找到需要的物品了,点击购买吧");
-        }
-
-
         /// <summary>
         /// <summary>
         /// 是否显示购买提示
         /// 是否显示购买提示
         /// </summary>
         /// </summary>
@@ -306,5 +347,12 @@ namespace GFGGame
                 _ui.m_txtBuyTips.visible = value;
                 _ui.m_txtBuyTips.visible = value;
             }
             }
         }
         }
+
+        protected override void UpdateToCheckGuide(object param)
+        {
+            if (!ViewManager.CheckIsTopView(this.viewCom)) return;
+
+            GuideController.TryGuide(_ui.m_btnSure, ConstGuideId.BUY_CLOTHING, 3, "找到需要的物品了,点击购买吧");
+        }
     }
     }
 }
 }

+ 15 - 15
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyTipsView.cs

@@ -31,12 +31,12 @@ namespace GFGGame
             _ui.m_btnSure.onClick.Add(OnClickBtnSure);
             _ui.m_btnSure.onClick.Add(OnClickBtnSure);
             _ui.m_btnCancel.onClick.Add(OnClickBtnCancel);
             _ui.m_btnCancel.onClick.Add(OnClickBtnCancel);
         }
         }
-        public void SetParams(int itemId, int count, int costId, int costCount, Action onSuccess = null)
+        public void SetParams(int itemId, int count, Action onSuccess = null)
         {
         {
             _itemId = itemId;
             _itemId = itemId;
             _count = count;
             _count = count;
-            _costId = costId;
-            _costCount = costCount;
+            // _costId = costId;
+            // _costCount = costCount;
             _onSuccess = onSuccess;
             _onSuccess = onSuccess;
         }
         }
         protected override void OnShown()
         protected override void OnShown()
@@ -46,29 +46,29 @@ namespace GFGGame
         }
         }
         private void UpdateView()
         private void UpdateView()
         {
         {
+            ItemExchangeCfgArray.Instance.GetMoneyIdAndNum(_itemId, ItemDataManager.GetItemExchangeTimes(_itemId), _count, out _costId, out _costCount, out int buyNum);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemId);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemId);
             _ui.m_txtNeed.text = string.Format("还需要购买{0}个", _count);
             _ui.m_txtNeed.text = string.Format("还需要购买{0}个", _count);
             _ui.m_loaNeed.url = ResPathUtil.GetCommonGameResPath(itemCfg.res);
             _ui.m_loaNeed.url = ResPathUtil.GetCommonGameResPath(itemCfg.res);
             ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(_costId);
             ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(_costId);
             _ui.m_txtCost.text = string.Format("是否花费{0}{1}购买?", _costCount, costCfg.name);
             _ui.m_txtCost.text = string.Format("是否花费{0}{1}购买?", _costCount, costCfg.name);
         }
         }
-        private void OnClickBtnSure()
+        private async void OnClickBtnSure()
         {
         {
-            ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_itemId);
 
 
-            int count = ItemUtil.GetItemExChangeCount(_itemId, _costCount);
-            ItemUtil.AddItemUseCost(_itemId, count, _costId, _costCount);
-
-            if (_onSuccess != null)
+            bool result = await ItemExchangeSProxy.ItemExchange(_itemId, _count);
+            if (result)
             {
             {
-                _onSuccess();
+                ItemData itemData = new ItemData();
+                itemData.id = _itemId;
+                itemData.num = _count;
+                ViewManager.Show<RewardView>(itemData);
+                if (_onSuccess != null)
+                {
+                    _onSuccess();
+                }
             }
             }
 
 
-            ItemData itemData = new ItemData();
-            itemData.id = _itemId;
-            itemData.num = count;
-            ViewManager.Show<RewardView>(new List<ItemData> { itemData });
-
             this.Hide();
             this.Hide();
         }
         }
         private void OnClickBtnCancel()
         private void OnClickBtnCancel()

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -107,7 +107,7 @@ namespace GFGGame
             _ui.m_txtRecommendCount.SetVar("v1", "" + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount)).FlushVars();
             _ui.m_txtRecommendCount.SetVar("v1", "" + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount)).FlushVars();
             _ui.m_btnRecommend.enabled = GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount) > 0;
             _ui.m_btnRecommend.enabled = GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount) > 0;
             _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
             _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
-            _ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
+            // _ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
             _levelID = (int)viewData;
             _levelID = (int)viewData;
             _levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
             _levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
             _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
             _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);

+ 21 - 11
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterView.cs

@@ -57,6 +57,8 @@ namespace GFGGame
             {
             {
                 OnClickBonusBox(_ui.m_bonusBox3, 2);
                 OnClickBonusBox(_ui.m_bonusBox3, 2);
             });
             });
+            EventAgent.AddEventListener(ConstMessage.NOTICE_MAINSTORY_BOXBONUS_STATE, UpdateBonusBox);
+
         }
         }
 
 
         protected override void OnShown()
         protected override void OnShown()
@@ -79,6 +81,8 @@ namespace GFGGame
             _endLevelItem = null;
             _endLevelItem = null;
             _ui.m_chapter.RemoveChildren(0, 0, true);
             _ui.m_chapter.RemoveChildren(0, 0, true);
             _valueBarController.OnHide();
             _valueBarController.OnHide();
+            EventAgent.RemoveEventListener(ConstMessage.NOTICE_MAINSTORY_BOXBONUS_STATE, UpdateBonusBox);
+
         }
         }
 
 
         private void OnClickBtnBack()
         private void OnClickBtnBack()
@@ -100,9 +104,8 @@ namespace GFGGame
             UpdateBonusBoxName(_ui.m_bonusBox1, "" + chapterCfg.bonusStar1);
             UpdateBonusBoxName(_ui.m_bonusBox1, "" + chapterCfg.bonusStar1);
             UpdateBonusBoxName(_ui.m_bonusBox2, "" + chapterCfg.bonusStar2);
             UpdateBonusBoxName(_ui.m_bonusBox2, "" + chapterCfg.bonusStar2);
             UpdateBonusBoxName(_ui.m_bonusBox3, "" + chapterCfg.bonusStar3);
             UpdateBonusBoxName(_ui.m_bonusBox3, "" + chapterCfg.bonusStar3);
-            UpdateBonusBoxStatus(_ui.m_bonusBox1, 0);
-            UpdateBonusBoxStatus(_ui.m_bonusBox2, 1);
-            UpdateBonusBoxStatus(_ui.m_bonusBox3, 2);
+            UpdateBonusBox();
+
             var list = StoryLevelCfgArray.Instance.GetCfgs(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
             var list = StoryLevelCfgArray.Instance.GetCfgs(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
             int endLevel = 0;
             int endLevel = 0;
             for (int i = 0; i < list.Length; i++)
             for (int i = 0; i < list.Length; i++)
@@ -192,7 +195,12 @@ namespace GFGGame
         {
         {
             bonusBox.m_txtName.text = name;
             bonusBox.m_txtName.text = name;
         }
         }
-
+        private void UpdateBonusBox()
+        {
+            UpdateBonusBoxStatus(_ui.m_bonusBox1, 0);
+            UpdateBonusBoxStatus(_ui.m_bonusBox2, 1);
+            UpdateBonusBoxStatus(_ui.m_bonusBox3, 2);
+        }
         private void UpdateBonusBoxStatus(UI_CompBonusBox bonusBox, int index)
         private void UpdateBonusBoxStatus(UI_CompBonusBox bonusBox, int index)
         {
         {
             int status = MainStoryDataManager.GetChapterBonusStatus(MainStoryDataManager.currentChapterCfgId, index);
             int status = MainStoryDataManager.GetChapterBonusStatus(MainStoryDataManager.currentChapterCfgId, index);
@@ -208,19 +216,21 @@ namespace GFGGame
             bonusBox.target.data = status;
             bonusBox.target.data = status;
         }
         }
 
 
-        private void OnClickBonusBox(UI_CompBonusBox bonusBox, int index)
+        private async void OnClickBonusBox(UI_CompBonusBox bonusBox, int index)
         {
         {
             int status = (int)bonusBox.target.data;
             int status = (int)bonusBox.target.data;
             if (status == ConstBonusStatus.CAN_GET)
             if (status == ConstBonusStatus.CAN_GET)
             {
             {
-                List<ItemData> bonusList = MainStoryDataManager.GetChapterBonus(MainStoryDataManager.currentChapterCfgId, index);
-                if (bonusList != null && bonusList.Count > 0)
+                bool got = await MainStorySProxy.GetMainStoryBoxBonus(MainStoryDataManager.currentChapterCfgId, index);
+                if (got)
                 {
                 {
-                    // ViewManager.Show(ViewName.GET_BONUS_VIEW, bonusList);
-                    ViewManager.Show<RewardView>(bonusList);
-
+                    List<ItemData> bonusList = MainStoryDataManager.GetChapterBonus(MainStoryDataManager.currentChapterCfgId, index);
+                    if (bonusList != null && bonusList.Count > 0)
+                    {
+                        ViewManager.Show<RewardView>(bonusList);
+                    }
+                    UpdateBonusBoxStatus(bonusBox, index);
                 }
                 }
-                UpdateBonusBoxStatus(bonusBox, index);
             }
             }
             else if (status == ConstBonusStatus.GOT)
             else if (status == ConstBonusStatus.GOT)
             {
             {

+ 10 - 10
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -20,7 +20,6 @@ namespace GFGGame
         private const int _range = 100;//圆圈随机范围
         private const int _range = 100;//圆圈随机范围
         private float _time = 0;// 登峰造极按住的时间
         private float _time = 0;// 登峰造极按住的时间
 
 
-        private float _speed = 1;
         protected override void OnInit()
         protected override void OnInit()
         {
         {
             base.OnInit();
             base.OnInit();
@@ -46,6 +45,8 @@ namespace GFGGame
             _ui.m_comAllCircle.target.onTouchEnd.Add(AllCircleScoreStart);
             _ui.m_comAllCircle.target.onTouchEnd.Add(AllCircleScoreStart);
             _ui.m_comAllCircle.target.visible = false;
             _ui.m_comAllCircle.target.visible = false;
             _ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
             _ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
+            _ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
+
             _ui.m_comClickCircle.target.touchable = !EquipDataCache.cacher.autoPlay;
             _ui.m_comClickCircle.target.touchable = !EquipDataCache.cacher.autoPlay;
             _ui.m_comAllCircle.target.touchable = !EquipDataCache.cacher.autoPlay;
             _ui.m_comAllCircle.target.touchable = !EquipDataCache.cacher.autoPlay;
 
 
@@ -57,7 +58,6 @@ namespace GFGGame
             _ui.m_proScore.target.value = 0;
             _ui.m_proScore.target.value = 0;
             _ui.m_proScore.m_imgFirstScore.x = (((float)fightCfg.score1 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
             _ui.m_proScore.m_imgFirstScore.x = (((float)fightCfg.score1 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
 
 
-            _speed = 1;
             _index = 0;
             _index = 0;
             _score = 0;
             _score = 0;
             _prefectCount = 0;
             _prefectCount = 0;
@@ -109,7 +109,7 @@ namespace GFGGame
             else
             else
             {
             {
                 _ui.m_comClickCircle.m_t0.ignoreEngineTimeScale = false;
                 _ui.m_comClickCircle.m_t0.ignoreEngineTimeScale = false;
-                _ui.m_comClickCircle.m_t0.timeScale = _speed;// (1 / _speed);
+                _ui.m_comClickCircle.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;// (1 / _speed);
                 _ui.m_comClickCircle.m_t0.Play(CircleScoreEnd);
                 _ui.m_comClickCircle.m_t0.Play(CircleScoreEnd);
             }
             }
 
 
@@ -124,7 +124,7 @@ namespace GFGGame
             UpdateCircleResult(clickState);
             UpdateCircleResult(clickState);
 
 
             _ui.m_comClickCircle.m_t1.ignoreEngineTimeScale = false;
             _ui.m_comClickCircle.m_t1.ignoreEngineTimeScale = false;
-            _ui.m_comClickCircle.m_t1.timeScale = _speed;// 1 / _speed;
+            _ui.m_comClickCircle.m_t1.timeScale = EquipDataCache.cacher.fightSpeed;// 1 / _speed;
             _ui.m_comClickCircle.m_t1.Play(() =>
             _ui.m_comClickCircle.m_t1.Play(() =>
             {
             {
                 CircleResuleEnd();
                 CircleResuleEnd();
@@ -164,14 +164,14 @@ namespace GFGGame
                 }
                 }
                 else
                 else
                 {
                 {
-                    Timers.inst.Add(0.5f / _speed, 1, Skip);//评分结束
+                    Timers.inst.Add(0.5f / EquipDataCache.cacher.fightSpeed, 1, Skip);//评分结束
                 }
                 }
             }
             }
             else
             else
             {
             {
 
 
                 _ui.m_comClickCircle.m_loaCircle.onClick.Add(CircleScoreEnd);
                 _ui.m_comClickCircle.m_loaCircle.onClick.Add(CircleScoreEnd);
-                Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / _speed, 1, SkillScoreStart);//下个部分评分
+                Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / EquipDataCache.cacher.fightSpeed, 1, SkillScoreStart);//下个部分评分
             }
             }
         }
         }
 
 
@@ -180,7 +180,7 @@ namespace GFGGame
             //登峰造极评分开始
             //登峰造极评分开始
             _ui.m_comAllCircle.target.visible = true;
             _ui.m_comAllCircle.target.visible = true;
             _ui.m_comAllCircle.m_t0.ignoreEngineTimeScale = false;
             _ui.m_comAllCircle.m_t0.ignoreEngineTimeScale = false;
-            _ui.m_comAllCircle.m_t0.timeScale = _speed;// 1 / _speed;
+            _ui.m_comAllCircle.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;// 1 / _speed;
             _ui.m_comAllCircle.m_t0.Play(() =>
             _ui.m_comAllCircle.m_t0.Play(() =>
             {
             {
                 AllCircleScoreStart();
                 AllCircleScoreStart();
@@ -222,7 +222,7 @@ namespace GFGGame
             _score += allCircleScore;
             _score += allCircleScore;
             SetScoreUI();
             SetScoreUI();
             _ui.m_comAllCircle.m_t1.ignoreEngineTimeScale = false;
             _ui.m_comAllCircle.m_t1.ignoreEngineTimeScale = false;
-            _ui.m_comAllCircle.m_t1.timeScale = _speed;// 1 / _speed;
+            _ui.m_comAllCircle.m_t1.timeScale = EquipDataCache.cacher.fightSpeed;// 1 / _speed;
             _ui.m_comAllCircle.m_t1.Play(() =>
             _ui.m_comAllCircle.m_t1.Play(() =>
             {
             {
                 Timers.inst.Add(1f, 1, Skip);
                 Timers.inst.Add(1f, 1, Skip);
@@ -239,8 +239,8 @@ namespace GFGGame
         }
         }
         private void OnBtnSpeedUp()
         private void OnBtnSpeedUp()
         {
         {
-            _speed = _speed == 1 ? 2 : 1;
-            _ui.m_btnSpeedUp.title = "x" + _speed;
+            EquipDataCache.cacher.fightSpeed = EquipDataCache.cacher.fightSpeed == 1 ? EquipDataCache.cacher.maxFightSpeed : 1;
+            _ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
         }
         }
 
 
         private void Skip(object param = null)
         private void Skip(object param = null)

+ 14 - 14
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -23,7 +23,7 @@ namespace GFGGame
         private double _targetMainScore;//战斗目标总主属性分
         private double _targetMainScore;//战斗目标总主属性分
         private const int _range = 30;//圆圈随机范围
         private const int _range = 30;//圆圈随机范围
 
 
-        private float _speed = 1;
+        // private float _speed = 1;
         private bool isAutoPlay = false;
         private bool isAutoPlay = false;
 
 
         private GameObject _gameObject0;
         private GameObject _gameObject0;
@@ -115,8 +115,8 @@ namespace GFGGame
             _ui.m_selfName.m_txtName.text = RoleDataManager.roleName;
             _ui.m_selfName.m_txtName.text = RoleDataManager.roleName;
             _ui.m_targetName.m_txtName.text = fightCfg.targetName;
             _ui.m_targetName.m_txtName.text = fightCfg.targetName;
             _ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
             _ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
+            _ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
 
 
-            _speed = 1;
             UpdateNormal();
             UpdateNormal();
             AddEffect();
             AddEffect();
 
 
@@ -132,7 +132,7 @@ namespace GFGGame
             {
             {
                 _ui.m_btnSkill0.target.touchable = false;
                 _ui.m_btnSkill0.target.touchable = false;
             }
             }
-            Timers.inst.Add(0.5f / _speed, 1, CircleScoreStart);//评分开始
+            Timers.inst.Add(0.5f / EquipDataCache.cacher.fightSpeed, 1, CircleScoreStart);//评分开始
 
 
         }
         }
         private void UpdateNormal()
         private void UpdateNormal()
@@ -242,10 +242,10 @@ namespace GFGGame
                 return;
                 return;
             }
             }
             _ui.m_comMineCircle.m_t0.ignoreEngineTimeScale = false;
             _ui.m_comMineCircle.m_t0.ignoreEngineTimeScale = false;
-            _ui.m_comMineCircle.m_t0.timeScale = _speed;
+            _ui.m_comMineCircle.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;
             _ui.m_comMineCircle.m_t0.Play(CircleScoreEnd);
             _ui.m_comMineCircle.m_t0.Play(CircleScoreEnd);
             _ui.m_comTargetCircle.m_t0.ignoreEngineTimeScale = false;
             _ui.m_comTargetCircle.m_t0.ignoreEngineTimeScale = false;
-            _ui.m_comTargetCircle.m_t0.timeScale = _speed;
+            _ui.m_comTargetCircle.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;
             _ui.m_comTargetCircle.m_t0.Play();
             _ui.m_comTargetCircle.m_t0.Play();
 
 
         }
         }
@@ -261,7 +261,7 @@ namespace GFGGame
             {
             {
                 _ui.m_comTargetCircle.target.visible = false;
                 _ui.m_comTargetCircle.target.visible = false;
                 _ui.m_comMineCircle.target.visible = false;
                 _ui.m_comMineCircle.target.visible = false;
-                Timers.inst.Add(0.5f / _speed, 1, CircleScoreStart);//评分结束
+                Timers.inst.Add(0.5f / EquipDataCache.cacher.fightSpeed, 1, CircleScoreStart);//评分结束
             }
             }
         }
         }
 
 
@@ -286,7 +286,7 @@ namespace GFGGame
             GProgressBar bar = item.m_proCD;
             GProgressBar bar = item.m_proCD;
             bar.visible = true;
             bar.visible = true;
             bar.value = 100;
             bar.value = 100;
-            bar.TweenValue(0, time / _speed).OnComplete((GTweener tweener) =>
+            bar.TweenValue(0, time / EquipDataCache.cacher.fightSpeed).OnComplete((GTweener tweener) =>
               {
               {
                   GProgressBar bar1 = (GProgressBar)tweener.target;
                   GProgressBar bar1 = (GProgressBar)tweener.target;
                   UI_ComBtnSkill item1 = UI_ComBtnSkill.Proxy(bar1.parent);
                   UI_ComBtnSkill item1 = UI_ComBtnSkill.Proxy(bar1.parent);
@@ -341,7 +341,7 @@ namespace GFGGame
             // comRoleSkillScore.m_comRoleSkill.m_c1.selectedIndex = 0;
             // comRoleSkillScore.m_comRoleSkill.m_c1.selectedIndex = 0;
             comRoleSkillScore.m_txtScore.SetVar("count", score.ToString()).FlushVars();
             comRoleSkillScore.m_txtScore.SetVar("count", score.ToString()).FlushVars();
             comRoleSkillScore.m_t0.ignoreEngineTimeScale = false;
             comRoleSkillScore.m_t0.ignoreEngineTimeScale = false;
-            comRoleSkillScore.m_t0.timeScale = _speed;
+            comRoleSkillScore.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;
             comRoleSkillScore.m_t0.Play(() =>
             comRoleSkillScore.m_t0.Play(() =>
                 {
                 {
                     comRoleSkillScore.target.visible = false;
                     comRoleSkillScore.target.visible = false;
@@ -359,7 +359,7 @@ namespace GFGGame
 
 
             comSkillMinus.visible = true;
             comSkillMinus.visible = true;
             comSkillMinus.value = 0;
             comSkillMinus.value = 0;
-            comSkillMinus.TweenValue(100, 2f / _speed).OnComplete(() =>
+            comSkillMinus.TweenValue(100, 2f / EquipDataCache.cacher.fightSpeed).OnComplete(() =>
               {
               {
                   comSkillMinus.visible = false;
                   comSkillMinus.visible = false;
 
 
@@ -391,7 +391,7 @@ namespace GFGGame
                   if (role == SkillDataManager.MINE)
                   if (role == SkillDataManager.MINE)
                   {
                   {
                       comRoleSkillScore.m_t0.ignoreEngineTimeScale = false;
                       comRoleSkillScore.m_t0.ignoreEngineTimeScale = false;
-                      comRoleSkillScore.m_t0.timeScale = _speed;
+                      comRoleSkillScore.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;
                       comRoleSkillScore.m_t0.Play(() =>
                       comRoleSkillScore.m_t0.Play(() =>
                       {
                       {
                           comRoleSkillScore.target.visible = false;
                           comRoleSkillScore.target.visible = false;
@@ -400,7 +400,7 @@ namespace GFGGame
                   else
                   else
                   {
                   {
                       comRoleSkillScore.m_t0.ignoreEngineTimeScale = false;
                       comRoleSkillScore.m_t0.ignoreEngineTimeScale = false;
-                      comRoleSkillScore.m_t0.timeScale = _speed;
+                      comRoleSkillScore.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;
                       comRoleSkillScore.m_t1.Play(() =>
                       comRoleSkillScore.m_t1.Play(() =>
                   {
                   {
                       comRoleSkillScore.target.visible = false;
                       comRoleSkillScore.target.visible = false;
@@ -431,7 +431,7 @@ namespace GFGGame
             comSkillShield.m_holder.visible = true;
             comSkillShield.m_holder.visible = true;
             comSkillShield.m_holder1.visible = false;
             comSkillShield.m_holder1.visible = false;
 
 
-            Timers.inst.Add(cfg.duration / _speed, 1, (param) =>
+            Timers.inst.Add(cfg.duration / EquipDataCache.cacher.fightSpeed, 1, (param) =>
               {
               {
                   // comSkillShield.target.visible = false;
                   // comSkillShield.target.visible = false;
                   comSkillShield.m_holder.visible = false;
                   comSkillShield.m_holder.visible = false;
@@ -440,8 +440,8 @@ namespace GFGGame
         }
         }
         private void OnBtnSpeedUp()
         private void OnBtnSpeedUp()
         {
         {
-            _speed = _speed == 1 ? 2 : 1;
-            _ui.m_btnSpeedUp.title = "x" + _speed;
+            EquipDataCache.cacher.fightSpeed = EquipDataCache.cacher.fightSpeed == 1 ? EquipDataCache.cacher.maxFightSpeed : 1;
+            _ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
         }
         }
 
 
         private void OnBtnBackClick()
         private void OnBtnBackClick()

+ 5 - 3
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBaseView.cs

@@ -15,7 +15,7 @@ namespace GFGGame
         protected StudioCfg studioCfg;
         protected StudioCfg studioCfg;
         protected StoryLevelCfg[] storyLevelCfgs;
         protected StoryLevelCfg[] storyLevelCfgs;
         protected StudioData studioData;
         protected StudioData studioData;
-        private int curIndex = 0;
+        protected int curIndex = 0;
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
@@ -47,7 +47,6 @@ namespace GFGGame
         {
         {
             base.OnShown();
             base.OnShown();
             _valueBarController.OnShown();
             _valueBarController.OnShown();
-            _ui.m_list.ScrollToView(curIndex);
             UpdateView();
             UpdateView();
             Timers.inst.Add(1, 0, UpdateShowTime);
             Timers.inst.Add(1, 0, UpdateShowTime);
 
 
@@ -64,8 +63,9 @@ namespace GFGGame
             EventAgent.RemoveEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, UpdateView);
             EventAgent.RemoveEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, UpdateView);
             EventAgent.RemoveEventListener(ConstMessage.NOTICE_STUDIO_PLAY_TIMES, UpdateView);
             EventAgent.RemoveEventListener(ConstMessage.NOTICE_STUDIO_PLAY_TIMES, UpdateView);
         }
         }
-        private void UpdateView()
+        protected void UpdateView()
         {
         {
+            studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             _ui.m_txtNum.text = string.Format("剩余次数:{0}/{1}", this.studioData.TotalPlayTimes - this.studioData.PlayTimes, studioCfg.num);
             _ui.m_txtNum.text = string.Format("剩余次数:{0}/{1}", this.studioData.TotalPlayTimes - this.studioData.PlayTimes, studioCfg.num);
         }
         }
         private void UpdateShowTime(object param)
         private void UpdateShowTime(object param)
@@ -97,6 +97,8 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt(content);
                 PromptController.Instance.ShowFloatTextPrompt(content);
                 return;
                 return;
             }
             }
+            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
+            StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
             InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishStoryLevel);
             InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishStoryLevel);
         }
         }
 
 

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBuyNumView.cs

@@ -38,11 +38,11 @@ namespace GFGGame
 
 
             EventAgent.AddEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, () =>
             EventAgent.AddEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, () =>
             {
             {
-                PromptController.Instance.ShowFloatTextPrompt("购买成功");
+                PromptController.Instance.ShowFloatTextPrompt("购买成功", MessageType.SUCCESS);
                 UpdateView();
                 UpdateView();
                 if (_studioData.BuyTimes == _studioCfg.buyNum)
                 if (_studioData.BuyTimes == _studioCfg.buyNum)
                 {
                 {
-                    PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限");
+                    PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限", MessageType.ERR);
                     this.Hide();
                     this.Hide();
                 }
                 }
             });
             });
@@ -84,17 +84,17 @@ namespace GFGGame
         {
         {
             if (_studioData.BuyTimes == _studioCfg.buyNum)
             if (_studioData.BuyTimes == _studioCfg.buyNum)
             {
             {
-                PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限");
+                PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限", MessageType.ERR);
                 return;
                 return;
             }
             }
             StudioCfgArray.Instance.GetMoneyIdAndNum(_studioCfg.id, _studioData.BuyTimes, 1, out int moneyId, out int moneyNum);
             StudioCfgArray.Instance.GetMoneyIdAndNum(_studioCfg.id, _studioData.BuyTimes, 1, out int moneyId, out int moneyNum);
 
 
             if (type == BUY_TYPE_0 && ItemDataManager.GetItemNum(_studioCfg.itemID) < _studioCfg.itemNum || type == BUY_TYPE_1 && ItemDataManager.GetItemNum(moneyId) < moneyNum)
             if (type == BUY_TYPE_0 && ItemDataManager.GetItemNum(_studioCfg.itemID) < _studioCfg.itemNum || type == BUY_TYPE_1 && ItemDataManager.GetItemNum(moneyId) < moneyNum)
             {
             {
-                PromptController.Instance.ShowFloatTextPrompt("道具不足");
+                PromptController.Instance.ShowFloatTextPrompt("道具不足", MessageType.ERR);
                 return;
                 return;
             }
             }
-            StudioProxy.ReqBuyStudioPlayTimes(_chapterId, type, 1).Coroutine();
+            StudioSProxy.ReqBuyStudioPlayTimes(_chapterId, type, 1).Coroutine();
 
 
         }
         }
     }
     }

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFabricView.cs

@@ -31,6 +31,8 @@ namespace GFGGame
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            _ui.m_list.ScrollToView(curIndex);
+
             base.OnShown();
             base.OnShown();
 
 
         }
         }

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioMetalView.cs

@@ -33,6 +33,8 @@ namespace GFGGame
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            _ui.m_list.ScrollToView(curIndex);
+
             base.OnShown();
             base.OnShown();
         }
         }
 
 

+ 44 - 12
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioPropertyView.cs

@@ -8,6 +8,9 @@ namespace GFGGame
 {
 {
     public class StudioPropertyView : StudioBaseView
     public class StudioPropertyView : StudioBaseView
     {
     {
+        private int _propertySelectIndex = 0;
+        private int _typeSelectIndex = 0;
+        private int firstOpenProperty = -1;//第一个开放的副本(打开界面时,如未选择副本,则默认选中第一个开启的副本)
         //书画副本
         //书画副本
         public override void Dispose()
         public override void Dispose()
         {
         {
@@ -24,20 +27,25 @@ namespace GFGGame
 
 
         protected override void OnShown()
         protected override void OnShown()
         {
         {
+            firstOpenProperty = -1;
+            _typeSelectIndex = (int)(this.viewData as object[])[0];
+            _propertySelectIndex = (int)(this.viewData as object[])[1];
+            _ui.m_c1.selectedIndex = _typeSelectIndex;
+
             StudioDataManager.Instance.VIEW_NAME = typeof(StudioPropertyView).Name;
             StudioDataManager.Instance.VIEW_NAME = typeof(StudioPropertyView).Name;
             StudioCfg[] studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
             StudioCfg[] studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
-            this.studioCfg = studioCfgs[0];
-            this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
-            this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
-
-            _ui.m_c1.selectedIndex = (int)(this.viewData as object[])[0];
-            StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
 
 
             _ui.m_listProperty.numItems = studioCfgs.Length;
             _ui.m_listProperty.numItems = studioCfgs.Length;
-            _ui.m_listProperty.selectedIndex = (int)(this.viewData as object[])[1];
-            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
+            _propertySelectIndex = TimeUtil.CheckDayOfWeek(studioCfgs[_propertySelectIndex].timeArr) ? _propertySelectIndex : firstOpenProperty;
+            _ui.m_listProperty.selectedIndex = _propertySelectIndex;
+
+            this.studioCfg = studioCfgs[_ui.m_listProperty.selectedIndex];
+            this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
+            this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
 
 
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            _ui.m_list.ScrollToView(curIndex);
+
             base.OnShown();
             base.OnShown();
 
 
         }
         }
@@ -54,18 +62,42 @@ namespace GFGGame
         }
         }
         private void ListPropertyItemRender(int index, GObject obj)
         private void ListPropertyItemRender(int index, GObject obj)
         {
         {
+            StudioCfg[] studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
             GButton item = obj.asButton;
             GButton item = obj.asButton;
-
-            item.data = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name)[index];
+            item.GetChild("icon0").asLoader.url = string.Format("ui://Studio/gzsltb_{0}", index + 1);
+            item.GetChild("icon1").asLoader.url = string.Format("ui://Studio/gzsatb_{0}", index + 1);
+            item.GetChild("icon2").asLoader.url = string.Format("ui://Studio/gzswtb_{0}", index + 1);
+            item.GetChild("icon2").asLoader.visible = TimeUtil.CheckDayOfWeek(studioCfgs[index].timeArr) ? false : true;
+            if (firstOpenProperty < 0 && TimeUtil.CheckDayOfWeek(studioCfgs[index].timeArr)) firstOpenProperty = index;
+            item.data = index;
         }
         }
         private void OnClickListProperty(EventContext context)
         private void OnClickListProperty(EventContext context)
         {
         {
-            GButton item = (context.data as GObject).asButton;
 
 
-            this.studioCfg = item.data as StudioCfg;
+            GButton item = (context.data as GObject).asButton;
+            int index = (int)item.data;
+            StudioCfg[] studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
+            StudioCfg studioCfg = studioCfgs[index];
+            if (!TimeUtil.CheckDayOfWeek(studioCfg.timeArr))
+            {
+                _ui.m_listProperty.selectedIndex = _propertySelectIndex;
+                string str = "";
+                for (int i = 0; i < studioCfg.timeArr.Length; i++)
+                {
+                    str += NumberUtil.GetChiniseNumberWeekText(studioCfg.timeArr[i]);
+                    if (i == studioCfg.timeArr.Length - 1) break;
+                    str += "、";
+                }
+                PromptController.Instance.ShowFloatTextPrompt(string.Format("周{0}开放", str));
+                return;
+            }
+            _propertySelectIndex = index;
+            this.studioCfg = studioCfg;
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            _ui.m_list.ScrollToView(curIndex);
+            UpdateView();
             StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
             StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
 
 
         }
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioView.cs

@@ -32,7 +32,7 @@ namespace GFGGame
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();//1;//
             base.OnShown();//1;//
-            StudioProxy.ReqStudioInfos().Coroutine();
+            StudioSProxy.ReqStudioInfos().Coroutine();
             int isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName, false) ? 1 : 0;
             int isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName, false) ? 1 : 0;
             _ui.m_comMetal.m_c1.selectedIndex = isopen;
             _ui.m_comMetal.m_c1.selectedIndex = isopen;
             isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName, false) ? 1 : 0; ;
             isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName, false) ? 1 : 0; ;

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


BIN
GameClient/Assets/ResIn/UI/Common/Common_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Common/Common_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Common/Common_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes