mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
更新星铁面板天赋图标显示
修正没有点亮的图标只默认显示暴击率图标问题 Signed-off-by: lcroof <lcroof@qq.com>
This commit is contained in:
parent
a49e843ed4
commit
c5bec092db
@ -208,12 +208,23 @@ let ProfileDetail = {
|
|||||||
treeData[pos].push(tmp)
|
treeData[pos].push(tmp)
|
||||||
treeMap[idx + 201 + ''] = 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) => {
|
lodash.forEach([2, 4, 6], (pos, idx) => {
|
||||||
let tmp = { type: 'talent', img: data.imgs[`tree${idx + 1}`] }
|
let tmp = { type: 'talent', img: data.imgs[`tree${idx + 1}`] }
|
||||||
treeData[pos] = tmp
|
treeData[pos] = tmp
|
||||||
treeMap[idx + 101 + ''] = tmp
|
treeMap[idx + 101 + ''] = tmp
|
||||||
})
|
})
|
||||||
|
// 点亮图标
|
||||||
lodash.forEach(profile.trees, (id) => {
|
lodash.forEach(profile.trees, (id) => {
|
||||||
let ret = /([12][01][0-9])$/.exec(id + '')
|
let ret = /([12][01][0-9])$/.exec(id + '')
|
||||||
if (ret && ret[1]) {
|
if (ret && ret[1]) {
|
||||||
@ -221,9 +232,6 @@ let ProfileDetail = {
|
|||||||
if (treeMap?.[treeId]) {
|
if (treeMap?.[treeId]) {
|
||||||
treeMap[treeId].value = 1
|
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
|
data.treeData = treeData
|
||||||
|
Loading…
Reference in New Issue
Block a user