mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-21 22:48:13 +00:00
伤害排名支持percent类型
This commit is contained in:
parent
f7364ea736
commit
06ad9f5195
@ -206,9 +206,11 @@ async function renderCharRankList({ e, uids, char, mode, groupId }) {
|
||||
title = title.replace(/[ ·]*/g, '')
|
||||
}
|
||||
title = title.length > 10 ? title.replace(/伤害$/, '') : title
|
||||
let tmpAvg = dmg.type !== 'text' ? Format.comma(dmg.avg, 1) : dmg.avg
|
||||
tmp.dmg = {
|
||||
title,
|
||||
avg: Format.comma(dmg.avg, 1)
|
||||
avg: tmpAvg,
|
||||
rank: data.dmg.rank
|
||||
}
|
||||
}
|
||||
if (uid) {
|
||||
@ -236,7 +238,7 @@ async function renderCharRankList({ e, uids, char, mode, groupId }) {
|
||||
tmp._mark = mark?._mark || 0
|
||||
}
|
||||
tmp._formatmark = Format.comma(tmp._mark, 1)
|
||||
tmp._dmg = dmg?.avg || 0
|
||||
tmp._dmg = (0 - tmp.dmg.rank) || 0
|
||||
tmp._star = 5 - tmp.star
|
||||
list.push(tmp)
|
||||
}
|
||||
|
@ -337,7 +337,8 @@ export default class ProfileRank {
|
||||
}
|
||||
}
|
||||
if (value && !lodash.isUndefined(value.score)) {
|
||||
await redis.zAdd(typeKey, { score: value.score, value: this.uid })
|
||||
let tmpScore = value.score.toString().replaceAll('%', '')
|
||||
await redis.zAdd(typeKey, { score: tmpScore, value: this.uid })
|
||||
}
|
||||
if (!lodash.isNumber(rank)) {
|
||||
rank = await redis.zRevRank(typeKey, this.uid)
|
||||
|
@ -19,7 +19,7 @@ export const details = [{
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['威光落雷伤害'], 'q')
|
||||
}]
|
||||
|
||||
export const defDmgIdx = 2
|
||||
export const defDmgIdx = 1
|
||||
export const mainAttr = 'atk,cpct,cdmg'
|
||||
|
||||
export const buffs = [{
|
||||
|
@ -55,7 +55,7 @@ export const details = [{
|
||||
}
|
||||
}]
|
||||
|
||||
export const defDmgIdx = 2
|
||||
export const defDmgIdx = 3
|
||||
export const mainAttr = 'hp,atk,cpct,cdmg,speed'
|
||||
|
||||
export const buffs = [{
|
||||
|
@ -29,6 +29,7 @@ export const details = [{
|
||||
}
|
||||
}]
|
||||
|
||||
export const defDmgIdx = 3
|
||||
export const mainAttr = 'atk,cpct,cdmg'
|
||||
|
||||
export const buffs = [{
|
||||
|
@ -32,6 +32,7 @@ export const details = [{
|
||||
}
|
||||
}]
|
||||
|
||||
export const defDmgIdx = 1
|
||||
export const mainAttr = 'atk,cpct,cdmg'
|
||||
|
||||
export const buffs = [{
|
||||
|
Loading…
Reference in New Issue
Block a user