1
This commit is contained in:
parent
6d2c0c67e6
commit
948e1b5c59
@ -52,6 +52,7 @@ type Team interface {
|
|||||||
KickOut(Player, string)
|
KickOut(Player, string)
|
||||||
HandoverLeader(Player, string)
|
HandoverLeader(Player, string)
|
||||||
CancelMatch()
|
CancelMatch()
|
||||||
|
SetMapId(int32)
|
||||||
}
|
}
|
||||||
|
|
||||||
type TeamMgr interface {
|
type TeamMgr interface {
|
||||||
|
@ -284,6 +284,7 @@ func (this *player) CMChooseMap(hdr *f5.MsgHdr, msg *cs.CMChooseMap) {
|
|||||||
rspMsg.Errcode = proto.Int32(1)
|
rspMsg.Errcode = proto.Int32(1)
|
||||||
rspMsg.Errmsg = proto.String("team already started")
|
rspMsg.Errmsg = proto.String("team already started")
|
||||||
} else {
|
} else {
|
||||||
|
this.GetTeam().SetMapId(msg.GetMapId())
|
||||||
}
|
}
|
||||||
this.SendMsg(rspMsg)
|
this.SendMsg(rspMsg)
|
||||||
this.GetTeam().SendUpdateNotify()
|
this.GetTeam().SendUpdateNotify()
|
||||||
|
@ -211,6 +211,12 @@ func (this *team) CancelMatch() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *team) SetMapId(mapId int32) {
|
||||||
|
if !this.Started() {
|
||||||
|
this.mapId = mapId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (this *team) rearrangementSortIdx() {
|
func (this *team) rearrangementSortIdx() {
|
||||||
members := []common.Player{}
|
members := []common.Player{}
|
||||||
q5.NewSlice(&members, 0, 4)
|
q5.NewSlice(&members, 0, 4)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user