1
This commit is contained in:
parent
aff32c9c75
commit
754d7515d7
@ -28,7 +28,7 @@ func (this *matchMgr) Init() {
|
||||
func (this *matchMgr) UnInit() {
|
||||
}
|
||||
|
||||
func (this *matchMgr) addMatchingTeam(team *team) {
|
||||
func (this *matchMgr) addMatch(team *team) {
|
||||
if this.getMatchingInfoByUuid(team.GetTeamUuid()) != nil {
|
||||
panic("111111")
|
||||
return
|
||||
@ -41,11 +41,17 @@ func (this *matchMgr) addMatchingTeam(team *team) {
|
||||
this.mustBeZn(team.GetZnKey()).AddTail(&m.entry)
|
||||
}
|
||||
|
||||
func (this *matchMgr) cancelMatching(team *team) {
|
||||
func (this *matchMgr) cancelMatch(team *team) bool {
|
||||
m := this.getMatchingInfoByUuid(team.GetTeamUuid())
|
||||
if m != nil {
|
||||
|
||||
if m.matchOk != nil {
|
||||
panic("cancelMatching error")
|
||||
return false
|
||||
}
|
||||
m.entry.DelInit()
|
||||
delete(this.teamUuidHash, team.GetTeamUuid())
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (this *matchMgr) getMatchingInfoByUuid(teamUuid string) *matchingInfo {
|
||||
|
@ -139,7 +139,7 @@ func (this *team) StartGame() {
|
||||
if !this.IsLock() && this.CanStartGame(this.owner) {
|
||||
if this.IsMobaMode() {
|
||||
this.state = constant.TEAM_STATE_MATCHING
|
||||
_matchMgr.addMatchingTeam(this)
|
||||
_matchMgr.addMatch(this)
|
||||
this.SendStateNotify()
|
||||
} else {
|
||||
this.state = constant.TEAM_STATE_STARTED
|
||||
|
Loading…
x
Reference in New Issue
Block a user