From 93b40d4b9895ff99117935fd24e4fae5b21a93bc Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 4 Aug 2023 17:07:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BC=9A=E7=AD=89?= =?UTF-8?q?=E7=BA=A7=E8=A7=A3=E9=94=81=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 2 +- modules/sys/model_sys.go | 9 ++++----- modules/sys/module.go | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/comm/const.go b/comm/const.go index f41170b71..ad686c601 100644 --- a/comm/const.go +++ b/comm/const.go @@ -999,7 +999,7 @@ const ( AddUpRecharge = 10 //累计充值 - // 特殊类型活动 只受活动开启限制 + // 特殊类型活动 只受活动开启限制 具体玩法 走excel 配置 HdTypeTurntable = 1001 //大转盘 HdCelebration = 1002 // 庆典活动 ) diff --git a/modules/sys/model_sys.go b/modules/sys/model_sys.go index d5bcc552e..aa41e0792 100644 --- a/modules/sys/model_sys.go +++ b/modules/sys/model_sys.go @@ -68,13 +68,12 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri } } case 5: - module, err := this.service.GetModule(comm.ModulePagoda) - if err != nil { - this.moduleSys.Debugln(err) + if !this.moduleSys.pagoda.CheckCompletePagoda(uid) { return "" } - if v, ok := module.(comm.IPagoda); ok { - if !v.CheckCompletePagoda(uid) { + case 6: // 查询工会等级 + if s := this.moduleSys.sociaty.GetSociaty(uid); s != nil { + if s.Lv < conf.Param { return "" } } diff --git a/modules/sys/module.go b/modules/sys/module.go index f4565d098..8ef31dfdf 100644 --- a/modules/sys/module.go +++ b/modules/sys/module.go @@ -20,6 +20,10 @@ type ModuleSys struct { service base.IRPCXService modelSys *ModelSys mainline comm.IMainline + + pagoda comm.IPagoda + + sociaty comm.ISociaty } func NewModule() core.IModule { @@ -54,6 +58,18 @@ func (this *ModuleSys) Start() (err error) { return } this.mainline = module.(comm.IMainline) + + if module, err = this.service.GetModule(comm.ModulePagoda); err != nil { + + return + } + this.pagoda = module.(comm.IPagoda) + + if module, err = this.service.GetModule(comm.ModuleSociaty); err != nil { + + return + } + this.sociaty = module.(comm.ISociaty) return }