秘境:首通信息

This commit is contained in:
luying
2021-09-07 17:31:21 +08:00
parent dd607934f7
commit 8c93cd1eba
10 changed files with 143 additions and 10 deletions
@@ -6,6 +6,8 @@ import { handleCost } from '../../../services/rewardService';
import { getGoldObject } from '../../../pubUtils/itemUtils';
import { getDungeonData, getDungeonBuyCountCost } from '../../../services/dungeonService';
import * as dicParam from '../../../pubUtils/dicParam';
import { DungeonFirstModel } from '../../../db/DungeonFirst';
import { DungeonResultParam } from '../../../domain/battleField/dungeon';
export default function(app: Application) {
return new DungeonBattleHandler(app);
@@ -64,4 +66,15 @@ export class DungeonBattleHandler {
buyCount: dicParam.DUNGEON_CONST.DUNGEON_CONST_BUY - dungeonBuyCnt - count
});
}
// 购买每日次数
async getFirstInfo(msg: { movePoint: number }, session: BackendSession) {
const { movePoint } = msg;
const serverId: number = session.get('serverId');
const firstInfos = await DungeonFirstModel.findByMovePoint(serverId, movePoint);
let result: DungeonResultParam[] = firstInfos.map(firstInfo => {
return new DungeonResultParam(firstInfo);
});
return resResult(STATUS.SUCCESS, { infos: result });
}
}