1
This commit is contained in:
parent
27bd9607df
commit
1cb3f33c45
@ -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{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user