From fca615e299c6a6ec0fd0b589f2b302a2bf54c72b Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 22 八月 2025 19:44:33 +0800
Subject: [PATCH] 153 【武将】招募系统 - 积分招募

---
 Main/Config/ConfigManager.cs                                                             |    3 
 Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs.meta          |   11 
 Main/System/Recharge/GotoChargeWin.cs.meta                                               |   11 
 Main/System/HappyXB/HappyXBModel.cs                                                      |   53 ++
 Main/System/Invest/InvestModel.cs                                                        |  377 ++++++++++++++++++++++
 Main/System/HappyXB/HeroCallResultWin.cs                                                 |   42 +
 Main/Core/NetworkPackage/ClientPack/CA5_Function/CA541_tagCMGetInvestReward.cs.meta      |   11 
 Main/System/Invest/InvestModel.cs.meta                                                   |   11 
 Main/System/HappyXB/HeroCallScoreWin.cs.meta                                             |   11 
 Main/System/Main/HomeWin.cs                                                              |   20 +
 Main/Main.cs                                                                             |    1 
 Main/System/ItemTip/OwnMoneyCell.cs                                                      |    4 
 Main/Component/UI/Effect/EffectPlayer.cs                                                 |    4 
 Main/SDK/SDKUtils.cs                                                                     |   88 ++--
 Main/Config/Configs/InvestConfig.cs.meta                                                 |   11 
 Main/System/Invest.meta                                                                  |    8 
 Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs      |   13 
 Main/System/HappyXB/HeroCallScoreWin.cs                                                  |   91 +++++
 Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs               |   24 +
 Main/System/HappyXB/HeroCallWin.cs                                                       |   17 
 Main/Core/NetworkPackage/ClientPack/CA5_Function/CA568_tagCMRequestTreasure.cs           |    8 
 Main/System/ItemTip/OwnItemCell.cs                                                       |    4 
 Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs.meta |   11 
 Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs                                     |    1 
 Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs                |   25 +
 Main/System/Recharge/GotoChargeWin.cs                                                    |   69 ++++
 Main/Config/Configs/InvestConfig.cs                                                      |   56 +++
 Main/Core/NetworkPackage/ClientPack/CA5_Function/CA541_tagCMGetInvestReward.cs           |   20 +
 Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs.meta           |   11 
 29 files changed, 937 insertions(+), 79 deletions(-)

diff --git a/Main/Component/UI/Effect/EffectPlayer.cs b/Main/Component/UI/Effect/EffectPlayer.cs
index 6f1d9d5..22b7ab3 100644
--- a/Main/Component/UI/Effect/EffectPlayer.cs
+++ b/Main/Component/UI/Effect/EffectPlayer.cs
@@ -80,7 +80,7 @@
         
         if (isPlayOnEnable)
         {
-            PlayAsync(false).Forget();
+            Play(false);
         }
         else if (spineComp != null)
         {
@@ -256,7 +256,7 @@
 
             spineComp.raycastTarget = false;
             spineComp.Initialize(true);
-            spineComp.timeScale = 1f;
+            spineComp.timeScale = speedRate;
             // 妫�鏌ュ姩鐢绘槸鍚︽湁鐩稿姞妯″紡
             // bool hasAdditiveBlend = CheckForAdditiveBlend(spineComp.Skeleton);
             // if (hasAdditiveBlend)
diff --git a/Main/Config/ConfigManager.cs b/Main/Config/ConfigManager.cs
index efaf67e..7035beb 100644
--- a/Main/Config/ConfigManager.cs
+++ b/Main/Config/ConfigManager.cs
@@ -46,6 +46,7 @@
             typeof(FightPowerRatioConfig),
             typeof(HeroLineupHaloConfig),
             typeof(HeroQualityLVConfig),
+            typeof(InvestConfig),
             typeof(ItemConfig),
             typeof(MainChapterConfig),
             typeof(MainLevelConfig),
@@ -228,6 +229,8 @@
         ClearConfigDictionary<HeroLineupHaloConfig>();
         // 娓呯┖ HeroQualityLVConfig 瀛楀吀
         ClearConfigDictionary<HeroQualityLVConfig>();
+        // 娓呯┖ InvestConfig 瀛楀吀
+        ClearConfigDictionary<InvestConfig>();
         // 娓呯┖ ItemConfig 瀛楀吀
         ClearConfigDictionary<ItemConfig>();
         // 娓呯┖ MainChapterConfig 瀛楀吀
diff --git a/Main/Config/Configs/InvestConfig.cs b/Main/Config/Configs/InvestConfig.cs
new file mode 100644
index 0000000..3df8136
--- /dev/null
+++ b/Main/Config/Configs/InvestConfig.cs
@@ -0,0 +1,56 @@
+锘�//--------------------------------------------------------
+//    [Author]:           YYL
+//    [  Date ]:           2025骞�8鏈�22鏃�
+//--------------------------------------------------------
+
+using System.Collections.Generic;
+using System;
+using UnityEngine;
+using LitJson;
+
+public partial class InvestConfig : ConfigBase<int, InvestConfig>
+{
+    static InvestConfig()
+    {
+        // 璁块棶杩囬潤鎬佹瀯閫犲嚱鏁�
+        visit = true; 
+    }
+
+    public int id;
+	public int type;
+	public int needDay;
+	public int needLV;
+	public int needNPCID;
+	public Dictionary<int, int[][]> award;
+	public string info;
+
+    public override int LoadKey(string _key)
+    {
+        int key = GetKey(_key);
+        return key;
+    }
+
+    public override void LoadConfig(string input)
+    {
+        try {
+        string[] tables = input.Split('\t');
+        int.TryParse(tables[0],out id); 
+
+			int.TryParse(tables[1],out type); 
+
+			int.TryParse(tables[2],out needDay); 
+
+			int.TryParse(tables[3],out needLV); 
+
+			int.TryParse(tables[4],out needNPCID); 
+
+			award = ConfigParse.ParseIntArray2Dict(tables[5]); 
+
+			info = tables[6];
+        }
+        catch (Exception exception)
+        {
+            Debug.LogError(exception);
+        }
+    }
+}
diff --git a/Main/Config/Configs/InvestConfig.cs.meta b/Main/Config/Configs/InvestConfig.cs.meta
new file mode 100644
index 0000000..a037ded
--- /dev/null
+++ b/Main/Config/Configs/InvestConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ff3d77591e2aeaa438955b2b6322cfba
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs b/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs
new file mode 100644
index 0000000..4b95933
--- /dev/null
+++ b/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs
@@ -0,0 +1,24 @@
+using UnityEngine;
+using System.Collections;
+
+// A1 25 浠e竵璐拱鍏呭�煎晢鍝佺紪鍙峰晢鍝� #tagCMCoinBuyOrderInfo
+
+public class CA125_tagCMCoinBuyOrderInfo : GameNetPackBasic {
+    public byte AppIDLen;
+    public string AppID;
+    public byte OrderInfoLen;
+    public string OrderInfo;    //鍟嗗搧缂栧彿
+
+    public CA125_tagCMCoinBuyOrderInfo () {
+        combineCmd = (ushort)0x03FE;
+        _cmd = (ushort)0xA125;
+    }
+
+    public override void WriteToBytes () {
+        WriteBytes (AppIDLen, NetDataType.BYTE);
+        WriteBytes (AppID, NetDataType.Chars, AppIDLen);
+        WriteBytes (OrderInfoLen, NetDataType.BYTE);
+        WriteBytes (OrderInfo, NetDataType.Chars, OrderInfoLen);
+    }
+
+}
diff --git a/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs.meta b/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs.meta
new file mode 100644
index 0000000..97d45ed
--- /dev/null
+++ b/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 05e91755d9d173640b5df5e6449852a4
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA541_tagCMGetInvestReward.cs b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA541_tagCMGetInvestReward.cs
new file mode 100644
index 0000000..3ea7f87
--- /dev/null
+++ b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA541_tagCMGetInvestReward.cs
@@ -0,0 +1,20 @@
+using UnityEngine;
+using System.Collections;
+
+// A5 41 棰嗗彇鎶曡祫鐞嗚储鍥炴姤 #tagCMGetInvestReward
+
+public class CA541_tagCMGetInvestReward : GameNetPackBasic {
+    public byte InvestType;    // 鎶曡祫绫诲瀷
+    public byte RewardIndex;    // 鍥炴姤绱㈠紩
+
+    public CA541_tagCMGetInvestReward () {
+        combineCmd = (ushort)0x03FE;
+        _cmd = (ushort)0xA541;
+    }
+
+    public override void WriteToBytes () {
+        WriteBytes (InvestType, NetDataType.BYTE);
+        WriteBytes (RewardIndex, NetDataType.BYTE);
+    }
+
+}
diff --git a/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA541_tagCMGetInvestReward.cs.meta b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA541_tagCMGetInvestReward.cs.meta
new file mode 100644
index 0000000..2bc90ee
--- /dev/null
+++ b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA541_tagCMGetInvestReward.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1752ebc635762534790398ccd1c3c413
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA568_tagCMRequestTreasure.cs b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA568_tagCMRequestTreasure.cs
index 6eb3c88..3576c00 100644
--- a/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA568_tagCMRequestTreasure.cs
+++ b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA568_tagCMRequestTreasure.cs
@@ -1,12 +1,12 @@
-using UnityEngine;
-using System.Collections;
-
+using UnityEngine;
+using System.Collections;
+
 // A5 68 璇锋眰瀵诲疂 #tagCMRequestTreasure
 
 public class CA568_tagCMRequestTreasure : GameNetPackBasic {
     public byte TreasureType;    //瀵诲疂绫诲瀷
     public byte TreasureIndex;    //瀵诲疂绱㈠紩
-    public byte CostType;    //娑堣�楃被鍨嬶細0-榛樿浠欑帀锛�1-鍏嶈垂娆℃暟锛�2-瀵诲疂閬撳叿
+    public byte CostType;    //娑堣�楃被鍨嬶細0-璐у竵锛�1-鍏嶈垂娆℃暟锛�2-瀵诲疂閬撳叿
 
     public CA568_tagCMRequestTreasure () {
         combineCmd = (ushort)0x03FE;
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs
new file mode 100644
index 0000000..18c2b36
--- /dev/null
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs
@@ -0,0 +1,13 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 38 鎶曡祫鐞嗚储淇℃伅 #tagMCInvestInfo
+
+public class DTCA338_tagMCInvestInfo : DtcBasic {
+    public override void Done(GameNetPackBasic vNetPack)
+    {
+        base.Done(vNetPack);
+        HA338_tagMCInvestInfo vNetData = vNetPack as HA338_tagMCInvestInfo;
+        InvestModel.Instance.UpdateInvestInfo(vNetData);
+    }
+}
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs.meta b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs.meta
new file mode 100644
index 0000000..092f615
--- /dev/null
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 642095ebf906d974e8bfb5c7d45d7fc8
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
index 2f5220f..cb38be7 100644
--- a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
+++ b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
@@ -109,6 +109,7 @@
         Register(typeof(HB125_tagSCPlayerHeroInfo), typeof(DTCB125_tagSCPlayerHeroInfo));
         Register(typeof(HA814_tagMCMakeItemAnswer), typeof(DTCA814_tagMCMakeItemAnswer));
         Register(typeof(HB122_tagSCHeroInfo), typeof(DTCB122_tagSCHeroInfo));
+        Register(typeof(HA338_tagMCInvestInfo), typeof(DTCA338_tagMCInvestInfo));
     }
 
     //涓诲伐绋嬫敞鍐屽皝鍖�
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs
new file mode 100644
index 0000000..e6b07b8
--- /dev/null
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs
@@ -0,0 +1,25 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 38 鎶曡祫鐞嗚储淇℃伅 #tagMCInvestInfo
+
+public class HA338_tagMCInvestInfo : GameNetPackBasic {
+    public byte InvestType;    // 鎶曡祫绫诲瀷
+    public ushort CurDay;    // 褰撳墠澶╂暟锛屾姇璧勭涓�澶╀负1
+    public byte ValueCount;
+    public  uint[] RewardValue;    //棰嗗璁板綍鍊硷紝鎸夋姇璧勫洖鎶ョ储寮曚綅璁板綍鏄惁宸查鍙�
+    public  uint[] ProgressValue;    //鎶曡祫鐩稿叧鍙鍙栬繘搴﹁褰曞��:  9鐧诲綍鎶曡祫-璁板綍宸茬櫥褰曞ぉ鏁帮紱11Boss鎶曡祫-鎸夊洖鎶ョ储寮曚綅璁板綍鏄惁宸插嚮鏉�璇oss
+
+    public HA338_tagMCInvestInfo () {
+        _cmd = (ushort)0xA338;
+    }
+
+    public override void ReadFromBytes (byte[] vBytes) {
+        TransBytes (out InvestType, vBytes, NetDataType.BYTE);
+        TransBytes (out CurDay, vBytes, NetDataType.WORD);
+        TransBytes (out ValueCount, vBytes, NetDataType.BYTE);
+        TransBytes (out RewardValue, vBytes, NetDataType.DWORD, ValueCount);
+        TransBytes (out ProgressValue, vBytes, NetDataType.DWORD, ValueCount);
+    }
+
+}
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs.meta b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs.meta
new file mode 100644
index 0000000..45a88d7
--- /dev/null
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9e48c8be42d2313489b38b738ddf52c6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/Main.cs b/Main/Main.cs
index a8402d0..0ef8a01 100644
--- a/Main/Main.cs
+++ b/Main/Main.cs
@@ -72,6 +72,7 @@
         managers.Add(RankModel.Instance);
         managers.Add(PlayerMainDate.Instance);
         managers.Add(HeroUIManager.Instance);
+        managers.Add(InvestModel.Instance);
 
         foreach (var manager in managers)
         {
diff --git a/Main/SDK/SDKUtils.cs b/Main/SDK/SDKUtils.cs
index 5de29d2..80c40dd 100644
--- a/Main/SDK/SDKUtils.cs
+++ b/Main/SDK/SDKUtils.cs
@@ -374,7 +374,7 @@
         var _result = "default";
         switch (Application.platform)
         {
-            case RuntimePlatform.Android:
+            case RuntimePlatform.Android:
                 _result = "android";
                 break;
             case RuntimePlatform.IPhonePlayer:
@@ -955,53 +955,53 @@
     public void FreePlatformPay(string title, float money, string cpInfo)
     {
         // 鎻愮ず鏄惁浣跨敤浠i噾鍒�
-        // var gameCash = UIHelper.GetAllVourcher();
+        var gameCash = UIHelper.GetAllVourcher();
 
-        // bool isBuyGameCash = false; //浠i噾鍒告湰韬殑鍏呭�间笉鑳界敤浠i噾鍒歌喘涔� 閫犳垚寰幆
-        // int ctgID = ModelCenter.Instance.GetModel<VipModel>().orderInfoToCTGID[cpInfo];
-        // if (ctgID != 0)
-        // {
-        //     isBuyGameCash = CTGConfig.Get(ctgID).PayType == 17;
-        // }
+        bool isBuyGameCash = false; //浠i噾鍒告湰韬殑鍏呭�间笉鑳界敤浠i噾鍒歌喘涔� 閫犳垚寰幆
+        int ctgID = RechargeManager.Instance.orderInfoToCTGID[cpInfo];
+        if (ctgID != 0)
+        {
+            isBuyGameCash = CTGConfig.Get(ctgID).PayType == 17;
+        }
 
 
-        // if (!isBuyGameCash && gameCash >= money * 100 && !LoginAwardModel.rechargeLimit.Contains(ctgID))
-        // {
+        if (!isBuyGameCash && gameCash >= money * 100)
+        {
 
-        //     WindowCenter.Instance.Close<GotoChargeWin>();
-        //     if (DayRemind.Instance.GetDayRemind(DayRemind.DJQTip))
-        //     {
-        //         var pack = new CA125_tagCMCoinBuyOrderInfo();
-        //         pack.AppID = VersionConfig.Get().appId;
-        //         pack.AppIDLen = (byte)pack.AppID.Length;
-        //         pack.OrderInfo = cpInfo;
-        //         pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
-        //         GameNetSystem.Instance.SendInfo(pack);
-        //     }
-        //     else
-        //     {
-        //         ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("GameCashRule1", money), Language.Get("TodayNoNotify"), (bool isOk, bool isToggle) =>
-        //         {
-        //             if (isOk)
-        //             {
-        //                 var pack = new CA125_tagCMCoinBuyOrderInfo();
-        //                 pack.AppID = VersionConfig.Get().appId;
-        //                 pack.AppIDLen = (byte)pack.AppID.Length;
-        //                 pack.OrderInfo = cpInfo;
-        //                 pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
-        //                 GameNetSystem.Instance.SendInfo(pack);
-        //             }
-        //             if (isToggle)
-        //             {
-        //                 DayRemind.Instance.SetDayRemind(DayRemind.DJQTip, true);
-        //             }
-        //         });
-        //     }
-        // }
-        // else
-        // { 
-        //     FreePlatformPayEx(title, money, cpInfo);
-        // }
+            UIManager.Instance.CloseWindow<GotoChargeWin>();
+            if (DayRemind.Instance.GetDayRemind(DayRemind.DJQTip))
+            {
+                var pack = new CA125_tagCMCoinBuyOrderInfo();
+                pack.AppID = VersionConfig.Get().appId;
+                pack.AppIDLen = (byte)pack.AppID.Length;
+                pack.OrderInfo = cpInfo;
+                pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
+                GameNetSystem.Instance.SendInfo(pack);
+            }
+            else
+            {
+                ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("GameCashRule1", money), Language.Get("TodayNoNotify"), (bool isOk, bool isToggle) =>
+                {
+                    if (isOk)
+                    {
+                        var pack = new CA125_tagCMCoinBuyOrderInfo();
+                        pack.AppID = VersionConfig.Get().appId;
+                        pack.AppIDLen = (byte)pack.AppID.Length;
+                        pack.OrderInfo = cpInfo;
+                        pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
+                        GameNetSystem.Instance.SendInfo(pack);
+                    }
+                    if (isToggle)
+                    {
+                        DayRemind.Instance.SetDayRemind(DayRemind.DJQTip, true);
+                    }
+                });
+            }
+        }
+        else
+        { 
+            FreePlatformPayEx(title, money, cpInfo);
+        }
     }
 
     public void FreePlatformPayEx(string title, float money, string cpInfo)
diff --git a/Main/System/HappyXB/HappyXBModel.cs b/Main/System/HappyXB/HappyXBModel.cs
index ee20400..1b5af30 100644
--- a/Main/System/HappyXB/HappyXBModel.cs
+++ b/Main/System/HappyXB/HappyXBModel.cs
@@ -234,7 +234,7 @@
     /// </summary>
     /// <param name="type">瀵诲疂绫诲瀷</param>
     /// <param name="index">0 鍗曟瀵诲疂 1 澶氭瀵诲疂</param>
-    /// <param name="costType">0-榛樿浠欑帀锛�1-鍏嶈垂娆℃暟锛�2-瀵诲疂閬撳叿</param>
+    /// <param name="costType">0-璐у竵锛�1-鍏嶈垂娆℃暟锛�2-瀵诲疂閬撳叿</param>
     public event Action<int> StartXBEvent;
     public void SendXBQuest(int type, int index, int costType)
     {
@@ -310,16 +310,31 @@
 
             if (UIHelper.GetMoneyCnt(moneyType) >= (ulong)xbOneMoney)
             {
-                StoreModel.Instance.UseMoneyCheck(xbOneMoney, moneyType, () =>
+                //鏆傚畾鍏呭�艰揣甯侀渶瑕佷簩娆$‘璁�
+                if (moneyType == 1)
+                {
+                    StoreModel.Instance.UseMoneyCheck(xbOneMoney, moneyType, () =>
+                    {
+                        SendXBQuest(xbType, 0, 0);
+                    }, (int)BuyStoreItemCheckType.HeroCall, fullTip: Language.Get("CostMoneyForItem", funcSet.CostItemID, xbOneMoney,
+                    UIHelper.GetIconNameWithMoneyType(moneyType), funcSet.CostItemCountList[0]));
+
+                }
+                else
                 {
                     SendXBQuest(xbType, 0, 0);
-                }, (int)BuyStoreItemCheckType.HeroCall, fullTip: Language.Get("CostMoneyForItem", funcSet.CostItemID, xbOneMoney,
-                UIHelper.GetIconNameWithMoneyType(moneyType), funcSet.CostItemCountList[0]));
+                }
             }
             else
             {
-                SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
-                ItemTipUtility.Show(GeneralDefine.MoneyDisplayModel[moneyType], true);
+                if (!GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType))
+                { 
+                    SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
+                }
+                else
+                {
+                    ItemTipUtility.Show(GeneralDefine.MoneyDisplayModel[moneyType], true);
+                }
             }
         }
     }
@@ -350,17 +365,31 @@
             int moneyType = funcSet.CostMoneyType;
             if (UIHelper.GetMoneyCnt(moneyType) >= (ulong)needMoney)
             {
-                StoreModel.Instance.UseMoneyCheck(needMoney, moneyType, () =>
+                //鏆傚畾鍏呭�艰揣甯侀渶瑕佷簩娆$‘璁�
+                if (moneyType == 1)
                 {
-                    //鍙鏈夐亾鍏峰氨鏄亾鍏峰瀹濓紝涓嶈冻閮ㄥ垎鏈嶅姟绔墸璐у竵
+                    StoreModel.Instance.UseMoneyCheck(needMoney, moneyType, () =>
+                    {
+                        //鍙鏈夐亾鍏峰氨鏄亾鍏峰瀹濓紝涓嶈冻閮ㄥ垎鏈嶅姟绔墸璐у竵
+                        SendXBQuest(xbType, 1, toolCnt > 0 ? 2 : 0);
+                    }, (int)BuyStoreItemCheckType.HeroCall, fullTip: Language.Get("CostMoneyForItem", funcSet.CostItemID, needMoney,
+                    UIHelper.GetIconNameWithMoneyType(moneyType), needToolCnt - toolCnt));
+                }
+                else
+                {
                     SendXBQuest(xbType, 1, toolCnt > 0 ? 2 : 0);
-                }, (int)BuyStoreItemCheckType.HeroCall, fullTip: Language.Get("CostMoneyForItem", funcSet.CostItemID, needMoney,
-                UIHelper.GetIconNameWithMoneyType(moneyType), needToolCnt - toolCnt));
+                }
             }
             else
             {
-                SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
-                ItemTipUtility.Show(GeneralDefine.MoneyDisplayModel[moneyType], true);
+                if (!GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType))
+                { 
+                    SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
+                }
+                else
+                {
+                    ItemTipUtility.Show(GeneralDefine.MoneyDisplayModel[moneyType], true);
+                }
             }
 
         }
diff --git a/Main/System/HappyXB/HeroCallResultWin.cs b/Main/System/HappyXB/HeroCallResultWin.cs
index e5397bb..43add94 100644
--- a/Main/System/HappyXB/HeroCallResultWin.cs
+++ b/Main/System/HappyXB/HeroCallResultWin.cs
@@ -70,19 +70,13 @@
         HappyXBModel.Instance.RefreshXBTypeInfoAct += RefreshBtn;
         InitMoney();
         UpdateState();
-        Display();
+        RefreshBtn();
     }
 
     protected override void OnPreClose()
     {
         HappyXBModel.Instance.RefreshXBResultAct -= UpdateState;
         HappyXBModel.Instance.RefreshXBTypeInfoAct -= RefreshBtn;
-    }
-
-    void Display()
-    {
-        // RefreshState();
-        RefreshBtn();
     }
 
     void UpdateState()
@@ -131,13 +125,13 @@
         if (resultState == 0)
         {
             btnsObj.SetActive(true);
-            call1Btn.SetActive(true);
+            call1Btn.SetActive(HeroUIManager.Instance.selectCallType != HappXBTitle.HeroCallScore ? true : false);
             call10Btn.SetActive(false);
 
             result1Obj.SetActive(true);
             result10Obj.SetActive(false);
             result10LihuiObj.SetActive(false);
-            moneyObj.SetActive(true);
+            ShowMoney(true);
             heroInfoObj.SetActive(true);
 
             result1Cell.Display(HappyXBModel.Instance.xbResultDict[0].itemId, 0);
@@ -152,7 +146,7 @@
             result1Obj.SetActive(false);
             result10Obj.SetActive(true);
             result10LihuiObj.SetActive(false);
-            moneyObj.SetActive(true);
+            ShowMoney(true);
             heroInfoObj.SetActive(false);
             if (isSkip)
                 Refresh10Result();
@@ -164,7 +158,7 @@
             result1Obj.SetActive(false);
             result10Obj.SetActive(true);
             result10LihuiObj.SetActive(false);
-            moneyObj.SetActive(false);
+            ShowMoney(false);
             heroInfoObj.SetActive(false);
             Refresh10Result();
         }
@@ -175,7 +169,7 @@
             result1Obj.SetActive(false);
             result10Obj.SetActive(false);
             result10LihuiObj.SetActive(true);
-            moneyObj.SetActive(false);
+            ShowMoney(false);
             heroInfoObj.SetActive(true);
             RefreshLihui();
         }
@@ -184,6 +178,20 @@
     public void RefreshBtn()
     {
         var funcSet = TreasureSetConfig.Get((int)HeroUIManager.Instance.selectCallType);
+        if (funcSet.CostItemID == 0)
+        { 
+            call1ItemIcon.SetActive(false);
+            call1Text.SetActive(false);
+            call10ItemIcon.SetActive(false);
+            call10Text.SetActive(false);
+            return;
+        }
+
+        call1ItemIcon.SetActive(true);
+        call1Text.SetActive(true);
+        call10ItemIcon.SetActive(true);
+        call10Text.SetActive(true);
+        
         var item = ItemConfig.Get(funcSet.CostItemID);
         var IconKey = item.IconKey;
         call1ItemIcon.SetOrgSprite(IconKey);
@@ -203,6 +211,16 @@
         call10Text.text = Language.Get("L1100", item.ItemName, funcSet.CostItemCountList[1]);
     }
 
+    void ShowMoney(bool show)
+    {
+        if (HeroUIManager.Instance.selectCallType == HappXBTitle.HeroCallScore)
+        {
+            moneyObj.SetActive(false);
+            return;
+        }
+        moneyObj.SetActive(show);
+    }
+
     void Refresh10Result()
     {
         for (int i = 0; i < result10Cells.Length; i++)
diff --git a/Main/System/HappyXB/HeroCallScoreWin.cs b/Main/System/HappyXB/HeroCallScoreWin.cs
new file mode 100644
index 0000000..5bce5c3
--- /dev/null
+++ b/Main/System/HappyXB/HeroCallScoreWin.cs
@@ -0,0 +1,91 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+/// <summary>
+/// 绉垎鎷涘嫙
+/// </summary>
+public class HeroCallScoreWin : UIBase
+{
+    [SerializeField] Button ruleBtn;
+    [SerializeField] Image sliderImg;
+    [SerializeField] Text scoreProcessText;
+    [SerializeField] Text tryLockText;
+    [SerializeField] Button call1Btn;
+
+
+
+    protected override void InitComponent()
+    {
+        call1Btn.AddListener(SendHeroCall);
+    }
+
+
+    protected override void OnPreOpen()
+    {
+        HappyXBModel.Instance.RefreshXBTypeInfoAct += Refresh;
+        Refresh();
+    }
+
+    protected override void OnPreClose()
+    {
+        HappyXBModel.Instance.RefreshXBTypeInfoAct -= Refresh;
+    }
+
+
+    public override void Refresh()
+    {
+        var funcSet = TreasureSetConfig.Get((int)HappXBTitle.HeroCallScore);
+        scoreProcessText.text = UIHelper.GetMoneyCnt(51) + "/" + TreasureSetConfig.Get((int)HappXBTitle.HeroCallScore).CostMoneyList[0];
+        sliderImg.fillAmount = (float)UIHelper.GetMoneyCnt(51) / TreasureSetConfig.Get((int)HappXBTitle.HeroCallScore).CostMoneyList[0];
+        if (UIHelper.GetMoneyCnt(51) >= (ulong)TreasureSetConfig.Get((int)HappXBTitle.HeroCallScore).CostMoneyList[0])
+        {
+            scoreProcessText.color = UIHelper.GetUIColor(TextColType.LightWhite);
+        }
+        else
+        {
+            scoreProcessText.color = UIHelper.GetUIColor(TextColType.Red);
+        }
+        if (InvestModel.Instance.IsInvested(InvestModel.monthCardType))
+        {
+            tryLockText.SetActive(false);
+            call1Btn.SetActive(true);
+        }
+        else
+        {
+            tryLockText.SetActive(true);
+            if (HappyXBModel.Instance.GetXBInfoByType((int)HappXBTitle.HeroCallScore).treasureCount == 0)
+            {
+                tryLockText.text = Language.Get("heroCall4", 1);
+                call1Btn.SetActive(true);
+            }
+            else
+            {
+                tryLockText.text = Language.Get("heroCall4", 0);
+                call1Btn.SetActive(false);
+            }
+            
+        }
+    }
+
+
+    void SendHeroCall()
+    {
+
+        if (!InvestModel.Instance.IsInvested(InvestModel.monthCardType))
+        {
+            //鏈拱鏈堝崱浣撻獙1娆�
+            if (HappyXBModel.Instance.GetXBInfoByType((int)HappXBTitle.HeroCallScore).treasureCount != 0)
+            {
+                return;
+            }
+        }
+
+        HeroUIManager.Instance.selectCallType = HappXBTitle.HeroCallScore;
+        HeroUIManager.Instance.selectCallIndex = 0;
+
+        HappyXBModel.Instance.SendOneXBQuest((int)HappXBTitle.HeroCallScore);
+    }
+
+}
\ No newline at end of file
diff --git a/Main/System/HappyXB/HeroCallScoreWin.cs.meta b/Main/System/HappyXB/HeroCallScoreWin.cs.meta
new file mode 100644
index 0000000..8075b37
--- /dev/null
+++ b/Main/System/HappyXB/HeroCallScoreWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4a39b88777149fb498604231bb29f255
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/HappyXB/HeroCallWin.cs b/Main/System/HappyXB/HeroCallWin.cs
index 4176582..229a972 100644
--- a/Main/System/HappyXB/HeroCallWin.cs
+++ b/Main/System/HappyXB/HeroCallWin.cs
@@ -33,11 +33,15 @@
         });
         ownItemCell.itemID = TreasureSetConfig.Get((int)HappXBTitle.HeroCallAdvanced).CostItemID;
         call1Btn.AddListener(SendHeroCall);
-        call10Btn.AddListener(()=>
+        call10Btn.AddListener(() =>
         {
             HeroUIManager.Instance.selectCallType = HappXBTitle.HeroCallAdvanced;
             HeroUIManager.Instance.selectCallIndex = 1;
             HappyXBModel.Instance.SendXBManyQuest((int)HappXBTitle.HeroCallAdvanced);
+        });
+        scoreBtn.AddListener(() =>
+        { 
+            UIManager.Instance.OpenWindow<HeroCallScoreWin>();
         });
     }
 
@@ -72,6 +76,17 @@
         }
         call10Text.text = Language.Get("L1100", item.ItemName, funcSet.CostItemCountList[1]);
 
+        scoreText.text = UIHelper.GetMoneyCnt(51) + "/" + TreasureSetConfig.Get((int)HappXBTitle.HeroCallScore).CostMoneyList[0];
+
+        if (UIHelper.GetMoneyCnt(51) >= (ulong)TreasureSetConfig.Get((int)HappXBTitle.HeroCallScore).CostMoneyList[0])
+        { 
+            scoreTween.SetActive(true);
+        }
+        else
+        {
+            scoreTween.SetActive(false);
+        }
+
         RefreshFreeTime();
     }
 
diff --git a/Main/System/Invest.meta b/Main/System/Invest.meta
new file mode 100644
index 0000000..974ba08
--- /dev/null
+++ b/Main/System/Invest.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8b5c73a4ffdc4c64da1462264f99720f
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Invest/InvestModel.cs b/Main/System/Invest/InvestModel.cs
new file mode 100644
index 0000000..cebccca
--- /dev/null
+++ b/Main/System/Invest/InvestModel.cs
@@ -0,0 +1,377 @@
+锘縰sing System;
+using System.Collections.Generic;
+using UnityEngine.UI;
+using System.Linq;
+using LitJson;
+
+public class InvestModel : GameSystemManager<InvestModel>
+{
+    public ILOpenServerActivityProxy activity;
+
+    public const int FuncID = 119;
+
+
+    //鎶曡祫瀵瑰簲濂栧姳
+    Dictionary<int, Dictionary<int, List<Item>>> m_InvestItems = new Dictionary<int, Dictionary<int, List<Item>>>();
+    //鎶曡祫瀵瑰簲鍏呭�糏D
+    Dictionary<int, int[]> m_InvestRechargeIds = new Dictionary<int, int[]>();
+    //鎶曡祫瀵瑰簲璐拱鎯呭喌
+    Dictionary<int, InvestInfo> m_InvestInfos = new Dictionary<int, InvestInfo>();
+    //{鎶曡祫绫诲瀷锛歔棰嗗彇澶╋紝褰撳墠澶} 澶╀粠1寮�濮�
+    Dictionary<int, List<List<int>>> m_InvestSingleInfos = new Dictionary<int, List<List<int>>>();
+    //鎶曡祫瀵瑰簲鐨勭孩鐐�
+    Dictionary<int, Redpoint> m_Redpoints = new Dictionary<int, Redpoint>();
+    //鎶曡祫绫诲瀷
+    public List<int> investTypes = new List<int>();
+
+
+    //姘镐箙鍗� 鏉冮檺
+    public const int foreverCardType = 12; //鎶曡祫绫诲瀷   
+    public const int monthCardType = 7; // 鏈堝崱7
+
+
+
+    public event Action onSelectUpdate;
+    public event Action onInvestUpdate;
+
+    public const int redpointID = 20931;
+    public Redpoint redpoint = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, redpointID);
+
+
+    public override void Init()
+    {
+        FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
+        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk;
+
+        //閫氳繃閰嶇疆鍐冲畾鏄惁鏈夋鎶曡祫椤癸紝濡傛腐鍙版病鏈夌櫥褰曟姇璧�
+        ParseConfig();
+
+    }
+
+
+
+    public override void Release()
+    {
+        FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
+        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
+        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= OnPlayerLoginOk;
+    }
+
+    public bool IsOpen()
+    {
+        return FuncOpen.Instance.IsFuncOpen(FuncID);
+    }
+
+    
+    public void OnBeforePlayerDataInitialize()
+    {
+        m_InvestInfos.Clear();
+        m_InvestSingleInfos.Clear();
+    }
+
+    public void OnPlayerLoginOk()
+    {
+        UpdateRedpoint();
+    }
+
+
+    void ParseConfig()
+    {
+        investTypes.Clear();
+        var funcConfig = FuncConfigConfig.Get("InvestCost");
+        m_InvestRechargeIds = ConfigParse.ParseIntArrayDict(funcConfig.Numerical3);
+        //m_Redpoints
+
+        investTypes = m_InvestRechargeIds.Keys.ToList();
+
+        investTypes.Sort();
+
+        var configs = InvestConfig.GetValues();
+        for (int i = 0; i < configs.Count; i++)
+        {
+            var config = configs[i];
+            if (!investTypes.Contains(config.type))
+            {
+                continue;
+            }
+
+            Dictionary<int, List<Item>> dict;
+            if (!m_InvestItems.TryGetValue(config.type, out dict))
+            {
+                dict = new Dictionary<int, List<Item>>();
+                m_InvestItems.Add(config.type, dict);
+            }
+
+            List<Item> items;
+            if (!dict.TryGetValue(config.id, out items))
+            {
+                items = new List<Item>();
+                dict.Add(config.id, items);
+            }
+
+            var itemArray = config.award[1];    //1鏆傛椂绾﹀畾鏈堝崱 姘镐箙鍗★紝鍏朵粬鐨勮嚜瀹氫箟鍚庣画鍐嶅畾
+            for (int j = 0; j < itemArray.Length; j++)
+            {
+                items.Add(new Item()
+                {
+                    id = itemArray[j][0],
+                    countEx = (ulong)itemArray[j][1],
+                    bind = itemArray[j][2],
+                });
+            }
+        }
+    }
+
+    public OrderInfoConfig GetOrderInfoId(int type)
+    {
+        var ids = m_InvestRechargeIds[type];
+        for (int i = 0; i < ids.Length; i++)
+        {
+            OrderInfoConfig config;
+            if (RechargeManager.Instance.TryGetOrderInfo(ids[i], out config))
+            {
+                return config;
+            }
+        }
+        return null;
+    }
+
+
+    public bool hasInvestType(int type)
+    {
+        return investTypes.Contains(type);
+    }
+
+
+    public int GetInvestPassDays(int type)
+    {
+        return m_InvestInfos.ContainsKey(type) ? m_InvestInfos[type].days : 0;
+    }
+
+    //鑾峰緱鍗曟姇璧勭殑鎬绘敹鐩�
+    public ulong GetTotalIncome(int type)
+    {
+        ulong income = 0;
+        if (m_InvestItems.ContainsKey(type))
+        {
+            var keyList = m_InvestItems[type].Keys.ToList();
+            for (int i = 0; i < keyList.Count; i++)
+            {
+                var items = m_InvestItems[type][keyList[i]];
+                for (var j = 0; j < items.Count; j++)
+                {
+                    var item = items[j];
+                    if (item.id == 20 || item.id == 30)
+                        income += item.countEx;
+                }
+            }
+        }
+        return income;
+    }
+
+
+    //id 涓鸿〃閲岀殑ID
+    //0-鏈姇璧� 1-鏈揪鎴� 2-鍙鍙� 3-宸查鍙�
+    public int GetSingleInvestState(int type, int id)
+    {
+        if (IsInvested(type))
+        {
+            var day = GetInvestPassDays(type);
+            if (m_InvestItems.ContainsKey(type)
+                && m_InvestItems[type].ContainsKey(id))
+            {
+                if (IsRewardGot(type, id))
+                {
+                    return 3;
+                }
+                var config = InvestConfig.Get(id);
+
+                if (!m_InvestSingleInfos.ContainsKey(type))
+                {
+                    return 0;
+                }
+
+                var index = id % 100;
+                //姣忎釜鏁版寜浣嶅瓨31涓縺娲荤储寮�
+                var listIndex = index / 31;
+                var bitIndex = index % 31;
+
+
+                return day < config.needDay ? 1 : 2;
+            }
+        }
+        return 0;
+    }
+
+
+
+    public bool TryGetItems(int type, int id, out List<Item> items)
+    {
+        items = null;
+        if (m_InvestItems.ContainsKey(type))
+        {
+            return m_InvestItems[type].TryGetValue(id, out items);
+        }
+        return false;
+    }
+
+    public List<int> GetIdsByType(int type)
+    {
+        if (m_InvestItems.ContainsKey(type))
+        {
+            return m_InvestItems[type].Keys.ToList();
+        }
+        return null;
+    }
+
+    //鍒ゆ柇鏄惁璐拱浜嗘姇璧�
+    public bool IsInvested(int type)
+    {
+        return m_InvestInfos.ContainsKey(type) && m_InvestInfos[type].money > 0;
+    }
+
+    //濂栧姳鏄惁宸查鍙�
+    public bool IsRewardGot(int type, int id)
+    {
+        if (m_InvestSingleInfos.ContainsKey(type))
+        {
+            var index = id % 100;
+            //姣忎釜鏁版寜浣嶅瓨31涓縺娲荤储寮�
+            var listIndex = index / 31;
+            var bitIndex = index % 31;
+            return ((int)Math.Pow(2, bitIndex) & m_InvestSingleInfos[type][1][listIndex]) != 0;
+        }
+        return false;
+    }
+
+
+    private void OnFuncStateChangeEvent(int id)
+    {
+        if (id == FuncID)
+        {
+            activity.StateUpdate(id);
+            UpdateRedpoint();
+        }
+
+    }
+
+    
+
+    public void SendGetReward(int type, int id)
+    {
+        var pak = new CA541_tagCMGetInvestReward();
+        pak.InvestType = (byte)type;
+        pak.RewardIndex = (byte)(id % 100);
+        GameNetSystem.Instance.SendInfo(pak);
+    }
+
+    //璐拱鎶曡祫
+    public void BuyInvest(int type)
+    {
+        RechargeManager.Instance.CTG(GetOrderInfoId(type));
+    }
+
+    public void UpdateInvestInfo(HA338_tagMCInvestInfo package)
+    {
+        if (!investTypes.Contains(package.InvestType))
+        {
+            return;
+        }
+
+        m_InvestInfos[package.InvestType] = new InvestInfo()
+        {
+            days = (int)package.CurDay,
+            money = package.CurDay >= 1 ? 1 : 0,
+        };
+
+        List<List<int>> singleInfos;
+        if (!m_InvestSingleInfos.TryGetValue(package.InvestType, out singleInfos))
+        {
+            singleInfos = new List<List<int>>();
+            m_InvestSingleInfos.Add(package.InvestType, singleInfos);
+        }
+        singleInfos.Clear();
+        singleInfos.Add(new List<int>());
+        singleInfos.Add(new List<int>());
+        singleInfos.Add(new List<int>());
+        singleInfos[0].Add((int)package.CurDay);
+        for (int i = 0; i < package.ValueCount; i++)
+        {
+            singleInfos[1].Add((int)package.RewardValue[i]);
+            singleInfos[2].Add((int)package.ProgressValue[i]);
+        }
+        UpdateRedpoint();
+
+        if (onInvestUpdate != null)
+        {
+            onInvestUpdate();
+        }
+    }
+
+    void UpdateRedpoint()
+    {
+        List<int> redpointTypes = new List<int>();
+        if (IsOpen())
+        {
+            for (var i = 0; i < investTypes.Count; i++)
+            {
+                var type = investTypes[i];
+                if (!IsInvested(type))
+                {
+                    continue;
+                }
+                var keyList = m_InvestItems[type].Keys.ToList();
+                for (int j = 0; j < keyList.Count; j++)
+                {
+                    var id = keyList[j];
+                    if (GetSingleInvestState(type, id) == 2)
+                    {
+                        redpointTypes.Add(type);
+                        break;
+                    }
+                }
+            }
+        }
+
+        var redList = m_Redpoints.Keys.ToList();
+        for (int j = 0; j < redList.Count; j++)
+        {
+            var type = redList[j];
+            m_Redpoints[type].state = redpointTypes.Contains(type) ? RedPointState.Simple : RedPointState.None;
+        }
+    }
+
+    
+
+    //宸茬粡璐拱骞堕鍙栨墍鏈夌墿鍝�
+    public bool IsFinish()
+    {
+        for (int i = 0; i < investTypes.Count; i++)
+        {
+            int type = investTypes[i];
+            //蹇界暐姘镐箙鍗�
+            if (type == foreverCardType)
+                continue;
+            var idsList = GetIdsByType(type);
+            if (idsList.IsNullOrEmpty())
+                continue;
+            for (int j = 0; j < idsList.Count; j++)
+            {
+                int id = idsList[j];
+                if (GetSingleInvestState(type, id) != 3)
+                {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    public struct InvestInfo
+    {
+        public int money;
+        public int days;
+    }
+}
+
diff --git a/Main/System/Invest/InvestModel.cs.meta b/Main/System/Invest/InvestModel.cs.meta
new file mode 100644
index 0000000..216f2ae
--- /dev/null
+++ b/Main/System/Invest/InvestModel.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2b3e856e57feb8b48aff823cacee137c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/ItemTip/OwnItemCell.cs b/Main/System/ItemTip/OwnItemCell.cs
index 3d1a62f..cf84db2 100644
--- a/Main/System/ItemTip/OwnItemCell.cs
+++ b/Main/System/ItemTip/OwnItemCell.cs
@@ -12,7 +12,9 @@
 
     void Start()
     {
-        itemIcon.SetOrgSprite(ItemConfig.Get(itemID).IconKey);
+        if (itemID != 0)
+            itemIcon.SetOrgSprite(ItemConfig.Get(itemID).IconKey);
+            
         wayBtn.AddListener(()=>
         { 
             ItemTipUtility.Show(itemID, true);
diff --git a/Main/System/ItemTip/OwnMoneyCell.cs b/Main/System/ItemTip/OwnMoneyCell.cs
index dc9b79a..61e4e58 100644
--- a/Main/System/ItemTip/OwnMoneyCell.cs
+++ b/Main/System/ItemTip/OwnMoneyCell.cs
@@ -11,7 +11,9 @@
 
     void Start()
     {
-        moneyIcon.SetIconWithMoneyType(moneyType);
+        if (moneyType != 0)
+            moneyIcon.SetIconWithMoneyType(moneyType);
+            
         if (wayBtn != null)
         { 
             wayBtn.AddListener(()=>
diff --git a/Main/System/Main/HomeWin.cs b/Main/System/Main/HomeWin.cs
index 1ccc79c..f4e73cd 100644
--- a/Main/System/Main/HomeWin.cs
+++ b/Main/System/Main/HomeWin.cs
@@ -29,6 +29,10 @@
 
     [SerializeField] Button autoBtn;
 
+
+    //鍏朵粬鍔熻兘鍏ュ彛
+    [SerializeField] Button monthCardBtn;
+
     /// <summary>
     /// 鍒濆鍖栫粍浠�
     /// </summary>
@@ -46,7 +50,7 @@
             UIManager.Instance.OpenWindow<HeroPosWin>();
         });
 
-        autoBtn.AddListener(()=>
+        autoBtn.AddListener(() =>
         {
             //娴嬭瘯鎷惧彇鎵�鏈夌墿鍝�
             var items = PackManager.Instance.GetItems(PackType.DropItem);
@@ -64,9 +68,15 @@
             }
             if (dropindexs.Count > 0)
             {
-                EquipModel.Instance.NotifyItemDrop(dropindexs, BattleManager.Instance.storyBattleField.battleRootNode.blueTeamNodeList[Random.Range(0,5)].GetComponent<RectTransform>());
+                EquipModel.Instance.NotifyItemDrop(dropindexs, BattleManager.Instance.storyBattleField.battleRootNode.blueTeamNodeList[Random.Range(0, 5)].GetComponent<RectTransform>());
                 dropindexs.Clear();
             }
+        });
+
+
+        monthCardBtn.AddListener(() =>
+        {
+            InvestModel.Instance.BuyInvest(InvestModel.monthCardType);
         });
     }
 
@@ -77,6 +87,7 @@
     {
         UpdatePlayerInfo();
         UpdateTask();
+        RefreshRecharge();
     }
 
     protected override void OnPreOpen()
@@ -119,6 +130,11 @@
 
     }
 
+    void RefreshRecharge()
+    { 
+        monthCardBtn.SetActive(!InvestModel.Instance.IsInvested(InvestModel.monthCardType));
+    }
+
     /// <summary>
     /// 鏇存柊鐜╁淇℃伅
     /// </summary>
diff --git a/Main/System/Recharge/GotoChargeWin.cs b/Main/System/Recharge/GotoChargeWin.cs
new file mode 100644
index 0000000..c6189f7
--- /dev/null
+++ b/Main/System/Recharge/GotoChargeWin.cs
@@ -0,0 +1,69 @@
+//--------------------------------------------------------
+//    [Author]:           绗簩涓栫晫
+//    [  Date ]:           Wednesday, May 09, 2018
+//--------------------------------------------------------
+
+using System;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class GotoChargeWin : UIBase
+{
+    [SerializeField] Text m_CTGStageDisplay;
+    public long startTime = DateTime.Now.Ticks;
+    
+
+    private void Update() {
+#if !UNITY_EDITOR
+        if (SDKUtils.Instance.FreePlatformInfo == null || string.IsNullOrEmpty(SDKUtils.Instance.FreePlatformInfo.account)){
+            return;
+        }
+        if (DateTime.Now.Ticks - startTime > 50000000)
+        {
+            CloseWindow();
+        }
+#endif
+
+        if (DateTime.Now.Ticks - startTime > 10000000)
+        {
+            CloseWindow();
+        }
+
+    }
+    protected override void OnPreOpen()
+    {
+        SDKUtils.Instance.onFreePlatformPayCancel += OnChargeComplete;
+        SDKUtils.Instance.onFreePlatformPayFail += OnChargeComplete;
+        SDKUtils.Instance.onFreePlatformPayOk += OnChargeComplete;
+
+        m_CTGStageDisplay.text = Language.Get("GotoCharging");
+        RechargeManager.Instance.OnCTGStageChange += OnCTGStageChange;
+
+        startTime = DateTime.Now.Ticks;
+    }
+
+
+    protected override void OnPreClose()
+    {
+        SDKUtils.Instance.onFreePlatformPayCancel -= OnChargeComplete;
+        SDKUtils.Instance.onFreePlatformPayFail -= OnChargeComplete;
+        SDKUtils.Instance.onFreePlatformPayOk -= OnChargeComplete;
+        RechargeManager.Instance.OnCTGStageChange -= OnCTGStageChange;
+    }
+
+
+
+    private void OnCTGStageChange(string _display)
+    {
+        m_CTGStageDisplay.text = _display;
+    }
+    private void OnChargeComplete()
+    {
+        CloseWindow();
+    }
+}
+
+
+
+
+
diff --git a/Main/System/Recharge/GotoChargeWin.cs.meta b/Main/System/Recharge/GotoChargeWin.cs.meta
new file mode 100644
index 0000000..b183610
--- /dev/null
+++ b/Main/System/Recharge/GotoChargeWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: de7b6ab55e42a8349b47e45201f894d9
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

--
Gitblit v1.8.0