记录所有获得的英雄

This commit is contained in:
meixiongfeng 2022-12-15 14:00:14 +08:00
parent bf35dce1b2
commit 266520c5a0

View File

@ -78,9 +78,7 @@ func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string,
if heroConf == nil {
return
}
if heroConf.Handbook == -1 { // 不需要记录图鉴
return
}
if result, err1 := this.ModuleUser.GetUserExpand(uid); err1 == nil {
initUpdate := map[string]interface{}{}
sz := result.GetTujian()
@ -89,7 +87,12 @@ func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string,
}
if _, ok := result.GetTujian()[heroCfgId]; !ok {
if heroConf.Handbook == -1 {
sz[heroCfgId] = 0
} else {
sz[heroCfgId] = 1
}
initUpdate["tujian"] = sz
this.ModuleUser.ChangeUserExpand(uid, initUpdate)
}