This commit is contained in:
aozhiwei 2024-03-12 10:53:14 +08:00
parent 27bd9607df
commit 1cb3f33c45

View File

@ -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{}