From 6ea676553ac0b16d93e67f6f5455e458b5627dcb Mon Sep 17 00:00:00 2001 From: xizifu <2238983941@qq.com> Date: Fri, 7 Jun 2024 00:25:21 +0800 Subject: [PATCH] Update content.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 防止chooseButton类技能生成的backup技能覆盖已封装技能中存在的sourceSkill --- noname/library/element/content.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/noname/library/element/content.js b/noname/library/element/content.js index 42c90d99e..36ab6cfba 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -3682,7 +3682,9 @@ export const Content = { info.chooseControl ? result : result.links, player ); - lib.skill[event.buttoned + "_backup"].sourceSkill = event.buttoned; + if (!lib.skill[event.buttoned + "_backup"].sourceSkill) { + lib.skill[event.buttoned + "_backup"].sourceSkill = event.buttoned; + } if (game.online) { event._sendskill = [event.buttoned + "_backup", lib.skill[event.buttoned + "_backup"]]; } else { @@ -3894,7 +3896,9 @@ export const Content = { info.chooseControl ? result : result.links, player ); - lib.skill[event.buttoned + "_backup"].sourceSkill = event.buttoned; + if (!lib.skill[event.buttoned + "_backup"].sourceSkill) { + lib.skill[event.buttoned + "_backup"].sourceSkill = event.buttoned; + } if (game.online) { event._sendskill = [event.buttoned + "_backup", lib.skill[event.buttoned + "_backup"]]; } else {