1
This commit is contained in:
parent
27bd9607df
commit
1cb3f33c45
@ -3,6 +3,8 @@ package team
|
|||||||
import (
|
import (
|
||||||
"cs"
|
"cs"
|
||||||
"main/common"
|
"main/common"
|
||||||
|
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type team struct {
|
type team struct {
|
||||||
@ -77,6 +79,17 @@ func (this *team) IsCopy() bool {
|
|||||||
return this.isCopy
|
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 {
|
func newTeam() *team {
|
||||||
t := new(team)
|
t := new(team)
|
||||||
t.accountIdHash = map[string]common.Player{}
|
t.accountIdHash = map[string]common.Player{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user