fix 每日剩余挑战次数为count
This commit is contained in:
@@ -53,7 +53,6 @@ export class DailyBattleHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let checkDailyResult = await getDailyNum(refreshResult, timesPerDay, timesCanBuy);
|
let checkDailyResult = await getDailyNum(refreshResult, timesPerDay, timesCanBuy);
|
||||||
checkDailyResult['count'] = checkDailyResult.battleCount;
|
|
||||||
result.push({
|
result.push({
|
||||||
type, name, ...checkDailyResult,
|
type, name, ...checkDailyResult,
|
||||||
wars
|
wars
|
||||||
@@ -96,7 +95,6 @@ export class DailyBattleHandler {
|
|||||||
let newDailyRecord = await DailyRecordModel.increseBuyCount(roleId, type, count);
|
let newDailyRecord = await DailyRecordModel.increseBuyCount(roleId, type, count);
|
||||||
|
|
||||||
let checkDailyResult = await getDailyNum(newDailyRecord, timesPerDay, timesCanBuy);
|
let checkDailyResult = await getDailyNum(newDailyRecord, timesPerDay, timesCanBuy);
|
||||||
checkDailyResult['count'] = checkDailyResult.battleCount;
|
|
||||||
return resResult(STATUS.SUCCESS, { type, ...checkDailyResult, buyCost});
|
return resResult(STATUS.SUCCESS, { type, ...checkDailyResult, buyCost});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,5 +72,5 @@ export async function getDailyNum(dailyRecord: DailyRecord, timesPerDay?: number
|
|||||||
if(vLv > 0) {
|
if(vLv > 0) {
|
||||||
timesCanBuy += 0; // 暂留,用于处理vip等级增加最大购买次数
|
timesCanBuy += 0; // 暂留,用于处理vip等级增加最大购买次数
|
||||||
}
|
}
|
||||||
return {battleCount: timesPerDay - count + buyCount, buyCount: timesCanBuy - buyCount}
|
return {count: timesPerDay - count + buyCount, buyCount: timesCanBuy - buyCount}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user