diff --git a/apps/profile/ProfileRank.js b/apps/profile/ProfileRank.js index e2bf2496..0a9c704c 100644 --- a/apps/profile/ProfileRank.js +++ b/apps/profile/ProfileRank.js @@ -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) } diff --git a/models/ProfileRank.js b/models/ProfileRank.js index f7836a6b..a52937f9 100644 --- a/models/ProfileRank.js +++ b/models/ProfileRank.js @@ -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) diff --git a/resources/meta-gs/character/旅行者/electro/calc.js b/resources/meta-gs/character/旅行者/electro/calc.js index 4a762336..629efffe 100644 --- a/resources/meta-gs/character/旅行者/electro/calc.js +++ b/resources/meta-gs/character/旅行者/electro/calc.js @@ -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 = [{ diff --git a/resources/meta-sr/character/刃/calc.js b/resources/meta-sr/character/刃/calc.js index 84fbb68a..6861d696 100644 --- a/resources/meta-sr/character/刃/calc.js +++ b/resources/meta-sr/character/刃/calc.js @@ -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 = [{ diff --git a/resources/meta-sr/character/布洛妮娅/calc.js b/resources/meta-sr/character/布洛妮娅/calc.js index 2e7a6866..4df61a30 100644 --- a/resources/meta-sr/character/布洛妮娅/calc.js +++ b/resources/meta-sr/character/布洛妮娅/calc.js @@ -29,6 +29,7 @@ export const details = [{ } }] +export const defDmgIdx = 3 export const mainAttr = 'atk,cpct,cdmg' export const buffs = [{ diff --git a/resources/meta-sr/character/花火/calc.js b/resources/meta-sr/character/花火/calc.js index cc6e2836..74c81576 100644 --- a/resources/meta-sr/character/花火/calc.js +++ b/resources/meta-sr/character/花火/calc.js @@ -32,6 +32,7 @@ export const details = [{ } }] +export const defDmgIdx = 1 export const mainAttr = 'atk,cpct,cdmg' export const buffs = [{