时间:整理时间方法
This commit is contained in:
@@ -4,7 +4,7 @@ import { TASK_TYPE, ABI_STAGE, WAR_TYPE, GUILD_JOB, TASK_FUN_TYPE, FUNCS_ID } fr
|
||||
import { UserTaskRecModel, UserTaskRecType } from '../db/UserTaskRec'
|
||||
import { RoleType, RoleModel } from '../db/Role';
|
||||
import { TaskParam, TaskListReturn } from '../domain/roleField/task';
|
||||
import { getTodayZeroPoint } from './timeUtil';
|
||||
import { getZeroPoint } from './timeUtil';
|
||||
import { HeroType } from '../db/Hero';
|
||||
import { EquipType, EquipModel } from '../db/Equip';
|
||||
import { ItemInter } from './interface';
|
||||
@@ -35,7 +35,7 @@ export async function checkTaskWithRole(roleId: string, taskType: number, role:
|
||||
let pushMessage = new Array<TaskListReturn>();
|
||||
|
||||
if (taskType == TASK_TYPE.LOGIN_SUM) {
|
||||
let today = getTodayZeroPoint();
|
||||
let today = getZeroPoint();
|
||||
if (today > role.loginTime) {
|
||||
pushMessage = await checkTask(roleId, taskType, 1, true, {}, funcs);
|
||||
//成长任务-累计登录游戏天数
|
||||
@@ -43,7 +43,7 @@ export async function checkTaskWithRole(roleId: string, taskType: number, role:
|
||||
}
|
||||
}
|
||||
else if (taskType == TASK_TYPE.LOGIN_SERIES) {
|
||||
let today = getTodayZeroPoint();
|
||||
let today = getZeroPoint();
|
||||
if (today > role.loginTime) {
|
||||
if (today - role.loginTime > 24 * 60 * 60) {
|
||||
pushMessage = await checkTask(roleId, taskType, 1, false, {}, funcs);
|
||||
|
||||
Reference in New Issue
Block a user