From 07dce54336a7c49c993d0ca395cd5b00eb8b1a4d Mon Sep 17 00:00:00 2001 From: bietiaop <1527109126@qq.com> Date: Mon, 2 Sep 2024 16:29:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=E4=B8=8D=E5=90=88=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wiki.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/apps/wiki.js b/apps/wiki.js index 675d0d6..9285b54 100644 --- a/apps/wiki.js +++ b/apps/wiki.js @@ -51,6 +51,14 @@ export class Abyss extends ZZZPlugin { const charname = this.e.msg.match(reg)[4]; if (!charname) return false; const levelsChar = this.e.msg.match(reg)[5]; + const levels = !!levelsChar + ? levelsChar.split('.').map(x => { + const _x = Number(x.trim()); + if (!_.isNaN(_x)) return _x; + if (_.isString(x)) return x.charCodeAt(0) - 64; + return null; + }) + : []; const [ BasicLevel = 12, DodgeLevel = 12, @@ -58,12 +66,15 @@ export class Abyss extends ZZZPlugin { SpecialLevel = 12, ChainLevel = 12, CoreLevel = 6, - ] = levelsChar.split('.').map(x => { - const _x = Number(x.trim()); - if (!_.isNaN(_x)) return _x; - if (_.isString(x)) return x.charCodeAt(0) - 64; - return null; - }); + ] = levels; + logger.debug( + BasicLevel, + DodgeLevel, + AssistLevel, + SpecialLevel, + ChainLevel, + CoreLevel + ); if ( !isSkillLevelLegal('BasicLevel', BasicLevel) || !isSkillLevelLegal('DodgeLevel', DodgeLevel) ||