From a0cc772e3de31fc11962a5ceec29fc58554fca09 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 02 一月 2025 02:54:21 +0800
Subject: [PATCH] 10331 【越南】【英语】【BT】【砍树】境界修改

---
 UI/Common/UI3DModelFactory.cs |   37 ++++++++++++++++---------------------
 1 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/UI/Common/UI3DModelFactory.cs b/UI/Common/UI3DModelFactory.cs
index d5697f7..8548cf0 100644
--- a/UI/Common/UI3DModelFactory.cs
+++ b/UI/Common/UI3DModelFactory.cs
@@ -91,7 +91,7 @@
         var animator = model.GetComponent<Animator>();
         if (animator != null)
         {
-            //ResetRealmBossAnimator(id, animator);
+            ResetRealmBossAnimator(id, animator);
             animator.enabled = false;
         }
 
@@ -111,26 +111,21 @@
         }
     }
 
-    //private static void ResetRealmBossAnimator(int _id, Animator animator)
-    //{
-    //    var configs = RealmConfig.GetValues();
-    //    var index = configs.FindIndex((x) =>
-    //    {
-    //        return x.BossID == _id;
-    //    });
-    //    if (index != -1)
-    //    {
-    //        var npcConfig = NPCConfig.Get(_id);
-    //        if (npcConfig != null)
-    //        {
-    //            var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, npcConfig.MODE);
-    //            if (runtimeController != null)
-    //            {
-    //                animator.runtimeAnimatorController = runtimeController;
-    //            }
-    //        }
-    //    }
-    //}
+    private static void ResetRealmBossAnimator(int _id, Animator animator)
+    {
+        if (RealmLVUPTaskConfig.IsRealmBoss(_id))
+        {
+            var npcConfig = NPCConfig.Get(_id);
+            if (npcConfig != null)
+            {
+                var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, npcConfig.MODE);
+                if (runtimeController != null)
+                {
+                    animator.runtimeAnimatorController = runtimeController;
+                }
+            }
+        }
+    }
 
     public static GameObject LoadUIHorse(int id)
     {

--
Gitblit v1.8.0