1
This commit is contained in:
parent
37574f5bd8
commit
aef4ac3f35
@ -70,6 +70,7 @@ type FriendMgr interface {
|
|||||||
type Guild interface {
|
type Guild interface {
|
||||||
GetGuildId() string
|
GetGuildId() string
|
||||||
GetGuildName() string
|
GetGuildName() string
|
||||||
|
FillMFGuild(*cs.MFGuild)
|
||||||
}
|
}
|
||||||
|
|
||||||
type GuildMember interface {
|
type GuildMember interface {
|
||||||
|
@ -3,6 +3,8 @@ package guild
|
|||||||
import (
|
import (
|
||||||
"q5"
|
"q5"
|
||||||
"f5"
|
"f5"
|
||||||
|
"cs"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type guild struct {
|
type guild struct {
|
||||||
@ -60,6 +62,21 @@ func (this *guild) isOwner(accountId string) bool {
|
|||||||
return this.ownerId == accountId
|
return this.ownerId == accountId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *guild) FillMFGuild(pbGuild *cs.MFGuild) {
|
||||||
|
pbGuild.AutoId = proto.Int64(0)
|
||||||
|
pbGuild.GuildId = proto.Int64(q5.ToInt64(this.guildId))
|
||||||
|
pbGuild.Name = proto.String(this.guildName)
|
||||||
|
pbGuild.LeaderId = proto.String(this.ownerId)
|
||||||
|
pbGuild.Avatar = proto.Int32(this.badge)
|
||||||
|
pbGuild.Notice = proto.String(this.notice)
|
||||||
|
pbGuild.JoinCond = proto.Int32(this.joinCondType)
|
||||||
|
pbGuild.JoinCondValue = proto.Int32(this.joinCondVal)
|
||||||
|
pbGuild.TotalStars = proto.Int32(0)
|
||||||
|
pbGuild.TotalKills = proto.Int32(0)
|
||||||
|
pbGuild.ChickenDinners = proto.Int32(0)
|
||||||
|
pbGuild.MaxMembers = proto.Int32(this.maxMemberNum)
|
||||||
|
}
|
||||||
|
|
||||||
func newGuild() *guild {
|
func newGuild() *guild {
|
||||||
p := new(guild)
|
p := new(guild)
|
||||||
p.idHash = make(map[string]*member)
|
p.idHash = make(map[string]*member)
|
||||||
|
@ -352,6 +352,12 @@ func (this *player) CMSetCurrPrivateChatTarget(hdr *f5.MsgHdr, msg *cs.CMSetCurr
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) CMGuildInfo(hdr *f5.MsgHdr, msg *cs.CMGuildInfo) {
|
func (this *player) CMGuildInfo(hdr *f5.MsgHdr, msg *cs.CMGuildInfo) {
|
||||||
|
rspMsg := new(cs.SMGuildInfo)
|
||||||
|
guild := GetGuildMgr().GetGuildByAccountId(msg.GetAccountId())
|
||||||
|
if guild == nil {
|
||||||
|
this.SendMsg(rspMsg.Err(1, "guild not exists"))
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) CMRecommendGuildList(hdr *f5.MsgHdr, msg *cs.CMRecommendGuildList) {
|
func (this *player) CMRecommendGuildList(hdr *f5.MsgHdr, msg *cs.CMRecommendGuildList) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user