From 9e40cf7d1390e13bc90acf23c30eb002744fd6d4 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期二, 21 十月 2025 19:16:06 +0800
Subject: [PATCH] 143 演武场-客户端 修改挑战界面,演武场布阵的显隐,达到条件才能切出非主线任务

---
 Main/System/Main/MainWin.cs |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/Main/System/Main/MainWin.cs b/Main/System/Main/MainWin.cs
index a629719..1ceda2d 100644
--- a/Main/System/Main/MainWin.cs
+++ b/Main/System/Main/MainWin.cs
@@ -123,13 +123,6 @@
 
     protected override void SelectBottomTab(int index)
     {
-        bool isOtherBattleInProgress = BattleManager.Instance.IsOtherBattleInProgress();
-        if (isOtherBattleInProgress)
-        {
-            // 濡傛灉姝e湪闈炰富绾挎垬鏂椾腑锛屾病婊¤冻瑙i攣鏉′欢鍒欎笉鍏佽鍒囨崲
-        }
-        DisplayTopBar(index);
-
         if (index == 3)
         {
             //鎸戞垬鐗规畩鏄剧ず閫昏緫
@@ -137,7 +130,7 @@
             return;
         }
 
-
+        TabChangeEvent?.Invoke();
 
         // 濡傛灉鐐瑰嚮褰撳墠宸查�変腑鐨勬爣绛撅紝涓嶅仛澶勭悊
         if (functionOrder == index && currentSubUI != null)
@@ -155,7 +148,6 @@
         // 鏍规嵁閫変腑鐨勬爣绛炬墦寮�瀵瑰簲鐨勭晫闈�
         OpenSubUIByTabIndex();
 
-        TabChangeEvent?.Invoke();
     }
 
     //鎴樻枟鎸夐挳鍔ㄧ敾
@@ -237,6 +229,16 @@
     protected override void OnTabButtonClicked(int index)
     {
         this.index = index;
+        int funcId = 32;
+        bool isOtherBattleInProgress = BattleManager.Instance.IsOtherBattleInProgress();
+        // 濡傛灉姝e湪闈炰富绾挎垬鏂椾腑锛屾病婊¤冻瑙i攣鏉′欢鍒欎笉鍏佽鍒囨崲
+        if (isOtherBattleInProgress && !FuncOpen.Instance.IsFuncOpen(funcId))
+        {
+            string tip = FuncOpen.Instance.GetErrorTip(funcId);
+            SysNotifyMgr.Instance.ShowTip("SwitchOutOfBattle", tip);
+            tabButtons[functionOrder].SelectBtn();
+            return;
+        }
 
 
         if (index == 0)
@@ -253,6 +255,8 @@
             UIManager.Instance.OpenWindow<GuildJoinWin>();
             return;
         }
+
+        DisplayTopBar(index);
         SelectBottomTab(index);
     }
 

--
Gitblit v1.8.0