任务:修复共斗任务达成
This commit is contained in:
@@ -310,7 +310,7 @@ export async function checkTask(roleId: string, taskType: number, count: number,
|
||||
let rec = await checkTaskRec(roleId, type, group, task0, count, isInc, param, funcs);
|
||||
if (rec) {
|
||||
for (let dicTask of tasks) {
|
||||
if (checkRecResult(rec, dicTask.id, dicTask.condition)) {
|
||||
if (checkRecResult(rec, dicTask.id)) {
|
||||
let received = rec.received || [];
|
||||
pushMessage.push({ type: dicTask.type, id: dicTask.id, count: rec.count, received: received.includes(dicTask.id) });
|
||||
}
|
||||
@@ -458,7 +458,7 @@ function checkHero(taskParam: number[], index: number, heroes: number[]) {
|
||||
return heroes.indexOf(hid) != -1;
|
||||
}
|
||||
|
||||
function checkRecResult(rec: UserTaskRecType, id: number, condition: number) {
|
||||
function checkRecResult(rec: UserTaskRecType, id: number) {
|
||||
if (!rec) return false;
|
||||
if (rec.received && rec.received.includes(id)) return false; // 已领取,不再推送
|
||||
|
||||
|
||||
Reference in New Issue
Block a user