修复爬塔

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 return
} }
func (this *ModelItemsComp) Start() (err error) {
err = this.MCompModel.Start()
return
}
// /查询用户背包数据 // /查询用户背包数据
func (this *ModelItemsComp) QueryUserPack(uId string) (itmes []*pb.DB_UserItemData, err error) { func (this *ModelItemsComp) QueryUserPack(uId string) (itmes []*pb.DB_UserItemData, err error) {

View File

@ -26,7 +26,7 @@ type apiComp struct {
service core.IService service core.IService
module *Pagoda module *Pagoda
chat comm.IChat chat comm.IChat
mline comm.IMline mline comm.IMainline
} }
//组件初始化接口 //组件初始化接口
@ -46,9 +46,9 @@ func (this *apiComp) Start() (err error) {
} }
this.chat = module.(comm.IChat) 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 return
} }
this.mline = module.(comm.IMline) this.mline = module.(comm.IMainline)
return return
} }

View File

@ -68,9 +68,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng
// 校验条件 // 校验条件
if conf.Unlock != 0 { 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{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaUnlock, Code: pb.ErrorCode_PagodaUnlock, // 挑战关卡未解锁
Title: pb.ErrorCode_PagodaUnlock.ToString(), Title: pb.ErrorCode_PagodaUnlock.ToString(),
} }
return return

View File

@ -73,7 +73,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
} }
// 校验条件 // 校验条件
if conf.Unlock != 0 { 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{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaUnlock, // 挑战关卡未解锁 Code: pb.ErrorCode_PagodaUnlock, // 挑战关卡未解锁
Title: pb.ErrorCode_PagodaUnlock.ToString(), 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) configure.RegisterConfigure(game_circulate, cfg.NewGameCirculate, this.LoadCirculate)
return return
} }
func (this *configureComp) Start() (err error) {
err = this.MCompConfigure.Start()
return
}
//加载多个配置文件 //加载多个配置文件
func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) { 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 return
} }
func (this *ModelPagoda) Start() (err error) {
err = this.MCompModel.Start()
return
}
// 获取爬塔信息 // 获取爬塔信息
func (this *ModelPagoda) getPagodaList(uid string) (result *pb.DBPagoda, err error) { func (this *ModelPagoda) getPagodaList(uid string) (result *pb.DBPagoda, err error) {
result = &pb.DBPagoda{} result = &pb.DBPagoda{}