From ff032a0d727eee13399e29391e1437bea912337c Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 06 十二月 2025 16:42:46 +0800
Subject: [PATCH] 121 【武将】武将系统 - 生效武将版本,同步属性计算,更改新筛选模式

---
 Main/System/HeroUI/HeroCollectionWin.cs |   39 ++++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/Main/System/HeroUI/HeroCollectionWin.cs b/Main/System/HeroUI/HeroCollectionWin.cs
index b72cd66..16a2331 100644
--- a/Main/System/HeroUI/HeroCollectionWin.cs
+++ b/Main/System/HeroUI/HeroCollectionWin.cs
@@ -13,9 +13,10 @@
     [SerializeField] Button heroPackBtn;
     [SerializeField] Text heroPackText;
     [SerializeField] ScrollerController heroListScroller;
-    [SerializeField] List<Text> totalAttrList;
+    // [SerializeField] List<Text> totalAttrList;
     [SerializeField] Button attrBtn;
-    [SerializeField] HeroSelectBehaviour fiterManager;  //姝﹀皢绛涢��
+    [SerializeField] Transform heroSelectBehaviour;
+    HeroSelectBehaviour fiterManager;  //姝﹀皢绛涢��
 
     SinglePack singlePack;
 
@@ -32,6 +33,8 @@
         {
             HeroUIManager.Instance.QueryUnLockHeroPack();
         });
+
+        fiterManager = HeroSelectBehaviour.Create(heroSelectBehaviour);
     }
 
     protected override void OnPreOpen()
@@ -41,8 +44,6 @@
         PackManager.Instance.RefreshItemEvent += RefreshItemEvent;
         HeroUIManager.Instance.OnHeroCollectEvent += OnHeroCollectEvent;
         heroListScroller.OnRefreshCell += OnRefreshCell;
-        HeroUIManager.Instance.selectHeroCollectListJob = 0;
-        HeroUIManager.Instance.selectHeroCollectListCountry = 0;
         HeroUIManager.Instance.SortHeroCollectList();
         Display();
     }
@@ -59,10 +60,10 @@
 
     void Display()
     {
-        fiterManager.Display(0, HeroUIManager.Instance.selectHeroCollectListJob, HeroUIManager.Instance.selectHeroCollectListCountry, SelectJobCountry);
+        fiterManager.Display(0, SelectJobCountry);
         
-        CreateScroller();
-        RefreshTotalAttr();
+        // CreateScroller();
+        // RefreshTotalAttr();
         RefreshPackCount();
     }
 
@@ -94,20 +95,20 @@
     }
 
 
-    void RefreshTotalAttr()
-    {
-        for (int i = 0; i < totalAttrList.Count; i++)
-        {
-            totalAttrList[i].text = PlayerPropertyConfig.GetFullDescription(PlayerPropertyConfig.basePerAttrs[i],
-            HeroUIManager.Instance.allHeroBookPer);
-        }
-    }
+    // void RefreshTotalAttr()
+    // {
+    //     for (int i = 0; i < totalAttrList.Count; i++)
+    //     {
+    //         totalAttrList[i].text = PlayerPropertyConfig.GetFullDescription(PlayerPropertyConfig.basePerAttrs[i],
+    //         HeroUIManager.Instance.allHeroBookPer);
+    //     }
+    // }
 
 
-    void SelectJobCountry(int job, int country)
+    /// 鍥炶皟鍙傛暟锛� 鑱屼笟锛屽浗瀹讹紝浼ゅ绫诲瀷锛�6澶ф垬鏂楀睘鎬э紝鐗规畩灞炴��
+    void SelectJobCountry(List<int> selects)
     {
-        HeroUIManager.Instance.selectHeroCollectListJob = job;
-        HeroUIManager.Instance.selectHeroCollectListCountry = country;
+        HeroUIManager.Instance.selectHeroCollectList = selects;
         HeroUIManager.Instance.SortHeroCollectList();
         CreateScroller();
     }
@@ -173,7 +174,7 @@
 
     void OnHeroCollectEvent()
     {
-        RefreshTotalAttr();
+        // RefreshTotalAttr();
         heroListScroller.m_Scorller.RefreshActiveCellViews();
     }
 

--
Gitblit v1.8.0