🐞 fix(gvg): 外政挑战时间限制

This commit is contained in:
luying
2023-02-08 10:48:35 +08:00
parent 542845af09
commit 77c503e697
3 changed files with 11 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ import { KeyNameParam, LeagueRankInfo, myIdInter, RoleRankInfo } from "../../dom
import { gameData, getGVGVestigeLeagueRank, getGVGVestigeRange } from "../../pubUtils/data";
import { GVG } from "../../pubUtils/dicParam";
import { RewardInter } from "../../pubUtils/interface";
import { getTimeFun } from "../../pubUtils/timeUtil";
import { getTimeFun, nowSeconds } from "../../pubUtils/timeUtil";
import { getRandEelm } from "../../pubUtils/util";
import { getNumberArr, uniqueArr } from "../ladderService";
import { getHeroesAttributes } from "../playerCeService";
@@ -41,6 +41,12 @@ export function getFightTimeByPeriod(period: GVG_PERIOD) {
}
}
export function checkFightTime() {
let { startFightTime, endFightTime } = getFightTimeByPeriod(GVG_PERIOD.PREPARE);
let now = nowSeconds();
return startFightTime <= now && endFightTime >= now;
}
// 征战中原每天随机的遗迹点
export async function getVestiges(serverId: number) {
let groupId = await getGroupIdOfServer(serverId);