Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
b6d92d23aa
@ -35,6 +35,8 @@ type (
|
||||
CheckLvUpCond(session IUserSession, lv int32)
|
||||
CheckTaskCond(session IUserSession, id int32)
|
||||
CheckMlineCond(session IUserSession, id int32)
|
||||
// 查询opencond 配置
|
||||
GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error)
|
||||
}
|
||||
|
||||
//邮件业务模块对外接口定义 提供给其他模块使用的
|
||||
|
@ -2,6 +2,7 @@ package sys
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/sys/configure"
|
||||
@ -28,8 +29,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
//this.LoadConfigure(gameOpencond, cfg.NewGameOpencond)
|
||||
configure.RegisterConfigure(gameOpencond, cfg.NewGameOpencond, this.LoadCondConfig)
|
||||
this.module = module.(*ModuleSys)
|
||||
|
||||
this.getFuncCfg("sign")
|
||||
return
|
||||
}
|
||||
|
||||
@ -85,11 +84,22 @@ func (this *configureComp) getOpencondCfg() (data *cfg.GameOpencond, err error)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) getFuncCfg(funcName string) (data *cfg.GameOpencondData) {
|
||||
if cfg, err := this.getOpencondCfg(); err == nil {
|
||||
data = cfg.GetDataMap()[funcName]
|
||||
func (this *configureComp) GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
)
|
||||
if v, err = this.GetConfigure(gameOpencond); err == nil {
|
||||
|
||||
if c, ok := v.(*cfg.GameOpencond); ok {
|
||||
if data = c.Get(id); data != nil {
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
err = comm.NewNotFoundConfErr("opencond", gameOpencond, id)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) getOpencondList() (list []*cfg.GameOpencondData) {
|
||||
|
@ -94,3 +94,7 @@ func (this *ModuleSys) AutoActivate(session comm.IUserSession, cids []string) bo
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *ModuleSys) GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error) {
|
||||
return this.configure.GetOpenCondCfgById(id)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user