From 9fb9b9a29e8f3ca5163ea6febb161c06a29a9f40 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期五, 09 五月 2025 19:53:42 +0800
Subject: [PATCH] 10366 【越南】【英语】【BT】【砍树】仙盟攻城战-客户端  修复入口显示领奖期文字

---
 System/FairySiege/FairySiegeCoolTime.cs |   48 +++++++++++++++++++++---------------------------
 1 files changed, 21 insertions(+), 27 deletions(-)

diff --git a/System/FairySiege/FairySiegeCoolTime.cs b/System/FairySiege/FairySiegeCoolTime.cs
index aa5a7d7..5fcda6a 100644
--- a/System/FairySiege/FairySiegeCoolTime.cs
+++ b/System/FairySiege/FairySiegeCoolTime.cs
@@ -6,8 +6,8 @@
     public class FairySiegeCoolTime : MonoBehaviour
     {
         [SerializeField] Image m_bg;
-        [SerializeField] Text m_Time;
-
+        [SerializeField] Text m_Time;
+        FairySiegeActModel model { get { return ModelCenter.Instance.GetModel<FairySiegeActModel>(); } }
         private void OnEnable()
         {
             GlobalTimeEvent.Instance.secondEvent += RefreshSecond;
@@ -22,32 +22,26 @@
         private void RefreshSecond()
         {
             m_bg.SetActive(true);
-            m_Time.SetActive(true);
-            var seconds = GetOperationSurplusTime(Operation.default53);
-            if (seconds > 0)
-            {
-                if (seconds < 86400)
-                {
-                    m_Time.text = StringUtility.Contact("<color=#8DDC11FF>", Language.Get("FairySiege153"), "</color>");
-                }
-                else
-                {
-                    m_bg.SetActive(false);
-                    m_Time.SetActive(false);
-                }
+            m_Time.SetActive(true);
+            int stateValue;
+            if (model.TryGetCurrentStateValue(out stateValue))
+            {
+                int state = model.GetStateByStateValue(stateValue);
+                if (state == 4)//0 鍏ず鏈� 1 澶囨垬鏈� 2 寮�鎴樻湡 3 浼戞垬鏈� 4 棰嗗鏈�
+                {
+                    m_Time.text = StringUtility.Contact("<color=#8DDC11FF>", Language.Get("FairySiege153"), "</color>");
+                }
+                else
+                {
+                    m_bg.SetActive(false);
+                    m_Time.SetActive(false);
+                }
+            }
+            else
+            {
+                m_bg.SetActive(false);
+                m_Time.SetActive(false);
             }
-            else
-            {
-                m_Time.text = UIHelper.AppendColor(TextColType.Red, Language.Get("XMZZ110"));
-            }
-        }
-
-        public int GetOperationSurplusTime(Operation type)
-        {
-            OperationBase operation;
-            if (OperationTimeHepler.Instance.TryGetOperationTime(type, out operation))
-                return operation.GetSurplusTime(ILTimeUtility.ServerCrossNow);
-            return 0;
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.8.0