From 88c90db6931233cf10213c6e7e4400ee29f980d0 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 22 四月 2026 17:16:06 +0800
Subject: [PATCH] 492 武将返场 高级战令

---
 Main/System/HeroReturn/HeroReturnZhanLingPreviewCell.cs.meta  |   11 
 Main/System/HeroReturn/HeroReturnZhanLingPreviewCell.cs       |   35 +
 Main/System/HeroReturn/HeroReturnZhanLingPreviewHWin.cs       |   91 +++++
 Main/System/HeroReturn/HeroReturnZhanLingPreviewWin.cs        |   87 ++++
 Main/System/HeroReturn/HeroReturnZhanLingPreviewWin.cs.meta   |   11 
 Main/System/HeroReturn/HeroReturnCallWin.cs                   |   28 -
 Main/System/HeroReturn/HeroReturnWin.cs                       |    4 
 Main/System/BattlePass/BattlePassManager.cs                   |   10 
 Main/System/HeroReturn/HeroReturnZhanLingPreviewHWin.cs.meta  |   11 
 Main/System/HeroReturn/HeroReturnZhanLingCell.cs              |  121 ++++++
 Main/System/UIBase/UIJumpManager.cs                           |    2 
 Main/System/HeroReturn/HeroReturnZhanLingCell.cs.meta         |   11 
 Main/System/HeroReturn/HeroReturnZhanLingPreviewHCell.cs.meta |   11 
 Main/System/HeroReturn/HeroReturnManager.cs                   |  402 ++++++++++++++++++++++
 Main/System/HeroReturn/HeroReturnZhanLingPreviewHCell.cs      |   35 +
 Main/System/HeroReturn/HeroReturnZhanLingWin.cs               |  151 ++++++++
 Main/System/HeroReturn/HeroReturnZhanLingWin.cs.meta          |   11 
 17 files changed, 1,007 insertions(+), 25 deletions(-)

diff --git a/Main/System/BattlePass/BattlePassManager.cs b/Main/System/BattlePass/BattlePassManager.cs
index d76d0eb..d4f3745 100644
--- a/Main/System/BattlePass/BattlePassManager.cs
+++ b/Main/System/BattlePass/BattlePassManager.cs
@@ -135,10 +135,12 @@
                 }
 
         }
-        
+
         if (HeroDebutManager.IsZhanLingType(type))
         {
             HeroDebutManager.Instance.UpdateRedpoint();
+            HeroReturnManager.Instance.UpdateRedpoint();
+            return;
         }
     }
 
@@ -377,12 +379,16 @@
 
         }
 
-        // 澶勭悊ZhanLing绫诲瀷锛堜粠HeroDebutManager鑾峰彇缂撳瓨鐨刏hanLingType鍒楄〃锛�
         if (HeroDebutManager.IsZhanLingType(_type))
         {
             return HeroDebutManager.GetZhanLingValueByType(_type);
         }
 
+        if (HeroReturnManager.IsZhanLingType(_type))
+        {
+            return HeroReturnManager.GetZhanLingValueByType(_type);
+        }
+
         return 0;
     }
 }
diff --git a/Main/System/HeroReturn/HeroReturnCallWin.cs b/Main/System/HeroReturn/HeroReturnCallWin.cs
index 11014c7..84d2be5 100644
--- a/Main/System/HeroReturn/HeroReturnCallWin.cs
+++ b/Main/System/HeroReturn/HeroReturnCallWin.cs
@@ -54,6 +54,7 @@
     [SerializeField] UIHeroController lhController;
     [SerializeField] UIHeroController uiHeroController;
     [SerializeField] HeroReturnCallBubbleCell[] bubbleCell;
+    [SerializeField] RichText richText;
 
     [SerializeField] float modleSize = 1f;
     HeroReturnManager manager => HeroReturnManager.Instance;
@@ -275,8 +276,10 @@
         xbButton10.Display(config.ActTreasureType, 1);
         resMoneyCallCntText.text = Language.Get("HeroDebut24", Mathf.Max(treasureSetConfig.DailyMaxCountMoney - xbTypeInfo.treasureCountTodayGold, 0));
 
-        var needCount = GetNextXBCountForBigAward(treasureType);
-        nextBigAwardCntText.text = Language.Get("HeroDebut08", needCount.ToString());
+        int buyState = manager.GetZhanLingBuyState();
+        bool isBuyPaidH = buyState == 2 || buyState == 3;
+        var needCount = manager.GetNextXBCountForBigAward(treasureType) - (isBuyPaidH ? manager.subVulue : 0);
+        nextBigAwardCntText.text = Language.Get("HeroDebut08", needCount <= 0 ? 1 : needCount);
 
         heroQualityText.text = Language.Get($"heroCallQaulity{heroConfig.Quality}");
         manager.SetheroQaulityColor(heroQualityText, heroConfig.Quality);
@@ -303,28 +306,13 @@
             }
         }
 
+        // 璐拱浜嗛珮绾ф垬浠わ紙鐜勭骇锛夋椂闅愯棌richText
+        richText.SetActive(!isBuyPaidH);
+
         ShowTop3();
         OnSecondEvent();
     }
 
-    public int GetNextXBCountForBigAward(int type)
-    {
-        XBTypeInfo typeInfo = HappyXBModel.Instance.GetXBInfoByType(type);
-        if (typeInfo == null) return 0;
-
-        var xbConfig = HappyXBModel.Instance.GetXBItemConfigByType(type);
-        var luckList = xbConfig.LuckyItemRateInfo.Keys.ToList();
-        luckList.Sort();
-        for (int i = 0; i < luckList.Count; i++)
-        {
-            var luckyValue = typeInfo.luckValue;
-            if (luckyValue < luckList[i])
-            {
-                return luckList[i] - luckyValue;
-            }
-        }
-        return 0;
-    }
     void ShowTop3()
     {
         for (int i = 0; i < top3NameText.Length; i++)
diff --git a/Main/System/HeroReturn/HeroReturnManager.cs b/Main/System/HeroReturn/HeroReturnManager.cs
index d7930e8..5f5647d 100644
--- a/Main/System/HeroReturn/HeroReturnManager.cs
+++ b/Main/System/HeroReturn/HeroReturnManager.cs
@@ -6,9 +6,12 @@
 
 public class HeroReturnManager : GameSystemManager<HeroReturnManager>, IOpenServerActivity
 {
+    // 缂撳瓨鐨刏hanLingType鍒楄〃锛堜粠ActHeroAppearConfig鑾峰彇锛屽悗缁笉鍙橈級
+    private static List<int> zhanLingTypeList = null;
     public int[] xbGridArr;
     public Dictionary<int, int[][]> heroQaulityColor;
     public int[][] seeArr;
+    public int subVulue;
     public override void Init()
     {
         DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin += OnBeforePlayerDataInitializeEventOnRelogin;
@@ -22,15 +25,19 @@
         GeneralActInfoManager.Instance.OnUpdateActSignInfosEvent += OnUpdateActSignInfosEvent;
         HeroManager.Instance.onHeroChangeEvent += OnHeroChangeEvent;
         TimeMgr.Instance.OnDayEvent += OnDayEvent;
+        BattlePassManager.Instance.BattlePassDataUpdateEvent += OnBattlePassDataUpdate;
 
         var config = FuncConfigConfig.Get("HeroAppear");
         xbGridArr = JsonMapper.ToObject<int[]>(config.Numerical1);
+        subVulue = int.Parse(config.Numerical4);
 
         config = FuncConfigConfig.Get("HeroReturn");
         heroQaulityColor = ConfigParse.ParseIntArray2Dict(config.Numerical1);
         seeArr = JsonMapper.ToObject<int[][]>(config.Numerical2);
-
+        
         InitRedPointId();
+
+
     }
 
     public void SetheroQaulityColor(GradientText text, int qaulity)
@@ -53,6 +60,7 @@
         GeneralActInfoManager.Instance.OnUpdateActSignInfosEvent -= OnUpdateActSignInfosEvent;
         HeroManager.Instance.onHeroChangeEvent -= OnHeroChangeEvent;
         TimeMgr.Instance.OnDayEvent -= OnDayEvent;
+        BattlePassManager.Instance.BattlePassDataUpdateEvent -= OnBattlePassDataUpdate;
     }
 
     private void OnDayEvent()
@@ -312,12 +320,14 @@
     public Redpoint starUpRedpoint;
     public Redpoint shopRedpoint;
     public Redpoint giftRedpoint;
+    public Redpoint zhanLingRedpoint;
     public void InitRedPointId()
     {
         checkInRedpoint ??= new Redpoint(MainRedDot.HeroReturnRepoint, GetRedPointId(HeroReturnRedPointType.CheckIn));
         starUpRedpoint ??= new Redpoint(MainRedDot.HeroReturnRepoint, GetRedPointId(HeroReturnRedPointType.StarUp));
         shopRedpoint ??= new Redpoint(MainRedDot.HeroReturnRepoint, GetRedPointId(HeroReturnRedPointType.Shop));
         giftRedpoint ??= new Redpoint(MainRedDot.HeroReturnRepoint, GetRedPointId(HeroReturnRedPointType.Gift));
+        zhanLingRedpoint ??= new Redpoint(MainRedDot.HeroReturnRepoint, GetRedPointId(HeroReturnRedPointType.ZhanLing));
     }
 
     public void UpdateRedpoint()
@@ -327,6 +337,7 @@
         starUpRedpoint.state = RedPointState.None;
         shopRedpoint.state = RedPointState.None;
         giftRedpoint.state = RedPointState.None;
+        zhanLingRedpoint.state = RedPointState.None;
 
         if (!IsHeroReturnOpen()) return;
 
@@ -349,6 +360,10 @@
         if (HasGiftCanHave())//鐨囨潈绀煎寘
         {
             giftRedpoint.state = RedPointState.Simple;
+        }
+        if (HasZhanLingCanHave())//鎴樹护
+        {
+            zhanLingRedpoint.state = RedPointState.Simple;
         }
     }
     #endregion
@@ -834,7 +849,6 @@
         LocalSave.SetBool(GetCallSkipKey(cfgID, startDate, endDate), value);
     }
 
-
     /// <summary>
     /// 褰撳墠鎷涘嫙閫変腑鐨勬灏咺D
     /// </summary>
@@ -847,6 +861,43 @@
         if (config == null || config.ActHeroIDList?.Length <= callHeroIndex) return 0;
 
         return config.ActHeroIDList[callHeroIndex];
+    }
+    public int GetLuckValueAward(int type)
+    {
+        XBTypeInfo typeInfo = HappyXBModel.Instance.GetXBInfoByType(type);
+        if (typeInfo == null) return 0;
+
+        var xbConfig = HappyXBModel.Instance.GetXBItemConfigByType(type);
+        var luckList = xbConfig.LuckyItemRateInfo.Keys.ToList();
+        luckList.Sort();
+        for (int i = 0; i < luckList.Count; i++)
+        {
+            var luckyValue = typeInfo.luckValue;
+            if (luckyValue < luckList[i])
+            {
+                return luckList[i];
+            }
+        }
+        return 0;
+    }
+
+    public int GetNextXBCountForBigAward(int type)
+    {
+        XBTypeInfo typeInfo = HappyXBModel.Instance.GetXBInfoByType(type);
+        if (typeInfo == null) return 0;
+
+        var xbConfig = HappyXBModel.Instance.GetXBItemConfigByType(type);
+        var luckList = xbConfig.LuckyItemRateInfo.Keys.ToList();
+        luckList.Sort();
+        for (int i = 0; i < luckList.Count; i++)
+        {
+            var luckyValue = typeInfo.luckValue;
+            if (luckyValue < luckList[i])
+            {
+                return luckList[i] - luckyValue;
+            }
+        }
+        return 0;
     }
 
     public int GetFirstHeroId()
@@ -1051,7 +1102,353 @@
     }
 
     #endregion
+    #region 鎴樹护
+    /// <summary>
+    /// 姝﹀皢鐧诲満鎴樹护绫诲瀷锛堜粠閰嶇疆瀹炴椂鑾峰彇锛�
+    /// </summary>
+    public int ZhanLingType => GetCurrentZhanLingType();
 
+    /// <summary>
+    /// 鑾峰彇褰撳墠鎴樹护绫诲瀷
+    /// </summary>
+    private int GetCurrentZhanLingType()
+    {
+        var act = GetOperationHeroAppearInfo();
+        if (act == null)
+            return 0;
+
+        var config = ActHeroAppearConfig.Get(act.CfgID);
+        return config?.ActZhanlingType ?? 0;
+    }
+
+    /// <summary>
+    /// 姝﹀皢鐧诲満鎴樹护鍔熻兘ID
+    /// </summary>
+    public const int ZhanLingFuncId = 63;
+
+    /// <summary>
+    /// 鎴樹护鏁版嵁鏇存柊浜嬩欢
+    /// </summary>
+    public event Action OnZhanLingUpdateEvent;
+
+    private void OnBattlePassDataUpdate(int type)
+    {
+        if (type == ZhanLingType)
+        {
+            OnZhanLingUpdateEvent?.Invoke();
+        }
+    }
+
+    /// <summary>
+    /// 鑾峰彇姝﹀皢鐧诲満鎴樹护鐨勫綋鍓嶈繘搴﹀��
+    /// </summary>
+    public int GetZhanLingValue()
+    {
+        var data = BattlePassManager.Instance.GetBattlePassData(ZhanLingType);
+        return data != null ? (int)data.value1 : 0;
+    }
+
+    /// <summary>
+    /// 鍒ゆ柇鎸囧畾绫诲瀷鏄惁涓篫hanLing绫诲瀷锛堢紦瀛樻煡璇級
+    /// </summary>
+    public static bool IsZhanLingType(int type)
+    {
+        if (zhanLingTypeList == null)
+        {
+            zhanLingTypeList = ActHeroAppearConfig.GetValues()
+                .Select(x => x.ActZhanlingType)
+                .Where(x => x > 0)
+                .Distinct()
+                .ToList();
+        }
+        return zhanLingTypeList.Contains(type);
+    }
+
+    /// <summary>
+    /// 鑾峰彇鎸囧畾ZhanLing绫诲瀷鐨勮繘搴﹀��
+    /// </summary>
+    public static int GetZhanLingValueByType(int zhanLingType)
+    {
+        var data = BattlePassManager.Instance.GetBattlePassData(zhanLingType);
+        return data != null ? (int)data.value1 : 0;
+    }
+
+    /// <summary>
+    /// 鍒ゆ柇姝﹀皢鐧诲満鎴樹护鐨勬寚瀹氱瓑绾ф槸鍚﹁揪鎴�
+    /// </summary>
+    public bool IsZhanLingNeedValueOk(int needValue)
+    {
+        return GetZhanLingValue() >= needValue;
+    }
+
+    /// <summary>
+    /// 鑾峰彇姝﹀皢鐧诲満鎴樹护鐨勮喘涔扮姸鎬�
+    /// 0 娌¤喘涔拌繘闃跺拰鐜勭骇 1 璐拱浜嗚繘闃舵病涔扮巹绾� 2 璐拱浜嗙巹绾ф病涔拌繘闃� 3 璐拱浜嗚繘闃跺拰鐜勭骇
+    /// </summary>
+    public int GetZhanLingBuyState()
+    {
+        var data = BattlePassManager.Instance.GetBattlePassData(ZhanLingType);
+        if (data == null)
+            return 0;
+
+        bool isBuyPaid = data.isActivite > 0;
+        bool isBuyPaidH = data.isActiviteH > 0;
+        if (isBuyPaid && isBuyPaidH)
+            return 3;
+        if (isBuyPaid)
+            return 1;
+        if (isBuyPaidH)
+            return 2;
+        return 0;
+    }
+
+    /// <summary>
+    /// 鏄惁鏈夊彲棰嗗彇鐨勬垬浠ゅ鍔�
+    /// </summary>
+    public bool HasZhanLingCanHave()
+    {
+        var data = BattlePassManager.Instance.GetBattlePassData(ZhanLingType);
+        if (data == null)
+            return false;
+
+        var dict = ZhanlingConfig.GetTypeToIDDict(ZhanLingType);
+        if (dict.IsNullOrEmpty())
+            return false;
+
+        int buyState = GetZhanLingBuyState();
+        bool isBuyPaid = buyState == 1 || buyState == 3;
+        bool isBuyPaidH = buyState == 2 || buyState == 3;
+
+        foreach (var kvp in dict)
+        {
+            int needValue = kvp.Key;
+            // 妫�鏌ュ厤璐瑰鍔�
+            int freeState = GetZhanLingFreeGiftState(needValue);
+            if (freeState == 1)
+                return true;
+
+            // 妫�鏌ユ櫘閫氬鍔憋紙闇�瑕佸凡璐拱杩涢樁锛�
+            if (isBuyPaid)
+            {
+                int paidState = GetZhanLingPaidGiftState(needValue);
+                if (paidState == 1)
+                    return true;
+            }
+
+            // 妫�鏌ラ珮绾у鍔憋紙闇�瑕佸凡璐拱鐜勭骇锛�
+            if (isBuyPaidH)
+            {
+                int paidHState = GetZhanLingPaidGiftHState(needValue);
+                if (paidHState == 1)
+                    return true;
+            }
+        }
+
+        return false;
+    }
+
+    /// <summary>
+    /// 鑾峰彇姝﹀皢鐧诲満鎴樹护鍏嶈垂濂栧姳鐘舵��
+    /// 0 涓嶈兘棰� 1 鏈鍙� 2 宸查鍙�
+    /// </summary>
+    public int GetZhanLingFreeGiftState(int needValue)
+    {
+        var data = BattlePassManager.Instance.GetBattlePassData(ZhanLingType);
+        if (data == null)
+            return 0;
+        var totalValue = BattlePassManager.Instance.GetTotalValue(ZhanLingType);
+        return BattlePassManager.Instance.GetBPCellAwardState(data, totalValue, needValue, 0);
+    }
+
+    /// <summary>
+    /// 鑾峰彇姝﹀皢鐧诲満鎴樹护鏅�氬鍔辩姸鎬�
+    /// 0 涓嶈兘棰� 1 鏈鍙� 2 宸查鍙�
+    /// </summary>
+    public int GetZhanLingPaidGiftState(int needValue)
+    {
+        var data = BattlePassManager.Instance.GetBattlePassData(ZhanLingType);
+        if (data == null)
+            return 0;
+        var totalValue = BattlePassManager.Instance.GetTotalValue(ZhanLingType);
+        return BattlePassManager.Instance.GetBPCellAwardState(data, totalValue, needValue, 1);
+    }
+
+    /// <summary>
+    /// 鑾峰彇姝﹀皢鐧诲満鎴樹护楂樼骇濂栧姳鐘舵��
+    /// 0 涓嶈兘棰� 1 鏈鍙� 2 宸查鍙�
+    /// </summary>
+    public int GetZhanLingPaidGiftHState(int needValue)
+    {
+        var data = BattlePassManager.Instance.GetBattlePassData(ZhanLingType);
+        if (data == null)
+            return 0;
+        var totalValue = BattlePassManager.Instance.GetTotalValue(ZhanLingType);
+        return BattlePassManager.Instance.GetBPCellAwardState(data, totalValue, needValue, 2);
+    }
+
+    /// <summary>
+    /// 涓�閿鍙栨灏嗙櫥鍦烘垬浠ゆ墍鏈夊彲棰嗗彇濂栧姳
+    /// </summary>
+    public void HaveAllZhanLingGift()
+    {
+        var data = BattlePassManager.Instance.GetBattlePassData(ZhanLingType);
+        if (data == null)
+            return;
+
+        if (PackManager.Instance.GetEmptyGridCount(PackType.Item) < 1)
+        {
+            SysNotifyMgr.Instance.ShowTip("GeRen_lhs_202580");
+            return;
+        }
+
+        var totalValue = BattlePassManager.Instance.GetTotalValue(ZhanLingType);
+        BattlePassManager.Instance.GetAllAward(data, ZhanLingType, totalValue);
+    }
+    #endregion
+
+    #region 鎴樹护棰勮璐拱
+    /// <summary>
+    /// 褰撳墠棰勮鐨勬垬浠ょ被鍨�
+    /// </summary>
+    public int previewZhanLingType { get; private set; }
+
+    /// <summary>
+    /// 褰撳墠棰勮鐨勭ぜ鍖呯被鍨� 1 鏅�氭垬浠ょぜ鍖� 2 楂樼骇鎴樹护绀煎寘
+    /// </summary>
+    public int previewGiftType { get; private set; }
+
+    /// <summary>
+    /// 鏄剧ず鎴樹护璐拱棰勮鐣岄潰
+    /// </summary>
+    public void ShowZhanLingHBuy(int zhanLingType, int showGiftType)
+    {
+        previewZhanLingType = zhanLingType;
+        previewGiftType = showGiftType;
+
+        if (showGiftType == 1)
+        {
+            UIManager.Instance.OpenWindow<HeroReturnZhanLingPreviewWin>();
+        }
+        else if (showGiftType == 2)
+        {
+            UIManager.Instance.OpenWindow<HeroReturnZhanLingPreviewHWin>();
+        }
+    }
+
+    /// <summary>
+    /// 鑾峰彇褰撳墠棰勮绫诲瀷鐨勫厖鍊糏D
+    /// </summary>
+    public int GetPreviewCtgID()
+    {
+        int ctgid = 0;
+        if (previewGiftType == 1)
+        {
+            ctgid = BattlePassManager.Instance.GetCTGIDByType(previewZhanLingType);
+        }
+        else if (previewGiftType == 2)
+        {
+            // 楂樼骇鎴樹护浣跨敤 Numerical3
+            var config = FuncConfigConfig.Get("Zhanling");
+            if (config != null)
+            {
+                var dict = ConfigParse.ParseIntArrayDict(config.Numerical3);
+                if (dict.TryGetValue(previewZhanLingType, out var arr) && arr.Length > 0)
+                {
+                    ctgid = arr[0];
+                }
+            }
+        }
+        return ctgid;
+    }
+
+    /// <summary>
+    /// 鑾峰彇璐拱鍚庢墍鏈夌瓑绾х殑濂栧姳
+    /// </summary>
+    /// <param name="maxCountPerSlot">姣忎釜鐩稿悓鐨刬temid姣忎釜鏍煎瓙鏈�澶у悓鏃舵樉绀虹殑鏁伴噺</param>
+    public List<Item> GetPreviewGiftAllItem(int maxCountPerSlot = 20)
+    {
+        List<int> collectList = new List<int>();
+        var dict = ZhanlingConfig.GetTypeToIDDict(previewZhanLingType);
+        if (dict.IsNullOrEmpty())
+            return new List<Item>();
+
+        var arr = dict.Keys.ToArray();
+        for (int i = 0; i < arr.Length; i++)
+        {
+            int needValue = arr[i];
+            int zhanLingId = dict[needValue];
+            collectList.Add(zhanLingId);
+        }
+        return CollectPreviewItems(collectList, maxCountPerSlot);
+    }
+
+    private List<Item> CollectPreviewItems(List<int> collectList, int maxCountPerSlot)
+    {
+        Dictionary<int, int> resultDict = new Dictionary<int, int>();
+        for (int i = 0; i < collectList.Count; i++)
+        {
+            int zhanLingId = collectList[i];
+            int[][] itemArr = GetPreviewItemArr(zhanLingId, previewGiftType);
+            if (itemArr.IsNullOrEmpty())
+                continue;
+
+            for (int j = 0; j < itemArr.Length; j++)
+            {
+                int itemID = itemArr[j][0];
+                int count = itemArr[j][1];
+                if (resultDict.ContainsKey(itemID))
+                    resultDict[itemID] += count;
+                else
+                    resultDict[itemID] = count;
+            }
+        }
+        List<Item> result = GetItemListByDict(resultDict, maxCountPerSlot);
+        result.Sort(CmpPreviewItem);
+        return result;
+    }
+
+    private int[][] GetPreviewItemArr(int zhanLingId, int showGiftType)
+    {
+        var config = ZhanlingConfig.Get(zhanLingId);
+        if (config == null)
+            return new int[][] { };
+
+        if (showGiftType == 1)
+            return config.ZLRewardItemList;
+        if (showGiftType == 2)
+            return config.ZLRewardItemListH;
+        return new int[][] { };
+    }
+
+    private List<Item> GetItemListByDict(Dictionary<int, int> dict, int maxCountPerSlot)
+    {
+        List<Item> result = new List<Item>();
+        var arr = dict.Keys.ToArray();
+        for (int i = 0; i < arr.Length; i++)
+        {
+            int itemID = arr[i];
+            int count = dict[itemID];
+
+            // 鏍规嵁maxCountPerSlot鎷嗗垎鏁伴噺锛屾瘡涓狪tem鏈�澶氭樉绀簃axCountPerSlot涓�
+            int slotCount = Mathf.CeilToInt((float)count / maxCountPerSlot);
+            for (int s = 0; s < slotCount; s++)
+            {
+                int itemCount = Mathf.Min(maxCountPerSlot, count - s * maxCountPerSlot);
+                result.Add(new Item(itemID, itemCount));
+            }
+        }
+        return result;
+    }
+
+    private int CmpPreviewItem(Item a, Item b)
+    {
+        int quality1 = ItemConfig.Get(a.id).ItemColor;
+        int quality2 = ItemConfig.Get(b.id).ItemColor;
+        if (quality1 != quality2)
+            return quality2.CompareTo(quality1);
+        return a.countEx.CompareTo(b.countEx);
+    }
+    #endregion
     #region 鑾峰璁板綍
     public static readonly int RecordType = 311;
 
@@ -1141,6 +1538,7 @@
     StarUp = 2,
     Shop = 3,
     Gift = 4,
+    ZhanLing = 5,
 }
 
 public class HeroReturnGameRec
diff --git a/Main/System/HeroReturn/HeroReturnWin.cs b/Main/System/HeroReturn/HeroReturnWin.cs
index 19c9f61..d05a679 100644
--- a/Main/System/HeroReturn/HeroReturnWin.cs
+++ b/Main/System/HeroReturn/HeroReturnWin.cs
@@ -29,6 +29,8 @@
     [SerializeField] UIHeroController lhController;
     [SerializeField] Image callRedImage;
     [SerializeField] ButtonEx closeButton;
+    [SerializeField] ButtonEx zhanlingBtn;
+    [SerializeField] RedpointBehaviour zhanlingRedpoint;
     [SerializeField] float modleSize = 0.8f;
 
     // 杞挱鐩稿叧
@@ -66,6 +68,7 @@
         skinButton.SetListener(() => UIManager.Instance.OpenWindow<HeroReturnSkinWin>());
         giftButton.SetListener(() => UIManager.Instance.OpenWindow<HeroReturnGiftWin>());
         callButton.SetListener(() => UIManager.Instance.OpenWindow<HeroReturnCallWin>());
+        zhanlingBtn.SetListener(() => UIManager.Instance.OpenWindow<HeroReturnZhanLingWin>());
     }
 
     protected override void OnPreOpen()
@@ -104,6 +107,7 @@
         starUpRedpoint.redpointId = manager.GetRedPointId(HeroReturnRedPointType.StarUp);
         shopRedpoint.redpointId = manager.GetRedPointId(HeroReturnRedPointType.Shop);
         giftRedpoint.redpointId = manager.GetRedPointId(HeroReturnRedPointType.Gift);
+        zhanlingRedpoint.redpointId = manager.GetRedPointId(HeroReturnRedPointType.ZhanLing);
     }
 
     private void Display()
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingCell.cs b/Main/System/HeroReturn/HeroReturnZhanLingCell.cs
new file mode 100644
index 0000000..cd97fbb
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingCell.cs
@@ -0,0 +1,121 @@
+锘縰sing System.Linq;
+using UnityEngine;
+
+public class HeroReturnZhanLingCell : CellView
+{
+    [SerializeField] ItemCell freeItemCell;
+    [SerializeField] Transform freeGotRect;
+    [SerializeField] Transform baseCanGetAwardRect;
+
+    [SerializeField] ItemCell[] paidAwards;
+    [SerializeField] Transform[] paidGotRects;
+    [SerializeField] Transform[] paidCanGetRects;
+    [SerializeField] Transform[] paidLockRects;
+    [SerializeField] ItemCell[] paidHAwards;
+    [SerializeField] Transform[] paidHGotRects;
+    [SerializeField] Transform[] paidHCanGetRects;
+    [SerializeField] Transform[] paidHLockRects;
+    [SerializeField] Transform upProcssBGRect;
+    [SerializeField] Transform upProcessRect;
+    [SerializeField] Transform downProcssBGRect;
+    [SerializeField] Transform downProcessRect;
+    [SerializeField] TextEx txtUnlockLV;
+    [SerializeField] Transform mask;
+
+    HeroReturnManager zhanLingModel => HeroReturnManager.Instance;
+
+    public void Display(int needValue)
+    {
+        var totalValue = BattlePassManager.Instance.GetTotalValue(zhanLingModel.ZhanLingType);
+        int zhanlingId = ZhanlingConfig.GetTypeToIDDict(zhanLingModel.ZhanLingType)[needValue];
+        int freeState = zhanLingModel.GetZhanLingFreeGiftState(needValue);
+        int paidState = zhanLingModel.GetZhanLingPaidGiftState(needValue);
+        int paidHState = zhanLingModel.GetZhanLingPaidGiftHState(needValue);
+        int buyState = zhanLingModel.GetZhanLingBuyState();
+
+        freeGotRect.SetActive(freeState == 2);
+        baseCanGetAwardRect.SetActive(freeState == 1);
+        mask.SetActive(freeState == 0);
+
+        for (int i = 0; i < paidAwards.Length; i++)
+        {
+            bool isBuy = buyState == 1 || buyState == 3;
+            paidGotRects[i].SetActive(paidState == 2);
+            paidCanGetRects[i].SetActive(paidState == 1 && isBuy);
+            paidLockRects[i].SetActive(!isBuy || paidState == 0);
+        }
+        for (int i = 0; i < paidHAwards.Length; i++)
+        {
+            bool isBuy = buyState == 2 || buyState == 3;
+            paidHGotRects[i].SetActive(paidHState == 2);
+            paidHCanGetRects[i].SetActive(paidHState == 1 && isBuy);
+            paidHLockRects[i].SetActive(!isBuy || paidHState == 0);
+        }
+        txtUnlockLV.text = needValue.ToString();
+
+        // 杩涘害鏉℃樉绀洪�昏緫
+        var ids = ZhanlingConfig.GetTypeToIDDict(zhanLingModel.ZhanLingType).Values.ToList();
+        ids.Sort();
+        upProcssBGRect.SetActive(ids[0] != zhanlingId);
+        upProcessRect.SetActive(freeState != 0);
+
+        downProcssBGRect.SetActive(ids[ids.Count - 1] != zhanlingId);
+        var nextConfig = ZhanlingConfig.Get(zhanlingId + 1);
+        downProcessRect.SetActive(nextConfig != null && totalValue >= nextConfig.NeedValue);
+
+        // 灞曠ずItemCell
+        var config = ZhanlingConfig.Get(zhanlingId);
+        if (config == null)
+            return;
+
+        // 鍏嶈垂濂栧姳
+        int freeItemId = config.FreeRewardItemList[0][0];
+        freeItemCell.Init(new ItemCellModel(freeItemId, false, config.FreeRewardItemList[0][1]));
+        freeItemCell.button.onClick.RemoveAllListeners();
+        freeItemCell.button.onClick.AddListener(() =>
+        {
+            if (freeState == 1)
+                zhanLingModel.HaveAllZhanLingGift();
+            else
+                ItemTipUtility.Show(freeItemId);
+        });
+
+        // 鏅�氬鍔�
+        for (int i = 0; i < paidAwards.Length; i++)
+        {
+            if (i >= config.ZLRewardItemList.Length)
+                continue;
+            int itemId2 = config.ZLRewardItemList[i][0];
+            paidAwards[i].Init(new ItemCellModel(itemId2, false, config.ZLRewardItemList[i][1]));
+            paidAwards[i].button.onClick.RemoveAllListeners();
+            paidAwards[i].button.onClick.AddListener(() =>
+            {
+                if (buyState == 0 || buyState == 2)
+                    zhanLingModel.ShowZhanLingHBuy(zhanLingModel.ZhanLingType, 1);
+                else if (paidState == 1)
+                    zhanLingModel.HaveAllZhanLingGift();
+                else
+                    ItemTipUtility.Show(itemId2);
+            });
+        }
+
+        // 楂樼骇濂栧姳
+        for (int i = 0; i < paidHAwards.Length; i++)
+        {
+            if (i >= config.ZLRewardItemListH.Length)
+                continue;
+            int itemId3 = config.ZLRewardItemListH[i][0];
+            paidHAwards[i].Init(new ItemCellModel(itemId3, false, config.ZLRewardItemListH[i][1]));
+            paidHAwards[i].button.onClick.RemoveAllListeners();
+            paidHAwards[i].button.onClick.AddListener(() =>
+            {
+                if (buyState == 0 || buyState == 1)
+                    zhanLingModel.ShowZhanLingHBuy(zhanLingModel.ZhanLingType, 2);
+                else if (paidHState == 1)
+                    zhanLingModel.HaveAllZhanLingGift();
+                else
+                    ItemTipUtility.Show(itemId3);
+            });
+        }
+    }
+}
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingCell.cs.meta b/Main/System/HeroReturn/HeroReturnZhanLingCell.cs.meta
new file mode 100644
index 0000000..a54a57a
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 39bf58fd6d8037e48900b76fe480d1e6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingPreviewCell.cs b/Main/System/HeroReturn/HeroReturnZhanLingPreviewCell.cs
new file mode 100644
index 0000000..aaa06c7
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingPreviewCell.cs
@@ -0,0 +1,35 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+public class HeroReturnZhanLingPreviewCell : CellView
+{
+    [SerializeField] ItemCell[] itemCells;
+    public const int itemCountPerRow = 5;
+
+    public void Display(int rowIndex, List<Item> items)
+    {
+        if (items == null)
+            return;
+
+        for (int i = 0; i < itemCells.Length; i++)
+        {
+            int index = rowIndex * itemCountPerRow + i;
+            if (index < items.Count)
+            {
+                itemCells[i].SetActive(true);
+                int itemID = items[index].id;
+                long count = items[index].countEx;
+                itemCells[i].Init(new ItemCellModel(itemID, false, count));
+                int clickItemId = itemID;
+                itemCells[i].button.AddListener(() =>
+                {
+                    ItemTipUtility.Show(clickItemId);
+                });
+            }
+            else
+            {
+                itemCells[i].SetActive(false);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingPreviewCell.cs.meta b/Main/System/HeroReturn/HeroReturnZhanLingPreviewCell.cs.meta
new file mode 100644
index 0000000..81a41a4
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingPreviewCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f2ea9ee2a4a29b742987ad12099575d4
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingPreviewHCell.cs b/Main/System/HeroReturn/HeroReturnZhanLingPreviewHCell.cs
new file mode 100644
index 0000000..cbcecbe
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingPreviewHCell.cs
@@ -0,0 +1,35 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+public class HeroReturnZhanLingPreviewHCell : CellView
+{
+    [SerializeField] ItemCell[] itemCells;
+    public const int itemCountPerRow = 5;
+
+    public void Display(int rowIndex, List<Item> items)
+    {
+        if (items == null)
+            return;
+
+        for (int i = 0; i < itemCells.Length; i++)
+        {
+            int index = rowIndex * itemCountPerRow + i;
+            if (index < items.Count)
+            {
+                itemCells[i].SetActive(true);
+                int itemID = items[index].id;
+                long count = items[index].countEx;
+                itemCells[i].Init(new ItemCellModel(itemID, false, count));
+                int clickItemId = itemID;
+                itemCells[i].button.AddListener(() =>
+                {
+                    ItemTipUtility.Show(clickItemId);
+                });
+            }
+            else
+            {
+                itemCells[i].SetActive(false);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingPreviewHCell.cs.meta b/Main/System/HeroReturn/HeroReturnZhanLingPreviewHCell.cs.meta
new file mode 100644
index 0000000..6fb4bc5
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingPreviewHCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ba3207764a58b62479b99da756d17f30
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingPreviewHWin.cs b/Main/System/HeroReturn/HeroReturnZhanLingPreviewHWin.cs
new file mode 100644
index 0000000..15359e8
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingPreviewHWin.cs
@@ -0,0 +1,91 @@
+using System;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class HeroReturnZhanLingPreviewHWin : UIBase
+{
+    [SerializeField] ScrollerController allScroller; //鎵�鏈夌瓑绾у鍔�
+    [SerializeField] Button btnClose;
+    [SerializeField] Button btnBuy;
+
+    [SerializeField] Text txtBuy;
+    [SerializeField] Text txtPercentage;
+    [SerializeField] Image imgMoney;
+    [SerializeField] Text txtMoney;
+
+    HeroReturnManager model => HeroReturnManager.Instance;
+    int ctgID;
+    int showCnt = 50;
+    protected override void InitComponent()
+    {
+        btnClose.AddListener(CloseWindow);
+        btnBuy.AddListener(OnBuyClick);
+    }
+
+    protected override void OnPreOpen()
+    {
+        allScroller.OnRefreshCell += OnScrollerRefreshAllCell;
+        Display();
+    }
+
+    protected override void OnPreClose()
+    {
+        allScroller.OnRefreshCell -= OnScrollerRefreshAllCell;
+
+    }
+
+    void OnBuyClick()
+    {
+        if (ctgID == 0)
+        {
+            CloseWindow();
+            return;
+        }
+        RechargeManager.Instance.CTG(ctgID);
+        CloseWindow();
+    }
+
+    protected override void NextFrameAfterOpen()
+    {
+        CreateAllScroller();
+    }
+
+    private void OnScrollerRefreshAllCell(ScrollerDataType type, CellView cell)
+    {
+        var _cell = cell as HeroReturnZhanLingPreviewHCell;
+        _cell.Display(_cell.index, model.GetPreviewGiftAllItem(showCnt));
+    }
+
+    void Display()
+    {
+        ctgID = model.GetPreviewCtgID();
+        var config = CTGConfig.Get(ctgID);
+        if (config == null)
+        {
+            CloseWindow();
+            return;
+        }
+        OrderInfoConfig orderCfg;
+        RechargeManager.Instance.TryGetOrderInfo(ctgID, out orderCfg);
+
+        txtPercentage.text = Language.Get("TimingGift02", config.Percentage);
+        txtBuy.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderCfg.PayRMBNumOnSale));
+        imgMoney.SetIconWithMoneyType(config.MoneyType);
+        txtMoney.text = config.GainGold.ToString();
+    }
+
+    private void CreateAllScroller()
+    {
+        var items = model.GetPreviewGiftAllItem(showCnt);
+        if (items == null || items.Count == 0)
+            return;
+        int rowCount = (int)Math.Ceiling((double)items.Count / HeroReturnZhanLingPreviewCell.itemCountPerRow);
+        allScroller.Refresh();
+        for (int i = 0; i < rowCount; i++)
+        {
+            allScroller.AddCell(ScrollerDataType.Header, i);
+        }
+        allScroller.Restart();
+    }
+
+}
\ No newline at end of file
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingPreviewHWin.cs.meta b/Main/System/HeroReturn/HeroReturnZhanLingPreviewHWin.cs.meta
new file mode 100644
index 0000000..90833e6
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingPreviewHWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 94b75faeefad0d640b0016287e56158f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingPreviewWin.cs b/Main/System/HeroReturn/HeroReturnZhanLingPreviewWin.cs
new file mode 100644
index 0000000..8b1d5a8
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingPreviewWin.cs
@@ -0,0 +1,87 @@
+锘縰sing System;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class HeroReturnZhanLingPreviewWin : UIBase
+{
+    [SerializeField] ScrollerController allScroller; //鎵�鏈夌瓑绾у鍔�
+    [SerializeField] Button btnClose;
+    [SerializeField] Button btnBuy;
+    [SerializeField] Text txtBuy;
+    [SerializeField] Text txtPercentage;
+    [SerializeField] Image imgMoney;
+    [SerializeField] Text txtMoney;
+    HeroReturnManager model => HeroReturnManager.Instance;
+    int ctgID;
+    int showCnt = 10;
+
+    protected override void OnPreOpen()
+    {
+        allScroller.OnRefreshCell += OnScrollerRefreshAllCell;
+        btnClose.AddListener(CloseWindow);
+        btnBuy.AddListener(OnBuyClick);
+        Display();
+    }
+
+    protected override void OnPreClose()
+    {
+        allScroller.OnRefreshCell -= OnScrollerRefreshAllCell;
+
+    }
+
+    void OnBuyClick()
+    {
+        if (ctgID == 0)
+        {
+            CloseWindow();
+            return;
+        }
+        RechargeManager.Instance.CTG(ctgID);
+        CloseWindow();
+    }
+
+    protected override void NextFrameAfterOpen()
+    {
+        CreateAllScroller();
+    }
+
+    private void OnScrollerRefreshAllCell(ScrollerDataType type, CellView cell)
+    {
+        var _cell = cell as HeroReturnZhanLingPreviewCell;
+        _cell.Display(_cell.index, model.GetPreviewGiftAllItem(showCnt));
+    }
+
+    void Display()
+    {
+        ctgID = model.GetPreviewCtgID();
+        var config = CTGConfig.Get(ctgID);
+        if (config == null)
+        {
+            CloseWindow();
+            return;
+        }
+        OrderInfoConfig orderCfg;
+        RechargeManager.Instance.TryGetOrderInfo(ctgID, out orderCfg);
+
+        txtPercentage.text = Language.Get("TimingGift02", config.Percentage);
+        txtBuy.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderCfg.PayRMBNumOnSale));
+        imgMoney.SetIconWithMoneyType(config.MoneyType);
+        txtMoney.text = config.GainGold.ToString();
+    }
+
+    private void CreateAllScroller()
+    {
+        var items = model.GetPreviewGiftAllItem(showCnt);
+        if (items == null || items.Count == 0)
+            return;
+        int rowCount = (int)Math.Ceiling((double)items.Count / HeroReturnZhanLingPreviewCell.itemCountPerRow);
+        allScroller.Refresh();
+        for (int i = 0; i < rowCount; i++)
+        {
+            allScroller.AddCell(ScrollerDataType.Header, i);
+        }
+        allScroller.Restart();
+    }
+
+
+}
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingPreviewWin.cs.meta b/Main/System/HeroReturn/HeroReturnZhanLingPreviewWin.cs.meta
new file mode 100644
index 0000000..da44361
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingPreviewWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b229745ad3e66044f931ac7deefcf6aa
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingWin.cs b/Main/System/HeroReturn/HeroReturnZhanLingWin.cs
new file mode 100644
index 0000000..aff6ea6
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingWin.cs
@@ -0,0 +1,151 @@
+锘縰sing System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+// 姝﹀皢鐧诲満鎴樹护
+public class HeroReturnZhanLingWin : UIBase
+{
+    [SerializeField] ScrollerController scroller;
+    [SerializeField] ButtonEx btnGo;
+    [SerializeField] ButtonEx btnPaid;
+    [SerializeField] ButtonEx btnPaidH;
+
+    [SerializeField] ImageEx imgPaidLock;
+    [SerializeField] ImageEx imgPaidLockH;
+
+    [SerializeField] Text txtNowNeedValue;
+
+    [SerializeField] Text welfarePerText;
+    [SerializeField] Text itemNameText;
+    [SerializeField] Image adImg;
+    [SerializeField] Image adWordImg;
+    [SerializeField] Image adHeroImg;
+
+    [SerializeField] Text txtPaidLock;
+    [SerializeField] Text txtPaidLockH;
+    [SerializeField] Text txtPaidLockBuyed;
+    [SerializeField] Text txtPaidLockBuyedH;
+
+    HeroReturnManager zhanLingModel => HeroReturnManager.Instance;
+    protected override void InitComponent()
+    {
+        btnGo.AddListener(OnGoClick);
+        btnPaid.AddListener(OnPaidClick);
+        btnPaidH.AddListener(OnPaidHClick);
+    }
+
+
+    protected override void OnPreOpen()
+    {
+        zhanLingModel.OnZhanLingUpdateEvent += OnZhanLingUpdateEvent;
+        scroller.OnRefreshCell += OnScrollerRefreshCell;
+        ShowStaticUI();
+        Initialize();
+        Display();
+    }
+
+    protected override void OnPreClose()
+    {
+        zhanLingModel.OnZhanLingUpdateEvent -= OnZhanLingUpdateEvent;
+        scroller.OnRefreshCell -= OnScrollerRefreshCell;
+    }
+
+    private void Display()
+    {
+        //0 娌¤喘涔拌繘闃跺拰鐜勭骇 1 璐拱浜嗚繘闃舵病涔扮巹绾� 2 璐拱浜嗙巹绾ф病涔拌繘闃� 3 璐拱浜嗚繘闃跺拰鐜勭骇
+        int buyState = zhanLingModel.GetZhanLingBuyState();
+        scroller.m_Scorller.RefreshActiveCellViews();
+        txtNowNeedValue.text = Language.Get("HeroReturnZhanLing06", zhanLingModel.GetZhanLingValue());
+
+        // imgPaidLock: 鏈喘涔拌繘闃�(type 1)涓旀湭璐拱鐜勭骇(type 2)鏃舵樉绀洪攣锛屾垨宸茶喘涔扮巹绾т絾鏈喘涔拌繘闃舵椂鏄剧ず閿�
+        imgPaidLock.SetActive(buyState == 0 || buyState == 2);
+        // imgPaidLockH: 鏈喘涔扮巹绾т笖鏈喘涔拌繘闃舵椂鏄剧ず閿侊紝鎴栧凡璐拱杩涢樁浣嗘湭璐拱鐜勭骇鏃舵樉绀洪攣
+        imgPaidLockH.SetActive(buyState == 0 || buyState == 1);
+
+        txtPaidLock.SetActive(buyState == 0 || buyState == 2);
+        txtPaidLockBuyed.SetActive(buyState == 1 || buyState == 3);
+
+        txtPaidLockH.SetActive(buyState == 0 || buyState == 1);
+        txtPaidLockBuyedH.SetActive(buyState == 2 || buyState == 3);
+    }
+
+    private void OnZhanLingUpdateEvent()
+    {
+        Display();
+        scroller.m_Scorller.RefreshActiveCellViews();
+    }
+
+    private void OnScrollerRefreshCell(ScrollerDataType type, CellView cell)
+    {
+        var _cell = cell as HeroReturnZhanLingCell;
+        _cell.Display(_cell.index);
+    }
+
+    private void Initialize()
+    {
+        var cellList = ZhanlingConfig.GetTypeToIDDict(zhanLingModel.ZhanLingType).Keys.ToList();
+        scroller.Refresh();
+        for (int i = 0; i < cellList.Count; i++)
+        {
+            scroller.AddCell(ScrollerDataType.Header, cellList[i]);
+        }
+        scroller.Restart();
+
+        var data = BattlePassManager.Instance.GetBattlePassData(zhanLingModel.ZhanLingType);
+        var totalValue = BattlePassManager.Instance.GetTotalValue(zhanLingModel.ZhanLingType);
+        scroller.JumpIndex(BattlePassManager.Instance.JumpIndex(data, zhanLingModel.ZhanLingType, totalValue));
+    }
+
+
+
+    void ShowStaticUI()
+    {
+        // 鑾峰彇楂樼骇浠樿垂锛圥aidH/鐜勭骇锛夌殑CTGID鍜岀櫨鍒嗘瘮
+        var funcConfig = FuncConfigConfig.Get("Zhanling");
+        var dict = ConfigParse.ParseIntArrayDict(funcConfig.Numerical3);
+        if (dict.TryGetValue(zhanLingModel.ZhanLingType, out var arr) && arr.Length > 0)
+        {
+            var paidHConfig = CTGConfig.Get(arr[0]);
+            welfarePerText.text = paidHConfig.Percentage + "%";
+        }
+
+        adWordImg.SetSprite("BattlePassInWord" + zhanLingModel.ZhanLingType);
+        adImg.SetSprite("BattlePassInWord" + zhanLingModel.ZhanLingType);
+
+        var act = zhanLingModel.GetOperationHeroAppearInfo();
+        if (act == null) return;
+
+        var config = ActHeroAppearConfig.Get(act.CfgID);
+        if (config == null) return;
+        var needCount = zhanLingModel.GetLuckValueAward(config.ActTreasureType) - zhanLingModel.subVulue;
+        itemNameText.text = Language.Get("HeroReturnZhanLing01", needCount);
+
+        int heroID = zhanLingModel.GetCurrentDisplayCallHeroId();
+        adImg.SetSprite($"HeroReturnZhanLingBG_{heroID}");
+        adWordImg.SetSprite($"HeroReturnZhanLingWord_{heroID}");
+        adHeroImg.SetSprite($"HeroReturnZhanLingHero_{heroID}");
+    }
+
+    void OnGoClick()
+    {
+        UIJumpManager.Instance.OpenWindow(20);
+    }
+
+    void OnPaidClick()
+    {
+        int buyState = zhanLingModel.GetZhanLingBuyState();
+        // 宸茶喘涔拌繘闃�(type 1)鎴栧凡璐拱鐜勭骇鍜岃繘闃�(buyState == 3)鏃朵笉鍐嶈烦杞�
+        if (buyState == 1 || buyState == 3)
+            return;
+        zhanLingModel.ShowZhanLingHBuy(zhanLingModel.ZhanLingType, 1);
+    }
+
+    void OnPaidHClick()
+    {
+        int buyState = zhanLingModel.GetZhanLingBuyState();
+        // 宸茶喘涔扮巹绾�(type 2)鎴栧凡璐拱鐜勭骇鍜岃繘闃�(buyState == 3)鏃朵笉鍐嶈烦杞�
+        if (buyState == 2 || buyState == 3)
+            return;
+        zhanLingModel.ShowZhanLingHBuy(zhanLingModel.ZhanLingType, 2);
+    }
+}
diff --git a/Main/System/HeroReturn/HeroReturnZhanLingWin.cs.meta b/Main/System/HeroReturn/HeroReturnZhanLingWin.cs.meta
new file mode 100644
index 0000000..a7eb564
--- /dev/null
+++ b/Main/System/HeroReturn/HeroReturnZhanLingWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bda89cf1dbeb16b4a8db1746e5a85a90
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/UIBase/UIJumpManager.cs b/Main/System/UIBase/UIJumpManager.cs
index e7059a2..1939e5d 100644
--- a/Main/System/UIBase/UIJumpManager.cs
+++ b/Main/System/UIBase/UIJumpManager.cs
@@ -98,7 +98,7 @@
 		//姝﹀皢杩斿満鐩稿叧
 		else if (config.WinName == "HeroReturnCallWin" || config.WinName == "HeroReturnSkinWin" ||
 				config.WinName == "HeroReturnCheckInWin" || config.WinName == "HeroReturnGiftWin" ||
-				config.WinName == "HeroReturnShopWin")
+				config.WinName == "HeroReturnShopWin"|| config.WinName == "HeroReturnZhanLingWin")
 		{
 			var heroDebutAct = HeroReturnManager.Instance.GetOperationHeroAppearInfo();
 			if (heroDebutAct == null)

--
Gitblit v1.8.0