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)
|
CheckLvUpCond(session IUserSession, lv int32)
|
||||||
CheckTaskCond(session IUserSession, id int32)
|
CheckTaskCond(session IUserSession, id int32)
|
||||||
CheckMlineCond(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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
@ -28,8 +29,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
|||||||
//this.LoadConfigure(gameOpencond, cfg.NewGameOpencond)
|
//this.LoadConfigure(gameOpencond, cfg.NewGameOpencond)
|
||||||
configure.RegisterConfigure(gameOpencond, cfg.NewGameOpencond, this.LoadCondConfig)
|
configure.RegisterConfigure(gameOpencond, cfg.NewGameOpencond, this.LoadCondConfig)
|
||||||
this.module = module.(*ModuleSys)
|
this.module = module.(*ModuleSys)
|
||||||
|
|
||||||
this.getFuncCfg("sign")
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,11 +84,22 @@ func (this *configureComp) getOpencondCfg() (data *cfg.GameOpencond, err error)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *configureComp) getFuncCfg(funcName string) (data *cfg.GameOpencondData) {
|
func (this *configureComp) GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error) {
|
||||||
if cfg, err := this.getOpencondCfg(); err == nil {
|
var (
|
||||||
data = cfg.GetDataMap()[funcName]
|
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) {
|
func (this *configureComp) getOpencondList() (list []*cfg.GameOpencondData) {
|
||||||
|
@ -94,3 +94,7 @@ func (this *ModuleSys) AutoActivate(session comm.IUserSession, cids []string) bo
|
|||||||
})
|
})
|
||||||
return true
|
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