This commit is contained in:
aozhiwei 2024-02-18 11:11:02 +08:00
parent d85ccbe093
commit ba521302a3
3 changed files with 4 additions and 1 deletions

View File

@ -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)
}

View File

@ -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

View File

@ -5,6 +5,7 @@ import (
_ "main/cache"
_ "main/chat"
_ "main/friend"
_ "main/guild"
_ "main/listener"
. "main/global"