From aa84cb62bebb9c8a4e586bcc1ec28eb7a16a8860 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 26 一月 2026 18:10:34 +0800
Subject: [PATCH] 422 子 【内政】命格系统 / 【内政】命格系统-客户端
---
Main/System/Battle/Skill/SkillBase.cs | 404 +++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 261 insertions(+), 143 deletions(-)
diff --git a/Main/System/Battle/Skill/SkillBase.cs b/Main/System/Battle/Skill/SkillBase.cs
index da38c42..4919082 100644
--- a/Main/System/Battle/Skill/SkillBase.cs
+++ b/Main/System/Battle/Skill/SkillBase.cs
@@ -24,12 +24,11 @@
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;
@@ -66,6 +65,11 @@
}
SafetyCheck();
+ }
+
+ public virtual void AfterAddToQueue()
+ {
+
}
// 璁剧疆鐖禦ecordAction
@@ -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,73 @@
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 (pack is HB427_tagSCUseSkill skillPack)
+ {
+ SkillConfig ssc = SkillConfig.Get((int)skillPack.SkillID);
+ if (!string.IsNullOrEmpty(ssc.SkillMotionName))
+ {
+ 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 (waitingRecordAction != null)
- {
- // 姣忎釜閮藉簲璇ョ瓑鍓嶄竴涓粨鏉熷悗
- battleField.recordPlayer.ImmediatelyPlay(recordAction, waitingRecordAction, true);
+ if (!string.IsNullOrEmpty(ssc.SkillMotionName))
+ {
+ break;
+ }
+ SkillRecordAction skillRecordAction = combinePack.CreateSkillAction();
+ allSubSkills.Add((sp.packUID, skillRecordAction));
+ removePackList.Add(pack);
}
- else
- {
- battleField.recordPlayer.ImmediatelyPlay(recordAction, parentRecordAction, true);
- }
+ }
+
+ 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)
+ {
+ battleField.recordPlayer.ImmediatelyPlay(recordAction);
if (recordAction.IsNeedWaiting())
{
- waitingRecordAction = recordAction;
+ currentWaitingSkill.Add(recordAction);
}
}
}
@@ -720,6 +720,11 @@
}
}
+ HandleHint(_hitIndex, hitList);
+ }
+
+ protected void HandleHint(int _hitIndex, List<HB427_tagSCUseSkill.tagSCUseSkillHurt> hitList)
+ {
if (0 == _hitIndex)
{
bool needhint = false;
@@ -755,9 +760,37 @@
DamageNumConfig hintConfig = DamageNumConfig.Get(BattleConst.BattleStun);
Hint(caster, hintConfig);
}
- }
-
+ for (int i = 0; i < hitList.Count; i++)
+ {
+ var hurt = hitList[i];
+
+ if ((hurt.AttackTypes & (int)DamageType.BreakArmor) == (int)DamageType.BreakArmor)
+ {
+ BattleObject battleObject = caster.battleField.battleObjMgr.GetBattleObject((int)hurt.ObjID);
+ if (battleObject != null)
+ {
+ DamageNumConfig hintConfig = DamageNumConfig.Get(BattleConst.BreakArmor);
+ Hint(battleObject, hintConfig);
+ battleField.battleEffectMgr.PlayEffect(battleObject,
+ BattleConst.BreakArmorEffectID, battleObject.heroRectTrans, battleObject.Camp,
+ battleObject.teamHero.modelScale);
+ }
+ }
+ else if ((hurt.AttackTypes & (int)DamageType.Parry) == (int)DamageType.Parry)
+ {
+ BattleObject battleObject = caster.battleField.battleObjMgr.GetBattleObject((int)hurt.ObjID);
+ if (battleObject != null)
+ {
+ DamageNumConfig hintConfig = DamageNumConfig.Get(BattleConst.Parry);
+ Hint(battleObject, hintConfig);
+ battleField.battleEffectMgr.PlayEffect(battleObject,
+ BattleConst.ParryEffectID, battleObject.heroRectTrans, battleObject.Camp,
+ battleObject.teamHero.modelScale);
+ }
+ }
+ }
+ }
}
// 澶勭悊鍗曚釜鐩爣琚懡涓�:搴旂敤浼ゅ鍜屾柦娉曡�呮晥鏋�
@@ -781,7 +814,14 @@
#endif
// 鍏堣皟鐢ㄧ洰鏍囧彈浼�
- target.Hurt(hurtParam, parentRecordAction);
+ DeathRecordAction recordAc = target.Hurt(hurtParam, parentRecordAction);
+
+ if (null != recordAc)
+ {
+ tempDeadPackList.Remove(hurtParam.hurter.hurtObj.ObjID);
+ battleField.recordPlayer.ImmediatelyPlay(recordAc, parentRecordAction, true);
+ currentWaitingSkill.Add(recordAc);
+ }
// 鍐嶈皟鐢ㄦ柦娉曡�呭惛琛�/鍙嶄激
caster.OnHurtTarget(hurtParam);
@@ -866,7 +906,10 @@
if (refreshPack != null)
{
// 鍒嗗彂HP鍒锋柊鍖�
- PackageRegedit.Distribute(refreshPack);
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛欻P鍒锋柊鍖呮槸鎶�鑳藉唴閮ㄤ骇鐢熺殑锛屽簲璇ョ敱褰撳墠SkillRecordAction鐨刬nnerRecordPlayer绠$悊
+ // 杩欐牱鍙互纭繚HP鍒锋柊涓庢妧鑳界殑鐢熷懡鍛ㄦ湡缁戝畾锛孎orceFinish鏃朵竴骞跺鐞�
+ PackageRegeditEx.DistributeToRecordAction(refreshPack, parentRecordAction);
packList.Remove(refreshPack);
}
}
@@ -877,13 +920,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, parentRecordAction);
packList.Remove(_dropPack);
}
@@ -898,8 +990,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);
// 淇锛氭坊鍔犵┖鍊兼鏌�
@@ -958,6 +1050,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;
}
// 鍒嗛厤缁忛獙鍊硷細灏嗙粡楠屽寘骞冲潎鍒嗛厤缁欐瘡涓浜″璞�
@@ -1037,7 +1171,7 @@
}
- public virtual bool IsFinishedForJudge()
+ public virtual bool IsActionCompleted()
{
if (!isPlay) return false;
@@ -1046,27 +1180,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;
}
}
@@ -1094,18 +1215,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;
}
@@ -1125,13 +1242,25 @@
return false;
}
+ // 濡傛灉鑷繁鍐呴儴鐨剅ecora action鐨� inner record player杩樻湁娌℃墽琛屽畬鐨勫寘 涔熸槸杩斿洖false
+ if (parentRecordAction != null && parentRecordAction.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));
+ if (null != recordAction)
+ {
+ parentRecordAction.GetInnerRecordPlayer().ImmediatelyPlay(recordAction);
+ tempDeadPackList.Clear();
+ return false;
+ }
}
return true;
@@ -1154,34 +1283,26 @@
}
// 浼犻�抪arentRecordAction锛岃姝讳骸鎶�鑳界瓑寰呭綋鍓嶆妧鑳藉畬鎴�
- battleField.OnObjsDead(new List<BattleDeadPack>(tempDeadPackList.Values), parentRecordAction);
+ RecordAction rc = battleField.OnObjsDead(new List<BattleDeadPack>(tempDeadPackList.Values));
+ if (null != rc)
+ {
+ parentRecordAction.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)
@@ -1208,12 +1329,6 @@
// 鍙栨秷骞诲奖鏁堟灉
caster.motionBase?.ShowIllusionShadow(false);
-
- // 鎾斁寰呮満鍔ㄧ敾锛堝鏋滆繕娲荤潃锛�
- if (!caster.teamHero.isDead)
- {
- caster.motionBase?.ResetForReborn(false);
- }
}
// 5. 鎭㈠ UI 鐘舵��
@@ -1263,8 +1378,9 @@
}
else
{
- if (pack is CustomB421ActionPack actionPack)
- actionPack.Distribute();
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛欶orceFinished鏃跺墿浣欑殑鍖呬篃鏄妧鑳藉唴閮ㄤ骇鐢熺殑锛屽簲璇ョ敱innerRecordPlayer绠$悊
+ // 杩欐牱鍙互纭繚鍗充娇寮哄埗缁撴潫锛屽寘鐨勫鐞嗕篃鍦ㄦ纭殑涓婁笅鏂囦腑
PackageRegedit.Distribute(pack);
}
}
@@ -1289,20 +1405,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;
@@ -1330,17 +1440,24 @@
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);
+ parentRecordAction.GetInnerRecordPlayer().PlayRecord(skillRecordAction);
return false;
}
else if (IsBuffPack(pack))
@@ -1368,14 +1485,12 @@
buffPackCollections.Clear();
continue;
}
-
- if (pack is CustomB421ActionPack actionPack)
- {
- actionPack.Distribute();
- }
else
{
- PackageRegedit.Distribute(pack);
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛氭妧鑳芥墽琛岃繃绋嬩腑鐨勫寘锛圔uff銆佸睘鎬у埛鏂扮瓑锛夋槸鎶�鑳芥晥鏋滅殑涓�閮ㄥ垎
+ // 搴旇鐢盨killRecordAction鐨刬nnerRecordPlayer绠$悊锛岀‘淇濅笌鎶�鑳界敓鍛藉懆鏈熶竴鑷�
+ PackageRegeditEx.DistributeToRecordAction(pack, parentRecordAction);
}
}
@@ -1387,7 +1502,7 @@
{
tempDropList?.Clear();
tempDeadPackList?.Clear();
- otherSkillActionList?.Clear();
+ currentWaitingSkill?.Clear();
dropPackList?.Clear();
expPackList?.Clear();
buffPackCollections?.Clear();
@@ -1443,7 +1558,10 @@
foreach (var pack in buffPacks)
{
- PackageRegedit.Distribute(pack);
+ // 銆愪娇鐢� parentRecordAction.innerRecordPlayer銆�
+ // 鍘熷洜锛欱uff鍖呮槸鎶�鑳芥晥鏋滅殑鏍稿績缁勬垚閮ㄥ垎锛屽簲璇ョ敱SkillRecordAction绠$悊
+ // 鍗充娇鏄己鍒跺垎鍙戠殑鎯呭喌锛屼篃瑕佷繚鎸佸湪姝g‘鐨凴ecordAction涓婁笅鏂囦腑
+ PackageRegeditEx.DistributeToRecordAction(pack, parentRecordAction);
}
}
--
Gitblit v1.8.0