From 266520c5a0f0dfde7fc3bedb9c24465b35dc9a5c Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 15 Dec 2022 14:00:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=89=80=E6=9C=89=E8=8E=B7?= =?UTF-8?q?=E5=BE=97=E7=9A=84=E8=8B=B1=E9=9B=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/module.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/hero/module.go b/modules/hero/module.go index c38b1ef93..b4c5b87ed 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -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 { - sz[heroCfgId] = 0 + if heroConf.Handbook == -1 { + sz[heroCfgId] = 0 + } else { + sz[heroCfgId] = 1 + } + initUpdate["tujian"] = sz this.ModuleUser.ChangeUserExpand(uid, initUpdate) }