From c5d64aebf1a6d82ba1b3d511bebfd2afc24ab991 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 15 Jun 2023 19:57:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?err=E5=AF=B9=E8=B1=A1=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/api_equip.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index bb936facc..14137c7a4 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -180,9 +180,8 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) if i != int(confs[i].Pos) { this.module.Errorf("Equip conf:%+v Target:%d Incorrect range!", confs[i], i) errdata = &pb.ErrorData{ - Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), - Message: err.Error(), + Code: pb.ErrorCode_SystemError, + Title: pb.ErrorCode_SystemError.ToString(), } return } From acfb28152330599dda9c802c3a7c2244932b8e54 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 15 Jun 2023 20:24:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BE=81=E7=BB=8A=E7=BA=A2=E7=82=B9?= =?UTF-8?q?=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/reddot/api_get.go | 4 ++++ modules/reddot/module.go | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/modules/reddot/api_get.go b/modules/reddot/api_get.go index 766314507..38c59ffeb 100644 --- a/modules/reddot/api_get.go +++ b/modules/reddot/api_get.go @@ -68,6 +68,10 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda for k, v := range this.module.hunting.Reddot(session, _rid) { reddot[int32(k)] = v } + case comm.Reddot19103, comm.Reddot19105, comm.Reddot19109, comm.Reddot19110: + for k, v := range this.module.library.Reddot(session, _rid) { + reddot[int32(k)] = v + } } } session.SendMsg(string(this.module.GetType()), "get", &pb.ReddotGetAllResp{Reddot: reddot}) diff --git a/modules/reddot/module.go b/modules/reddot/module.go index 560906b5d..f5b131e67 100644 --- a/modules/reddot/module.go +++ b/modules/reddot/module.go @@ -31,6 +31,7 @@ type Reddot struct { mail comm.Imail viking comm.IViking hunting comm.IHunting + library comm.ILibrary api_comp *apiComp mline comm.IMline } @@ -96,6 +97,11 @@ func (this *Reddot) Start() (err error) { } this.hunting = module.(comm.IHunting) + if module, err = this.service.GetModule(comm.ModuleLibrary); err != nil { + return + } + this.library = module.(comm.ILibrary) + return }