1
This commit is contained in:
parent
d3d6985a99
commit
f7d6bde2e4
@ -322,21 +322,25 @@ func (this *guildMgr) AsyncGetApplyList(lastIdx int64, accountId string,
|
||||
}
|
||||
|
||||
func (this *guildMgr) AsyncApplyJoin(accountId string, guildId string, cb func(int32, string)) {
|
||||
guild := this.GetGuildByAccountId(accountId)
|
||||
guild := this.internalGetGuildByAccountId(accountId)
|
||||
if guild != nil {
|
||||
cb(0, "")
|
||||
return
|
||||
}
|
||||
model.GuildApply.Force(
|
||||
guildId,
|
||||
accountId,
|
||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||
if err != nil {
|
||||
cb(500, "server internal error")
|
||||
return
|
||||
}
|
||||
cb(0, "")
|
||||
})
|
||||
if guild.joinCondType == constant.JoinCondFree &&
|
||||
!guild.isFull() {
|
||||
} else {
|
||||
model.GuildApply.Force(
|
||||
guildId,
|
||||
accountId,
|
||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||
if err != nil {
|
||||
cb(500, "server internal error")
|
||||
return
|
||||
}
|
||||
cb(0, "")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (this *guildMgr) asyncAcceptApplyTask(task *f5.LockAsyncTask, guild *guild,
|
||||
|
Loading…
x
Reference in New Issue
Block a user