mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
修正面板变换时圣遗物套装全名可能识别错误的问题
This commit is contained in:
parent
178b5e75b9
commit
c625d5ffd1
@ -86,7 +86,7 @@ const ProfileChange = {
|
|||||||
|
|
||||||
// 匹配圣遗物套装
|
// 匹配圣遗物套装
|
||||||
let asMap = ArtifactSet.getAliasMap()
|
let asMap = ArtifactSet.getAliasMap()
|
||||||
let asKey = lodash.keys(asMap).join('|')
|
let asKey = lodash.keys(asMap).sort((a,b)=>b.length-a.length).join('|')
|
||||||
let asReg = new RegExp(`(${asKey})套?[2,4]?\\+?(${asKey})?套?[2,4]?`)
|
let asReg = new RegExp(`(${asKey})套?[2,4]?\\+?(${asKey})?套?[2,4]?`)
|
||||||
let asRet = asReg.exec(txt)
|
let asRet = asReg.exec(txt)
|
||||||
if (asRet && asRet[1] && asMap[asRet[1]]) {
|
if (asRet && asRet[1] && asMap[asRet[1]]) {
|
||||||
|
@ -98,6 +98,7 @@ lodash.forEach(aliasCfg, (txt, name) => {
|
|||||||
lodash.forEach(txt.split(','), (t) => {
|
lodash.forEach(txt.split(','), (t) => {
|
||||||
alias[t] = name
|
alias[t] = name
|
||||||
})
|
})
|
||||||
|
alias[name] = name
|
||||||
})
|
})
|
||||||
export const aliasMap = alias
|
export const aliasMap = alias
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user