1
This commit is contained in:
parent
87ced0179a
commit
831d2480fc
@ -75,7 +75,7 @@ func (this *guildMgr) loadGuildMember() {
|
|||||||
p := newMember()
|
p := newMember()
|
||||||
p.init(g, guildJob, memberId, joinTime)
|
p.init(g, guildJob, memberId, joinTime)
|
||||||
g.addMember(p)
|
g.addMember(p)
|
||||||
this.memberIdHash[memberId] = p
|
this.addGuildMember(p)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
func (err error) {
|
func (err error) {
|
||||||
@ -203,14 +203,7 @@ func (this *guildMgr) asyncCreateGuildTask(task *f5.LockAsyncTask,
|
|||||||
task.SetFail()
|
task.SetFail()
|
||||||
panic(fmt.Sprintf("asyncCreateGuildTask:%s", ""))
|
panic(fmt.Sprintf("asyncCreateGuildTask:%s", ""))
|
||||||
} else {
|
} else {
|
||||||
g := newGuild()
|
this.createGuildAndAddOwner(guildId, guildName, creatorId, badge, nowTime)
|
||||||
g.init(guildId, guildName, creatorId, badge, constant.GuildMaxMembers, int32(nowTime))
|
|
||||||
this.addGuild(g)
|
|
||||||
m := newMember()
|
|
||||||
m.init(g, constant.GuildMemberLevelLeader,
|
|
||||||
creatorId, q5.ToInt32(nowTime))
|
|
||||||
g.addMember(m)
|
|
||||||
this.addGuildMember(m)
|
|
||||||
task.SetSucc()
|
task.SetSucc()
|
||||||
cb(0, "", guildId)
|
cb(0, "", guildId)
|
||||||
}
|
}
|
||||||
@ -928,6 +921,19 @@ func (this* guildMgr) traverseGuild(cb func(*guild) bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *guildMgr) createGuildAndAddOwner(guildId string, guildName string, creatorId string,
|
||||||
|
badge int32, nowTime int64) {
|
||||||
|
g := newGuild()
|
||||||
|
g.init(guildId, guildName, creatorId, badge, constant.GuildMaxMembers, int32(nowTime))
|
||||||
|
this.addGuild(g)
|
||||||
|
{
|
||||||
|
m := newMember()
|
||||||
|
m.init(g, constant.GuildMemberLevelLeader, creatorId, q5.ToInt32(nowTime))
|
||||||
|
g.addMember(m)
|
||||||
|
this.addGuildMember(m)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (this* guildMgr) addGuild(g *guild) {
|
func (this* guildMgr) addGuild(g *guild) {
|
||||||
this.idHash[g.guildId] = g
|
this.idHash[g.guildId] = g
|
||||||
this.nameHash[g.guildName] = g
|
this.nameHash[g.guildName] = g
|
||||||
|
Loading…
x
Reference in New Issue
Block a user