军团:退出军团时减少战力

This commit is contained in:
luying
2021-02-05 20:13:07 +08:00
parent 97d2bea767
commit 9a71f6258a
4 changed files with 9 additions and 9 deletions

View File

@@ -314,7 +314,7 @@ export class GuildHandler {
// 添加动态
const rec = await GuildRecModel.createGuildRec(roleId, code, GUILD_REC_TYPE.JOIN_GUILD, [roleName]);
// 更新人数增加
this.app.rpc.chat.guildRemote.updateInfo.toServer(CHAT_SERVER, code, { memberCnt: joinResult.memberCnt });
this.app.rpc.chat.guildRemote.updateInfo.toServer(CHAT_SERVER, code, { memberCnt: joinResult.memberCnt, guildCe: joinResult.guildCe });
this.app.rpc.chat.guildRemote.addRec.toServer(CHAT_SERVER,rec);
hasGuild = true;
@@ -371,7 +371,7 @@ export class GuildHandler {
if(joinResult.status == 0) continue;
// 更新人数增加
this.app.rpc.chat.guildRemote.updateInfo.toServer(CHAT_SERVER, code, { memberCnt: joinResult.memberCnt });
this.app.rpc.chat.guildRemote.updateInfo.toServer(CHAT_SERVER, code, { memberCnt: joinResult.memberCnt, guildCe: joinResult.guildCe });
// 添加动态
const rec = await GuildRecModel.createGuildRec(roleId, code, GUILD_REC_TYPE.JOIN_GUILD, [joinResult.roleName]);
this.app.rpc.chat.guildRemote.addRec.toServer(CHAT_SERVER,rec);
@@ -496,7 +496,7 @@ export class GuildHandler {
}
// 更新人数增加
this.app.rpc.chat.guildRemote.updateInfo.toServer(CHAT_SERVER, code, { memberCnt: joinResult.memberCnt });
this.app.rpc.chat.guildRemote.updateInfo.toServer(CHAT_SERVER, code, { memberCnt: joinResult.memberCnt, guildCe: joinResult.guildCe });
// 添加动态
const rec = await GuildRecModel.createGuildRec(roleId, code, GUILD_REC_TYPE.JOIN_GUILD, [joinResult.roleName]);
this.app.rpc.chat.guildRemote.addRec.toServer(CHAT_SERVER, rec);
@@ -599,7 +599,7 @@ export class GuildHandler {
const role = await RoleModel.quitGuild(roleId, nowSeconds());
if(!role) return resResult(STATUS.GUILD_QUIT_ERROR);
const guild = await GuildModel.quit(code, roleId, serverId);
const guild = await GuildModel.quit(code, roleId, serverId, role.ce, userGuild.auth == GUILD_AUTH.MANAGER);
if(!guild) return resResult(STATUS.GUILD_QUIT_ERROR);
// 添加动态
@@ -633,7 +633,7 @@ export class GuildHandler {
const role = await RoleModel.quitGuild(memberRoleId, nowSeconds());
if(!role) return resResult(STATUS.GUILD_KICK_ERROR);
const guild = await GuildModel.quit(code, memberRoleId, serverId);
const guild = await GuildModel.quit(code, memberRoleId, serverId, role.ce, userGuild.auth == GUILD_AUTH.MANAGER);
if(!guild) return resResult(STATUS.GUILD_KICK_ERROR);
this.app.rpc.chat.guildRemote.memberQuit.toServer(CHAT_SERVER,code, roleId, guild);