From 7746e45cd693d4ba83a422049026d8f2fd0c24dc Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 01 十二月 2025 11:37:26 +0800
Subject: [PATCH] 125 战斗 弹射问题修复

---
 Main/System/Battle/SkillEffect/BulletSkillEffect.cs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Main/System/Battle/SkillEffect/BulletSkillEffect.cs b/Main/System/Battle/SkillEffect/BulletSkillEffect.cs
index 5221f5c..d01967a 100644
--- a/Main/System/Battle/SkillEffect/BulletSkillEffect.cs
+++ b/Main/System/Battle/SkillEffect/BulletSkillEffect.cs
@@ -382,6 +382,8 @@
 
         int bounceHitIndex = 0;
 
+        int tempBulletIndex = bulletIndex;
+
         var bulletCurve = BulletCurveFactory.CreateBulletCurve(caster, skillConfig, effectPlayer, target.heroRectTrans, tagUseSkillAttack.HurtList.ToList(), bulletIndex, (index, hitList) =>
         {
             if (skillConfig.BulletPath == 4)
@@ -407,7 +409,7 @@
                 // 琛ㄧ幇瀛愬脊椋炶鍒扮洰鏍囦綅缃�
                 onHit?.Invoke(index, new List<HB427_tagSCUseSkill.tagSCUseSkillHurt> { hurt });
 
-                if (bulletIndex == tagUseSkillAttack.HurtList.Length - 1)
+                if (bounceHitIndex >= tagUseSkillAttack.HurtList.Length)
                 {
                     caster.battleField.battleEffectMgr.RemoveEffect(skillConfig.BulletEffectId, effectPlayer);
                 }
@@ -415,7 +417,7 @@
                 if (isFinish)
                     return;
 
-                if (bulletIndex >= skillConfig.ActiveFrames.Length - 1 && bounceHitIndex >= hitList.Count)
+                if (tempBulletIndex >= skillConfig.ActiveFrames.Length - 1 && bounceHitIndex >= hitList.Count)
                 {
                     isFinish = true;
                 }

--
Gitblit v1.8.0