@@ -348,17 +348,19 @@ export class CheckSingleTask {
|
||||
switch(this.taskType) {
|
||||
case TASK_TYPE.LOGIN_SUM: // 1. 累计登录 x 天
|
||||
{
|
||||
let role = this.getRole();
|
||||
let today = getZeroPoint();
|
||||
if (today > param.loginTime) {
|
||||
if (today > role.loginTime) {
|
||||
result = { inc: 1 }
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TASK_TYPE.LOGIN_SERIES: // 2. 连续登录 x 天
|
||||
{
|
||||
let role = this.getRole();
|
||||
let today = getZeroPoint();
|
||||
if (today > param.loginTime) {
|
||||
if (today - param.loginTime > 24 * 60 * 60) {
|
||||
if (today > role.loginTime) {
|
||||
if (today - role.loginTime > 24 * 60 * 60) {
|
||||
result = { set: 1 }
|
||||
} else {
|
||||
result = { inc: 1 }
|
||||
|
||||
@@ -40,11 +40,11 @@ export async function checkTask(serverId: number, roleId: string, sid: string, t
|
||||
await task.saveAndPush(sid);
|
||||
}
|
||||
|
||||
export async function checkTaskInEntry(serverId: number, roleId: string, sid: string, role: RoleType, loginTime: number) {
|
||||
export async function checkTaskInEntry(serverId: number, roleId: string, sid: string, role: RoleType) {
|
||||
let task = new CheckTask(serverId, roleId);
|
||||
task.setRole(role);
|
||||
task.setParam(TASK_TYPE.LOGIN_SUM, { loginTime });
|
||||
task.setParam(TASK_TYPE.LOGIN_SERIES, { loginTime });
|
||||
task.setParam(TASK_TYPE.LOGIN_SUM, {});
|
||||
task.setParam(TASK_TYPE.LOGIN_SERIES, {});
|
||||
await task.saveAndPush(sid);
|
||||
checkPopUpConditionInEntry(serverId, roleId, sid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user