拍卖行:检查拍卖行阶段
This commit is contained in:
@@ -530,4 +530,18 @@ export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
export async function checkAuctionStage(auctionStage: number) {
|
||||
const curTime = await getCurrentTimeWithSetDay();
|
||||
if(auctionStage != AUCTION_STAGE.GUILD && auctionStage != AUCTION_STAGE.WORLD) return false;
|
||||
if(auctionStage == AUCTION_STAGE.GUILD) {
|
||||
if(curTime < (await todayGuildBegin()).getTime() - 10 * 60 * 100) return false;
|
||||
if(curTime > (await todayWorldBegin()).getTime() + 10 * 60 * 1000) return false
|
||||
}
|
||||
if(auctionStage == AUCTION_STAGE.WORLD) {
|
||||
if(curTime < (await todayWorldBegin()).getTime() - 10 * 60 * 100) return false;
|
||||
if(curTime > (await todayWorldEnd()).getTime() + 10 * 60 * 1000) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -376,7 +376,7 @@ let startWorldAuctionJobId: Job;
|
||||
let stopAuctionJobId: Job;
|
||||
let sendUngotDividendJobId: Job;
|
||||
|
||||
export function auctionSchedule() {
|
||||
export async function auctionSchedule() {
|
||||
clearAuctionSchedule();
|
||||
let guildOpen = gameData.auctionTime.get(AUCTION_TIME.GUILD_OPEN);
|
||||
let worldOpen = gameData.auctionTime.get(AUCTION_TIME.WORLD_OPEN);
|
||||
|
||||
Reference in New Issue
Block a user