mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-22 06:58:24 +00:00
修正enka天赋获取错误问题
This commit is contained in:
parent
a5b15e232e
commit
7fcbe22c3d
@ -171,12 +171,15 @@ let EnkaData = {
|
|||||||
let tid = talentId[id]
|
let tid = talentId[id]
|
||||||
key = talentKey[tid]
|
key = talentKey[tid]
|
||||||
elem = elem || talentElem[tid]
|
elem = elem || talentElem[tid]
|
||||||
|
ret[key] = {
|
||||||
|
original: lv
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
key = ['a', 'e', 'q'][idx++]
|
key = ['a', 'e', 'q'][idx++]
|
||||||
}
|
|
||||||
ret[key] = ret[key] || {
|
ret[key] = ret[key] || {
|
||||||
original: lv
|
original: lv
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
elem: elem,
|
elem: elem,
|
||||||
|
@ -21,12 +21,12 @@ export default class ProfileRank {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const key = this.key(profile, 'mark')
|
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) {
|
if (!lodash.isNumber(rank) || force) {
|
||||||
let mark = profile.getArtisMark(false)
|
let mark = profile.getArtisMark(false)
|
||||||
if (mark) {
|
if (mark) {
|
||||||
await redis.zAdd(key, { score: mark._mark, value: this.uid })
|
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)) {
|
if (lodash.isNumber(rank)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user