1
This commit is contained in:
parent
e21483a6a3
commit
d8bcfe8104
@ -10,6 +10,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"main/constant"
|
"main/constant"
|
||||||
"main/common"
|
"main/common"
|
||||||
|
"math/rand"
|
||||||
. "main/global"
|
. "main/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -372,4 +373,11 @@ func (this *playerMgr) GetRecommendPlayers(excludeHums map[string]int32, outHums
|
|||||||
return true
|
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