This commit is contained in:
aozhiwei 2024-04-15 20:43:52 +08:00
parent be61205a1b
commit 2a716f7108

View File

@ -186,7 +186,23 @@ func (this *cacheMgr) AsyncRecommendList(recommendType int32, accountId string,
excludeHums[accountId] = 1
outHums := make(map[string]int32)
doFunc := func () {
users := []string{}
for accountId, _ := range(outHums) {
q5.AppendSlice(&users, accountId)
}
if len(users) <= 0 {
cb(0, "")
} else {
this.AsyncGetUsersAndFillMFUser(
users, pbUsers,
func (errCode int32, errMsg string) {
if errCode != 0 {
cb(500, "")
return
}
cb(0, "")
})
}
}
if recommendType == constant.RECOMMEND_TYPE_BATTLE {
GetPlayerMgr().GetRecommendPlayers(excludeHums, outHums, 5)