yyl
2025-11-27 fbea95ff1d813328f13ad7a3ece021d2271f093a
125 战斗 击晕支持
4个文件已修改
69 ■■■■ 已修改文件
Main/Core/NetworkPackage/CustomServerPack/CustomHB426CombinePack.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/Define/BattleDmgInfo.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/Define/DamageType.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/Skill/SkillBase.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/CustomServerPack/CustomHB426CombinePack.cs
@@ -366,7 +366,6 @@
            else
            {
                pack.commonMark = true;
                // Debug.LogError("发现非Skill包,先分发掉: " + pack.GetType().Name);
                PackageRegedit.Distribute(pack);
            }
        }
@@ -415,7 +414,6 @@
            else
            {
                pack.commonMark = true;
                // Debug.LogError("发现非Skill包,先分发掉: " + pack.GetType().Name);
                PackageRegedit.Distribute(pack);
            }
        }
Main/System/Battle/Define/BattleDmgInfo.cs
@@ -135,6 +135,10 @@
                    convertedAttackTypes |= (int)DamageType.Crit;
                    break;
                
                case ServerDamageType.Stunned:
                    convertedAttackTypes |= (int)DamageType.Stunned;
                    break;
                case ServerDamageType.Dodge:
                    convertedAttackTypes |= (int)DamageType.Dodge;
                    break;
@@ -167,12 +171,6 @@
                convertedAttackTypes = (int)DamageType.Bloody;
            }
            // 治疗类型保持不变
        }
        // 检查是否包含占位符类型
        if ((convertedAttackTypes & (int)DamageType.TakePlace2) == (int)DamageType.TakePlace2)
        {
            Debug.LogWarning($"[BattleDmgInfo] 转换后的伤害类型包含占位符 TakePlace2(256)");
        }
        hurt.AttackTypes = (uint)convertedAttackTypes;
Main/System/Battle/Define/DamageType.cs
@@ -48,7 +48,7 @@
    Crit = 128,         //暴击 (2^7)
    TakePlace2 = 256,   //占位2 (暂无用) (2^8)
    Stunned = 256,   //击晕 (2^8)
    Dodge = 512,        //闪避 (2^9)
Main/System/Battle/Skill/SkillBase.cs
@@ -252,11 +252,9 @@
                hintConfig = DamageNumConfig.Get(BattleConst.BattleChaseAttack);
            }
            
            if (hintConfig != null)
            {
                caster.heroInfoBar.ShowTips(((char)hintConfig.prefix).ToString(), true, false, 1.25f);
                // Debug.Break();
            }
            Hint(caster, hintConfig);
        }
        // 高亮所有本次技能相关的目标
@@ -285,6 +283,14 @@
                Debug.LogError("强制结束技能 暂时不支持其他的方式释放 有需求please联系策划 技能id:" + skillConfig.SkillID + " cast position " + skillConfig.CastPosition);
                ForceFinished();
                break;
        }
    }
    protected void Hint(BattleObject battleObject, DamageNumConfig hintConfig)
    {
        if (hintConfig != null)
        {
            battleObject.heroInfoBar.ShowTips(((char)hintConfig.prefix).ToString(), true, false, 1.25f);
        }
    }
@@ -633,6 +639,45 @@
                OnHitEachTargetEx(_hitIndex, exTarget, hurtEx);
            }
        }
        if (0 == _hitIndex)
        {
            bool needhint = false;
            for (int i = 0; i < hitList.Count; i++)
            {
                var hurt = hitList[i];
                //8-击晕
                if ((hurt.AttackTypes & (int)DamageType.Stunned) == (int)DamageType.Stunned)
                {
                    needhint = true;
                    break;
                }
                for (int j = 0; j < hurt.HurtListEx?.Length; j++)
                {
                    var hurtex = hurt.HurtListEx[j];
                    //8-击晕
                    if ((hurtex.AttackTypes & (int)ServerDamageType.Stunned) == (int)ServerDamageType.Stunned)
                    {
                        needhint = true;
                        break;
                    }
                }
                if (needhint)
                    break;
            }
            if (needhint)
            {
                DamageNumConfig hintConfig = DamageNumConfig.Get(BattleConst.BattleStun);
                Hint(caster, hintConfig);
            }
        }
    }
    // 处理单个目标被命中:应用伤害和施法者效果