From 16dba0ff4d2eed7f5a4a7c37640f158ee9f73d8c Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期五, 05 六月 2026 19:22:43 +0800
Subject: [PATCH] 669 子 【武将】武将系统 / 时装新增开服天数显示入口字段

---
 Main/System/Store/SkinStoreCell.cs                      |    2 
 Main/Config/ConfigManager.cs                            |    1 
 Main/System/Store/SkinStoreLineCell.cs                  |   11 ++
 Main/System/HeroUI/HeroBestBaseWin.cs                   |    3 
 Main/System/Store/SkinStoreWin.cs                       |   12 ++
 Main/System/HeroUI/HeroCollectionWin.cs                 |    2 
 Main/System/HeroUI/HeroUIManager.Collect.cs             |   38 +++++++++
 Main/System/HeroUI/HeroTrainBaseWin.cs                  |    3 
 Main/System/HeroUI/HeroSkinWin.cs                       |   37 ++++++++-
 Main/System/PhantasmPavilion/PhantasmPavilionManager.cs |    4 
 Main/System/UIBase/UIJumpManager.cs                     |   12 ++
 Main/Config/Configs/HeroSkinConfig.cs                   |    5 +
 Main/System/Store/StoreModel.cs                         |   77 +++++++++++++++++++
 Main/System/HeroUI/HeroUIManager.cs                     |   16 +++
 14 files changed, 207 insertions(+), 16 deletions(-)

diff --git a/Main/Config/ConfigManager.cs b/Main/Config/ConfigManager.cs
index bc21b79..27d2f30 100644
--- a/Main/Config/ConfigManager.cs
+++ b/Main/Config/ConfigManager.cs
@@ -43,6 +43,7 @@
         // 鍔犺浇閰嶇疆鏂囦欢
         // 鍔犺浇閰嶇疆鏂囦欢
         // 鍔犺浇閰嶇疆鏂囦欢
+
         HashSet<Type> configTypes = new HashSet<Type>() {
             typeof(ActBillboardAwardConfig),
             typeof(ActHeroAppearArtConfig),
diff --git a/Main/Config/Configs/HeroSkinConfig.cs b/Main/Config/Configs/HeroSkinConfig.cs
index 8948622..dcf82b5 100644
--- a/Main/Config/Configs/HeroSkinConfig.cs
+++ b/Main/Config/Configs/HeroSkinConfig.cs
@@ -1,6 +1,6 @@
 锘�//--------------------------------------------------------
 //    [Author]:           YYL
-//    [  Date ]:           Tuesday, May 19, 2026
+//    [  Date ]:           2026骞�6鏈�5鏃�
 //--------------------------------------------------------
 
 using System.Collections.Generic;
@@ -31,6 +31,7 @@
 	public string ApearMotionName;
 	public string TransfMotionName;
 	public string LoopMotionName;
+	public int OpenDay;
 
     public override int LoadKey(string _key)
     {
@@ -95,6 +96,8 @@
 			TransfMotionName = tables[13];
 
 			LoopMotionName = tables[14];
+
+			int.TryParse(tables[15],out OpenDay); 
         }
         catch (Exception exception)
         {
diff --git a/Main/System/HeroUI/HeroBestBaseWin.cs b/Main/System/HeroUI/HeroBestBaseWin.cs
index aba3e7e..34d52a7 100644
--- a/Main/System/HeroUI/HeroBestBaseWin.cs
+++ b/Main/System/HeroUI/HeroBestBaseWin.cs
@@ -45,7 +45,8 @@
             return;
         }
         var config = HeroConfig.Get(HeroUIManager.Instance.selectForPreviewHeroID);
-        tabButtons[1].SetActive(config.SkinIDList.Length > 1);
+        // 浠呴粯璁ょ毊鑲ゅ彲鏄剧ず(鎵�鏈夐潪榛樿鐨偆鍧囨湭鍒板紑鏈嶅ぉ鏁�)鏃堕殣钘忔椂瑁呭叆鍙�
+        tabButtons[1].SetActive(HeroUIManager.HasHeroAnyAvailableSkin(config.HeroID));
     }
 
     //鍏朵粬鐣岄潰鍜屾鐣岄潰鐨勫眰绾ф樉绀洪棶棰�
diff --git a/Main/System/HeroUI/HeroCollectionWin.cs b/Main/System/HeroUI/HeroCollectionWin.cs
index 7257a55..231f45a 100644
--- a/Main/System/HeroUI/HeroCollectionWin.cs
+++ b/Main/System/HeroUI/HeroCollectionWin.cs
@@ -60,6 +60,8 @@
 
     private void OnDayEvent()
     {
+        // 杩囧ぉ鏃� OpenDay 鍙兘鍙樺寲锛屽厛鍒锋柊鍥鹃壌绾㈢偣鐘舵�侊紝鍐嶉噸缁樺垪琛�
+        HeroUIManager.Instance.UpdateHeroBookRedpoint();
         HeroUIManager.Instance.SortHeroCollectList();
         CreateScroller();
     }
diff --git a/Main/System/HeroUI/HeroSkinWin.cs b/Main/System/HeroUI/HeroSkinWin.cs
index c27c4db..abe160c 100644
--- a/Main/System/HeroUI/HeroSkinWin.cs
+++ b/Main/System/HeroUI/HeroSkinWin.cs
@@ -156,7 +156,19 @@
         {
             tmpIndex = HeroUIManager.Instance.selectSkinIndex;
         }
-        
+
+        // 妫�鏌ラ�変腑鐨勯潪榛樿鐨偆鏄惁婊¤冻 OpenDay 灞曠ず鏉′欢
+        if (tmpIndex > 0)
+        {
+            int selectedSkinID = heroConfig.SkinIDList[tmpIndex];
+            if (!HeroUIManager.IsSkinOpenDayMet(selectedSkinID))
+            {
+                // 褰撳墠閫変腑鐨偆鏈埌寮�鏈嶅睍绀烘椂闂达紝鍥為��鍒伴粯璁ょ毊鑲�
+                tmpIndex = 0;
+                HeroUIManager.Instance.selectSkinIndex = 0;
+            }
+        }
+
         skinID = heroConfig.SkinIDList[tmpIndex];
         bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(skinID, heroConfig.Country));
         roleLhModel.Create(skinID, 1, motionName: "", isLh: true);
@@ -237,14 +249,31 @@
     void CreateScroller()
     {
         skinScroller.Refresh();
+        int visibleCount = 0;
         for (int i = 0; i < heroConfig.SkinIDList.Length; i++)
         {
-            skinScroller.AddCell(ScrollerDataType.Header, i);
+            // 榛樿鐨偆锛堢储寮�0锛夊缁堟樉绀猴紝闈為粯璁ょ毊鑲ら渶婊¤冻 OpenDay 灞曠ず鏉′欢
+            if (i == 0 || HeroUIManager.IsSkinOpenDayMet(heroConfig.SkinIDList[i]))
+            {
+                skinScroller.AddCell(ScrollerDataType.Header, i);
+                visibleCount++;
+            }
         }
         skinScroller.Restart();
-        if (tmpIndex > 2)
+
+        // 璁$畻褰撳墠閫変腑鐨偆鍦ㄨ繃婊ゅ悗鐨勫垪琛ㄤ腑鐨勮瑙変綅缃�
+        int visualIndex = 0;
+        for (int i = 0; i < heroConfig.SkinIDList.Length; i++)
         {
-            skinScroller.JumpIndex(tmpIndex - 1);
+            if (i == tmpIndex)
+                break;
+            if (i == 0 || HeroUIManager.IsSkinOpenDayMet(heroConfig.SkinIDList[i]))
+                visualIndex++;
+        }
+
+        if (visualIndex > 2)
+        {
+            skinScroller.JumpIndex(visualIndex - 1);
         }
     }
 
diff --git a/Main/System/HeroUI/HeroTrainBaseWin.cs b/Main/System/HeroUI/HeroTrainBaseWin.cs
index 7b3c9f8..19677da 100644
--- a/Main/System/HeroUI/HeroTrainBaseWin.cs
+++ b/Main/System/HeroUI/HeroTrainBaseWin.cs
@@ -63,7 +63,8 @@
             return;
         }
         var config = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid).heroConfig;
-        tabButtons[2].SetActive(config.SkinIDList.Length > 1);
+        // 浠呴粯璁ょ毊鑲ゅ彲鏄剧ず(鎵�鏈夐潪榛樿鐨偆鍧囨湭鍒板紑鏈嶅ぉ鏁�)鏃堕殣钘忔椂瑁呭叆鍙�
+        tabButtons[2].SetActive(HeroUIManager.HasHeroAnyAvailableSkin(config.HeroID));
     }
 
 
diff --git a/Main/System/HeroUI/HeroUIManager.Collect.cs b/Main/System/HeroUI/HeroUIManager.Collect.cs
index 06a977c..c677114 100644
--- a/Main/System/HeroUI/HeroUIManager.Collect.cs
+++ b/Main/System/HeroUI/HeroUIManager.Collect.cs
@@ -465,6 +465,44 @@
 
     #endregion
 
+    #region 鐨偆寮�鏈嶅ぉ鏁扮浉鍏虫柟娉�
+
+    /// <summary>
+    /// 妫�鏌ョ毊鑲ゆ槸鍚︽弧瓒冲紑鏈嶅ぉ鏁板睍绀烘潯浠�
+    /// </summary>
+    /// <param name="skinID">鐨偆ID</param>
+    /// <returns>true: 鍙睍绀�; false: 灏氭湭婊¤冻寮�鏈嶅ぉ鏁�</returns>
+    public static bool IsSkinOpenDayMet(int skinID)
+    {
+        var skinConfig = HeroSkinConfig.Get(skinID);
+        if (skinConfig == null || skinConfig.OpenDay <= 0)
+            return true;  // OpenDay <= 0 琛ㄧず鏃犻檺鍒�
+        return TimeUtility.OpenDay + 1 >= skinConfig.OpenDay;
+    }
+
+    /// <summary>
+    /// 鍒ゆ柇姝﹀皢鍦ㄨ�冭檻 OpenDay 闄愬埗鍚庯紝鏄惁鏈夎嚦灏戜竴涓彲鏄剧ず鐨勯潪榛樿鐨偆
+    /// 榛樿鐨偆锛圫kinIDList[0]锛変笉鍙� OpenDay 鎺у埗锛屽缁堝彲鐢�
+    /// </summary>
+    /// <param name="heroID">姝﹀皢ID</param>
+    /// <returns>true: 鏈夎嚦灏戜竴涓潪榛樿鐨偆鍙樉绀�; false: 浠呴粯璁ょ毊鑲ゅ彲鏄剧ず</returns>
+    public static bool HasHeroAnyAvailableSkin(int heroID)
+    {
+        var heroConfig = HeroConfig.Get(heroID);
+        if (heroConfig == null || heroConfig.SkinIDList.Length <= 1)
+            return false;  // 鍙湁榛樿鐨偆鎴栨病鏈夌毊鑲�
+
+        // 浠庣储寮� 1 寮�濮嬫鏌ラ潪榛樿鐨偆
+        for (int i = 1; i < heroConfig.SkinIDList.Length; i++)
+        {
+            if (IsSkinOpenDayMet(heroConfig.SkinIDList[i]))
+                return true;
+        }
+        return false;
+    }
+
+    #endregion
+
     #endregion
 }
 
diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
index 064abb6..126cecc 100644
--- a/Main/System/HeroUI/HeroUIManager.cs
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -43,6 +43,7 @@
         PackManager.Instance.RefreshItemEvent += RefreshItemEvent;
         TeamManager.Instance.OnTeamChange += OnTeamChangeEvent;
         QuickSetting.Instance.onQuickSettingUpdate += OnQuickSettingUpdate;
+        TimeMgr.Instance.OnDayEvent += OnDayEvent;
         ParseConfig();
         InitHeroOnTeamRedpointList();
         InitHerosData();
@@ -58,6 +59,7 @@
         PackManager.Instance.RefreshItemEvent -= RefreshItemEvent;
         TeamManager.Instance.OnTeamChange -= OnTeamChangeEvent;
         QuickSetting.Instance.onQuickSettingUpdate -= OnQuickSettingUpdate;
+        TimeMgr.Instance.OnDayEvent -= OnDayEvent;
     }
 
     void ParseConfig()
@@ -744,7 +746,7 @@
         return false;
     }
 
-    void UpdateHeroBookRedpoint()
+    public void UpdateHeroBookRedpoint()
     {
         if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Hero))
             return;
@@ -777,6 +779,14 @@
             UpdateHeroCardRedpoint();
             refreshRedPoint = false;
         }
+    }
+
+    void OnDayEvent()
+    {
+        // 杩囧ぉ鏃� OpenDay 鍙兘鍙樺寲锛岄渶瑕佸埛鏂扮孩鐐�
+        UpdateHeroCardRedpoint();
+        UpdateHeroCardSkinRedpoint();
+        UpdateHeroBookRedpoint();
     }
 
     void RefreshItemEvent(PackType packType, int index, int itemID)
@@ -864,6 +874,10 @@
         var config = HeroConfig.Get(heroID);
         for (int i = 0; i < config.SkinIDList.Length; i++)
         {
+            // 榛樿鐨偆锛堢储寮�0锛夊缁堝弬涓庣孩鐐硅绠楋紱闈為粯璁ょ毊鑲ら渶婊¤冻 OpenDay 鎵嶅弬涓�
+            if (i > 0 && !IsSkinOpenDayMet(config.SkinIDList[i]))
+                continue;
+
             var state = HeroSkinStateForRedpoint(config.SkinIDList[i], isBook);
             if (isBook && state == 2)
             {
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
index 1eb3e20..14eea8c 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
@@ -695,7 +695,9 @@
         {
             // 鐨偆閫斿緞锛孶nlockValue 鏄� SkinID
             int skinId = unlockValue;
-            return IsHeroCollectionOpen(HeroConfig.GetHeroIDBySkinID(skinId));
+            // 姝﹀皢闇�婊¤冻寮�鏈嶅ぉ鏁帮紝涓旂毊鑲ゆ湰韬篃闇�婊¤冻寮�鏈嶅ぉ鏁板睍绀烘潯浠�
+            return IsHeroCollectionOpen(HeroConfig.GetHeroIDBySkinID(skinId))
+                && HeroUIManager.IsSkinOpenDayMet(skinId);
         }
 
         // 鍏朵粬鑾峰彇閫斿緞锛堝娲诲姩銆侀粯璁ょ瓑锛夛紝涓嶅仛闄愬埗锛岀洿鎺ユ樉绀�
diff --git a/Main/System/Store/SkinStoreCell.cs b/Main/System/Store/SkinStoreCell.cs
index 69c4243..aa7a891 100644
--- a/Main/System/Store/SkinStoreCell.cs
+++ b/Main/System/Store/SkinStoreCell.cs
@@ -19,7 +19,7 @@
 
     public void Display(int index)
     {
-        var list = StoreModel.Instance.GetTimeValidStoreDatas(StoreFunc.HeroSkin);
+        var list = StoreModel.Instance.GetTimeValidHeroSkinStoreDatas();
         var storeData = list[index];
         int shopID = storeData.shopId;
         var itemID = storeData.storeConfig.ItemID;
diff --git a/Main/System/Store/SkinStoreLineCell.cs b/Main/System/Store/SkinStoreLineCell.cs
index af2f769..df3cf6f 100644
--- a/Main/System/Store/SkinStoreLineCell.cs
+++ b/Main/System/Store/SkinStoreLineCell.cs
@@ -10,7 +10,16 @@
 
     public void Display(int index)
     {
-        var list = StoreModel.Instance.GetTimeValidStoreDatas(StoreFunc.HeroSkin);
+        var list = StoreModel.Instance.GetTimeValidHeroSkinStoreDatas();
+        if (list == null)
+        {
+            for (int i = 0; i < storeCells.Length; i++)
+            {
+                storeCells[i].SetActive(false);
+            }
+
+            return;
+        }
 
         for (int i = 0; i < storeCells.Length; i++)
         {
diff --git a/Main/System/Store/SkinStoreWin.cs b/Main/System/Store/SkinStoreWin.cs
index a660afd..fc5643d 100644
--- a/Main/System/Store/SkinStoreWin.cs
+++ b/Main/System/Store/SkinStoreWin.cs
@@ -62,7 +62,12 @@
 
         int jumpIndex = -1;
         scroller.Refresh();
-        var list = StoreModel.Instance.GetTimeValidStoreDatas(StoreFunc.HeroSkin);
+        var list = StoreModel.Instance.GetTimeValidHeroSkinStoreDatas();
+        if (list == null)
+        {
+            return;
+        }
+
         for (int i = 0; i < list.Count; i++)
         {
             if (i % 4 == 0)
@@ -78,7 +83,10 @@
         scroller.lockType = EnhanceLockType.KeepVertical;
         if (StoreModel.Instance.jumpShopID != 0)
         {
-            scroller.JumpIndex(jumpIndex);
+            if (jumpIndex >= 0)
+            {
+                scroller.JumpIndex(jumpIndex);
+            }
             StoreModel.Instance.jumpShopID = 0;
         }
     }
diff --git a/Main/System/Store/StoreModel.cs b/Main/System/Store/StoreModel.cs
index cc7c163..ba9b185 100644
--- a/Main/System/Store/StoreModel.cs
+++ b/Main/System/Store/StoreModel.cs
@@ -212,10 +212,85 @@
         return validDatas;
     }
 
+    public List<StoreData> GetTimeValidHeroSkinStoreDatas()
+    {
+        var validDatas = GetTimeValidStoreDatas(StoreFunc.HeroSkin);
+        if (validDatas == null)
+            return null;
+
+        List<StoreData> heroSkinValidDatas = new List<StoreData>();
+        for (int i = 0; i < validDatas.Count; i++)
+        {
+            var storeData = validDatas[i];
+            if (IsHeroSkinShopOpenByStoreConfig(storeData.storeConfig))
+            {
+                heroSkinValidDatas.Add(storeData);
+            }
+        }
+
+        return heroSkinValidDatas;
+    }
+
+    public bool IsHeroSkinShopOpenByShopID(int shopID)
+    {
+        return IsHeroSkinShopOpenByStoreConfig(StoreConfig.Get(shopID));
+    }
+
+    public bool IsHeroSkinShopOpenByStoreConfig(StoreConfig storeConfig)
+    {
+        if (!TryGetHeroSkinShopSkinID(storeConfig, out var skinID))
+        {
+            return true;
+        }
+
+        return IsHeroSkinShopOpenBySkinID(skinID);
+    }
+
+    public bool IsHeroSkinShopOpenBySkinID(int skinID)
+    {
+        var skinConfig = HeroSkinConfig.Get(skinID);
+        if (skinConfig == null || skinConfig.OpenDay <= 0)
+        {
+            return true;
+        }
+
+        return TimeUtility.OpenDay + 1 >= skinConfig.OpenDay;
+    }
+
+    public bool TryGetHeroSkinShopSkinID(StoreConfig storeConfig, out int skinID)
+    {
+        skinID = 0;
+        if (storeConfig == null)
+        {
+            return false;
+        }
+
+        if (HeroSkinAttrConfig.TryGetSkinIDByItemID(storeConfig.ItemID, out skinID))
+        {
+            return true;
+        }
+
+        if (storeConfig.ItemListEx == null)
+        {
+            return false;
+        }
+
+        for (int i = 0; i < storeConfig.ItemListEx.Length; i++)
+        {
+            var item = storeConfig.ItemListEx[i];
+            if (item != null && item.Length > 0 && HeroSkinAttrConfig.TryGetSkinIDByItemID(item[0], out skinID))
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
     public bool TryGetTimeValidSkinShopIDByItemID(int itemID, out int shopID)
     {
         shopID = 0;
-        var validDatas = GetTimeValidStoreDatas(StoreFunc.HeroSkin);
+        var validDatas = GetTimeValidHeroSkinStoreDatas();
         if (validDatas == null)
         {
             return false;
diff --git a/Main/System/UIBase/UIJumpManager.cs b/Main/System/UIBase/UIJumpManager.cs
index 7667b1c..a3b386f 100644
--- a/Main/System/UIBase/UIJumpManager.cs
+++ b/Main/System/UIBase/UIJumpManager.cs
@@ -57,7 +57,15 @@
 				}
 				else
 				{
-					StoreModel.Instance.selectStoreFuncType = (StoreFunc)StoreConfig.Get(StoreModel.Instance.jumpShopID).ShopType;
+					var storeConfig = StoreConfig.Get(StoreModel.Instance.jumpShopID);
+					if (storeConfig.ShopType == (int)StoreFunc.HeroSkin &&
+					    !StoreModel.Instance.IsHeroSkinShopOpenByStoreConfig(storeConfig))
+					{
+						SysNotifyMgr.Instance.ShowTip("JumpSkinErr");
+						StoreModel.Instance.jumpShopID = 0;
+						return;
+					}
+					StoreModel.Instance.selectStoreFuncType = (StoreFunc)storeConfig.ShopType;
 				}
 			}
 		}
@@ -162,4 +170,4 @@
 			ui?.ClickFuncBtn(config.TabIndex);
 		}
 	}
-}
\ No newline at end of file
+}

--
Gitblit v1.8.0