✨ feat(gvg): 添加激战期战斗录像支持
This commit is contained in:
@@ -18,6 +18,7 @@ import { getRandEelmWithWeight } from 'app/pubUtils/util';
|
||||
import { getLocalRplUrl, getRemoteRplUrl } from 'app/pubUtils/battleUtils'
|
||||
import { ChannelInfoModel } from '@db/ChannelInfo';
|
||||
import { GVGVestigeRecModel } from '@db/GVGVestigeRec';
|
||||
import { GVGBattleRecModel } from '@db/GVGBattleRec';
|
||||
const sendToWormhole = require('stream-wormhole');
|
||||
const pump = require('mz-modules/pump');
|
||||
|
||||
@@ -224,7 +225,7 @@ export default class GameController extends Controller {
|
||||
if (!battleRec) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_NOT_FOUND);
|
||||
|
||||
let { warType, roleId } = battleRec;
|
||||
if (warType !== WAR_TYPE.PVP && warType !== WAR_TYPE.LADDER && warType !== WAR_TYPE.GVG_VESTIGE) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_RPL_NOT_SUPPORT);
|
||||
if (warType !== WAR_TYPE.PVP && warType !== WAR_TYPE.LADDER && warType !== WAR_TYPE.GVG_VESTIGE && warType !== WAR_TYPE.GVG_BATTLE) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_RPL_NOT_SUPPORT);
|
||||
|
||||
writePath = getLocalRplUrl(roleId, warType, battleCode);
|
||||
try {
|
||||
@@ -249,6 +250,8 @@ export default class GameController extends Controller {
|
||||
updateDBRes = await LadderMatchRecModel.updateRplStatus(battleCode, true);
|
||||
} else if (warType == WAR_TYPE.GVG_VESTIGE) {
|
||||
updateDBRes = await GVGVestigeRecModel.updateRplStatus(battleCode, true);
|
||||
} else if (warType == WAR_TYPE.GVG_BATTLE) {
|
||||
updateDBRes = await GVGBattleRecModel.updateRplStatus(battleCode, true);
|
||||
}
|
||||
if (!updateDBRes) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_RPL_UPDATE_ERR);
|
||||
remoteUrl = `${getRemoteRplUrl(ctx.app.config.realEnv, roleId, warType, battleCode)}/${battleCode}.bin`;
|
||||
|
||||
Reference in New Issue
Block a user