当主公经验到达满级时,关卡不再获得经验

This commit is contained in:
luying
2020-12-29 11:32:01 +08:00
parent cf05fc6bb8
commit eb6a46b18e
6 changed files with 29 additions and 61 deletions

View File

@@ -340,7 +340,7 @@ export default class GMUsers extends Service {
let lv = parseInt(_lv);
if(isNaN(lv)) return ctx.service.utils.resResult(STATUS.WRONG_PARMS);
for(let roleId of uids) {
let exp = ctx.service.utils.getExpByLv(lv);
let exp = ctx.service.utils.getExpByLv(lv - 1);
await RoleModel.levelup(roleId, lv, exp?exp.sum:0);
}