From 8a46eeaf9de09c0d909204b7f7760d7ea26e27f9 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Thu, 22 Feb 2024 18:39:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DremoveAdditionalSkill(s)?= =?UTF-8?q?=E5=9C=A8additionalSkills[skill]=E4=B8=BA=E7=A9=BA=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=88=A0=E9=99=A4additionalSkills[skill]=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/element/player.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noname/library/element/player.js b/noname/library/element/player.js index ecc809d94..553bfd1b8 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -7462,7 +7462,7 @@ export class Player extends HTMLDivElement { const player = this, skills = this.getRemovableAdditionalSkills(skill, target); if(skills.length){ player.removeSkill(skills); - if (player.additionalSkills[skill]&&player.additionalSkills[skill].length) delete player.additionalSkills[skill]; + if (player.additionalSkills[skill]&&!player.additionalSkills[skill].length) delete player.additionalSkills[skill]; } _status.event.clearStepCache(); return this; @@ -7475,7 +7475,7 @@ export class Player extends HTMLDivElement { return '#g【' + get.translation(i) + '】'; })); player.removeSkill(skills); - if (player.additionalSkills[skill]&&player.additionalSkills[skill].length) delete player.additionalSkills[skill]; + if (player.additionalSkills[skill]&&!player.additionalSkills[skill].length) delete player.additionalSkills[skill]; }); } }