diff --git a/models/AvatarArtis.js b/models/AvatarArtis.js index 2293f7d5..197e60bc 100644 --- a/models/AvatarArtis.js +++ b/models/AvatarArtis.js @@ -31,7 +31,7 @@ export default class AvatarArtis extends Base { if (!this.hasArtis || AvatarArtis.isProfileArtis(ds) || !AvatarArtis.isProfileArtis(this.artis)) { for (let idx = 1; idx <= 5; idx++) { if (ds[idx]) { - this.setArtis(idx, ds[idx] || {}) + this.setArtis(idx, ds[idx] || ds[`arti${idx}`] || {}) } } return true diff --git a/models/ProfileReq.js b/models/ProfileReq.js index 004c0646..3c68c08b 100644 --- a/models/ProfileReq.js +++ b/models/ProfileReq.js @@ -62,7 +62,7 @@ export default class ProfileReq extends Base { let reqParam = await serv.getReqParam(this.uid) let cdTime = await this.inCd() if (cdTime) { - // return this.err(`请求过快,请${cdTime}秒后重试..`) + return this.err(`请求过快,请${cdTime}秒后重试..`) } await this.setCd(20) this.msg(`开始获取uid:${this.uid}的数据,可能会需要一定时间~`) diff --git a/models/profile-lib/ArtisMark.js b/models/profile-lib/ArtisMark.js index 19fc36c7..ed675835 100644 --- a/models/profile-lib/ArtisMark.js +++ b/models/profile-lib/ArtisMark.js @@ -166,7 +166,7 @@ let ArtisMark = { getMark (charCfg, posIdx, mainAttr, subAttr, elem = '') { let ret = 0 let { attrs, posMaxMark } = charCfg - let key = mainAttr.key + let key = mainAttr?.key let fixPct = 1 posIdx = posIdx * 1 if (posIdx >= 3) { diff --git a/models/profile-lib/AttrCalc.js b/models/profile-lib/AttrCalc.js index 5264bfb0..00bc2079 100644 --- a/models/profile-lib/AttrCalc.js +++ b/models/profile-lib/AttrCalc.js @@ -181,6 +181,9 @@ class AttrCalc { * @returns {boolean} */ calcArtisAttr (ds, char) { + if (!ds) { + return false + } let key = ds.key if (Format.isElem(key) && char.elem === key) { key = 'dmg'