package catchbugs import ( "go_dreamfactory/lego/core" "go_dreamfactory/modules" cfg "go_dreamfactory/sys/configure/structs" ) const ( game_catchbugreward = "game_catchbugreward.json" game_catchbuglllustrated = "game_catchbuglllustrated.json" ) type configureComp struct { modules.MCompConfigure module *CatchBugs } func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { err = this.MCompConfigure.Init(service, module, comp, options) this.module = module.(*CatchBugs) err = this.LoadMultiConfigure(map[string]interface{}{ game_catchbugreward: cfg.NewGameCatchbugReward, game_catchbuglllustrated: cfg.NewGameCatchbugLllustrated, }) return } // 获取奖励列表 func (this *configureComp) getGameGColorRewardDatas() (confs []*cfg.GameCatchbugRewardData, err error) { var ( v interface{} ) if v, err = this.GetConfigure(game_catchbugreward); err != nil { return } confs = v.(*cfg.GameCatchbugReward).GetDataList() return } // 获取奖励列表 func (this *configureComp) getGameCatchbugLllustratedDatas() (confs []*cfg.GameCatchbugLllustratedData, err error) { var ( v interface{} ) if v, err = this.GetConfigure(game_catchbuglllustrated); err != nil { return } confs = v.(*cfg.GameCatchbugLllustrated).GetDataList() return }