1
This commit is contained in:
parent
1501e2f17b
commit
9a7e9d19c4
@ -146,6 +146,8 @@ type Team interface {
|
||||
HandoverLeader(Player, string)
|
||||
CancelMatch()
|
||||
SetMapInfo(*MapInfoRsp)
|
||||
GetMapId() int32
|
||||
GetModeId() int32
|
||||
IsMobaMode() bool
|
||||
}
|
||||
|
||||
|
@ -300,9 +300,13 @@ func (this *player) CMStartGame(hdr *f5.MsgHdr, msg *cs.CMStartGame) {
|
||||
rspMsg := &cs.SMStartGame{}
|
||||
if !this.GetTeam().IsLock() {
|
||||
if this.GetTeam().CanStartGame(this) {
|
||||
if GetHistoryMgr().CanStart(this.GetAccountId(),
|
||||
this.GetTeam().GetMapId(),
|
||||
this.GetTeam().GetModeId()) {
|
||||
this.GetTeam().StartGame()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.SendMsg(rspMsg)
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,14 @@ func (this *team) GetNodeId() int32 {
|
||||
return this.nodeId
|
||||
}
|
||||
|
||||
func (this *team) GetMapId() int32 {
|
||||
return this.mapInfo.MapId
|
||||
}
|
||||
|
||||
func (this *team) GetModeId() int32 {
|
||||
return this.mapInfo.MapId
|
||||
}
|
||||
|
||||
func (this *team) GetZnKey() int64 {
|
||||
return q5.MkInt64(this.GetZoneId(), this.GetNodeId())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user