This commit is contained in:
aozhiwei 2024-04-09 13:17:02 +08:00
parent 599ca101e3
commit 410dc67362
2 changed files with 15 additions and 0 deletions

View File

@ -539,6 +539,10 @@ func (this *guildMgr) AsyncKickout(accountId string, targetId string, cb func(in
cb(0, "")
return;
}
if guild.getMember(targetId) == nil {
cb(0, "")
return;
}
}
func (this *guildMgr) AsyncDisband(accountId string, cb func(int32, string, []string)) {

View File

@ -497,6 +497,17 @@ func (this *player) CMLeaveGuild(hdr *f5.MsgHdr, msg *cs.CMLeaveGuild) {
}
func (this *player) CMDismissMember(hdr *f5.MsgHdr, msg *cs.CMDismissMember) {
rspMsg := new(cs.SMDismissMember)
GetGuildMgr().AsyncKickout(
this.GetAccountId(),
msg.GetDismissAccountId(),
func (errCode int32, errMsg string) {
if errCode != 0 {
this.SendMsg(rspMsg.Err(errCode, errMsg))
return
}
this.SendMsg(rspMsg)
})
}
func (this *player) CMSetMemberLevel(hdr *f5.MsgHdr, msg *cs.CMSetMemberLevel) {