From 60275f016e144fddeaab0e2fb8b13dd5d6ddbbc8 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 27 一月 2026 22:17:52 +0800
Subject: [PATCH] 422 子 【内政】命格系统 / 【内政】命格系统-客户端
---
Main/System/Battle/Skill/SkillBase.cs | 408 +++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 260 insertions(+), 148 deletions(-)
diff --git a/Main/System/Battle/Skill/SkillBase.cs b/Main/System/Battle/Skill/SkillBase.cs
index f07de9d..b501bfb 100644
--- a/Main/System/Battle/Skill/SkillBase.cs
+++ b/Main/System/Battle/Skill/SkillBase.cs
@@ -24,19 +24,18 @@
protected RectTransform targetNode = null; // 鐩爣鑺傜偣
public BattleObject caster = null; // 鏂芥硶鑰�
protected List<GameNetPackBasic> packList;
- protected List<SkillRecordAction> otherSkillActionList = new List<SkillRecordAction>();
+
+ protected List<RecordAction> currentWaitingSkill = new List<RecordAction>();
+
protected List<H0704_tagRolePackRefresh> dropPackList = new List<H0704_tagRolePackRefresh>();
protected List<HB405_tagMCAddExp> expPackList = new List<HB405_tagMCAddExp>();
-
- protected List<SkillRecordAction> waitingCastSkillRecordAction = new List<SkillRecordAction>();
-
protected bool moveFinished = false;
public SkillBase fromSkill;
public bool isPlay = false;
// 鐖禦ecordAction锛圫killRecordAction锛夛紝鐢ㄤ簬瀛愭妧鑳藉缓绔嬬埗瀛愬叧绯�
- protected RecordAction parentRecordAction;
+ protected SkillRecordAction ownRecordAction;
// 鎶�鑳藉姩鐢绘槸鍚︽挱鏀惧畬鎴愶紙閽堝鏈夊姩鐢荤殑鎶�鑳斤級
protected bool isMotionCompleted = false;
@@ -68,10 +67,15 @@
SafetyCheck();
}
- // 璁剧疆鐖禦ecordAction
- public void SetParentRecordAction(RecordAction recordAction)
+ public virtual void AfterAddToQueue()
{
- parentRecordAction = recordAction;
+
+ }
+
+ // 璁剧疆鐖禦ecordAction
+ public void SetOwnRecordAction(SkillRecordAction recordAction)
+ {
+ ownRecordAction = recordAction;
}
#if UNITY_EDITOR
@@ -190,22 +194,7 @@
return;
}
- if (otherSkillActionList.Count > 0)
- {
- for (int i = otherSkillActionList.Count - 1; i >= 0; i--)
- {
- var action = otherSkillActionList[i];
- if (action.IsFinished())
- {
- otherSkillActionList.RemoveAt(i);
- OnSkillFinished();
- }
- else if (moveFinished)
- {
- action.Run();
- }
- }
- }
+
}
protected void ShadowIllutionCreate(bool create)
@@ -495,62 +484,90 @@
return;
}
+ // 鍏堟妸姝讳骸鍖呮敹闆嗕簡
HandleDead();
+
+ // 鍐嶅鐞� 鍐呭祵鎶�鑳�
+ ProcessSubSkill();
skillEffect = SkillEffectFactory.CreateSkillEffect(this, caster, skillConfig, tagUseSkillAttack);
skillEffect.Play(OnHitTargets);
- ProcessSubSkill();
- HandleWaitingCastSkill();
+
isPlay = true;
}
protected void ProcessSubSkill()
{
- foreach (var subSkillPack in tagUseSkillAttack.subSkillList)
- {
- SkillRecordAction recordAction = CustomHB426CombinePack.CreateSkillAction(battleField.guid, new List<GameNetPackBasic>() { subSkillPack });
- recordAction.fromSkill = this;
- // 瀛愭妧鑳借缃甒aitingPlay=true锛岀瓑寰呯埗鎶�鑳藉姩浣滃畬鎴�
- waitingCastSkillRecordAction.Add(recordAction);
- battleField.recordPlayer.ImmediatelyPlay(recordAction, parentRecordAction, true);
- }
- tagUseSkillAttack.subSkillList.Clear();
- foreach (var subCombinePack in tagUseSkillAttack.subSkillCombinePackList)
- {
- SkillRecordAction recordAction = CustomHB426CombinePack.CreateSkillAction(battleField.guid, subCombinePack.packList);
- recordAction.fromSkill = this;
- // 瀛愭妧鑳借缃甒aitingPlay=true锛岀瓑寰呯埗鎶�鑳藉姩浣滃畬鎴�
- waitingCastSkillRecordAction.Add(recordAction);
- }
- tagUseSkillAttack.subSkillCombinePackList.Clear();
-
- waitingCastSkillRecordAction.OrderBy(recordAction => recordAction.hB427_TagSCUseSkill.packUID);
-
+ // 鎸塸ackUID鎺掑簭鎵�鏈夊瓙鎶�鑳�
+ var allSubSkills = new List<(ulong packUID, SkillRecordAction action)>();
- }
+ List<GameNetPackBasic> removePackList = new List<GameNetPackBasic>();
- protected void HandleWaitingCastSkill()
- {
- RecordAction waitingRecordAction = null;
-
- for (int i = 0; i < waitingCastSkillRecordAction.Count; i++)
+ foreach (var pack in packList)
{
- var recordAction = waitingCastSkillRecordAction[i];
-
- if (waitingRecordAction != null)
+ if (pack is HB427_tagSCUseSkill skillPack)
{
- // 姣忎釜閮藉簲璇ョ瓑鍓嶄竴涓粨鏉熷悗
- battleField.recordPlayer.ImmediatelyPlay(recordAction, waitingRecordAction, true);
+ SkillConfig ssc = SkillConfig.Get((int)skillPack.SkillID);
+ if (!string.IsNullOrEmpty(ssc.SkillMotionName))
+ {
+ break;
+ }
+ if (ssc.SkillType == 8)
+ {
+ break;
+ }
+ SkillRecordAction skillRecordAction = CustomHB426CombinePack.CreateSkillAction(battleField.guid, new List<GameNetPackBasic> { skillPack });
+ allSubSkills.Add((skillPack.packUID, skillRecordAction));
+ removePackList.Add(pack);
+ }
+ else if (pack is HB422_tagMCTurnFightObjDead dead)
+ {
+ break;
+ }
+ else if (pack is CustomHB426CombinePack combinePack)
+ {
+ HB427_tagSCUseSkill sp = combinePack.GetMainHB427SkillPack();
+ SkillConfig ssc = SkillConfig.Get((int)sp.SkillID);
+
+ if (!string.IsNullOrEmpty(ssc.SkillMotionName))
+ {
+ break;
+ }
+
+ if (ssc.SkillType == 8)
+ {
+ break;
+ }
+
+ SkillRecordAction skillRecordAction = combinePack.CreateSkillAction();
+ allSubSkills.Add((sp.packUID, skillRecordAction));
+ removePackList.Add(pack);
+
+ if (skillRecordAction.useParentRecordPlayer)
+ {
+ break;
+ }
+ }
+ }
+
+ for (int i = 0; i < removePackList.Count; i++)
+ {
+ packList.Remove(removePackList[i]);
+ }
+
+ // 鎸塸ackUID鎺掑簭
+ allSubSkills.Sort((a, b) => a.packUID.CompareTo(b.packUID));
+
+ foreach (var (packUID, recordAction) in allSubSkills)
+ {
+ if (recordAction.useParentRecordPlayer)
+ {
+ ownRecordAction.GetInnerRecordPlayer().PlayRecord(recordAction, ownRecordAction);
}
else
{
- battleField.recordPlayer.ImmediatelyPlay(recordAction, parentRecordAction, true);
- }
-
- if (recordAction.IsNeedWaiting())
- {
- waitingRecordAction = recordAction;
+ ownRecordAction.GetInnerRecordPlayer().ImmediatelyPlay(recordAction);
}
}
}
@@ -814,7 +831,14 @@
#endif
// 鍏堣皟鐢ㄧ洰鏍囧彈浼�
- target.Hurt(hurtParam, parentRecordAction);
+ DeathRecordAction recordAc = target.Hurt(hurtParam, ownRecordAction);
+
+ if (null != recordAc)
+ {
+ tempDeadPackList.Remove(hurtParam.hurter.hurtObj.ObjID);
+ ownRecordAction.GetInnerRecordPlayer().ImmediatelyPlay(recordAc, ownRecordAction, true);
+ currentWaitingSkill.Add(recordAc);
+ }
// 鍐嶈皟鐢ㄦ柦娉曡�呭惛琛�/鍙嶄激
caster.OnHurtTarget(hurtParam);
@@ -899,7 +923,10 @@
if (refreshPack != null)
{
// 鍒嗗彂HP鍒锋柊鍖�
- PackageRegedit.Distribute(refreshPack);
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛欻P鍒锋柊鍖呮槸鎶�鑳藉唴閮ㄤ骇鐢熺殑锛屽簲璇ョ敱褰撳墠SkillRecordAction鐨刬nnerRecordPlayer绠$悊
+ // 杩欐牱鍙互纭繚HP鍒锋柊涓庢妧鑳界殑鐢熷懡鍛ㄦ湡缁戝畾锛孎orceFinish鏃朵竴骞跺鐞�
+ PackageRegeditEx.DistributeToRecordAction(refreshPack, ownRecordAction);
packList.Remove(refreshPack);
}
}
@@ -910,13 +937,62 @@
List<BattleDeadPack> deadPackList = BattleUtility.FindDeadPack(packList);
if (deadPackList.Count <= 0) return;
+ foreach (var deadPack in deadPackList)
+ {
+ packList.Remove(deadPack.deadPack);
+ packList.Remove(deadPack.deadTriggerSkill);
+ }
+
+ // 鎵惧埌鏈�澶х殑姝讳骸鍖� packUID
+ BattleDeadPack lastBattleDeadPack = null;
+ ulong maxDeathPackUID = 0;
+ foreach (var deadPack in deadPackList)
+ {
+ if (deadPack.deadPack != null && deadPack.deadPack.packUID > maxDeathPackUID)
+ {
+ maxDeathPackUID = deadPack.deadPack.packUID;
+ lastBattleDeadPack = deadPack;
+ }
+ }
+
+ // 濡傛灉鎵惧埌浜嗘浜″寘锛屾敹闆嗘墍鏈� packUID > maxDeathPackUID 鐨勫寘
+ if (maxDeathPackUID > 0 && lastBattleDeadPack != null)
+ {
+ BattleDebug.LogError($"SkillBase.HandleDead: 鎵惧埌姝讳骸鍖咃紝maxDeathPackUID = {maxDeathPackUID}锛屽紑濮嬫敹闆嗘浜″悗鐨勫寘");
+
+ // 1. 鏀堕泦 packList 涓� packUID 澶т簬姝讳骸鍖呯殑鍖咃紙鎺掗櫎缁忛獙鍖呭拰鎺夎惤鍖咃紝瀹冧滑闇�瑕佸湪褰撳墠鎶�鑳戒腑澶勭悊锛�
+ List<GameNetPackBasic> packsToRemove = new List<GameNetPackBasic>();
+ foreach (var pack in packList)
+ {
+ ulong packUID = GetPackUID(pack);
+ if (packUID > maxDeathPackUID)
+ {
+ // 鎺掗櫎缁忛獙鍖呭拰鎺夎惤鍖咃紝瀹冧滑灞炰簬褰撳墠姝讳骸浜嬩欢鐨勪竴閮ㄥ垎锛屼笉鏄�"姝讳骸鍚�"鐨勫寘
+ if (pack is HB405_tagMCAddExp expPack && expPack.Source == 2 ||
+ (pack is H0704_tagRolePackRefresh h0704 && h0704.PackType == (byte)PackType.DropItem && h0704.IsBind == 1))
+ {
+ continue; // 璺宠繃缁忛獙鍖呭拰鎺夎惤鍖咃紝璁� CheckAfterDeadhPack() 澶勭悊瀹冧滑
+ }
+
+ BattleDebug.LogError($"SkillBase.HandleDead: 浠巔ackList鏀堕泦姝讳骸鍚庣殑鍖� - Type: {pack.GetType().Name}, UID: {packUID}");
+ lastBattleDeadPack.packListAfterDeath.Add(pack);
+ packsToRemove.Add(pack);
+ }
+ }
+
+ packList.RemoveAll(p => packsToRemove.Contains(p));
+ }
+
CheckAfterDeadhPack();
// 淇锛氬厛鏀堕泦瑕佸垹闄ょ殑鍖咃紝閬垮厤鍦╢oreach涓慨鏀归泦鍚�
var dropPacksToRemove = new List<H0704_tagRolePackRefresh>(dropPackList);
foreach (var _dropPack in dropPacksToRemove)
{
- PackageRegedit.Distribute(_dropPack);
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛氭帀钀藉寘鏄妧鑳芥晥鏋滅殑涓�閮ㄥ垎锛屽簲璇ョ敱褰撳墠SkillRecordAction绠$悊
+ // 鎺夎惤鍖呯殑鍒嗗彂涓庢妧鑳藉畬鎴愮粦瀹氾紝纭繚鍦ㄦ妧鑳紽orceFinish鏃舵纭鐞�
+ PackageRegeditEx.DistributeToRecordAction(_dropPack, ownRecordAction);
packList.Remove(_dropPack);
}
@@ -931,8 +1007,8 @@
// 鏋勯�燘attleDrops骞剁紦瀛�
for (int i = 0; i < deadPackList.Count; i++)
{
- BattleDeadPack battleDeadPack = deadPackList[i];
- int objID = (int)battleDeadPack.deadPack.ObjID;
+ BattleDeadPack bdp = deadPackList[i];
+ int objID = (int)bdp.deadPack.ObjID;
BattleObject deadTarget = battleField.battleObjMgr.GetBattleObject(objID);
// 淇锛氭坊鍔犵┖鍊兼鏌�
@@ -991,6 +1067,48 @@
for (int i = 0; i < itemList.Count; i++)
dropAssign[i % deadCount].Add(itemList[i]);
return dropAssign;
+ }
+
+ // 鑾峰彇鍖呯殑 packUID
+ protected ulong GetPackUID(GameNetPackBasic pack)
+ {
+ if (pack == null) return 0;
+
+ if (pack is HB422_tagMCTurnFightObjDead deadPack)
+ return deadPack.packUID;
+
+ if (pack is CustomHB426CombinePack combinePack)
+ {
+ var mainSkillPack = combinePack.GetMainHB427SkillPack();
+ return mainSkillPack?.packUID ?? 0;
+ }
+
+ if (pack is HB427_tagSCUseSkill skillPack)
+ return skillPack.packUID;
+
+ if (pack is HB428_tagSCBuffRefresh buffRefresh)
+ return buffRefresh.packUID;
+
+ if (pack is HB429_tagSCBuffDel buffDel)
+ return buffDel.packUID;
+
+ if (pack is HB419_tagSCObjHPRefresh hpRefresh)
+ return hpRefresh.packUID;
+
+ if (pack is HB405_tagMCAddExp expPack)
+ return expPack.packUID;
+
+ if (pack is H0704_tagRolePackRefresh dropPack)
+ return dropPack.packUID;
+
+ // 灏濊瘯閫氳繃鍙嶅皠鑾峰彇 packUID
+ var packUIDField = pack.GetType().GetField("packUID");
+ if (packUIDField != null)
+ {
+ return (ulong)packUIDField.GetValue(pack);
+ }
+
+ return 0;
}
// 鍒嗛厤缁忛獙鍊硷細灏嗙粡楠屽寘骞冲潎鍒嗛厤缁欐瘡涓浜″璞�
@@ -1070,7 +1188,7 @@
}
- public virtual bool IsFinishedForJudge()
+ public virtual bool IsActionCompleted()
{
if (!isPlay) return false;
@@ -1079,27 +1197,14 @@
if (!skillEffect.IsFinished()) return false;
}
- if (otherSkillActionList.Count > 0)
+ if (moveFinished)
{
- foreach (var action in otherSkillActionList)
- {
- if (!action.IsFinishedForJudge()) return false;
- }
- }
-
- if (isFinished && moveFinished)
- {
- if (packList.Count > 0)
- {
- return false;
- }
-
// 濡傛灉鎶�鑳芥湁鍔ㄧ敾锛圫killMotionName涓嶄负绌猴級锛岄渶瑕佺瓑寰呭姩鐢绘挱鏀惧畬鎴�
if (skillConfig != null && !string.IsNullOrEmpty(skillConfig.SkillMotionName))
{
if (!isMotionCompleted)
{
- BattleDebug.LogError($"SkillBase.IsFinishedForJudge: 鎶�鑳� {skillConfig.SkillID} 绛夊緟鍔ㄧ敾鎾斁瀹屾垚");
+ BattleDebug.LogError($"SkillBase.IsActionCompleted: 鎶�鑳� {skillConfig.SkillID} 绛夊緟鍔ㄧ敾鎾斁瀹屾垚");
return false;
}
}
@@ -1127,18 +1232,14 @@
}
// 妫�鏌ュ叾浠栨妧鑳藉姩浣滄槸鍚﹀畬鎴�
- if (otherSkillActionList.Count > 0)
+ if (currentWaitingSkill.Count > 0)
{
- for (int i = otherSkillActionList.Count - 1; i >= 0; i--)
+ if (currentWaitingSkill.Any(s => s.IsFinished()))
{
- var action = otherSkillActionList[i];
- if (action.IsFinished())
- {
- otherSkillActionList.RemoveAt(i);
- OnSkillFinished();
- }
+ currentWaitingSkill.RemoveAll(s => s.IsFinished());
+ OnSkillFinished();
}
- if (otherSkillActionList.Count > 0)
+ else
{
tempRetValue = false;
}
@@ -1149,6 +1250,7 @@
return false;
}
+
// 妫�鏌ユ渶缁堝畬鎴愮姸鎬�
if (isFinished && moveFinished)
{
@@ -1158,16 +1260,28 @@
return false;
}
+ // 濡傛灉鑷繁鍐呴儴鐨剅ecora action鐨� inner record player杩樻湁娌℃墽琛屽畬鐨勫寘 涔熸槸杩斿洖false
+ if (ownRecordAction != null && ownRecordAction.GetInnerRecordPlayer().IsPlaying())
+ {
+ return false;
+ }
+
// 鎶�鑳藉畬鍏ㄧ粨鏉燂紝绉婚櫎鎶�鑳芥敞鍐屽苟瑙﹀彂寤惰繜鐨勬浜″垽瀹�
if (battleField != null && caster != null)
{
battleField.RemoveCastingSkill(caster.ObjID, this);
// 浼犻�抪arentRecordAction锛岃姝讳骸鎶�鑳界瓑寰呭綋鍓嶆妧鑳藉畬鎴�
- battleField.OnObjsDead(new List<BattleDeadPack>(tempDeadPackList.Values));
+ DeathRecordAction recordAction = battleField.OnObjsDead(new List<BattleDeadPack>(tempDeadPackList.Values), null, ownRecordAction);
+ if (null != recordAction)
+ {
+ ownRecordAction.GetInnerRecordPlayer().ImmediatelyPlay(recordAction);
+ tempDeadPackList.Clear();
+ return false;
+ }
}
- return true;
+ return !ownRecordAction.GetInnerRecordPlayer().IsPlaying();
}
return false;
@@ -1187,34 +1301,26 @@
}
// 浼犻�抪arentRecordAction锛岃姝讳骸鎶�鑳界瓑寰呭綋鍓嶆妧鑳藉畬鎴�
- battleField.OnObjsDead(new List<BattleDeadPack>(tempDeadPackList.Values));
+ RecordAction rc = battleField.OnObjsDead(new List<BattleDeadPack>(tempDeadPackList.Values));
+ if (null != rc)
+ {
+ ownRecordAction.GetInnerRecordPlayer().ImmediatelyPlay(rc);
+ }
+ tempDeadPackList.Clear();
// 1. 寮哄埗缁撴潫鎶�鑳芥晥鏋�
skillEffect?.ForceFinished();
skillEffect = null;
-
- foreach (var subSkillPack in tagUseSkillAttack.subSkillList)
- {
- SkillRecordAction recordAction = CustomHB426CombinePack.CreateSkillAction(battleField.guid, new List<GameNetPackBasic>() { subSkillPack });
- recordAction.fromSkill = this;
- otherSkillActionList.Add(recordAction);
- // 瀛愭妧鑳借缃甒aitingPlay=true锛岀瓑寰呯埗鎶�鑳藉姩浣滃畬鎴�
- battleField.recordPlayer.ImmediatelyPlay(recordAction, parentRecordAction, true);
- }
- tagUseSkillAttack.subSkillList.Clear();
- foreach (var subCombinePack in tagUseSkillAttack.subSkillCombinePackList)
- {
- SkillRecordAction recordAction = CustomHB426CombinePack.CreateSkillAction(battleField.guid, subCombinePack.packList);
- recordAction.fromSkill = this;
- otherSkillActionList.Add(recordAction);
- // 瀛愭妧鑳借缃甒aitingPlay=true锛岀瓑寰呯埗鎶�鑳藉姩浣滃畬鎴�
- battleField.recordPlayer.ImmediatelyPlay(recordAction, parentRecordAction, true);
- }
- tagUseSkillAttack.subSkillCombinePackList.Clear();
// 2. 寮哄埗缁撴潫鎵�鏈夊瓙鎶�鑳藉姩浣�
- otherSkillActionList.ForEach(action => action.ForceFinish());
- otherSkillActionList.Clear();
+ if (currentWaitingSkill.Count > 0)
+ {
+ foreach (var skill in currentWaitingSkill)
+ {
+ skill.ForceFinish();
+ }
+ currentWaitingSkill.Clear();
+ }
// 3. 娓呯悊 DOTween 鍔ㄧ敾锛堥槻姝㈢Щ鍔ㄥ洖璋冨湪鎴樻枟缁撴潫鍚庢墽琛岋級
if (caster != null && caster.heroRectTrans != null)
@@ -1241,12 +1347,6 @@
// 鍙栨秷骞诲奖鏁堟灉
caster.motionBase?.ShowIllusionShadow(false);
-
- // 鎾斁寰呮満鍔ㄧ敾锛堝鏋滆繕娲荤潃锛�
- if (!caster.teamHero.isDead)
- {
- caster.motionBase?.ResetForReborn(false);
- }
}
// 5. 鎭㈠ UI 鐘舵��
@@ -1296,8 +1396,9 @@
}
else
{
- if (pack is CustomB421ActionPack actionPack)
- actionPack.Distribute();
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛欶orceFinished鏃跺墿浣欑殑鍖呬篃鏄妧鑳藉唴閮ㄤ骇鐢熺殑锛屽簲璇ョ敱innerRecordPlayer绠$悊
+ // 杩欐牱鍙互纭繚鍗充娇寮哄埗缁撴潫锛屽寘鐨勫鐞嗕篃鍦ㄦ纭殑涓婁笅鏂囦腑
PackageRegedit.Distribute(pack);
}
}
@@ -1322,20 +1423,14 @@
}
// 楠岃瘉鍏朵粬鎶�鑳藉姩浣滄槸鍚﹀畬鎴�
- if (otherSkillActionList.Count > 0)
+ if (currentWaitingSkill.Count > 0)
{
- bool hasFinishedAction = false;
- for (int i = otherSkillActionList.Count - 1; i >= 0; i--)
- {
- var action = otherSkillActionList[i];
- if (action.IsFinished())
- {
- otherSkillActionList.RemoveAt(i);
- hasFinishedAction = true;
- }
- }
+ bool hasFinishedAction = currentWaitingSkill.All(s => s.IsFinished());
+
if (hasFinishedAction)
{
+ // 淇姝诲惊鐜細瀹屾垚鍚庨渶瑕佹竻绌� currentWaitingSkill
+ currentWaitingSkill.Clear();
continue; // 浣跨敤continue浠f浛閫掑綊璋冪敤
}
return;
@@ -1363,17 +1458,33 @@
protected virtual bool ResolvePackList()
{
+ if (currentWaitingSkill.Count > 0)
+ {
+ return false;
+ }
+
while (packList.Count > 0)
{
var pack = packList[0];
packList.RemoveAt(0);
+
if (pack is CustomHB426CombinePack combinePack && combinePack.startTag.Tag.StartsWith("Skill_"))
{
- BattleDebug.LogError("other skill casting " + combinePack.startTag.Tag);
- var otherSkillAction = combinePack.CreateSkillAction();
- otherSkillAction.fromSkill = this;
- otherSkillActionList.Add(otherSkillAction);
+ var skillRecordAction = combinePack.CreateSkillAction();
+ skillRecordAction.fromSkill = this;
+ currentWaitingSkill.Add(skillRecordAction);
+
+ // 闇�瑕佺粰鐪熸parent鎾殑
+ if (skillRecordAction.useParentRecordPlayer && skillRecordAction.parentSkillAction != null)
+ {
+ skillRecordAction.parentSkillAction.GetInnerRecordPlayer().PlayRecord(skillRecordAction);
+ }
+ else
+ {
+ ownRecordAction.GetInnerRecordPlayer().PlayRecord(skillRecordAction);
+ }
+
return false;
}
else if (IsBuffPack(pack))
@@ -1401,14 +1512,12 @@
buffPackCollections.Clear();
continue;
}
-
- if (pack is CustomB421ActionPack actionPack)
- {
- actionPack.Distribute();
- }
else
{
- PackageRegedit.Distribute(pack);
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛氭妧鑳芥墽琛岃繃绋嬩腑鐨勫寘锛圔uff銆佸睘鎬у埛鏂扮瓑锛夋槸鎶�鑳芥晥鏋滅殑涓�閮ㄥ垎
+ // 搴旇鐢盨killRecordAction鐨刬nnerRecordPlayer绠$悊锛岀‘淇濅笌鎶�鑳界敓鍛藉懆鏈熶竴鑷�
+ PackageRegeditEx.DistributeToRecordAction(pack, ownRecordAction);
}
}
@@ -1420,7 +1529,7 @@
{
tempDropList?.Clear();
tempDeadPackList?.Clear();
- otherSkillActionList?.Clear();
+ currentWaitingSkill?.Clear();
dropPackList?.Clear();
expPackList?.Clear();
buffPackCollections?.Clear();
@@ -1476,7 +1585,10 @@
foreach (var pack in buffPacks)
{
- PackageRegedit.Distribute(pack);
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛欱uff鍖呮槸鎶�鑳芥晥鏋滅殑鏍稿績缁勬垚閮ㄥ垎锛屽簲璇ョ敱SkillRecordAction绠$悊
+ // 鍗充娇鏄己鍒跺垎鍙戠殑鎯呭喌锛屼篃瑕佷繚鎸佸湪姝g‘鐨凴ecordAction涓婁笅鏂囦腑
+ PackageRegeditEx.DistributeToRecordAction(pack, ownRecordAction);
}
}
--
Gitblit v1.8.0