diff --git a/shared/domain/roleField/attribute.ts b/shared/domain/roleField/attribute.ts index 306e12ad7..731e04e97 100644 --- a/shared/domain/roleField/attribute.ts +++ b/shared/domain/roleField/attribute.ts @@ -30,11 +30,13 @@ export class AttributeCal { } } - public setByCeArr(attributes: {id: number, ceVal: number}[], ratio: number = 1) { - for(let {id, ceVal} of attributes) { + public setByCeArr(attributes: {id: number, val: number, ceVal: number}[], ratio: number = 1) { + for(let {id, val, ceVal} of attributes) { if(ABI_TYPE_MAIN.includes(id)) { + this.attrs.set(id, Math.floor(val * ratio)); this.ceAttrs.set(id, Math.floor(ceVal * ratio)); } else { + this.attrs.set(id, Math.floor(val * ratio)); this.ceAttrs.set(id, Math.floor(ceVal)); } }