From 78a9b0e3a368d2b59fd6559a2be1f50d32040ea0 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期二, 18 十一月 2025 18:14:49 +0800
Subject: [PATCH] 125 战斗 tagAim=6的支持 持续buff层级永远在最前

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

diff --git a/Main/System/Battle/Skill/SkillBase.cs b/Main/System/Battle/Skill/SkillBase.cs
index 08a3515..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,17 +340,19 @@
     {
         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);
         }
@@ -881,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
@@ -962,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