战力:修复切换皮肤后套装属性加错的问题

This commit is contained in:
luying
2022-06-27 13:32:58 +08:00
parent 6e738d62b7
commit 4dcf421ebf
8 changed files with 36 additions and 29 deletions

View File

@@ -35,7 +35,7 @@ export function loadTitle() {
arr.forEach(o => {
o.mainAttrValue = parseMainAttr(o);
o.assiAttrValue = parseAttr(o.assiAttrValue);
o.assiAttrValue = parseAttr(o.pdi, o.mdi, o.assiAttrValue);
o.material = parseGoodStr(o.material);
dicTitle.set(o.id, _.pick(o, Object.keys(DicTitleKeys)));
});
@@ -43,7 +43,7 @@ export function loadTitle() {
arr = undefined;
}
function parseAttr(str: string) {
function parseAttr(pdi: number, mdi: number, str: string) {
let result = new Map<number, number>();
if(!str) return result;
let decodeArr = decodeArrayListStr(str);
@@ -53,6 +53,10 @@ function parseAttr(str: string) {
}
result.set(parseInt(id), parseInt(value));
}
result.set(ABI_TYPE.ABI_PHYSICAL_DAMAGE_INCREASE, pdi);
result.set(ABI_TYPE.ABI_MAGIC_DAMAGE_INCREASE, mdi);
return result
}