This commit is contained in:
aozhiwei 2024-03-19 17:41:13 +08:00
parent bf92dd60c2
commit 514ff07d8e

View File

@ -25,6 +25,8 @@ type team struct {
startTime int64
stateNotifyMsg *cs.SMTeamStateNotify
accountIdHash map[string]common.Player
matchOk *team
matchTick int64
}
func (this *team) init(teamUuid string, owner common.Player, msg *cs.CMLogin, mapInfo* common.MapInfoRsp) {
@ -120,6 +122,8 @@ func (this *team) IsLock() bool {
}
func (this *team) setMatchOk(targetM *team) {
this.matchOk = targetM
this.matchTick = q5.GetTickCount()
}
func (this *team) onMatchOk() {
@ -234,7 +238,9 @@ func (this *team) HandoverLeader(hum common.Player, targetId string) {
}
func (this *team) CancelMatch() {
if !this.Started() {
if this.Matching() {
_matchMgr.cancelMatch(this)
this.state = constant.TEAM_STATE_INIT
}
}