属性:fix

This commit is contained in:
luying
2021-03-01 15:09:42 +08:00
parent ee3dcc4610
commit 95deef6230
7 changed files with 40 additions and 10 deletions

View File

@@ -73,6 +73,7 @@ function parseMainAttrMax(elem) {
result.set(ABI_TYPE.ABI_ATK, elem.atkMax);
result.set(ABI_TYPE.ABI_DEF, elem.defMax);
result.set(ABI_TYPE.ABI_MDEF, elem.mdefMax);
return result
}
function parseMainAttrUp(elem) {
@@ -81,4 +82,5 @@ function parseMainAttrUp(elem) {
result.set(ABI_TYPE.ABI_ATK, elem.atkUp);
result.set(ABI_TYPE.ABI_DEF, elem.defUp);
result.set(ABI_TYPE.ABI_MDEF, elem.mdefUp);
return result
}

View File

@@ -21,8 +21,8 @@ import { GuildModel } from '../db/Guild';
import { DicJob } from './dictionary/DicJob';
// 修改并下发战力
export async function calPlayerCeAndSave(type: number, roleId: string, originHero: HeroType, update: HeroUpdate, role?: RoleType, args?: Array<number>) {
if(!role) role = await RoleModel.findByRoleId(roleId);
export async function calPlayerCeAndSave(type: number, roleId: string, originHero: HeroType, update: HeroUpdate, args?: Array<number>) {
let role = await RoleModel.findByRoleId(roleId);
let { attr: roleAttrs = [] } = role;