功能开启 主线关卡校验

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
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 {

View File

@ -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
}