yyl
2025-11-27 0a01580b727239e0e764c6b71425f3dbfa91e0c5
125 战斗 死亡 受击音效 & 天子考验护盾隐藏
4个文件已修改
58 ■■■■■ 已修改文件
Main/Config/Configs/HeroConfig.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleObject/BattleObject.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/UIComp/BattleHeroInfoBar.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Team/TeamHero.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           Wednesday, September 17, 2025
//    [  Date ]:           2025年11月27日
//--------------------------------------------------------
using System.Collections.Generic;
@@ -26,6 +26,8 @@
    public int[] SkinIDList;
    public int AtkSkillID;
    public int AngerSkillID;
    public int DeathSFX;
    public int HitSFX;
    public int AtkInheritPer;
    public int DefInheritPer;
    public int HPInheritPer;
@@ -77,21 +79,25 @@
            int.TryParse(tables[9],out AngerSkillID); 
            int.TryParse(tables[10],out AtkInheritPer);
            int.TryParse(tables[10],out DeathSFX);
            int.TryParse(tables[11],out DefInheritPer);
            int.TryParse(tables[11],out HitSFX);
            int.TryParse(tables[12],out HPInheritPer);
            int.TryParse(tables[12],out AtkInheritPer);
            BatAttrDict = ConfigParse.ParseIntDict(tables[13]);
            int.TryParse(tables[13],out DefInheritPer);
            if (tables[14].Contains("["))
            int.TryParse(tables[14],out HPInheritPer);
            BatAttrDict = ConfigParse.ParseIntDict(tables[15]);
            if (tables[16].Contains("["))
            {
                FetterIDList = JsonMapper.ToObject<int[]>(tables[14]);
                FetterIDList = JsonMapper.ToObject<int[]>(tables[16]);
            }
            else
            {
                string[] FetterIDListStringArray = tables[14].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                string[] FetterIDListStringArray = tables[16].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                FetterIDList = new int[FetterIDListStringArray.Length];
                for (int i=0;i<FetterIDListStringArray.Length;i++)
                {
@@ -99,17 +105,17 @@
                }
            }
            float.TryParse(tables[15],out UIScale);
            float.TryParse(tables[17],out UIScale);
            Desc = tables[16];
            Desc = tables[18];
            if (tables[17].Contains("["))
            if (tables[19].Contains("["))
            {
                TalentList = JsonMapper.ToObject<int[]>(tables[17]);
                TalentList = JsonMapper.ToObject<int[]>(tables[19]);
            }
            else
            {
                string[] TalentListStringArray = tables[17].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                string[] TalentListStringArray = tables[19].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                TalentList = new int[TalentListStringArray.Length];
                for (int i=0;i<TalentListStringArray.Length;i++)
                {
Main/System/Battle/BattleObject/BattleObject.cs
@@ -358,6 +358,7 @@
            {
                if (!buffMgr.isControled[BattleConst.HardControlGroup])
                {
                    battleField.soundManager.PlayEffectSound(teamHero.heroConfig.HitSFX);
                    motionBase.PlayAnimation(MotionName.hit, false);
                }
            }
@@ -431,6 +432,7 @@
    public virtual void OnDeath(Action _onDeathAnimationComplete)
    {
        buffMgr.RemoveAllBuff();
        battleField.soundManager.PlayEffectSound(teamHero.heroConfig.DeathSFX);
        motionBase.PlayDeadAnimation(() =>
        {
            teamHero.isDead = true;
@@ -702,4 +704,9 @@
        }
#endif
    }
    public bool IsTianziBoss()
    {
        return battleField.MapID == 30020 && battleField.FindBoss() == this;
    }
}
Main/System/Battle/UIComp/BattleHeroInfoBar.cs
@@ -205,6 +205,9 @@
    public void UpdateHP(float value)
    {
        sliderHp.value = value; 
        bool IsTianziBoss = battleObject.IsTianziBoss();
        sliderShield1.SetActive(!IsTianziBoss);
        sliderShield2.SetActive(!IsTianziBoss);
        //Debug.Log("TianziDamageBar UpdateHP value:" + value);
    }
@@ -300,8 +303,10 @@
        damageSequence = DOTween.Sequence();
        bool IsTianziBoss = battleObject.IsTianziBoss();
        // 护盾动画
        if (fromShield > 0)
        if (fromShield > 0 && !IsTianziBoss)
        {
            float fromShield1Value = Mathf.Min((float)(fromHp + fromShield), (float)maxHp) / (float)maxHp;
            float fromShield2Value = Mathf.Max((float)(fromHp + fromShield - maxHp), 0f) / (float)maxHp;
Main/System/Team/TeamHero.cs
@@ -6,6 +6,8 @@
    public HeroCountry Country;
    public int SkinID;
    public HeroConfig heroConfig;
    public HeroSkinConfig skinConfig;
    public string guid;
@@ -42,20 +44,20 @@
        //  补充 skinid跟heroid要么同时没有 要么同时有 如果这三个id都没有的话 那就是配置严重错误 无法弥补
        if (fightObj.SkinID > 0 && fightObj.HeroID > 0)
        {
            // 走玩家逻辑
            var heroConfig = HeroConfig.Get(heroId);
        heroConfig = HeroConfig.Get(heroId);
            if (null == heroConfig)
            {
                Debug.LogError("hero config is null, heroId : " + heroId);
                return;
            }
        if (fightObj.SkinID > 0 && fightObj.HeroID > 0)
        {
            Country = (HeroCountry)heroConfig.Country;
            SkinID = (int)fightObj.SkinID;
            modelScale = 1f;
            name = heroConfig.Name;
        }
        else
        {