修复爬塔

This commit is contained in:
liwei1dao 2023-09-13 11:12:56 +08:00
parent 9c1b873a97
commit d0151b0eae
6 changed files with 21 additions and 6 deletions

View File

@ -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) {

View File

@ -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
}

View File

@ -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

View File

@ -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(),

View File

@ -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) {

View File

@ -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{}