任务:寻宝相关
This commit is contained in:
@@ -50,7 +50,7 @@ export class CheckTask {
|
||||
this.tasks.push(task);
|
||||
}
|
||||
|
||||
public async saveAndPush(sid: string) {
|
||||
public async saveAndPush(sid?: string) {
|
||||
for(let task of this.tasks) {
|
||||
await task.check();
|
||||
}
|
||||
@@ -100,7 +100,7 @@ export class CheckTask {
|
||||
}
|
||||
|
||||
// 推送
|
||||
public async pushMessage(sid: string) {
|
||||
public async pushMessage(sid?: string) {
|
||||
let roleId = this.roleId;
|
||||
if (!sid) {
|
||||
let onlineUser = await getRoleOnlineInfo(roleId);
|
||||
|
||||
@@ -147,7 +147,7 @@ export async function checkTaskInBattleSweep(serverId: number, roleId: string, s
|
||||
|
||||
|
||||
export async function checkTaskInComBattleStart(roleStatus: RoleStatus[], capId: string, blueprtId: number) {
|
||||
// console.log('********', JSON.stringify(roleStatus), capId, quality)
|
||||
console.log('********', JSON.stringify(roleStatus), capId, blueprtId)
|
||||
for (let { roleId, isRobot } of roleStatus) {
|
||||
if (!isRobot) {
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
@@ -160,6 +160,7 @@ export async function checkTaskInComBattleStart(roleStatus: RoleStatus[], capId:
|
||||
}
|
||||
task.setParam(TASK_TYPE.COM_BATTLE, {});
|
||||
task.setParam(TASK_TYPE.COM_BATTLE_LV, { gid: blueprtId });
|
||||
await task.saveAndPush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user