| | |
| | | |
| | | } |
| | | |
| | | public override void AfterAddToQueue() |
| | | { |
| | | base.AfterAddToQueue(); |
| | | } |
| | | |
| | | protected override void OnHitTargets(int _hitIndex, List<HB427_tagSCUseSkill.tagSCUseSkillHurt> hitList) |
| | | { |
| | | List<BattleObject> rebornTargets = new List<BattleObject>(); |
| | | for (int i = 0; i < hitList.Count; i++) |
| | | { |
| | | var hurt = hitList[i]; |
| | | BattleObject battleObject = battleField.battleObjMgr.GetBattleObject((int)hitList[i].ObjID); |
| | | if (battleObject != null) |
| | | { |
| | | battleObject.OnReborn(hurt, hurt.ObjID == caster.teamHero.ObjID); |
| | | battleObject.OnReborn(hurt, hurt.ObjID == caster.teamHero.ObjID, parentRecordAction); |
| | | rebornTargets.Add(battleObject); |
| | | } |
| | | } |
| | | |
| | | RebornRecordAction recordAction = new RebornRecordAction(battleField, rebornTargets, () => |
| | | { |
| | | for (int i = 0; i < tagUseSkillAttack.HurtList.Length; i++) |
| | | { |
| | | var hurt = tagUseSkillAttack.HurtList[i]; |
| | | BattleObject battleObject = battleField.battleObjMgr.GetBattleObject((int)tagUseSkillAttack.HurtList[i].ObjID); |
| | | if (battleObject != null) |
| | | { |
| | | battleField.OnObjReborn(tagUseSkillAttack.HurtList[i].ObjID); |
| | | battleObject.teamHero.curHp = GeneralDefine.GetFactValue(hurt.CurHP, hurt.CurHPEx); |
| | | |
| | | // Debug.LogError("OnReborn " + teamHero.curHp); |
| | | battleObject.teamHero.isDead = false; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | battleField.recordPlayer.ImmediatelyPlay(recordAction); |
| | | |
| | | |
| | | bool vValue = true; |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | public override void OnMiddleFrameStart(int times) |
| | | { |
| | | skillEffect.OnMiddleFrameStart(times); // 修复:添加空值检查 |
| | | } |
| | | |
| | | // 技能中摇结束回调:通知技能效果处理中摇结束 |
| | | public override void OnMiddleFrameEnd(int times, int hitIndex) |
| | | { |
| | | skillEffect.OnMiddleFrameEnd(times, hitIndex); // 修复:添加空值检查 |
| | | } |
| | | |
| | | public override void OnFinalFrameEnd() |
| | | { |
| | | skillEffect?.OnFinalFrameEnd(); // 修复:添加空值检查 |
| | | } |
| | | |
| | | } |