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