1
This commit is contained in:
parent
e21483a6a3
commit
d8bcfe8104
@ -10,6 +10,7 @@ import (
|
||||
"net"
|
||||
"main/constant"
|
||||
"main/common"
|
||||
"math/rand"
|
||||
. "main/global"
|
||||
)
|
||||
|
||||
@ -372,4 +373,11 @@ func (this *playerMgr) GetRecommendPlayers(excludeHums map[string]int32, outHums
|
||||
return true
|
||||
})
|
||||
}
|
||||
randLen := 0
|
||||
if randLen < len(this.recommendHumans) {
|
||||
randLen = len(this.recommendHumans)
|
||||
}
|
||||
rand.Shuffle(randLen, func (i int, j int) {
|
||||
this.recommendHumans[i], this.recommendHumans[j] = this.recommendHumans[j], this.recommendHumans[i]
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user