From 9653574bfa6d0d95a8bb72af9948b1e5b6b46be1 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 22 Aug 2023 14:09:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E7=BD=B2=E5=90=8C=E6=AD=A5=20?= =?UTF-8?q?=E9=93=81=E5=8C=A0=E9=93=BA=E6=94=B6=E8=97=8F=E5=93=81gm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/module.go | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/modules/smithy/module.go b/modules/smithy/module.go index 6627dbca4..e5563184f 100644 --- a/modules/smithy/module.go +++ b/modules/smithy/module.go @@ -176,22 +176,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 { @@ -202,7 +207,11 @@ func (this *Smithy) GmSmithyAtlas(session comm.IUserSession) { this.modelAtlas.CheckActivateEquipAtlas(session.GetUserId(), []*pb.DB_Equipment{equip}, 1) } } - } + if len(szLibrary) > 0 { + for _, v := range szLibrary { + this.CheckActivateAtlasCollect(session.GetUserId(), v) + } + } }