活动:修复七天乐任务无效

This commit is contained in:
luying
2022-01-11 14:53:49 +08:00
parent 3375abfa5b
commit 2f05af6444
5 changed files with 25 additions and 7 deletions

View File

@@ -256,6 +256,13 @@ export class FriendHandler {
roles.push(role);
// 任务
await checkTaskWithRoles(serverId, roleId, sid, TASK_TYPE.FRIEND_NUM, roles);
for(let curRole of roles) {
if(curRole.roleId == role.roleId) {
await checkActivityTask(serverId, sid, roleId, TASK_TYPE.FRIEND_NUM, curRole.friendCnt);
} else {
await checkActivityTask(serverId, null, curRole.roleId, TASK_TYPE.FRIEND_NUM, curRole.friendCnt);
}
}
// 特殊处理:如果他点一键同意,有很多人,这个单独的人就不做这个额外的提示,直接把他好友申请删掉就好
if (str == getResStr(STATUS.FRIEND_HAS_ADD) && resultApplyCodeList.length > 1) str = '';
@@ -423,6 +430,8 @@ export class FriendHandler {
// 任务
await checkTaskWithRoles(serverId, roleId, sid, TASK_TYPE.FRIEND_NUM, [role, friend]);
await checkActivityTask(serverId, sid, role.roleId, TASK_TYPE.FRIEND_NUM, role.friendCnt);
await checkActivityTask(serverId, null, friend.roleId, TASK_TYPE.FRIEND_NUM, friend.friendCnt);
return resResult(STATUS.SUCCESS, {
frdRoleIds, blackRoleIds,