名将擂台:修改时间精度和debug接口

This commit is contained in:
luying
2022-07-20 17:02:33 +08:00
parent 083201462e
commit cf03a7d4bd
6 changed files with 68 additions and 35 deletions

View File

@@ -746,12 +746,12 @@ export async function setLadderCountDown(battleCode: string, time: number, statu
if(scheduledJobs[`ladder${battleCode}`]) {
scheduledJobs[`ladder${battleCode}`].cancel();
}
let endTime = time + (status == LADDER_STATUS.CHECK? LADDER.LADDER_BATTLE_PREPARE_COUNTDOWN: LADDER.LADDER_BATTLE_COUNTDOWN);
scheduleJob(`ladder${battleCode}`, endTime * 1000, async () => {
let endTime = time + (status == LADDER_STATUS.CHECK? LADDER.LADDER_BATTLE_PREPARE_COUNTDOWN: LADDER.LADDER_BATTLE_COUNTDOWN) * 1000;
scheduleJob(`ladder${battleCode}`, endTime, async () => {
await ladderTimeWillout(battleCode, status);
scheduledJobs[`ladder${battleCode}`].cancel();
scheduleJob(`ladder${battleCode}`, endTime * 1000 + LADDER_SERVER_GAP_TIME * 1000, async () => {
scheduleJob(`ladder${battleCode}`, endTime + LADDER_SERVER_GAP_TIME * 1000, async () => {
await ladderTimeout(battleCode, status);
scheduledJobs[`ladder${battleCode}`].cancel();
});