修正enka天赋获取错误问题

This commit is contained in:
Kokomi 2022-11-08 14:42:24 +08:00
parent a5b15e232e
commit 7fcbe22c3d
2 changed files with 8 additions and 5 deletions

View File

@ -171,11 +171,14 @@ let EnkaData = {
let tid = talentId[id]
key = talentKey[tid]
elem = elem || talentElem[tid]
ret[key] = {
original: lv
}
} else {
key = ['a', 'e', 'q'][idx++]
}
ret[key] = ret[key] || {
original: lv
ret[key] = ret[key] || {
original: lv
}
}
})
return {

View File

@ -21,12 +21,12 @@ export default class ProfileRank {
return false
}
const key = this.key(profile, 'mark')
let rank = await redis.zRank(key, this.uid)
let rank = await redis.zRevRank(key, this.uid)
if (!lodash.isNumber(rank) || force) {
let mark = profile.getArtisMark(false)
if (mark) {
await redis.zAdd(key, { score: mark._mark, value: this.uid })
rank = await redis.zRank(key, this.uid)
rank = await redis.zRevRank(key, this.uid)
}
}
if (lodash.isNumber(rank)) {