mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix: 默认等级不合法
This commit is contained in:
parent
15b14eece4
commit
07dce54336
1 changed files with 17 additions and 6 deletions
23
apps/wiki.js
23
apps/wiki.js
|
|
@ -51,6 +51,14 @@ export class Abyss extends ZZZPlugin {
|
||||||
const charname = this.e.msg.match(reg)[4];
|
const charname = this.e.msg.match(reg)[4];
|
||||||
if (!charname) return false;
|
if (!charname) return false;
|
||||||
const levelsChar = this.e.msg.match(reg)[5];
|
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 [
|
const [
|
||||||
BasicLevel = 12,
|
BasicLevel = 12,
|
||||||
DodgeLevel = 12,
|
DodgeLevel = 12,
|
||||||
|
|
@ -58,12 +66,15 @@ export class Abyss extends ZZZPlugin {
|
||||||
SpecialLevel = 12,
|
SpecialLevel = 12,
|
||||||
ChainLevel = 12,
|
ChainLevel = 12,
|
||||||
CoreLevel = 6,
|
CoreLevel = 6,
|
||||||
] = levelsChar.split('.').map(x => {
|
] = levels;
|
||||||
const _x = Number(x.trim());
|
logger.debug(
|
||||||
if (!_.isNaN(_x)) return _x;
|
BasicLevel,
|
||||||
if (_.isString(x)) return x.charCodeAt(0) - 64;
|
DodgeLevel,
|
||||||
return null;
|
AssistLevel,
|
||||||
});
|
SpecialLevel,
|
||||||
|
ChainLevel,
|
||||||
|
CoreLevel
|
||||||
|
);
|
||||||
if (
|
if (
|
||||||
!isSkillLevelLegal('BasicLevel', BasicLevel) ||
|
!isSkillLevelLegal('BasicLevel', BasicLevel) ||
|
||||||
!isSkillLevelLegal('DodgeLevel', DodgeLevel) ||
|
!isSkillLevelLegal('DodgeLevel', DodgeLevel) ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue