From 23642e28c8c2269524bd6816d93bd4b137f44baf Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 04 九月 2025 16:17:25 +0800
Subject: [PATCH] 153 【武将】招募系统 - 单抽弹立绘,品质配置决定

---
 Main/System/HappyXB/HappyXBModel.cs      |    5 ++
 Main/System/HappyXB/HeroCallResultWin.cs |   59 ++++++++++++++++++++---------
 2 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/Main/System/HappyXB/HappyXBModel.cs b/Main/System/HappyXB/HappyXBModel.cs
index c091f55..662792f 100644
--- a/Main/System/HappyXB/HappyXBModel.cs
+++ b/Main/System/HappyXB/HappyXBModel.cs
@@ -39,6 +39,8 @@
     }  
     private Dictionary<int, XBTypeInfo> xbTypeInfoDict = new Dictionary<int, XBTypeInfo>(); //鎶藉鐘舵�佺浉鍏崇殑 鏈嶅姟鍣ㄨ褰�
 
+    public int lhQuality;
+
     public override void Init()
     {
         DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
@@ -67,6 +69,9 @@
 
             xbTypeItemDict[list[i].TreasureType].Add(list[i]);
         }
+
+        var config = FuncConfigConfig.Get("HeroCall");
+        lhQuality = int.Parse(config.Numerical1);
     }
 
     public override void Release()
diff --git a/Main/System/HappyXB/HeroCallResultWin.cs b/Main/System/HappyXB/HeroCallResultWin.cs
index 64b43dc..48bb773 100644
--- a/Main/System/HappyXB/HeroCallResultWin.cs
+++ b/Main/System/HappyXB/HeroCallResultWin.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using Cysharp.Threading.Tasks;
@@ -43,7 +44,15 @@
     [SerializeField] Button okBtn;
 
 
-    int resultState = 0; //0鍗曟娊灞曠ず 1鍗佽繛灞曠ず 2 鍗佽繛寮�濮嬪睍绀� 3 鍗佽繛绔嬬粯灞曠ず
+    public enum ResultState
+    {
+        single = 0, //鍗曟娊灞曠ず
+        singleStart = 1,    //鍗曟娊灞曠ず寮�濮�
+        ten = 2,    //鍗佽繛灞曠ず
+        tenStart = 3,   //鍗佽繛寮�濮嬪睍绀�
+        Lihui = 4,  //绔嬬粯灞曠ず
+    }
+    ResultState resultState = ResultState.single; 
 
     bool isSkip = false;
     List<int> showLHHeroIDList = new List<int>();
@@ -78,37 +87,36 @@
         HappyXBModel.Instance.RefreshXBTypeInfoAct -= RefreshBtn;
     }
 
+
     void UpdateState()
     {
-        if (HeroUIManager.Instance.selectCallIndex == 0)
+        if (isSkip)
         {
-            resultState = 0;
-        }
-        else if (isSkip)
-        {
-            resultState = 1;
+            resultState = HeroUIManager.Instance.selectCallIndex == 0 ? ResultState.single : ResultState.ten;
+            
+            RefreshState();
         }
         else
         {
-            resultState = 2;
+            resultState = HeroUIManager.Instance.selectCallIndex == 0 ? ResultState.singleStart : ResultState.tenStart;
+            RefreshState();
             MoveToNextState().Forget();
         }
-        RefreshState();
     }
 
     async UniTask MoveToNextState()
     {
-        await UniTask.Delay(1500);
-
         showLHHeroIDList.Clear();
         for (int i = 0; i < HappyXBModel.Instance.xbResultDict.Count; i++)
         {
             var heroID = HappyXBModel.Instance.xbResultDict[i].itemId;
-            if (HeroConfig.Get(heroID).Quality >= 4)
+            if (HeroConfig.Get(heroID).Quality >= HappyXBModel.Instance.lhQuality)
                 showLHHeroIDList.Add(HappyXBModel.Instance.xbResultDict[i].itemId);
         }
 
-        resultState = 3;
+        await UniTask.Delay(resultState == ResultState.singleStart ? 800 : 1500);
+
+        resultState = ResultState.Lihui;
         try
         {
             RefreshState();
@@ -121,7 +129,7 @@
 
     void RefreshState()
     {
-        if (resultState == 0)
+        if (resultState == ResultState.single)
         {
             btnsObj.SetActive(true);
             call1Btn.SetActive(HeroUIManager.Instance.selectCallType != HappXBTitle.HeroCallScore ? true : false);
@@ -133,10 +141,23 @@
             ShowMoney(true);
             heroInfoObj.SetActive(true);
 
-            result1Cell.Display(HappyXBModel.Instance.xbResultDict[0].itemId, 0);
+            if (isSkip)
+                result1Cell.Display(HappyXBModel.Instance.xbResultDict[0].itemId, 0, true);
             RefreshHeroInfo(HappyXBModel.Instance.xbResultDict[0].itemId);
         }
-        else if (resultState == 1)
+        else if (resultState == ResultState.singleStart)
+        {
+            btnsObj.SetActive(false);
+
+            result1Obj.SetActive(true);
+            result10Obj.SetActive(false);
+            result10LihuiObj.SetActive(false);
+            ShowMoney(false);
+            heroInfoObj.SetActive(false);
+
+            result1Cell.Display(HappyXBModel.Instance.xbResultDict[0].itemId, 0);
+        }
+        else if (resultState == ResultState.ten)
         {
             btnsObj.SetActive(true);
             call1Btn.SetActive(false);
@@ -150,7 +171,7 @@
             if (isSkip)
                 Refresh10Result();
         }
-        else if (resultState == 2)
+        else if (resultState == ResultState.tenStart)
         {
             btnsObj.SetActive(false);
 
@@ -161,7 +182,7 @@
             heroInfoObj.SetActive(false);
             Refresh10Result();
         }
-        else if (resultState == 3)
+        else if (resultState == ResultState.Lihui)
         {
             btnsObj.SetActive(false);
 
@@ -260,7 +281,7 @@
         }
         else
         {
-            resultState = 1;
+            resultState = HeroUIManager.Instance.selectCallIndex == 0 ? ResultState.single : ResultState.ten;
             RefreshState();
             return;
         }

--
Gitblit v1.8.0