军团:邀请不可以请不同服的人
This commit is contained in:
@@ -422,7 +422,7 @@ export class GuildHandler {
|
||||
let result = new Array<string>();
|
||||
let uids = [];
|
||||
for (let role of roleList) {
|
||||
if (!role.hasGuild) {
|
||||
if (!role.hasGuild || role.serverId == serverId) {
|
||||
await UserGuildApplyModel.createUserGuildApply(role, guild, GUILD_APPLY_TYPE.INVITE);
|
||||
result.push(role.roleId);
|
||||
let hisInfo = await getRoleOnlineInfo(role.roleId);
|
||||
@@ -431,6 +431,10 @@ export class GuildHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(result.length <= 0) {
|
||||
return resResult(STATUS.GUILD_CANNOT_INVITE)
|
||||
}
|
||||
|
||||
await GuildModel.recordInvitedMember(code, serverId, roleIds, shouldRefresh(guild.inviteTime, new Date()));
|
||||
this.channelService.pushMessageByUids('onGuildInvite', resResult(STATUS.SUCCESS, { code }), uids);
|
||||
|
||||
|
||||
@@ -202,6 +202,7 @@ export const STATUS = {
|
||||
GUILD_TRAIN_BOX_INDEX_IS_GOT: { code: 20972, simStr: '该位置试炼宝箱已经领取过,请重新选择' },
|
||||
GUILD_TRAIN_BOX_IS_GOT: { code: 20973, simStr: '玩家已经领取该试炼宝箱' },
|
||||
GUILD_SCRIPT_ENCOURGE_NOT_ENOUGH: { code: 20974, simStr: '鼓舞次数达到上限' },
|
||||
GUILD_CANNOT_INVITE: { code: 20975, simStr: '该玩家已经加入军团或该玩家不同服' },
|
||||
|
||||
GUILD_LOT_NOT_FOUND: { code: 21001, simStr: '拍品未找到' },
|
||||
LOT_OFFER_SERIAL: { code: 21002, simStr: '不能连续出价' },
|
||||
|
||||
Reference in New Issue
Block a user