diff --git a/game-server/app/servers/guild/handler/gvgBattleHandler.ts b/game-server/app/servers/guild/handler/gvgBattleHandler.ts index e7c53b2e9..3581e32ab 100644 --- a/game-server/app/servers/guild/handler/gvgBattleHandler.ts +++ b/game-server/app/servers/guild/handler/gvgBattleHandler.ts @@ -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 }); } // 队伍停止攻击