hch
2026-01-26 aa84cb62bebb9c8a4e586bcc1ec28eb7a16a8860
Main/System/Battle/BattleObject/BattleObject.cs
@@ -315,8 +315,9 @@
        return true;
    }
    public virtual void Hurt(BattleHurtParam battleHurtParam, RecordAction causingRecordAction = null)
    public virtual DeathRecordAction Hurt(BattleHurtParam battleHurtParam, RecordAction _causingRecordAction = null)
    {
        DeathRecordAction recordAction = null;
        bool isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillConfig.DamageDivide.Length - 1;
        bool firstHit = battleHurtParam.hitIndex == 0;
        
@@ -335,6 +336,10 @@
            if (isLastHit)
            {
                DodgeFinishAction dodgeFinish = new DodgeFinishAction(battleField, this);
                // 【使用 BattleField.recordPlayer】
                // 原因:闪避完成动作是目标角色的独立行为,不是技能内部产生的
                // 虽然是在Hurt过程中触发,但是闪避动作本身是目标的反应,应该由主RecordPlayer管理
                // 使用InsertRecord可以插到队列最前面,保证闪避表现的优先级
                battleField.recordPlayer.InsertRecord(dodgeFinish);
            }
@@ -352,7 +357,7 @@
            {
                PushDropItems(battleHurtParam.battleDrops);
            }
            battleField.OnObjsDead(new List<BattleDeadPack>() { battleHurtParam.deadPack }, causingRecordAction);
            recordAction = battleField.OnObjsDead(new List<BattleDeadPack>() { battleHurtParam.deadPack }, _causingRecordAction);
        }
        else
@@ -374,6 +379,8 @@
            // }
        }
        return recordAction;
    }
    /// <summary>
@@ -489,7 +496,7 @@
    }
    //  复活action
    public void OnReborn(HB427_tagSCUseSkill.tagSCUseSkillHurt vNetData, bool reviveSelf = false)
    public void OnReborn(HB427_tagSCUseSkill.tagSCUseSkillHurt vNetData, bool reviveSelf = false, RecordAction parentAction = null)
    {
        isReborning = true;
        heroGo.SetActive(true);
@@ -497,16 +504,7 @@
        heroRectTrans.anchoredPosition = Vector2.zero;
        motionBase.skeletonAnim.skeleton.A = 0f;
        motionBase.skeletonAnim.LateUpdate();
        RebornRecordAction recordAction = new RebornRecordAction(battleField, this, () =>
        {
            battleField.OnObjReborn((uint)ObjID);
            teamHero.curHp = GeneralDefine.GetFactValue(vNetData.CurHP, vNetData.CurHPEx);
            // Debug.LogError("OnReborn " + teamHero.curHp);
            teamHero.isDead = false;
        });
        battleField.recordPlayer.InsertRecord(recordAction);
    }
    public void AfterReborn()
@@ -585,9 +583,9 @@
        heroGo.SetActive(true);
        motionBase.HaveRest();
        heroRectTrans.anchoredPosition = Vector2.zero;
        heroInfoBar.HaveRest();
        isReborning = false;
        heroInfoBar.SetActive(false);
        SetFront();
    }