关卡:修改关卡列表接口
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user