fix(charwords): fixed adding charwords when multiple skins are presented
This commit is contained in:
@@ -110,12 +110,14 @@ export default class CharwordTable {
|
|||||||
Object.values(data.charWords).forEach(item => {
|
Object.values(data.charWords).forEach(item => {
|
||||||
const operatorInfo = Object.values(this.#charwordTable.operators).filter(element => element.info[region][item.wordKey])
|
const operatorInfo = Object.values(this.#charwordTable.operators).filter(element => element.info[region][item.wordKey])
|
||||||
if (operatorInfo.length > 0) {
|
if (operatorInfo.length > 0) {
|
||||||
if (typeof operatorInfo[0].voice[region][item.wordKey] === 'undefined') {
|
for (const operator of operatorInfo) {
|
||||||
operatorInfo[0].voice[region][item.wordKey] = {}
|
if (typeof operator.voice[region][item.wordKey] === 'undefined') {
|
||||||
}
|
operator.voice[region][item.wordKey] = {}
|
||||||
operatorInfo[0].voice[region][item.wordKey][item.voiceId] = {
|
}
|
||||||
title: item.voiceTitle,
|
operator.voice[region][item.wordKey][item.voiceId] = {
|
||||||
text: item.voiceText.replace(/{@nickname}/g, NICKNAME[region]),
|
title: item.voiceTitle,
|
||||||
|
text: item.voiceText.replace(/{@nickname}/g, NICKNAME[region]),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user