1
This commit is contained in:
parent
13dfd2647f
commit
e8383f8b38
@ -46,6 +46,7 @@ func (this *guildMgr) loadGuild() {
|
|||||||
p.loadFromDb(ds)
|
p.loadFromDb(ds)
|
||||||
this.idHash[p.guildId] = p
|
this.idHash[p.guildId] = p
|
||||||
this.nameHash[p.guildName] = p
|
this.nameHash[p.guildName] = p
|
||||||
|
this.updateGuildRank(p)
|
||||||
},
|
},
|
||||||
func (err error) {
|
func (err error) {
|
||||||
panic(fmt.Sprintf("loadGuild dberror:%s", err))
|
panic(fmt.Sprintf("loadGuild dberror:%s", err))
|
||||||
@ -833,7 +834,9 @@ func (this *guildMgr) asyncSetApplyStatus(accountId string, guildId string, stat
|
|||||||
|
|
||||||
func (this *guildMgr) AsyncGetGuildRank(num int32, cb func(int32, string, []string)) {
|
func (this *guildMgr) AsyncGetGuildRank(num int32, cb func(int32, string, []string)) {
|
||||||
guildIds := []string{}
|
guildIds := []string{}
|
||||||
this.rearrangement()
|
for _, m := range(this.guildRankList) {
|
||||||
|
q5.AppendSlice(&guildIds, m.guildId)
|
||||||
|
}
|
||||||
cb(0, "", guildIds)
|
cb(0, "", guildIds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,6 +382,7 @@ func (this *player) CMRecommendGuildList(hdr *f5.MsgHdr, msg *cs.CMRecommendGuil
|
|||||||
|
|
||||||
func (this *player) CMGetTopGuildsByTotalStars(hdr *f5.MsgHdr, msg *cs.CMGetTopGuildsByTotalStars) {
|
func (this *player) CMGetTopGuildsByTotalStars(hdr *f5.MsgHdr, msg *cs.CMGetTopGuildsByTotalStars) {
|
||||||
rspMsg := new(cs.SMGetTopGuildsByTotalStars)
|
rspMsg := new(cs.SMGetTopGuildsByTotalStars)
|
||||||
|
q5.NewSlice(&rspMsg.Guilds, 0, 50)
|
||||||
GetGuildMgr().AsyncGetGuildRank(
|
GetGuildMgr().AsyncGetGuildRank(
|
||||||
0,
|
0,
|
||||||
func (errCode int32, errMsg string, guildIds []string) {
|
func (errCode int32, errMsg string, guildIds []string) {
|
||||||
@ -416,6 +417,7 @@ func (this *player) CMGetTopGuildsByTotalStars(hdr *f5.MsgHdr, msg *cs.CMGetTopG
|
|||||||
this.SendMsg(rspMsg.Err(1, "server internal error"))
|
this.SendMsg(rspMsg.Err(1, "server internal error"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
q5.AppendSlice(&rspMsg.Guilds, pbGuild)
|
||||||
doNextFunc()
|
doNextFunc()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user