From e93628fb8cb1c6049de99133f7656d92d069574e Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Fri, 1 Jul 2022 03:04:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=A7=92=E8=89=B2=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=B6=E6=9C=89=E5=8F=AF=E8=83=BD=E5=9B=A0=E6=97=A0?= =?UTF-8?q?=E5=A4=A9=E8=B5=8B=E6=95=B0=E6=8D=AE=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin.js | 2 +- components/models/Character.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/admin.js b/apps/admin.js index 05a08c8b..5c4f3bb1 100644 --- a/apps/admin.js +++ b/apps/admin.js @@ -25,7 +25,7 @@ let sysCfgReg = `^#喵喵设置\s*(${lodash.keys(cfgMap).join("|")})?\s*(.*)$`; export const rule = { updateRes: { hashMark: true, - reg: "^#喵喵更新图像$", + reg: "^#喵喵(更新图像|图像更新)$", describe: "【#管理】更新素材", }, updateMiaoPlugin: { diff --git a/components/models/Character.js b/components/models/Character.js index beb8c4f2..87fa2898 100644 --- a/components/models/Character.js +++ b/components/models/Character.js @@ -168,8 +168,12 @@ class Character extends Base { } getConsTalent() { - let e = this.talent.e.name, - q = this.talent.q.name; + let talent = this.talent || false; + if (!talent) { + return { e: 3, q: 5 } + } + let e = talent.e.name, + q = talent.q.name; let c3 = this.cons['3'].desc, c5 = this.cons['5'].desc; return {