1
This commit is contained in:
parent
5e81710e6a
commit
dfe6e017ca
@ -81,23 +81,27 @@ func (this *matchMgr) mustBeZn(key int64) *q5.ListHead {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *matchMgr) execMatch(m *matchingInfo) {
|
func (this *matchMgr) execMatch(m *matchingInfo) {
|
||||||
l := this.mustBeZn(m.team.GetZnKey())
|
if q5.GetTickCount() - m.addTick > 1000 * 7 {
|
||||||
l.ForEach(
|
|
||||||
func (ele interface{}) bool {
|
|
||||||
if targetM, ok := ele.(*matchingInfo); ok {
|
|
||||||
if m != targetM && m.team.canMatch(targetM.team) {
|
|
||||||
m.matchOk = targetM
|
|
||||||
m.matchTick = q5.GetTickCount()
|
|
||||||
|
|
||||||
targetM.matchOk = m
|
} else {
|
||||||
targetM.matchTick = q5.GetTickCount()
|
l := this.mustBeZn(m.team.GetZnKey())
|
||||||
return false
|
l.ForEach(
|
||||||
|
func (ele interface{}) bool {
|
||||||
|
if targetM, ok := ele.(*matchingInfo); ok {
|
||||||
|
if m != targetM && m.team.canMatch(targetM.team) {
|
||||||
|
m.matchOk = targetM
|
||||||
|
m.matchTick = q5.GetTickCount()
|
||||||
|
|
||||||
|
targetM.matchOk = m
|
||||||
|
targetM.matchTick = q5.GetTickCount()
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return true
|
||||||
return true
|
})
|
||||||
})
|
if m.matchOk != nil {
|
||||||
if m.matchOk != nil {
|
this.onMatchOk(m)
|
||||||
this.onMatchOk(m)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user