任务:根据test结果修复
This commit is contained in:
@@ -12,8 +12,10 @@ import { ItemInter } from './interface';
|
||||
export async function checkTaskWithRoles(taskType: number, roles: RoleType[], funcs?: number[]) {
|
||||
let pushMessage = new Array<{type: number, id: number, count: number, received: boolean}>();
|
||||
for(let role of roles) {
|
||||
let singlePush = await checkTaskWithRole(role.roleId, taskType, role, funcs);
|
||||
pushMessage.concat(singlePush);
|
||||
if(role) {
|
||||
let singlePush = await checkTaskWithRole(role.roleId, taskType, role, funcs);
|
||||
pushMessage.concat(singlePush);
|
||||
}
|
||||
}
|
||||
return pushMessage
|
||||
}
|
||||
@@ -306,7 +308,7 @@ export async function checkTaskWithGoods(roleId: string, taskType: number, goods
|
||||
|
||||
// 根据taskType判断有哪些任务需要check的
|
||||
export async function checkTask(roleId: string, taskType: number, count: number, isInc: boolean, param: TaskParam, funcs?: number[]) {
|
||||
let tasks = gameData.taskType.get(taskType);
|
||||
let tasks = gameData.taskType.get(taskType)||[];
|
||||
let pushMessage = new Array<{type: number, id: number, count: number, received: boolean}>();
|
||||
let groups = new Map<number, { task0: DicTask, tasks: DicTask[] }>();
|
||||
for(let dicTask of tasks) {
|
||||
|
||||
Reference in New Issue
Block a user