关卡:修复每日关卡手动挑战次数不足问题
This commit is contained in:
@@ -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 }};
|
||||
|
||||
Reference in New Issue
Block a user