This commit is contained in:
aozhiwei 2024-04-12 19:25:39 +08:00
parent 3ba021ee2a
commit 96c2241897
2 changed files with 5 additions and 5 deletions

View File

@ -103,7 +103,7 @@ func (this *guild) updateByKv(kv map[int32]string) {
}
}
func (this *guild) disband() {
func (this *guild) disband(ownerId string, reason int32) {
model.Guild.DeleteSoft(this.guildId,
func (err error, lastInsertId int64, rowsAffected int64) {
})
@ -111,6 +111,7 @@ func (this *guild) disband() {
func (err error, lastInsertId int64, rowsAffected int64) {
})
_guildMgr.delGuild(this)
GetDbLogMgr().GuildDisband(this.guildId, ownerId, reason)
}
func (this *guild) AsyncFillMFGuild(pbGuild *cs.MFGuild, cb func(int32, string)) {
@ -173,14 +174,14 @@ func (this *guild) asyncLeave(accountId string, cb func(int32, string)) {
})
} else {
if this.GetMemberNum() <= 0 {
this.disband()
this.disband(accountId, 0)
}
cb(0, "")
return
}
} else {
if this.GetMemberNum() <= 0 {
this.disband()
this.disband(accountId, 0)
}
cb(0, "")
}

View File

@ -604,8 +604,7 @@ func (this *guildMgr) AsyncDisband(accountId string, cb func(int32, string, []st
cb(1, "Disband only leader perm", members)
return
}
guild.disband()
guild.disband()
guild.disband(accountId, 1)
task.SetSucc()
cb(0, "", members)
})