yyl
2025-11-20 38a309977fee4c17369f263412c60c9c4e748186
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)
@@ -37,6 +39,8 @@
        this.battleFieldGuid = battleFieldGuid;
        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;