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 }