计算宝箱总数

This commit is contained in:
小花花花儿 2024-01-25 12:31:37 +08:00
parent 12e280b38c
commit a5cb607c98
2 changed files with 34 additions and 32 deletions

View File

@ -7,9 +7,6 @@ avatar: 77
# 等级
level: 60
# 总宝箱
all_chest: 6044
# 奇馈宝箱
magic_chest: 221

View File

@ -29,6 +29,11 @@ export default class RoleIndex extends base {
枫丹: 9
}
this.all_chest = 0
lodash.forEach(this.lable, (v, i) => {
if (i.includes('_chest')) this.all_chest += v
})
this.areaName = lodash.invert(this.area)
this.headIndexStyle = `<style> .head_box { background: url(${this.screenData.pluResPath}img/roleIndex/namecard/${lodash.random(1, 8)}.png) #f5f5f5; background-position-x: 30px; background-repeat: no-repeat; border-radius: 15px; font-family: tttgbnumber; padding: 10px 20px; position: relative; background-size: auto 101%; }</style>`
@ -121,7 +126,7 @@ export default class RoleIndex extends base {
stats.exquisite_chest_number +
stats.common_chest_number +
stats.magic_chest_number) /
this.lable.all_chest) *
this.all_chest) *
100,
1
)
@ -150,7 +155,7 @@ export default class RoleIndex extends base {
stats.exquisite_chest_number +
stats.common_chest_number +
stats.magic_chest_number,
extra: this.lable.all_chest
extra: this.all_chest
},
{
@ -457,7 +462,7 @@ export default class RoleIndex extends base {
stats.common_chest_number +
stats.magic_chest_number) *
100) /
this.lable.all_chest,
this.all_chest,
2
)
@ -492,7 +497,7 @@ export default class RoleIndex extends base {
stats.exquisite_chest_number +
stats.common_chest_number +
stats.magic_chest_number,
extra: this.lable.all_chest
extra: this.all_chest
},
{
lable: '宝箱获取率',