拍卖行:检查拍卖行阶段

This commit is contained in:
luying
2022-05-13 22:27:19 +08:00
parent 3886533599
commit 38b23de279
4 changed files with 29 additions and 9 deletions
@@ -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
}