更新星铁面板天赋图标显示

修正没有点亮的图标只默认显示暴击率图标问题

Signed-off-by: lcroof <lcroof@qq.com>
This commit is contained in:
lcroof 2024-02-07 02:57:21 +00:00 committed by Gitee
parent a49e843ed4
commit c5bec092db
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -208,12 +208,23 @@ let ProfileDetail = {
treeData[pos].push(tmp)
treeMap[idx + 201 + ''] = tmp
})
// 属性建成后图标替换
lodash.forEach(Object.keys(char.detail.tree), (id) => {
let ret = /([12][01][0-9])$/.exec(id + '')
if (ret && ret[1]) {
let treeId = ret[1]
if (treeId[0] === '2') {
treeMap[treeId].img = `/meta-sr/public/icons/tree-${char.detail?.tree?.[id]?.key}.webp`
}
}
})
// 能力
lodash.forEach([2, 4, 6], (pos, idx) => {
let tmp = { type: 'talent', img: data.imgs[`tree${idx + 1}`] }
treeData[pos] = tmp
treeMap[idx + 101 + ''] = tmp
})
// 点亮图标
lodash.forEach(profile.trees, (id) => {
let ret = /([12][01][0-9])$/.exec(id + '')
if (ret && ret[1]) {
@ -221,9 +232,6 @@ let ProfileDetail = {
if (treeMap?.[treeId]) {
treeMap[treeId].value = 1
}
if (treeId[0] === '2') {
treeMap[treeId].img = `/meta-sr/public/icons/tree-${char.detail?.tree?.[id]?.key}.webp`
}
}
})
data.treeData = treeData