Merge branch 'feature/jenkins'

This commit is contained in:
luying
2022-06-07 16:06:04 +08:00
5 changed files with 12 additions and 9 deletions
@@ -64,8 +64,7 @@ export class DailyBattleHandler {
return resResult(STATUS.TOKEN_ERR);
}
let roleId = session.get('roleId');
await DailyRecordModel.increseBuyCount(roleId, type, 1);
await DailyRecordModel.increseDailyCount(roleId, type, -1); // 减次数,避免超出每日购买最大次数
await DailyRecordModel.deleteAccount(roleId);
return resResult(STATUS.SUCCESS);
}
}
@@ -46,8 +46,8 @@ export class AuctionHandler {
}
async offer(msg: { code: string, max: boolean, auctionStage: number }, session: BackendSession) {
const { code, max, auctionStage } = msg;
async offer(msg: { code: string, max: boolean, auctionStage: number, magicWord: string }, session: BackendSession) {
const { code, max, auctionStage, magicWord } = msg;
const roleId = session.get('roleId');
const sid = session.get('sid');
const serverId = session.get('serverId');
@@ -71,7 +71,7 @@ export class AuctionHandler {
return resResult(STATUS.AUCTION_GUILD_MEMBER_ONLY);
}
if(!await checkAuctionStage(auctionStage)) {
if(!await checkAuctionStage(auctionStage, magicWord)) {
res.releaseCallback();
return resResult(STATUS.AUCITON_STAGE_ERR);
}
+3 -1
View File
@@ -515,7 +515,9 @@ export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType
}
export async function checkAuctionStage(auctionStage: number) {
export async function checkAuctionStage(auctionStage: number, magicWord: string) {
if(magicWord == DEBUG_MAGIC_WORD) return true
const curTime = await getCurrentTimeWithSetDay();
if(auctionStage != AUCTION_STAGE.GUILD && auctionStage != AUCTION_STAGE.WORLD) return false;
if(auctionStage == AUCTION_STAGE.GUILD) {