From eb08b17ddd08424eb03e1d6e5606933f0034ac45 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 06 五月 2026 10:04:57 +0800
Subject: [PATCH] 262 幻境阁 优化配表支持

---
 Main/System/PhantasmPavilion/PhantasmPavilionUnlockButton.cs |   32 ++++++++------------------------
 1 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionUnlockButton.cs b/Main/System/PhantasmPavilion/PhantasmPavilionUnlockButton.cs
index 9945047..3b71802 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionUnlockButton.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionUnlockButton.cs
@@ -24,40 +24,24 @@
                 int useCnt = manager.GetUnlockNeedCnt(type, id);
                 if (useCnt > hasCnt)
                 {
-                    if (!ItemConfig.HasKey(unlockValue))
-                        return;
+                    if (!ItemConfig.HasKey(unlockValue)) return;
                     string name = ItemConfig.Get(unlockValue).ItemName;
                     SysNotifyMgr.Instance.ShowTip("UnLockFail2", name);
                     return;
                 }
             }
-            else if (unlockWay == 3)
+            else if (unlockWay != 1) // 缁熶竴澶勭悊 3, 4, 5 浠ュ強鏈潵鑷畾涔夌殑绫诲瀷
             {
-                bool hasHero = HeroManager.Instance.HasHero(unlockValue);
-                if (!hasHero)
+                // UI 灞備笉鍐嶇‖缂栫爜鍚箟锛岀洿鎺ヨ皟鐢ㄥ熀浜� Type 鐨勬牎楠�
+                bool canUnlock = manager.CheckTableSpecificUnlock(type, unlockWay, unlockValue);
+                if (!canUnlock)
                 {
-                    SysNotifyMgr.Instance.ShowTip("UnLockFail1");
+                    // 杩欓噷缁熶竴澶嶇敤 UnLockFail1锛屾垨鏈潵鍦� CheckTableSpecificUnlock 涓繑鍥炴洿鍏蜂綋鐨勯敊璇灇涓�
+                    SysNotifyMgr.Instance.ShowTip("UnLockFail1"); 
                     return;
                 }
             }
-            else if (unlockWay == 4) // 鏂板锛氬鏋滄槸鐨偆瑙i攣
-            {
-                bool hasSkin = HeroUIManager.Instance.IsHeroSkinActive(HeroConfig.GetHeroIDBySkinID(unlockValue), unlockValue);
-                if (!hasSkin)
-                {
-                    SysNotifyMgr.Instance.ShowTip("UnLockFail1");
-                    return;
-                }
-            }
-            else if (unlockWay == 5) // 濡傛灉鏄舰璞¤В閿�
-            {
-                bool hasModel = manager.IsUnlock(PhantasmPavilionType.Model, unlockValue);
-                if (!hasModel)
-                {
-                    SysNotifyMgr.Instance.ShowTip("UnLockFail1"); // 鍙互鏍规嵁闇�瑕佹崲鎴愬搴旂殑璇█鍖� Key锛屽 "褰㈣薄鏈В閿�"
-                    return;
-                }
-            }
+            
             manager.SendOPPack(type, PhantasmPavilionOperation.Activate, (uint)id);
             SysNotifyMgr.Instance.ShowTip("UnLockSuccess");
         });

--
Gitblit v1.8.0