diff --git a/server/matchserver/team/team.go b/server/matchserver/team/team.go index 2df4daec..cda9e418 100644 --- a/server/matchserver/team/team.go +++ b/server/matchserver/team/team.go @@ -3,6 +3,8 @@ package team import ( "cs" "main/common" + + "github.com/golang/protobuf/proto" ) type team struct { @@ -77,6 +79,17 @@ func (this *team) IsCopy() bool { return this.isCopy } +func (this *team) broadcastMsg(msg proto.Message) { + for _, m := range this.accountIdHash { + m.SendMsg(msg) + } +} + +func (this *team) SendUpdateNotify() { + notifyMsg := &cs.SMTeamUpdateNotify{} + this.broadcastMsg(notifyMsg) +} + func newTeam() *team { t := new(team) t.accountIdHash = map[string]common.Player{}