diff --git a/modules/items/modelitems.go b/modules/items/modelitems.go index e810f3246..87ee5369e 100644 --- a/modules/items/modelitems.go +++ b/modules/items/modelitems.go @@ -34,6 +34,10 @@ func (this *ModelItemsComp) Init(service core.IService, module core.IModule, com }) return } +func (this *ModelItemsComp) Start() (err error) { + err = this.MCompModel.Start() + return +} // /查询用户背包数据 func (this *ModelItemsComp) QueryUserPack(uId string) (itmes []*pb.DB_UserItemData, err error) { diff --git a/modules/pagoda/api.go b/modules/pagoda/api.go index de24d4aee..7e28802b6 100644 --- a/modules/pagoda/api.go +++ b/modules/pagoda/api.go @@ -26,7 +26,7 @@ type apiComp struct { service core.IService module *Pagoda chat comm.IChat - mline comm.IMline + mline comm.IMainline } //组件初始化接口 @@ -46,9 +46,9 @@ func (this *apiComp) Start() (err error) { } this.chat = module.(comm.IChat) - if module, err = this.service.GetModule(comm.ModuleMline); err != nil { + if module, err = this.service.GetModule(comm.ModuleMainline); err != nil { return } - this.mline = module.(comm.IMline) + this.mline = module.(comm.IMainline) return } diff --git a/modules/pagoda/api_challenge.go b/modules/pagoda/api_challenge.go index 671aaafb5..7cd0cf6b2 100644 --- a/modules/pagoda/api_challenge.go +++ b/modules/pagoda/api_challenge.go @@ -68,9 +68,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng // 校验条件 if conf.Unlock != 0 { - if !this.mline.CheckCommpleteStage(session.GetUserId(), conf.Unlock) { + level := this.mline.InquireMainLinePassLevel(session.GetUserId()) + if _, ok := level[conf.Unlock]; !ok { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_PagodaUnlock, + Code: pb.ErrorCode_PagodaUnlock, // 挑战关卡未解锁 Title: pb.ErrorCode_PagodaUnlock.ToString(), } return diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index 02be6cc35..bb24186b7 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -73,7 +73,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal } // 校验条件 if conf.Unlock != 0 { - if !this.mline.CheckCommpleteStage(session.GetUserId(), conf.Unlock) { + level := this.mline.InquireMainLinePassLevel(session.GetUserId()) + if _, ok := level[conf.Unlock]; !ok { errdata = &pb.ErrorData{ Code: pb.ErrorCode_PagodaUnlock, // 挑战关卡未解锁 Title: pb.ErrorCode_PagodaUnlock.ToString(), diff --git a/modules/pagoda/comp_configure.go b/modules/pagoda/comp_configure.go index 9410e461d..2f12f8850 100644 --- a/modules/pagoda/comp_configure.go +++ b/modules/pagoda/comp_configure.go @@ -44,6 +44,10 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp configure.RegisterConfigure(game_circulate, cfg.NewGameCirculate, this.LoadCirculate) return } +func (this *configureComp) Start() (err error) { + err = this.MCompConfigure.Start() + return +} //加载多个配置文件 func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) { diff --git a/modules/pagoda/model_pagoda.go b/modules/pagoda/model_pagoda.go index ecf92d9d8..7f35335cd 100644 --- a/modules/pagoda/model_pagoda.go +++ b/modules/pagoda/model_pagoda.go @@ -28,6 +28,11 @@ func (this *ModelPagoda) Init(service core.IService, module core.IModule, comp c return } +func (this *ModelPagoda) Start() (err error) { + err = this.MCompModel.Start() + return +} + // 获取爬塔信息 func (this *ModelPagoda) getPagodaList(uid string) (result *pb.DBPagoda, err error) { result = &pb.DBPagoda{}