修正角色查询时有可能因无天赋数据导致的错误

This commit is contained in:
yoimiya-kokomi 2022-07-01 03:04:20 +08:00
parent 485fe9b3ac
commit e93628fb8c
2 changed files with 7 additions and 3 deletions

View File

@ -25,7 +25,7 @@ let sysCfgReg = `^#喵喵设置\s*(${lodash.keys(cfgMap).join("|")})?\s*(.*)$`;
export const rule = {
updateRes: {
hashMark: true,
reg: "^#喵喵更新图像$",
reg: "^#喵喵(更新图像|图像更新)$",
describe: "【#管理】更新素材",
},
updateMiaoPlugin: {

View File

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