时间:整理时间方法
This commit is contained in:
@@ -86,7 +86,7 @@ export class TowerBattleHandler {
|
||||
let {timeReward, startTime, deltaTime} = result.data;
|
||||
let {hangUpSpdUpCnt, lastSpdUpTime} = await RoleModel.findByRoleId(roleId);
|
||||
let curTime = new Date();
|
||||
if (!lastSpdUpTime || (shouldRefresh(lastSpdUpTime, curTime, HANG_UP_CONSTS.REFRESH_TIME, 1) && hangUpSpdUpCnt <= HANG_UP_CONSTS.MAX_SPD_UP_CNT)) {
|
||||
if (!lastSpdUpTime || (shouldRefresh(lastSpdUpTime, curTime) && hangUpSpdUpCnt <= HANG_UP_CONSTS.MAX_SPD_UP_CNT)) {
|
||||
hangUpSpdUpCnt = HANG_UP_CONSTS.MAX_SPD_UP_CNT;
|
||||
}
|
||||
let num = HANG_UP_CONSTS.MAX_SPD_UP_CNT - hangUpSpdUpCnt + 1;
|
||||
@@ -167,7 +167,7 @@ export class TowerBattleHandler {
|
||||
let { towerLv, towerTaskRefTime, towerTaskReCnt = 0 } = await RoleModel.findByRoleId(roleId);
|
||||
let curTasks = await TowerTaskRecModel.getCurTasks(roleId); // 当前显示中的任务
|
||||
|
||||
const needRefresh = shouldRefresh(towerTaskRefTime, curTime, TOWER_TASK_CONST.REFRESH_TIME);
|
||||
const needRefresh = shouldRefresh(towerTaskRefTime, curTime);
|
||||
|
||||
if(needRefresh) {
|
||||
const batchCode = genCode(8);
|
||||
|
||||
Reference in New Issue
Block a user