This commit is contained in:
aozhiwei 2024-03-20 19:56:19 +08:00
parent 7304eef94a
commit 538b94401b
3 changed files with 5 additions and 2 deletions

View File

@ -94,6 +94,7 @@ type GuildMember interface {
type GuildMgr interface { type GuildMgr interface {
GetGuildByAccountId(string) Guild GetGuildByAccountId(string) Guild
GetGuildIdByAccountId(string) int64 GetGuildIdByAccountId(string) int64
RandomGuilds() []*Guild
} }
type CacheMgr interface { type CacheMgr interface {

View File

@ -411,10 +411,11 @@ func (p *Player) CMGetTopGuildsByTotalStars(hdr *f5.MsgHdr, msg *cs.CMGetTopGuil
guildsNum := int(msg.GetGuildsNum()) guildsNum := int(msg.GetGuildsNum())
var allMFGuilds []*cs.MFGuild var allMFGuilds []*cs.MFGuild
for _, g := range guildMgr.guilds { /*
for _, g := range GetGuildMgr().guilds {
guild := p.FillMFGuild(g) guild := p.FillMFGuild(g)
allMFGuilds = append(allMFGuilds, guild) allMFGuilds = append(allMFGuilds, guild)
} }*/
sort.Slice(allMFGuilds, func(i, j int) bool { sort.Slice(allMFGuilds, func(i, j int) bool {
return allMFGuilds[i].GetTotalStars() > allMFGuilds[j].GetTotalStars() return allMFGuilds[i].GetTotalStars() > allMFGuilds[j].GetTotalStars()

View File

@ -172,6 +172,7 @@ func (this *team) StartGame() {
if !this.IsLock() && this.CanStartGame(this.owner) { if !this.IsLock() && this.CanStartGame(this.owner) {
if this.IsMobaMode() { if this.IsMobaMode() {
this.state = constant.TEAM_STATE_MATCHING this.state = constant.TEAM_STATE_MATCHING
this.stateNotifyMsg.State = proto.Int32(this.state)
_matchMgr.addMatch(this) _matchMgr.addMatch(this)
this.SendStateNotify() this.SendStateNotify()
} else { } else {