diff --git a/server/imserver/common/types.go b/server/imserver/common/types.go index e8f19aa7..fa00609b 100644 --- a/server/imserver/common/types.go +++ b/server/imserver/common/types.go @@ -84,6 +84,7 @@ type FriendMgr interface { AsyncDeleteFriend(string, string, func(int32, string)) AsyncAddBlack(string, string, func(int32, string)) AsyncRemoveBlack(string, string, func(int32, string)) + AsyncHasApply(string, func(int32, string, int32)) } type Guild interface { @@ -113,6 +114,7 @@ type GuildMgr interface { AsyncSearch(int64, string, func(int32, string, int64, []string)) AsyncGetGuildLogs(string, string, func(int32, string)) AsyncUpdateGuild(string, string, map[int32]string, func(int32, string)) + AsyncHasApply(string, func(int32, string, int32)) NotifyGuildMsg(string, proto.Message) } diff --git a/server/imserver/friend/friendmgr.go b/server/imserver/friend/friendmgr.go index f7d8a7bd..246fbb60 100644 --- a/server/imserver/friend/friendmgr.go +++ b/server/imserver/friend/friendmgr.go @@ -325,6 +325,10 @@ func (this *friendMgr) AsyncRemoveBlack(senderId string, targetId string, cb fun }) } +func (this *friendMgr) AsyncHasApply(string, func(int32, string, int32)) { + +} + func (this *friendMgr) addFriendShip(accountId1 string, accountId2 string, addTime int32) { { friends := this.getFriends(accountId1) diff --git a/server/imserver/guild/guildmgr.go b/server/imserver/guild/guildmgr.go index fbf52e0e..bf391dc1 100644 --- a/server/imserver/guild/guildmgr.go +++ b/server/imserver/guild/guildmgr.go @@ -813,6 +813,10 @@ func (this *guildMgr) AsyncGetRecommendGuild(num int32, cb func(int32, string, [ cb(0, "", guildIds) } +func (this *guildMgr) AsyncHasApply(string, func(int32, string, int32)) { + +} + func (this *guildMgr) rearrangement() { this.guildRankList = []*guild{} this.guildRankHash = make(map[string]*guild) diff --git a/server/imserver/player/player.go b/server/imserver/player/player.go index 89ce6214..f4a4d2ea 100644 --- a/server/imserver/player/player.go +++ b/server/imserver/player/player.go @@ -866,7 +866,20 @@ func (this *player) CMGuildLogs(hdr *f5.MsgHdr, msg *cs.CMGuildLogs) { func (this *player) CMRedDot(hdr *f5.MsgHdr, msg *cs.CMRedDot) { rspMsg := new(cs.SMRedDot) - this.SendMsg(rspMsg) + var flags int64 + GetFriendMgr().AsyncHasApply(this.GetAccountId(), + func (errCode int32, errMsg string, num int32) { + if num > 0 { + q5.SetBitFlag(&flags, 0) + } + GetGuildMgr().AsyncHasApply(this.GetAccountId(), + func (errCode int32, errMsg string, num int32) { + if num > 0 { + q5.SetBitFlag(&flags, 1) + } + this.SendMsg(rspMsg) + }) + }) } func (this *player) onOffline() {