Update content.js

防止chooseButton类技能生成的backup技能覆盖已封装技能中存在的sourceSkill
This commit is contained in:
xizifu 2024-06-07 00:25:21 +08:00
parent f7f3d7c694
commit 6ea676553a
1 changed files with 6 additions and 2 deletions

View File

@ -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 {