| | |
| | | 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) |
| | |
| | | this.battleFieldGuid = battleFieldGuid; |
| | | this.battleHurtParam = battleHurtParam; |
| | | this.isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillConfig.DamageDivide.Length - 1; |
| | | |
| | | m_rawAttackType = hurt == null ? 0 : hurt.AttackTypes; |
| | | |
| | | HandleDamageType(); |
| | | HandleAttackTypeAndDamage(); |
| | |
| | | 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: |
| | |
| | | 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; |