1
This commit is contained in:
parent
aef4ac3f35
commit
a6724dc933
@ -70,7 +70,7 @@ type FriendMgr interface {
|
||||
type Guild interface {
|
||||
GetGuildId() string
|
||||
GetGuildName() string
|
||||
FillMFGuild(*cs.MFGuild)
|
||||
AsyncFillMFGuild(*cs.MFGuild, func(int32, string))
|
||||
}
|
||||
|
||||
type GuildMember interface {
|
||||
|
@ -62,7 +62,7 @@ func (this *guild) isOwner(accountId string) bool {
|
||||
return this.ownerId == accountId
|
||||
}
|
||||
|
||||
func (this *guild) FillMFGuild(pbGuild *cs.MFGuild) {
|
||||
func (this *guild) AsyncFillMFGuild(pbGuild *cs.MFGuild, cb func(int32, string)) {
|
||||
pbGuild.AutoId = proto.Int64(0)
|
||||
pbGuild.GuildId = proto.Int64(q5.ToInt64(this.guildId))
|
||||
pbGuild.Name = proto.String(this.guildName)
|
||||
|
@ -358,6 +358,16 @@ func (this *player) CMGuildInfo(hdr *f5.MsgHdr, msg *cs.CMGuildInfo) {
|
||||
this.SendMsg(rspMsg.Err(1, "guild not exists"))
|
||||
return
|
||||
}
|
||||
rspMsg.Guild = new(cs.MFGuild)
|
||||
guild.AsyncFillMFGuild(rspMsg.Guild,
|
||||
func (errCode int32, errMsg string) {
|
||||
if errCode != 0 {
|
||||
this.SendMsg(rspMsg.Err(500, "server internal error"))
|
||||
return
|
||||
|
||||
}
|
||||
this.SendMsg(rspMsg)
|
||||
})
|
||||
}
|
||||
|
||||
func (this *player) CMRecommendGuildList(hdr *f5.MsgHdr, msg *cs.CMRecommendGuildList) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user