From 7514dbcbb81bcbf8a517d14b0e4ddcf12c27457e Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 11 八月 2025 17:26:09 +0800
Subject: [PATCH] 125 【战斗】战斗系统 战斗系统更新

---
 Main/System/Battle/BattleManager.cs                                                            |   43 +++++++------
 Main/System/Battle/BattleObject/BattleObjectFactory.cs                                         |   11 +++
 Main/System/Battle/BattleWin.cs                                                                |   13 ++++
 Main/System/Battle/Motion/MotionBase.cs                                                        |   25 +++++---
 Main/System/Battle/BattleField/StoryBattleField.cs                                             |    2 
 Main/Core/NetworkPackage/CustomServerPack/CustomHB426CombinePack.cs                            |   17 ++++-
 Main/System/Battle/BattleMode.cs                                                               |    2 
 Main/System/Battle/BattleField/BattleField.cs                                                  |    6 +-
 Main/Common/EventBroadcast.cs                                                                  |    4 +
 Main/Core/NetworkPackage/CustomServerPack/CustomB421ActionPack.cs                              |   15 +++++
 Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB423_tagMCTurnFightObjReborn.cs |    2 
 Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs                                           |    7 +-
 Main/System/Battle/BattleField/RecordActions/BattleStartAction.cs                              |    2 
 Main/System/Battle/Skill/SkillBase.cs                                                          |    3 
 Main/System/Battle/BattleObject/BattleObjMgr.cs                                                |    2 
 Main/System/Battle/BattleField/RecordActions/DeathRecordAction.cs                              |   16 +++++
 Main/System/Team/TeamHero.cs                                                                   |    2 
 17 files changed, 127 insertions(+), 45 deletions(-)

diff --git a/Main/Common/EventBroadcast.cs b/Main/Common/EventBroadcast.cs
index 68e51d8..671fcad 100644
--- a/Main/Common/EventBroadcast.cs
+++ b/Main/Common/EventBroadcast.cs
@@ -26,6 +26,10 @@
     // 闃叉澶栭儴瀹炰緥鍖�
     private EventBroadcast() { }
 
+    ~EventBroadcast() {
+        eventDict.Clear();
+    }
+
     #region 娣诲姞鐩戝惉
 
     /// <summary>
diff --git a/Main/Core/NetworkPackage/CustomServerPack/CustomB421ActionPack.cs b/Main/Core/NetworkPackage/CustomServerPack/CustomB421ActionPack.cs
index 0082938..78bb4d2 100644
--- a/Main/Core/NetworkPackage/CustomServerPack/CustomB421ActionPack.cs
+++ b/Main/Core/NetworkPackage/CustomServerPack/CustomB421ActionPack.cs
@@ -20,6 +20,21 @@
 
     public void Distribute()
     {
+        while (actionPacks.Count > 0)
+        {
+            GameNetPackBasic pack = actionPacks.Dequeue();
 
+            Debug.LogError("CustomB421ActionPack distribute pack " + pack.GetType().Name);
+
+            if (pack is CustomHB426CombinePack)
+            {
+                var b426Pack = pack as CustomHB426CombinePack;
+                b426Pack.Distribute();
+            }
+            else
+            {
+                PackageRegedit.Distribute(pack);
+            }
+        }
     }
 }
\ No newline at end of file
diff --git a/Main/Core/NetworkPackage/CustomServerPack/CustomHB426CombinePack.cs b/Main/Core/NetworkPackage/CustomServerPack/CustomHB426CombinePack.cs
index ed9c008..beb0ffd 100644
--- a/Main/Core/NetworkPackage/CustomServerPack/CustomHB426CombinePack.cs
+++ b/Main/Core/NetworkPackage/CustomServerPack/CustomHB426CombinePack.cs
@@ -24,12 +24,13 @@
 
     public void SetHB426End(int _toIndex, HB426_tagSCTurnFightTag _endTag)
     {
-        if (endTag.Sign != 1)
+        if (_endTag.Sign != 1)
         {
-            Debug.LogError("HB426_tagSCTurnFightTag Sign must be 1 for end tag, but got: " + endTag.Sign);
+            Debug.LogError("HB426_tagSCTurnFightTag Sign must be 1 for end tag, but got: " + _endTag.Sign);
             return;
         }
         endTag = _endTag;
+        toIndex = _toIndex;
 
         packList = CombineToSkillPackFromList(guid, packList);
     }
@@ -59,13 +60,18 @@
 
     public bool IsEndPack(HB426_tagSCTurnFightTag tag)
     {
-        if (endTag == null)
+        if (tag == null)
         {
-            Debug.LogError("endTag is null, please set it first.");
             return false;
         }
 
-        return endTag.Tag == tag.Tag && endTag.Sign == 1;
+        if (startTag == null)
+        {
+            Debug.LogError("startTag is null, please set it first.");
+            return false;
+        }
+
+        return startTag.Tag == tag.Tag && tag.Sign == 1;
     }
 
 
@@ -83,6 +89,7 @@
                     combinePack = new CustomHB426CombinePack();
                     combinePack.guid = _guid;
                     combinePack.SetHB426Start(i, tag);
+                    continue;
                 }
                 else
                 {
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB423_tagMCTurnFightObjReborn.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB423_tagMCTurnFightObjReborn.cs
index b707515..42b63eb 100644
--- a/Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB423_tagMCTurnFightObjReborn.cs
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB423_tagMCTurnFightObjReborn.cs
@@ -11,6 +11,6 @@
 
         HB423_tagMCTurnFightObjReborn vNetData = vNetPack as HB423_tagMCTurnFightObjReborn;
         BattleField battleField = BattleManager.Instance.GetBattleField(vNetPack.packUID);
-        // battleField.OnObjReborn(vNetData.ObjID);
+        battleField.OnObjReborn(vNetData);
     }
 }
diff --git a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
index 6ecf68a..74f7e43 100644
--- a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
+++ b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
@@ -49,8 +49,6 @@
         Register(typeof(HA709_tagObjInfoListRefresh), typeof(DTCA709_tagObjInfoListRefresh));
         Register(typeof(H0113_tagServerHeart), typeof(DTC0113_tagServerHeart));
         Register(typeof(H0111_tagOnlineReply), typeof(DTC0111_tagOnlineReply));
-        Register(typeof(HB428_tagSCBuffRefresh), typeof(DTCB428_tagSCBuffRefresh));
-        Register(typeof(HB429_tagSCBuffDel), typeof(DTCB429_tagSCBuffDel));
         Register(typeof(H0608_tagNPCDie), typeof(DTC0608_tagNPCDie));
         Register(typeof(H0612_tagClearObjBuff), typeof(DTC0612_tagClearObjBuff));
         Register(typeof(HA3A1_tagMCModuleFightPowerInfo), typeof(DTCA3A1_tagMCModuleFightPowerInfo));
@@ -98,10 +96,13 @@
         Register(typeof(HB423_tagMCTurnFightObjReborn), typeof(DTCB423_tagMCTurnFightObjReborn));
         Register(typeof(HB424_tagSCTurnFightInit), typeof(DTCB424_tagSCTurnFightInit));
         Register(typeof(HB425_tagSCTurnFightReportSign), typeof(DTCB425_tagSCTurnFightReportSign));
+        Register(typeof(HB426_tagSCTurnFightTag), typeof(DTCB426_tagSCTurnFightTag));
+        Register(typeof(HB427_tagSCUseSkill), typeof(DTCB427_tagSCUseSkill));
+        Register(typeof(HB428_tagSCBuffRefresh), typeof(DTCB428_tagSCBuffRefresh));
+        Register(typeof(HB429_tagSCBuffDel), typeof(DTCB429_tagSCBuffDel));
         Register(typeof(HB430_tagSCTurnFightReport), typeof(DTCB430_tagSCTurnFightReport));
         Register(typeof(H0407_tagNPCDisappear), typeof(DTC0407_tagNPCDisappear));
         Register(typeof(HB418_tagSCObjPropertyRefreshView), typeof(DTCB418_tagSCObjPropertyRefreshView));
-        Register(typeof(HB427_tagSCUseSkill), typeof(DTCB427_tagSCUseSkill));
         Register(typeof(HB124_tagSCLineupInfo), typeof(DTCB124_tagSCLineupInfo));
         Register(typeof(HA207_tagSCPackBuyInfo), typeof(DTCA207_tagSCPackBuyInfo));
     }
diff --git a/Main/System/Battle/BattleField/BattleField.cs b/Main/System/Battle/BattleField/BattleField.cs
index 07c5ced..0fd1e13 100644
--- a/Main/System/Battle/BattleField/BattleField.cs
+++ b/Main/System/Battle/BattleField/BattleField.cs
@@ -229,7 +229,6 @@
         //  TurnNum;    // 褰撳墠杞
         //  Len;
         //  Msg;    //size = Len   +
-
         if (State == 4)
         {
             //宸茬粡缁撴潫骞剁粨绠�
@@ -250,7 +249,7 @@
             Debug.Log("鎴樻枟鍥炲悎 : " + turnNum + "锛岀姸鎬� " + State);
         }
 
-
+        DistributeNextPackage();
 
         // 鍋氫竴涓狝ction 閫氱煡UI缈讳笅鐗屽瓙 鐒跺悗缁撴潫Action
         // TurnFightStateAction turnFightStateAction = new TurnFightStateAction(this, turnNum, State, FuncLineID, extendData);
@@ -363,7 +362,8 @@
         {
             obj.motionBase.PlayAnimation(MotionName.run, true);
             RectTransform trans = obj.heroRectTrans;
-            tween = trans.DOMove(obj.GetAliasTeamNode().position, 0.5f).SetEase(Ease.Linear);
+            trans.anchoredPosition = new Vector2(-800, 0);
+            tween = trans.DOAnchorPos(Vector2.zero, 1f).SetEase(Ease.Linear);
             battleTweenMgr.OnPlayTween(tween);
         }
 
diff --git a/Main/System/Battle/BattleField/RecordActions/BattleStartAction.cs b/Main/System/Battle/BattleField/RecordActions/BattleStartAction.cs
index 2ab72f6..c60825a 100644
--- a/Main/System/Battle/BattleField/RecordActions/BattleStartAction.cs
+++ b/Main/System/Battle/BattleField/RecordActions/BattleStartAction.cs
@@ -32,6 +32,8 @@
 			isFinish = true;
 			// 瀹屾垚灏卞紑濮嬫樉绀篣I
 			EventBroadcast.Instance.Broadcast(EventName.DISPLAY_BATTLE_UI, battleField.guid, true);
+
+			battleField.DistributeNextPackage();
 		});
 
 		isRun = true;
diff --git a/Main/System/Battle/BattleField/RecordActions/DeathRecordAction.cs b/Main/System/Battle/BattleField/RecordActions/DeathRecordAction.cs
index 86a19e5..fa8f020 100644
--- a/Main/System/Battle/BattleField/RecordActions/DeathRecordAction.cs
+++ b/Main/System/Battle/BattleField/RecordActions/DeathRecordAction.cs
@@ -30,6 +30,22 @@
 
     private void OnDeathAnimationEnd()
     {
+        //  鍙湁涓荤嚎鎺夎惤鐗╁搧
+        if (battleField.MapID == 1 || battleField.MapID == 2)
+        {
+            var dropItemPack = PackManager.Instance.GetSinglePack(PackType.DropItem);
+            if (dropItemPack != null)
+            {
+                var items = dropItemPack.GetAllItems();
+                foreach (ItemModel item in items.Values)
+                {
+                    //    鎺夎惤鐗╁搧
+                    battleField.OnObjDropItem(battleObject.teamHero.positionNum, item);
+                    battleField.OnObjDropExp(battleObject);
+                    
+                }
+            }
+        }
         // 鎺夎惤鐗╁搧 澧炲姞缁忛獙
 
     	isFinish = true;
diff --git a/Main/System/Battle/BattleField/StoryBattleField.cs b/Main/System/Battle/BattleField/StoryBattleField.cs
index 1d43c45..8854fcd 100644
--- a/Main/System/Battle/BattleField/StoryBattleField.cs
+++ b/Main/System/Battle/BattleField/StoryBattleField.cs
@@ -140,6 +140,8 @@
     public override void OnBattleEnd(JsonData turnFightStateData)
     {
         base.OnBattleEnd(turnFightStateData);
+
+        HaveRest();
     }
 
     // public override void Run()
diff --git a/Main/System/Battle/BattleManager.cs b/Main/System/Battle/BattleManager.cs
index 630243f..6ca51aa 100644
--- a/Main/System/Battle/BattleManager.cs
+++ b/Main/System/Battle/BattleManager.cs
@@ -1,9 +1,7 @@
 using System.Collections.Generic;
 using UnityEngine;
 using LitJson;
-
-
-
+using System;
 
 public class BattleManager : GameSystemManager<BattleManager>
 {
@@ -14,10 +12,13 @@
 
     protected LogicUpdate logicUpdate = new LogicUpdate();
 
+    public Action<string, BattleField> onBattleFieldCreate;
+
+    public Action<string, BattleField> onBattleFieldDestroy;
+
     public override void Init()
     {
         base.Init();
-        // StartStoryBattle();
         logicUpdate.Start(Run);
         DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk;
     }
@@ -64,7 +65,6 @@
     {
 
     }
-
 
     #region 鎴柇缃戠粶娲惧彂鍖� 鍙敹鍏ュ綋鍓嶅寘鐨勫悗缁� b425鏄富绾跨殑 闈炰富绾跨殑鍖呭苟涓嶄細璧癰425
     private bool allow = true;
@@ -116,10 +116,13 @@
         List<GameNetPackBasic> packQueueSnapshot = new List<GameNetPackBasic>(packQueue);
 
         List<GameNetPackBasic> newPackList = new List<GameNetPackBasic>();
+        HashSet<int> skipIndexes = new HashSet<int>();
 
         // 杩欓噷宸茬粡鏄寜鐓equeue鐨勯『搴忎簡
         for (int i = 0; i < packQueueSnapshot.Count; i++)
         {
+            if (skipIndexes.Contains(i)) continue;
+
             GameNetPackBasic pack = packQueueSnapshot[i];
 
             // 纰板埌B421 鎴柇 寰�涓嬫敹闆哹421閲岀殑鍏ㄩ儴鍐呭
@@ -128,7 +131,6 @@
                 HB421_tagMCTurnFightObjAction b421Pack = pack as HB421_tagMCTurnFightObjAction;
 
                 List<GameNetPackBasic> b421PackList = new List<GameNetPackBasic>();
-
                 i++;    // 璺宠繃褰撳墠鐨凚421鍖�
 
                 for (; i < packQueueSnapshot.Count; i++)
@@ -144,17 +146,14 @@
                     else
                     {
                         b421PackList.Add(nextPack);
+                        skipIndexes.Add(i); // 鏍囪宸茶鍚堝寘
                     }
                 }
 
                 // 鍙兘娌$敤浜� 涓昏灏辨槸鍒╃敤涓�涓媠kill鐨刢ombine 鏆傜暀 鐪嬩箣鍚庤繕鏈夋病鏈夊埆鐨勯渶姹�
                 CustomB421ActionPack actionPack = CustomB421ActionPack.CreateB421ActionPack(GetGUID(b421Pack.packUID), b421PackList);
 
-                while (actionPack.actionPacks.Count > 0)
-                {
-                    GameNetPackBasic actionPackItem = actionPack.actionPacks.Dequeue();
-                    newPackList.Add(actionPackItem);
-                }
+                newPackList.Add(actionPack);
             }
             else
             {
@@ -187,6 +186,7 @@
         DistributeNextPackage();
     }
 
+    //  涓撳睘浜庝富绾挎垬鏂楃殑娲惧彂
     public bool DistributeNextPackage()
     {
         if (packQueue.Count > 0)
@@ -197,6 +197,11 @@
             {
                 CustomHB426CombinePack combinePack = pack as CustomHB426CombinePack;
                 combinePack.Distribute();
+            }
+            else if (pack is CustomB421ActionPack)
+            {
+                CustomB421ActionPack actionPack = pack as CustomB421ActionPack;
+                actionPack.Distribute();
             }
             else
             {
@@ -264,8 +269,6 @@
         return battleField;
     }
 
-
-
     public string GetGUID(ulong packUID)
     {
         foreach (var kv in battlePackRelationList)
@@ -277,7 +280,6 @@
         }
         return string.Empty;
     }
-
 
     public void DistributeNextReportPackage(string guid)
     {
@@ -311,6 +313,8 @@
 
         battleField = BattleFieldFactory.CreateBattleField(guid, MapID, FuncLineID, extendData, redTeamList, blueTeamList);
 
+        onBattleFieldCreate?.Invoke(guid, battleField);
+
         if (string.IsNullOrEmpty(guid))
         {
             storyBattleField = (StoryBattleField)battleField;
@@ -331,17 +335,21 @@
             return;
         }
 
+        onBattleFieldDestroy?.Invoke(battleField.guid, battleField);
+
         string guid = battleField.guid;
 
         if (battleFields.ContainsKey(guid))
         {
             battleFields.Remove(guid);
         }
-        
+
         if (storyBattleField == battleField)
         {
             storyBattleField = null;
         }
+
+        GameObject.DestroyImmediate(battleField.battleRootNode.gameObject);
     }
 
 
@@ -363,11 +371,6 @@
 
     public void Run()
     {
-        // if (null != storyBattleField)
-        // {
-        //     storyBattleField.Run();
-        // }
-
         foreach (var battleField in battleFields)
         {
             battleField.Value?.Run();
diff --git a/Main/System/Battle/BattleMode.cs b/Main/System/Battle/BattleMode.cs
index b03d5bf..21e5910 100644
--- a/Main/System/Battle/BattleMode.cs
+++ b/Main/System/Battle/BattleMode.cs
@@ -5,4 +5,6 @@
     Hand,//鎵嬪姩鎴樻枟
     Auto,//鑷姩鎴樻枟
     Record,//鎴樻姤
+
+    Stop,   //鏆傚仠妯″紡
 }
\ No newline at end of file
diff --git a/Main/System/Battle/BattleObject/BattleObjMgr.cs b/Main/System/Battle/BattleObject/BattleObjMgr.cs
index 3c8cd0e..fccf934 100644
--- a/Main/System/Battle/BattleObject/BattleObjMgr.cs
+++ b/Main/System/Battle/BattleObject/BattleObjMgr.cs
@@ -42,7 +42,7 @@
         for (int i = 0; i < teamBase.serverHeroes.Length; i++)
         {
             TeamHero teamHero = teamBase.serverHeroes[i];
-            if (teamHero != null && teamHero.heroId > 0)
+            if (teamHero != null)
             {
                 BattleObject battleObj = BattleObjectFactory.CreateBattleObject(battleField, posNodeList, teamHero, _Camp);
                 allBattleObjDict.Add(battleObj.ObjID, battleObj);
diff --git a/Main/System/Battle/BattleObject/BattleObjectFactory.cs b/Main/System/Battle/BattleObject/BattleObjectFactory.cs
index 0ad9ec5..9bb60eb 100644
--- a/Main/System/Battle/BattleObject/BattleObjectFactory.cs
+++ b/Main/System/Battle/BattleObject/BattleObjectFactory.cs
@@ -29,6 +29,8 @@
             return null;
         }
 
+        Debug.LogError("1 BattleObjectFactory.CreateBattleObject: Creating BattleObject for " + teamHero.ObjID + " at position " + teamHero.positionNum);
+
         GameObject goParent = posNodeList[teamHero.positionNum];
         BattleObject battleObject = new BattleObject(_battleField);
         battleObject.ObjID = teamHero.ObjID;
@@ -43,13 +45,20 @@
             return null;
         }
 
+        Debug.LogError("2 BattleObjectFactory.CreateBattleObject: Creating BattleObject for " + teamHero.ObjID + " at position " + teamHero.positionNum);
+
+
         float finalScaleRate = modelScaleRate * teamHero.modelScale;
 
         skeletonGraphic.skeletonDataAsset = skeletonDataAsset;
         skeletonGraphic.Initialize(true);
         realGO.name = battleObject.ObjID.ToString();
-        realGO.transform.localScale = new Vector3((_Camp == BattleCamp.Red ? 1 : -1f) * finalScaleRate, finalScaleRate, finalScaleRate);
+        realGO.transform.localScale = new Vector3(finalScaleRate, finalScaleRate, finalScaleRate);
         battleObject.Init(realGO, teamHero, _Camp);
+
+        Debug.LogError(realGO.name +  " /3 BattleObjectFactory.CreateBattleObject: Creating BattleObject for " + teamHero.ObjID + " at position " + teamHero.positionNum);
+
+
         return battleObject;
     }
 
diff --git a/Main/System/Battle/BattleWin.cs b/Main/System/Battle/BattleWin.cs
index 006dfcc..1d4fe89 100644
--- a/Main/System/Battle/BattleWin.cs
+++ b/Main/System/Battle/BattleWin.cs
@@ -1,4 +1,5 @@
-锘縰sing UnityEngine;
+锘縰sing System;
+using UnityEngine;
 using UnityEngine.UI;
 
 public class BattleWin : UIBase
@@ -41,12 +42,22 @@
     {
         base.OnPreOpen();
         // SetBattleField(BattleManager.Instance.storyBattleField);
+        BattleManager.Instance.onBattleFieldCreate += OnCreateBattleField;
     }
 
     protected override void OnPreClose()
     {
         base.OnPreClose();
         UIManager.Instance.CloseWindow<BattleHUDWin>();
+        BattleManager.Instance.onBattleFieldCreate -= OnCreateBattleField;
+    }
+
+    private void OnCreateBattleField(string arg1, BattleField field)
+    {
+        if (field.GetType() == battleField.GetType())
+        {
+            SetBattleField(field);
+        }
     }
 
     protected override void OnOpen()
diff --git a/Main/System/Battle/Motion/MotionBase.cs b/Main/System/Battle/Motion/MotionBase.cs
index adcb575..99e5e3b 100644
--- a/Main/System/Battle/Motion/MotionBase.cs
+++ b/Main/System/Battle/Motion/MotionBase.cs
@@ -10,6 +10,8 @@
 /// </summary>
 public class MotionBase
 {
+    public static float MotionTimeScale = 2f;
+
     public static List<string> AttackMotionList = new List<string>
     {
         MotionName.attack.ToString(),
@@ -42,7 +44,7 @@
     private Spine.TrackEntry currentTrackEntry;
 
     #region 鍒濆鍖栨柟娉�
-    
+
     /// <summary>
     /// 鍒濆鍖栧姩鐢荤粍浠�
     /// </summary>
@@ -50,21 +52,24 @@
     public virtual void Init(SkeletonGraphic skeletonGraphic)
     {
         this.skeletonGraphic = skeletonGraphic;
-        
+
         if (skeletonGraphic != null)
         {
             spineAnimationState = skeletonGraphic.AnimationState;
+            spineAnimationState.TimeScale = MotionTimeScale;
+            skeletonGraphic.timeScale = MotionTimeScale;
+
             skeleton = skeletonGraphic.Skeleton;
-            
+
             // 璁剧疆鍔ㄧ敾娣峰悎鏃堕棿
             if (spineAnimationState != null)
             {
                 spineAnimationState.Data.DefaultMix = defaultMixDuration;
             }
-            
+
             // 鎾斁榛樿鍔ㄧ敾
             PlayAnimation(MotionName.idle, true);
-            
+
             // 璁剧疆鍔ㄧ敾浜嬩欢鐩戝惉
             SetupAnimationHandlers();
         }
@@ -72,6 +77,8 @@
         {
             Debug.LogError("缂哄皯SkeletonGraphic缁勪欢!");
         }
+        
+
     }
     
     public virtual void Release()
@@ -303,14 +310,14 @@
 
     public virtual void Pause()
     {
-        if (currentTrackEntry != null)
-            currentTrackEntry.TimeScale = 0f;
+        spineAnimationState.TimeScale = 0f;
+        skeletonGraphic.timeScale = 0f;
     }
 
     public virtual void Resume()
     {
-        if (currentTrackEntry != null)
-            currentTrackEntry.TimeScale = 1f;
+        spineAnimationState.TimeScale = MotionTimeScale;
+        skeletonGraphic.timeScale = MotionTimeScale;
     }
 
     #endregion
diff --git a/Main/System/Battle/Skill/SkillBase.cs b/Main/System/Battle/Skill/SkillBase.cs
index 3921dc6..4325c92 100644
--- a/Main/System/Battle/Skill/SkillBase.cs
+++ b/Main/System/Battle/Skill/SkillBase.cs
@@ -135,7 +135,8 @@
 			// 	DashToTarget(() => BackToOrigin(OnSkillFinished));
 			// 	break;
 			default:
-				Debug.LogError("鏆傛椂涓嶆敮鎸佸叾浠栫殑鏂瑰紡閲婃斁 鏈夐渶姹傝鑱旂郴绛栧垝");
+				Debug.LogError("鏆傛椂涓嶆敮鎸佸叾浠栫殑鏂瑰紡閲婃斁 鏈夐渶姹傝鑱旂郴绛栧垝" + skillConfig.SkillID);
+				OnSkillFinished();
 				break;
 		}
 	}
diff --git a/Main/System/Team/TeamHero.cs b/Main/System/Team/TeamHero.cs
index 52c1238..c5af4ad 100644
--- a/Main/System/Team/TeamHero.cs
+++ b/Main/System/Team/TeamHero.cs
@@ -37,6 +37,7 @@
             NPCConfig npcConfig = NPCConfig.Get((int)fightObj.NPCID);
             Country = (HeroCountry)npcConfig.Country;
             SkinID = npcConfig.SkinID;
+            Debug.LogError("npc skin id is " + SkinID);
             modelScale = npcConfig.ModelScale;
         }
         else
@@ -45,6 +46,7 @@
             var heroConfig = HeroConfig.Get(heroId);
             Country = (HeroCountry)heroConfig.Country;
             SkinID = (int)fightObj.SkinID;
+            Debug.LogError("normal hero skin id is " + SkinID);
             modelScale = 1f;
         }
 

--
Gitblit v1.8.0