战力
This commit is contained in:
@@ -10,7 +10,6 @@ import { ItemModel } from '../../../db/Item';
|
||||
import { gameData, getHeroExpByLv, getHeroStarByQuality, getHeroWakeByQuality, getHeroLvByExp, getMaxGradeByjobClass, getJobByGradeAndClass, getFriendShipById } from '../../../pubUtils/data';
|
||||
import { RewardInter } from '../../../pubUtils/interface';
|
||||
import { getDropItems } from '../../../consts/constModules/itemConst'
|
||||
|
||||
export default function(app: Application) {
|
||||
return new HeroHandler(app);
|
||||
}
|
||||
@@ -46,17 +45,19 @@ export class HeroHandler {
|
||||
|
||||
//let result = await handleCost(roleId, sid, [{id, count}] );
|
||||
let items = [{id, count}];
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
if (id == 999999) {
|
||||
items = getDropItems();
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
role.lv = 60;
|
||||
let roleLvInfo = gameData.kingexp.get(role.lv - 1);
|
||||
role.exp = roleLvInfo.sum;
|
||||
await RoleModel.updateRoleInfo(roleId, role);
|
||||
}
|
||||
let result = await addItems(roleId, roleName, sid, items );
|
||||
if(!result) {
|
||||
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS,{goods: result});
|
||||
return resResult(STATUS.SUCCESS,{goods: result, lv: role.lv, exp: role.exp});
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user