diff --git a/shared/pubUtils/playerCe.ts b/shared/pubUtils/playerCe.ts index 54da75fb5..d865f587b 100644 --- a/shared/pubUtils/playerCe.ts +++ b/shared/pubUtils/playerCe.ts @@ -4,7 +4,7 @@ import { HERO_SYSTEM_TYPE, ABI_TYPE, HERO_CE_RATIO, HERO_SUB_ATTR_RATIO, LINEUP_NUM } from '../consts'; -import { deepCopy, getAllAttrStage, reduceCe } from './util'; +import { cal, deepCopy, getAllAttrStage, reduceCe } from './util'; import { HeroModel, HeroType, HeroUpdate } from '../db/Hero'; import { RoleModel, RoleType, RoleUpdate } from '../db/Role'; import { CeAttrData, CeAttrDataRole, Attribute } from '../domain/roleField/attribute'; @@ -400,8 +400,8 @@ function updateRoleAttr(roleAttrs: CeAttrDataRole[], id: number, update: { inc?: } if(update.inc) { let { fixUp, ratioUp } = update.inc; - if(fixUp) curAttr.fixUp += fixUp; - if(ratioUp) curAttr.ratioUp += ratioUp; + if(fixUp) curAttr.fixUp = cal.add(curAttr.fixUp, fixUp); + if(ratioUp) curAttr.ratioUp = cal.add(curAttr.ratioUp, ratioUp); } if(update.set) { let { fixUp, ratioUp } = update.set;