mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
修正enka天赋获取错误问题
This commit is contained in:
parent
a5b15e232e
commit
7fcbe22c3d
@ -171,11 +171,14 @@ 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 {
|
||||||
|
@ -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