巅峰演武:赛季防守阵容修改
This commit is contained in:
@@ -25,7 +25,7 @@ import { RoleRankInfo } from '../domain/rank';
|
||||
import { reportTAEvent } from './sdkService';
|
||||
import { getVipPvpChallengeMaxCnt } from './activity/monthlyTicketService';
|
||||
import { getHeroesAttributes } from './playerCeService';
|
||||
import { setPvpSeasonNumToRemote, setPvpSettleSeasonNumToRemote } from './timeTaskService';
|
||||
import { setPvpSettleSeasonNumToRemote } from './timeTaskService';
|
||||
|
||||
/**
|
||||
* 返回对手三人信息
|
||||
@@ -259,10 +259,14 @@ async function matchRobot(chosenOpps: string[], role: RoleType, score: number, d
|
||||
let { lv: myLv, roleId } = role;
|
||||
let { id: pos, minLv, maxLv, ratio } = dicOpp;
|
||||
|
||||
let result = getRandSingleEelm(gameData.pvpWar);
|
||||
let pvpConfig = await PVPConfigModel.findCurPVPConfig();
|
||||
let range = pvpConfig?.warIds||[];
|
||||
let warId = getRandSingleEelm(range);
|
||||
if (!warId) return null;
|
||||
let result = gameData.war.get(warId);
|
||||
if (!result) return null;
|
||||
|
||||
let robotWarjson = gameData.warJson.get(result.war_id);
|
||||
let robotWarjson = gameData.warJson.get(result.dispatchJsonId);
|
||||
if (!robotWarjson) return null
|
||||
let heroes: PvpEnemies[] = [];
|
||||
let defCe = 0;
|
||||
@@ -568,6 +572,7 @@ export async function generPVPOppRecInfo(isSuccess: boolean, curOpp: OppPlayer,
|
||||
let { pvpSeasonResult } = await sendPVPRewardToUser(pvpDefense, pvpConfig.seasonNum, pvpConfig.seasonEndTime);
|
||||
reportTAEvent(roleId, TA_EVENT.PVP_SEASON_END, { top_rank: rank, hero_score: pvpSeasonResult.heroScores })
|
||||
}
|
||||
await PvpDefenseModel.resetDefense();
|
||||
let settledPvpConfig = await PVPConfigModel.setReward(pvpConfig.seasonNum);
|
||||
await setPvpSettleSeasonNumToRemote(settledPvpConfig);
|
||||
}
|
||||
@@ -733,4 +738,9 @@ export function checkPvpSeasonIsStart() {
|
||||
export function checkPvpSeasonIsSummit() {
|
||||
let status = getPvpSeasonStatus();
|
||||
return status == PVP_SEASON_STATUS.SUMMIT;
|
||||
}
|
||||
|
||||
export function checkPvpSeasonIsWaiting() {
|
||||
let status = getPvpSeasonStatus();
|
||||
return status == PVP_SEASON_STATUS.WAITING;
|
||||
}
|
||||
Reference in New Issue
Block a user