活动:弹出商店添加推送数据
This commit is contained in:
@@ -583,9 +583,19 @@ export async function accomplishTask(serverId: number, roleId: string, taskType:
|
||||
let { addCount, record } = isComplete(roleId, task.taskType, task.taskParam, count, parma, recordData);
|
||||
if (addCount) {
|
||||
if (taskType == TASK_TYPE.ROLE_LV || taskType == TASK_TYPE.ROLE_TITLE) {
|
||||
await ActivityPopUpShopModel.addTaskCount(serverId, activity.activityId, roleId, task.id, task.taskType, addCount);
|
||||
let playerRecord = await ActivityPopUpShopModel.addTaskCount(serverId, activity.activityId, roleId, task.id, task.taskType, addCount);
|
||||
//推送
|
||||
if (task.condition < playerRecord.totalCount) {
|
||||
popShopData.setPlayerRecords(playerRecord)
|
||||
pushMessage = pushMessage.concat(popShopData);
|
||||
}
|
||||
} else {
|
||||
await ActivityPopUpShopModel.addTaskCount(serverId, activity.activityId, roleId, task.id, task.taskType, addCount);
|
||||
let playerRecord = await ActivityPopUpShopModel.addTaskCount(serverId, activity.activityId, roleId, task.id, task.taskType, addCount);
|
||||
//推送
|
||||
if (task.condition < playerRecord.totalCount) {
|
||||
popShopData.setPlayerRecords(playerRecord)
|
||||
pushMessage = pushMessage.concat(popShopData);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (record) {
|
||||
|
||||
Reference in New Issue
Block a user