1
This commit is contained in:
parent
d85ccbe093
commit
ba521302a3
@ -75,6 +75,7 @@ type GuildMgr interface {
|
||||
|
||||
type CacheMgr interface {
|
||||
GetProfileByAccountId(accountId string, cb func(err error, profile *PlayerProfile))
|
||||
GetPlayerProfile(accountId string) *PlayerProfile
|
||||
LoadUserProfile(string)
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ import (
|
||||
"time"
|
||||
"main/constant"
|
||||
"main/common"
|
||||
. "main/global"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -211,7 +212,7 @@ func (gm *GuildMgr) ApplyToGuild(guildId int64, applicantAccountId string, cb fu
|
||||
}
|
||||
|
||||
if guild.JoinCond == constant.JoinCondStar {
|
||||
profile := cacheMgr.GetPlayerProfile(applicantAccountId)
|
||||
profile := GetCacheMgr().GetPlayerProfile(applicantAccountId)
|
||||
if profile == nil {
|
||||
cb(constant.ERR_CODE_GUILD_MEMBER_NO_EXISTS, "applicantAccountId no exists", nil)
|
||||
return
|
||||
|
@ -5,6 +5,7 @@ import (
|
||||
_ "main/cache"
|
||||
_ "main/chat"
|
||||
_ "main/friend"
|
||||
_ "main/guild"
|
||||
_ "main/listener"
|
||||
|
||||
. "main/global"
|
||||
|
Loading…
x
Reference in New Issue
Block a user