1
This commit is contained in:
parent
de5e85fabe
commit
571ee553e9
@ -277,7 +277,7 @@ message CMKickoutTeam
|
||||
//踢成员
|
||||
message CMKickoutMember
|
||||
{
|
||||
optional string account_id = 1; //成员account_id
|
||||
optional string target_id = 1; //目标account_id
|
||||
}
|
||||
|
||||
//关闭通知
|
||||
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user