寻宝:寻宝邀请信息修改
This commit is contained in:
@@ -707,16 +707,17 @@ export class ComBattleHandler {
|
|||||||
let roleId = session.get('roleId');
|
let roleId = session.get('roleId');
|
||||||
let roleName = session.get('roleName');
|
let roleName = session.get('roleName');
|
||||||
const { teamCode, targetRoleId } = msg;
|
const { teamCode, targetRoleId } = msg;
|
||||||
const msgData = await pushFriendTeamInviteMsg(roleId, roleName, teamCode, targetRoleId);
|
|
||||||
|
let teamStatus = this.teamMap.get(teamCode);
|
||||||
|
if(!teamStatus) return resResult(STATUS.WRONG_PARMS);
|
||||||
|
|
||||||
|
const msgData = await pushFriendTeamInviteMsg(roleId, roleName, teamCode, teamStatus.blueprtId, targetRoleId);
|
||||||
if (!msgData) return resResult(STATUS.WRONG_PARMS);
|
if (!msgData) return resResult(STATUS.WRONG_PARMS);
|
||||||
const roleInfo = await getSimpleRoleInfo(targetRoleId);
|
const roleInfo = await getSimpleRoleInfo(targetRoleId);
|
||||||
|
|
||||||
let teamStatus = this.teamMap.get(teamCode);
|
let index = teamStatus.blacklist.indexOf(targetRoleId);
|
||||||
if(teamStatus) {
|
if(index != -1) {
|
||||||
let index = teamStatus.blacklist.indexOf(targetRoleId);
|
teamStatus.blacklist.splice(index, 1);
|
||||||
if(index != -1) {
|
|
||||||
teamStatus.blacklist.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return resResult(STATUS.SUCCESS, {...msgData, roleInfo});
|
return resResult(STATUS.SUCCESS, {...msgData, roleInfo});
|
||||||
|
|||||||
@@ -362,8 +362,8 @@ export async function pushTeamInviteMsg(roleId: string, roleName: string, server
|
|||||||
* @description 发送组队私人邀请消息
|
* @description 发送组队私人邀请消息
|
||||||
* @param {string} teamCode 队伍唯一标识
|
* @param {string} teamCode 队伍唯一标识
|
||||||
*/
|
*/
|
||||||
export async function pushFriendTeamInviteMsg(roleId: string, roleName: string, teamCode: string, targetRoleId) {
|
export async function pushFriendTeamInviteMsg(roleId: string, roleName: string, teamCode: string, blueprtId: number, targetRoleId) {
|
||||||
const msgData = await createPrivateMsg(roleId, roleName, MSG_TYPE.RICH_TEXT, MSG_SOURCE.TEAM_INVITE, teamCode, targetRoleId, null);
|
const msgData = await createPrivateMsg(roleId, roleName, MSG_TYPE.RICH_TEXT, MSG_SOURCE.TEAM_INVITE, JSON.stringify({ teamCode, blueprtId}), targetRoleId, null);
|
||||||
await pushMsgToRole(msgData);
|
await pushMsgToRole(msgData);
|
||||||
return msgData;
|
return msgData;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user