This commit is contained in:
aozhiwei 2023-09-15 11:24:45 +08:00
parent de5e85fabe
commit 571ee553e9
2 changed files with 5 additions and 2 deletions

View File

@ -277,7 +277,7 @@ message CMKickoutTeam
//
message CMKickoutMember
{
optional string account_id = 1; //account_id
optional string target_id = 1; //account_id
}
//

View File

@ -228,15 +228,18 @@ func (this *room) CMKickoutTeam(hdr *f5.MsgHdr, msg *cs.CMKickoutTeam) {
if m == this.owner && t != nil {
notifyMsg := &cs.SMRoomKickoutNotify{}
this.broadcastMsg(notifyMsg)
t.unInit()
}
}
func (this *room) CMKickoutMember(hdr *f5.MsgHdr, msg *cs.CMKickoutMember) {
hum := hdr.Context.(common.Player)
m := this.getMember(hum.GetAccountId())
if m == this.owner {
target := this.getMember(msg.GetTargetId())
if m == this.owner && target != nil {
notifyMsg := &cs.SMRoomKickoutNotify{}
this.broadcastMsg(notifyMsg)
this.removeMember(target.hum.GetAccountId())
}
}