🐞 fix(gvgBattle): 修改 battleStart 返回值
This commit is contained in:
@@ -6,7 +6,7 @@ import { GVGCityModel } from './../../../../../shared/db/GVGCity';
|
||||
import { Application, BackendSession, ChannelService, HandlerService } from "pinus";
|
||||
import { STATUS } from "../../../consts";
|
||||
import { LineupHero } from "../../../domain/roleField/hero";
|
||||
import { resResult } from "../../../pubUtils/util";
|
||||
import { resResult, genCode } from "../../../pubUtils/util";
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -82,6 +82,7 @@ export class GVGBattleHandler {
|
||||
|
||||
// 队伍离开积分点
|
||||
async teamLeave(msg: any, session: BackendSession) {
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
// 队伍开始攻击
|
||||
@@ -101,7 +102,9 @@ export class GVGBattleHandler {
|
||||
if (teamInvalid) {
|
||||
return resResult(STATUS.GVG_BATTLE_TEAM_INVALID, { teamCode: invalidTeamCode });
|
||||
}
|
||||
return resResult(STATUS.SUCCESS);
|
||||
// 生成 battleCode
|
||||
const battleCode = genCode(8);
|
||||
return resResult(STATUS.SUCCESS, { battleCode });
|
||||
}
|
||||
|
||||
// 队伍停止攻击
|
||||
|
||||
Reference in New Issue
Block a user