From 22362d43bbd9fbd67d08150d741fb479b05261ba Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 24 十一月 2025 12:14:11 +0800
Subject: [PATCH] 328 【主界面】坐骑系统  幻化 去掉活动激活的坐骑幻化 缺物品

---
 Main/System/Horse/HorseManager.cs |   84 ++++++++++++++++++++----------------------
 1 files changed, 40 insertions(+), 44 deletions(-)

diff --git a/Main/System/Horse/HorseManager.cs b/Main/System/Horse/HorseManager.cs
index 7993500..59fa1a7 100644
--- a/Main/System/Horse/HorseManager.cs
+++ b/Main/System/Horse/HorseManager.cs
@@ -11,7 +11,6 @@
     public int exp;    //褰撳墠闃剁瓑绾х粡楠岋紝姣忕骇浠�0寮�濮�
     public event Action OnHorseUpdateEvent;
 
-    public int lastClassLV;  //鐨偆鐣岄潰鐐瑰嚮鍚庣孩鐐瑰埛鏂�
 
     Dictionary<int, HorseSkin> skinDic = new Dictionary<int, HorseSkin>();
     public event Action OnSkinUpdateEvent;
@@ -67,7 +66,6 @@
         horseLV = 0;
         exp = 0;
         skinDic.Clear();
-        lastClassLV = 0;
     }
 
     void OnPlayerLoginOk()
@@ -131,10 +129,6 @@
             UIManager.Instance.OpenWindow<HorseSuccessWin>();
         }
 
-        if (!DTC0403_tagPlayerLoginLoadOK.finishedLogin)
-        {
-            lastClassLV = classLV;
-        }
     }
 
 
@@ -189,7 +183,7 @@
     }
 
     //鐨偆绾㈢偣
-    public void UpdateSkinRedpoint()
+    void UpdateSkinRedpoint()
     {
         skinRedpoint.state = RedPointState.None;
         if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Horse))
@@ -202,22 +196,10 @@
             return;
         }
 
-        //鍗囬樁瑙i攣绾㈢偣
-        foreach (var lv in HorseSkinConfig.rankLVList)
-        {
-            if (classLV >= lv && lastClassLV < lv)
-            {
-                skinRedpoint.state = RedPointState.Simple;
-                return;
-            }
-        }
 
-        //鍗囨槦瑙i攣绾㈢偣
+        //鍗囨槦/瑙i攣绾㈢偣
         foreach (var skin in HorseSkinConfig.GetValues())
         {
-            if (skin.UnlockWay != 2)
-                continue;
-
             if (IsSkinActive(skin.SkinID))
             {
                 if (skin.StarMax > 0)
@@ -234,13 +216,25 @@
             }
             else
             {
-                //鐨偆瑙i攣绾㈢偣
-                int itemID = skin.UnlockValue;
-                var count = PackManager.Instance.GetItemCountByID(PackType.Item, itemID);
-                if (count >= skin.UnlockNeedCnt)
+
+                if (skin.UnlockWay == 1)
                 {
-                    skinRedpoint.state = RedPointState.Simple;
-                    return;
+                    if (classLV >= skin.UnlockValue &&  skin.UnlockValue > 0)
+                    {
+                        skinRedpoint.state = RedPointState.Simple;
+                        return;
+                    }
+                }
+                else
+                {
+                    //鐨偆瑙i攣绾㈢偣
+                    int itemID = skin.UnlockValue;
+                    var count = PackManager.Instance.GetItemCountByID(PackType.Item, itemID);
+                    if (count >= skin.UnlockNeedCnt)
+                    {
+                        skinRedpoint.state = RedPointState.Simple;
+                        return;
+                    }
                 }
             }
 
@@ -260,27 +254,18 @@
                 return true;
             }
         }
-        var skinConfig = HorseSkinConfig.Get(id);
-        if (skinConfig.UnlockWay == 1)
+        var config = HorseSkinConfig.Get(id);
+        if (config.UnlockWay == 1 && config.UnlockValue == 0)
         {
-            return classLV >= skinConfig.UnlockValue;
+            return true;
         }
+
         return false;
     }
 
     public bool IsShowTheHorseRedImg(int skinID)
     {
         var skin = HorseSkinConfig.Get(skinID);
-        int lv = skin.UnlockWay == 1 ? skin.UnlockValue : 0;
-        //鍗囬樁瑙i攣绾㈢偣
-        if (classLV >= lv && lastClassLV < lv)
-        {
-            return true;
-        }
-
-        //鍗囨槦瑙i攣绾㈢偣
-        if (skin.UnlockWay != 2)
-            return false;
 
         if (IsSkinActive(skin.SkinID))
         {
@@ -297,13 +282,24 @@
         }
         else
         {
-            //鐨偆瑙i攣绾㈢偣
-            int itemID = skin.UnlockValue;
-            var count = PackManager.Instance.GetItemCountByID(PackType.Item, itemID);
-            if (count >= skin.UnlockNeedCnt)
+
+            if (skin.UnlockWay == 1)
             {
-                return true;
+                if (classLV >= skin.UnlockValue && skin.UnlockValue > 0)
+                {
+                    return true;
+                }
             }
+            else
+            {
+                //鐨偆瑙i攣绾㈢偣
+                int itemID = skin.UnlockValue;
+                var count = PackManager.Instance.GetItemCountByID(PackType.Item, itemID);
+                if (count >= skin.UnlockNeedCnt)
+                {
+                    return true;
+                }
+            }            
         }
         return false;
     }

--
Gitblit v1.8.0