diff --git a/modules/reddot/api_getall.go b/modules/reddot/api_getall.go index 482c86a9b..010bdb508 100644 --- a/modules/reddot/api_getall.go +++ b/modules/reddot/api_getall.go @@ -21,15 +21,15 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq) if code = this.GetAllCheck(session, req); code != pb.ErrorCode_Success { return } - reddot[int32(comm.Reddot1)] = true - reddot[int32(comm.Reddot2)] = true - reddot[int32(comm.Reddot3)] = false - reddot[int32(comm.Reddot4)] = true - reddot[int32(comm.Reddot5)] = true - reddot[int32(comm.Reddot6)] = true - // for k, v := range this.module.martialhall.Reddot(session.GetUserId(), comm.Reddot1) { - // reddot[int32(k)] = v - // } + for k, v := range this.module.ModuleTask.Reddot(session.GetUserId(), comm.Reddot1, comm.Reddot2, comm.Reddot3, comm.Reddot4) { + reddot[int32(k)] = v + } + for k, v := range this.module.mainline.Reddot(session.GetUserId(), comm.Reddot5) { + reddot[int32(k)] = v + } + for k, v := range this.module.pagoda.Reddot(session.GetUserId(), comm.Reddot6) { + reddot[int32(k)] = v + } session.SendMsg(string(this.module.GetType()), "getall", &pb.ReddotGetAllResp{Reddot: reddot}) return } diff --git a/modules/reddot/module.go b/modules/reddot/module.go index 32910a5d0..9d5334943 100644 --- a/modules/reddot/module.go +++ b/modules/reddot/module.go @@ -20,6 +20,8 @@ func NewModule() core.IModule { type Reddot struct { modules.ModuleBase service base.IRPCXService + mainline comm.IMainline + pagoda comm.IPagoda martialhall comm.IMartialhall api_comp *apiComp } @@ -38,6 +40,14 @@ func (this *Reddot) Init(service core.IService, module core.IModule, options cor func (this *Reddot) Start() (err error) { err = this.ModuleBase.Start() var module core.IModule + if module, err = this.service.GetModule(comm.ModuleMainline); err != nil { + return + } + this.mainline = module.(comm.IMainline) + if module, err = this.service.GetModule(comm.ModulePagoda); err != nil { + return + } + this.pagoda = module.(comm.IPagoda) if module, err = this.service.GetModule(comm.ModuleMartialhall); err != nil { return }