diff --git a/server/matchserver/app/app.go b/server/matchserver/app/app.go index 15a4c48d..5c84b0f7 100644 --- a/server/matchserver/app/app.go +++ b/server/matchserver/app/app.go @@ -62,7 +62,7 @@ func (this *app) Update() { } switch handler.HandlerId { case constant.PLAYER_MGR_HANDLER_ID: - fallthrough + GetPlayerMgr().ProcessCMMsg(handler, hdr) case constant.PLAYER_HANDLER_ID: GetPlayerMgr().ProcessCMMsg(handler, hdr) case constant.TEAM_HANDLER_ID: diff --git a/server/matchserver/listener/handlermgr.go b/server/matchserver/listener/handlermgr.go index db1b1888..c4a730a5 100644 --- a/server/matchserver/listener/handlermgr.go +++ b/server/matchserver/listener/handlermgr.go @@ -17,6 +17,15 @@ func (this *HandlerMgr) Init() { cs.RegHandlerId(int(cs.CMMessageIdE__CMPing), constant.PLAYER_MGR_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMLogin), constant.PLAYER_MGR_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMReconnect), constant.PLAYER_MGR_HANDLER_ID) + + cs.RegHandlerId(int(cs.CMMessageIdE__CMLeaveTeam), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMDisbandTeam), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMKickOut), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMHandoverLeader), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMStartGame), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMCancel), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMSetReady), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMGrantInvitePermission), constant.PLAYER_HANDLER_ID) } func (this *HandlerMgr) UnInit() { diff --git a/server/matchserver/team/team.go b/server/matchserver/team/team.go index 03a12ce6..9eafc804 100644 --- a/server/matchserver/team/team.go +++ b/server/matchserver/team/team.go @@ -285,9 +285,7 @@ func (this *team) SendUpdateNotify() { } func (this *team) SendStateNotify() { - notifyMsg := &cs.SMTeamStateNotify{} - notifyMsg.State = proto.Int32(this.state) - this.broadcastMsg(notifyMsg) + this.broadcastMsg(this.stateNotifyMsg) } func newTeam() *team {