From d7f25831cd9bd5022b59c173d65d7f20530bdddf Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 21 Aug 2023 18:48:55 +0800 Subject: [PATCH] =?UTF-8?q?gm=20=E5=8F=91=E6=94=BE=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/module.go | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/modules/smithy/module.go b/modules/smithy/module.go index d777cad16..5fe1f99a7 100644 --- a/modules/smithy/module.go +++ b/modules/smithy/module.go @@ -285,22 +285,27 @@ func (this *Smithy) GmProficiency(uid string) { // gm 新增图鉴信息 func (this *Smithy) GmSmithyAtlas(session comm.IUserSession) { var ( - res []*cfg.Gameatn + res []*cfg.Gameatn + szLibrary []string ) conf := this.configure.GmGetAllAtlasConf() for _, v := range conf { - - for _, v1 := range this.configure.GetAllEquipmentConfigure() { - if v1.AtlasId == v.Id { - res = append(res, &cfg.Gameatn{ - A: "equi", - T: v1.Id, - N: 1, - }) - break + if v.TypeId == 1 { + for _, v1 := range this.configure.GetAllEquipmentConfigure() { + if v1.AtlasId == v.Id { + res = append(res, &cfg.Gameatn{ + A: "equi", + T: v1.Id, + N: 1, + }) + break + } } + } else if v.TypeId == 2 { + szLibrary = append(szLibrary, v.Id) } + } if errdata, atno := this.DispenseAtno(session, res, true); errdata == nil { @@ -313,4 +318,10 @@ func (this *Smithy) GmSmithyAtlas(session comm.IUserSession) { } } + if len(szLibrary) > 0 { + for _, v := range szLibrary { + this.CheckActivateAtlasCollect(session.GetUserId(), v) + } + + } }