功能开启 主线关卡校验

This commit is contained in:
meixiongfeng 2023-08-02 17:39:27 +08:00
parent 238d9bd347
commit 44201e1d47
2 changed files with 10 additions and 14 deletions

View File

@ -61,23 +61,21 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri
} }
case 2: //关卡ID case 2: //关卡ID
iuser := this.moduleSys.ModuleUser // 查询主线进度
ex, err := iuser.GetUserExpand(uid) module, err := this.service.GetModule(comm.ModuleMainline)
if err != nil { if err != nil {
this.moduleSys.Debugln(err)
return "" return ""
} }
if ex.Uid == "" { if m, ok := module.(comm.IMainline); ok {
return "" if levels := m.InquireMainLinePassLevel(uid); len(levels) > 0 {
} if _, ok := levels[conf.Param]; ok {
return condData.Id
if v, ok := ex.Mline[1]; ok { } else {
if v < conf.Param { return ""
return "" }
} }
} else {
return ""
} }
case 3: //世界任务ID case 3: //世界任务ID
module, err := this.service.GetModule(comm.ModuleWtask) module, err := this.service.GetModule(comm.ModuleWtask)
if err != nil { if err != nil {

View File

@ -89,8 +89,6 @@ func (this *MCompConfigure) Init(service core.IService, module core.IModule, com
this.SNum = make(map[int64]int32, 0) this.SNum = make(map[int64]int32, 0)
configure.RegisterConfigure(game_lottery, cfg.NewGameLottery, this.LoadGroupData) configure.RegisterConfigure(game_lottery, cfg.NewGameLottery, this.LoadGroupData)
_d := this.GetGroupDataByLottery(100101, 1, 1)
fmt.Printf("%v", _d)
return return
} }