From ed98029a88cd89702980ac7c40b711afddc5aeb2 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 20 十一月 2025 14:44:59 +0800
Subject: [PATCH] Merge branch 'master' of http://mobile.secondworld.net.cn:10010/r/Project_SG_scripts

---
 Main/System/Battle/Skill/SkillBase.cs |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/Main/System/Battle/Skill/SkillBase.cs b/Main/System/Battle/Skill/SkillBase.cs
index 7fb0d75..be236e3 100644
--- a/Main/System/Battle/Skill/SkillBase.cs
+++ b/Main/System/Battle/Skill/SkillBase.cs
@@ -17,18 +17,18 @@
                                                         189f / 255f);
 
     protected SkillEffect skillEffect;
-    protected HB427_tagSCUseSkill tagUseSkillAttack;
+    public HB427_tagSCUseSkill tagUseSkillAttack;
     public SkillConfig skillConfig;
     protected bool isFinished = false;
     protected BattleField battleField = null; // 鎴樺満
     protected RectTransform targetNode = null; // 鐩爣鑺傜偣
-    protected BattleObject caster = null; // 鏂芥硶鑰�
+    public BattleObject caster = null; // 鏂芥硶鑰�
     protected List<GameNetPackBasic> packList;
     protected List<SkillRecordAction> otherSkillActionList = new List<SkillRecordAction>();
     protected List<H0704_tagRolePackRefresh> dropPackList = new List<H0704_tagRolePackRefresh>();
     protected List<HB405_tagMCAddExp> expPackList = new List<HB405_tagMCAddExp>();
     protected bool moveFinished = false;
-    public int fromSkillId;
+    public SkillBase fromSkill;
     public bool isPlay = false;
 
     private float MoveSpeed = 750f;
@@ -219,7 +219,7 @@
             return;
         }
 
-        int mainTargetPosNum = BattleUtility.GetMainTargetPositionNum(caster, tagUseSkillAttack.HurtList.ToList(), skillConfig);
+        int mainTargetPosNum = BattleUtility.GetMainTargetPositionNum(this, caster, tagUseSkillAttack.HurtList.ToList(), skillConfig);
         BattleCamp battleCamp = skillConfig.TagFriendly != 0 ? caster.Camp : caster.GetEnemyCamp();
         RectTransform targetTrans = battleField.GetTeamNode(battleCamp, mainTargetPosNum);
 
@@ -340,14 +340,23 @@
     {
         HandleDead();
         
-        skillEffect = SkillEffectFactory.CreateSkillEffect(caster, skillConfig, tagUseSkillAttack);
+        skillEffect = SkillEffectFactory.CreateSkillEffect(this, caster, skillConfig, tagUseSkillAttack);
         skillEffect.Play(OnHitTargets);
         foreach (var subSkillPack in tagUseSkillAttack.subSkillList)
         {
             SkillRecordAction recordAction = CustomHB426CombinePack.CreateSkillAction(battleField.guid, new List<GameNetPackBasic>() { subSkillPack });
+            recordAction.fromSkill = this;
             otherSkillActionList.Add(recordAction);
             battleField.recordPlayer.ImmediatelyPlay(recordAction);
         }
+        foreach (var subCombinePack in tagUseSkillAttack.subSkillCombinePackList)
+        {
+            SkillRecordAction recordAction = CustomHB426CombinePack.CreateSkillAction(battleField.guid, subCombinePack.packList);
+            recordAction.fromSkill = this;
+            otherSkillActionList.Add(recordAction);
+            battleField.recordPlayer.ImmediatelyPlay(recordAction);
+        }
+
         isPlay = true;
     }
 
@@ -874,7 +883,7 @@
             if (pack is CustomHB426CombinePack combinePack && combinePack.startTag.Tag.StartsWith("Skill_"))
             {
                 var otherSkillAction = combinePack.CreateSkillAction();
-                otherSkillAction.fromSkillId = skillConfig.SkillID;
+                otherSkillAction.fromSkill = this;
                 otherSkillAction.ForceFinish();
             }
             else
@@ -955,7 +964,7 @@
             {
                 BattleDebug.LogError("other skill casting " + combinePack.startTag.Tag);
                 var otherSkillAction = combinePack.CreateSkillAction();
-                otherSkillAction.fromSkillId = skillConfig.SkillID;
+                otherSkillAction.fromSkill = this;
                 otherSkillActionList.Add(otherSkillAction);
                 return false;
             }

--
Gitblit v1.8.0