From 44201e1d470a379bb30e00db5f8cda972e840332 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 2 Aug 2023 17:39:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=BC=80=E5=90=AF=20?= =?UTF-8?q?=E4=B8=BB=E7=BA=BF=E5=85=B3=E5=8D=A1=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/sys/model_sys.go | 22 ++++++++++------------ modules/tools/comp_configure.go | 2 -- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/modules/sys/model_sys.go b/modules/sys/model_sys.go index f87229c85..6e9527733 100644 --- a/modules/sys/model_sys.go +++ b/modules/sys/model_sys.go @@ -61,23 +61,21 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri } case 2: //关卡ID - iuser := this.moduleSys.ModuleUser - ex, err := iuser.GetUserExpand(uid) + // 查询主线进度 + module, err := this.service.GetModule(comm.ModuleMainline) if err != nil { + this.moduleSys.Debugln(err) return "" } - if ex.Uid == "" { - return "" - } - - if v, ok := ex.Mline[1]; ok { - if v < conf.Param { - return "" + if m, ok := module.(comm.IMainline); ok { + if levels := m.InquireMainLinePassLevel(uid); len(levels) > 0 { + if _, ok := levels[conf.Param]; ok { + return condData.Id + } else { + return "" + } } - } else { - return "" } - case 3: //世界任务ID module, err := this.service.GetModule(comm.ModuleWtask) if err != nil { diff --git a/modules/tools/comp_configure.go b/modules/tools/comp_configure.go index 0caf6d86b..a2710ed8a 100644 --- a/modules/tools/comp_configure.go +++ b/modules/tools/comp_configure.go @@ -89,8 +89,6 @@ func (this *MCompConfigure) Init(service core.IService, module core.IModule, com this.SNum = make(map[int64]int32, 0) configure.RegisterConfigure(game_lottery, cfg.NewGameLottery, this.LoadGroupData) - _d := this.GetGroupDataByLottery(100101, 1, 1) - fmt.Printf("%v", _d) return }