From ca959e812f6997c7ed902ccc711f94c3b6d296c4 Mon Sep 17 00:00:00 2001 From: luying Date: Thu, 29 Jul 2021 19:14:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E5=8A=9B=EF=BC=9A=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E5=8A=A0=E5=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/pubUtils/playerCe.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;