关卡:修复每日关卡手动挑战次数不足问题

This commit is contained in:
luying
2022-06-08 18:09:39 +08:00
parent 83bc909fd8
commit dcf319021e

View File

@@ -73,8 +73,8 @@ export async function checkDaily(roleId: string, battleId: number, inc: number)
if(!curDaily) return { status: -1, resResult: resResult(STATUS.DAILY_TYPE_NOT_FOUND) };
let dailyRecord = await DailyRecordModel.refreshRecord(roleId, type);
let checkDailyResult = await getDailyNum(dailyRecord);
let { count = 0, buyCount = 0 } = checkDailyResult;
if(count + inc > curDaily.timesPerDay + buyCount ) {
let { count = 0 } = checkDailyResult;
if(count < inc) {
return { status: -1, resResult: resResult(STATUS.DAILY_TIMES_LACK) }
}
return {status: 1, data: {type, ...checkDailyResult }};