字典:解析export

This commit is contained in:
luying
2021-05-29 17:57:38 +08:00
parent b075dcfcd4
commit 6f61993f55
10 changed files with 17 additions and 16 deletions

View File

@@ -14,7 +14,7 @@ export async function roleLevelup(roleId: string, kingExp: number, session: Back
const serverId = session.get('serverId');
let role = await RoleModel.findByRoleId(roleId);
let { lv = 1, exp = 0 } = role;
let canGetExp = lv < gameData.maxPlayerLv; // 当主公超过最大级后,挑战结算不再获得经验值
let canGetExp = lv < gameData.maxPlayerLv.max; // 当主公超过最大级后,挑战结算不再获得经验值
let newExp = canGetExp ? exp + kingExp : exp;
let newLv = getLvByExp(newExp);
// 等级超过最高级之后,经验依然可以稍微溢出一些,以备下一次提升等级