This commit is contained in:
aozhiwei 2024-04-09 20:11:30 +08:00
parent e446f3e5ec
commit 74a64a7653
2 changed files with 10 additions and 2 deletions

View File

@ -28,6 +28,7 @@ const (
const (
MAX_PACKET_LEN = 1024 * 64
MAX_GUILD_TOP = 50
MAX_GUILD_RECOMMEND = 50
)
const (

View File

@ -840,8 +840,15 @@ func (this *guildMgr) AsyncGetGuildRank(num int32, cb func(int32, string, []stri
cb(0, "", guildIds)
}
func (this *guildMgr) AsyncGetRecommendGuild(int32, func(int32, string, []string)) {
func (this *guildMgr) AsyncGetRecommendGuild(num int32, cb func(int32, string, []string)) {
guildIds := []string{}
for _, m := range(this.idHash) {
q5.AppendSlice(&guildIds, m.guildId)
if len(guildIds) >= constant.MAX_GUILD_RECOMMEND {
break
}
}
cb(0, "", guildIds)
}
func (this *guildMgr) rearrangement() {