关卡:修改关卡列表接口

This commit is contained in:
luying
2022-01-19 09:54:47 +08:00
parent b585c6141d
commit 0f0e47d2b6
3 changed files with 10 additions and 6 deletions
@@ -12,7 +12,7 @@ import { STATUS } from '../../../consts/statusCode';
import { resResult } from '../../../pubUtils/util';
import { RoleModel } from '../../../db/Role';
import { RScriptRecordModel } from '../../../db/RScriptRecord';
import { checkBattleHeroes, roleLevelup, getBattleList, calculateWarStar } from '../../../services/normalBattleService';
import { checkBattleHeroes, roleLevelup, getBattleList, calculateWarStar, getBattleListOfTypes } from '../../../services/normalBattleService';
import { checkDungeonNum, checkDungeonAndIncrease, saveDungeonFirst } from '../../../services/dungeonService';
// import { switchOnFunc } from '../../../services/funcSwitchService';
import { gameData } from '../../../pubUtils/data';
@@ -113,14 +113,14 @@ export class NormalBattleHandler {
}
// 关卡列表
async getBattleList(msg: { type: number }, session: BackendSession) {
const { type } = msg;
async getBattleList(msg: { types: number[] }, session: BackendSession) {
const { types } = msg;
let roleId = session.get('roleId');
let role = await RoleModel.findByRoleId(roleId);
let result = await getBattleList(role, type);
let result = await getBattleListOfTypes(role, types);
return resResult(STATUS.SUCCESS, {
list: result
result
});
}