From 38a309977fee4c17369f263412c60c9c4e748186 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 20 十一月 2025 11:55:02 +0800
Subject: [PATCH] 125 战斗 闪避问题修复 伤害类型错误描述变更

---
 Main/System/Battle/BattleObject/BattleObject.cs |    3 ++-
 Main/System/Battle/Define/BattleDmgInfo.cs      |   15 +++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/Main/System/Battle/BattleObject/BattleObject.cs b/Main/System/Battle/BattleObject/BattleObject.cs
index 5669394..cc5192c 100644
--- a/Main/System/Battle/BattleObject/BattleObject.cs
+++ b/Main/System/Battle/BattleObject/BattleObject.cs
@@ -314,7 +314,7 @@
 
 
         //  杩欓噷
-        if (dmgInfo.IsType(DamageType.Dodge) && !buffMgr.isControled[BattleConst.HardControlGroup])
+        if (dmgInfo.IsType(DamageType.Dodge) /*&& !buffMgr.isControled[BattleConst.HardControlGroup]*/)//濡傛灉琚帶鍒朵簡杩橀棯閬夸簡 瑕佺湅鐪嬫湇鍔″櫒鎬庝箞澶勭悊浜�
         {
             if (isLastHit)
             {
@@ -426,6 +426,7 @@
     {
         // 澶勭悊澶嶆椿閫昏緫
         teamHero.curHp = GeneralDefine.GetFactValue(vNetData.HP, vNetData.HPEx);
+        teamHero.isDead = false;
         heroGo.SetActive(true);
         motionBase.PlayAnimation(MotionName.idle, true);
     }
diff --git a/Main/System/Battle/Define/BattleDmgInfo.cs b/Main/System/Battle/Define/BattleDmgInfo.cs
index 3764066..bcf03c0 100644
--- a/Main/System/Battle/Define/BattleDmgInfo.cs
+++ b/Main/System/Battle/Define/BattleDmgInfo.cs
@@ -30,6 +30,8 @@
     public List<BattleDmg> targetDamageList = new List<BattleDmg>();
     public List<BattleDmg> casterDamageList = new List<BattleDmg>();
 
+    public uint m_rawAttackType;
+
     #region Initialization
 
     public BattleDmgInfo(string battleFieldGuid, BattleHurtParam battleHurtParam)
@@ -38,6 +40,8 @@
         this.battleHurtParam = battleHurtParam;
         this.isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillConfig.DamageDivide.Length - 1;
         
+        m_rawAttackType = hurt == null ? 0 : hurt.AttackTypes;
+
         HandleDamageType();
         HandleAttackTypeAndDamage();
     }
@@ -94,15 +98,18 @@
                     break;
                 
                 case ServerDamageType.DamageReverse:
-                    Debug.LogWarning($"[BattleDmgInfo] 鏈嶅姟鍣ㄤ激瀹崇被鍨� DamageReverse({serverValue}) 鍦ㄥ鎴风娌℃湁瀵瑰簲鐨勬灇涓惧��");
+                    convertedAttackTypes |= (int)DamageType.Damage;
+                    // Debug.LogWarning($"[BattleDmgInfo] 鏈嶅姟鍣ㄤ激瀹崇被鍨� DamageReverse({serverValue}) 鍦ㄥ鎴风娌℃湁瀵瑰簲鐨勬灇涓惧��");
                     break;
                 
                 case ServerDamageType.SuckHpReverse:
-                    Debug.LogWarning($"[BattleDmgInfo] 鏈嶅姟鍣ㄤ激瀹崇被鍨� SuckHpReverse({serverValue}) 鍦ㄥ鎴风娌℃湁瀵瑰簲鐨勬灇涓惧��");
+                    convertedAttackTypes |= (int)DamageType.Damage;
+                    // Debug.LogWarning($"[BattleDmgInfo] 鏈嶅姟鍣ㄤ激瀹崇被鍨� SuckHpReverse({serverValue}) 鍦ㄥ鎴风娌℃湁瀵瑰簲鐨勬灇涓惧��");
                     break;
                 
                 case ServerDamageType.SelfHarm:
-                    Debug.LogWarning($"[BattleDmgInfo] 鏈嶅姟鍣ㄤ激瀹崇被鍨� SelfHarm({serverValue}) 鍦ㄥ鎴风娌℃湁瀵瑰簲鐨勬灇涓惧��");
+                    convertedAttackTypes |= (int)DamageType.Damage;
+                    // Debug.LogWarning($"[BattleDmgInfo] 鏈嶅姟鍣ㄤ激瀹崇被鍨� SelfHarm({serverValue}) 鍦ㄥ鎴风娌℃湁瀵瑰簲鐨勬灇涓惧��");
                     break;
                 
                 default:
@@ -286,7 +293,7 @@
         if (DamageNumConfig.Get(attackType) != null)
             return attackType;
 
-        UnityEngine.Debug.LogError($"鏈嶅姟鍣ㄧ粰鐨勪激瀹崇被鍨嬩笉瀵癸紝寮哄埗杞崲涓烘櫘閫氫激瀹�/娌荤枟, attackType: {attackType}");
+        UnityEngine.Debug.LogError($"杞崲浼ゅ绫诲瀷閿欒鎴栬�呮湭瀹炵幇锛屽己鍒惰浆鎹负鏅�氫激瀹�/娌荤枟, attackType: {attackType} rawAttackType: {m_rawAttackType}");
 
         if ((attackType & (int)DamageType.Damage) != 0)
             return (int)DamageType.Damage;

--
Gitblit v1.8.0