From a766977fbdc68eb895216e81fa732ee9fa5b86c1 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 15 Jun 2023 20:54:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E7=BA=BF=E5=85=B3=E5=8D=A1=E9=A2=86?= =?UTF-8?q?=E5=8F=96=E5=A5=96=E5=8A=B1=E7=BA=A2=E7=82=B9=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 6 +++++- modules/mline/module.go | 25 ++++++++++--------------- modules/reddot/api_get.go | 4 ++-- modules/reddot/api_getall.go | 9 ++++++++- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/comm/const.go b/comm/const.go index 7d3af16a2..044d62bb9 100644 --- a/comm/const.go +++ b/comm/const.go @@ -437,7 +437,7 @@ const ( Reddot15102 ReddotType = 15102 //公会----签到红点 Reddot15201 ReddotType = 15201 //公会----申请红点 //主线关卡 - Reddot11100 ReddotType = 11100 //主线关卡----可挑战红点 + //Reddot11100 ReddotType = 11100 //主线关卡----可挑战红点 -- 废弃 // 铁匠铺 Reddot17102 ReddotType = 17102 // 铁匠铺手册台 Reddot17106 ReddotType = 17106 // 铁匠铺手册台收藏家奖励上 @@ -459,10 +459,14 @@ const ( Reddot25 ReddotType = 10025 //熊猫武馆----可领取奖励红点 Reddot33 ReddotType = 10033 //附魔副本 有挑战次数 + // 羁绊 Reddot19103 ReddotType = 19103 // 当好感度奖励可以领取时,出现好感度奖励领取红点 Reddot19105 ReddotType = 19105 //当英雄等级解锁到一定程度,下方传记解锁新的传记的时候 Reddot19109 ReddotType = 19109 // 当存在好感度羁绊可以激活的时候 Reddot19110 ReddotType = 19110 // 当存在好感度羁绊可以升级的时候,好感度羁绊界面激活 + + // 主线 + Reddot24100 ReddotType = 24100 // 主线章节有奖励没领取 ) type TaskType int32 diff --git a/modules/mline/module.go b/modules/mline/module.go index 8b372883d..3fb8112fc 100644 --- a/modules/mline/module.go +++ b/modules/mline/module.go @@ -53,8 +53,8 @@ func (this *Mline) Start() (err error) { func (this *Mline) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) { reddot = make(map[comm.ReddotType]bool) for _, v := range rid { - if v == comm.Reddot11100 { - reddot[comm.Reddot11100] = this.CheckPoint(session.GetUserId()) + if v == comm.Reddot24100 { + reddot[comm.Reddot24100] = this.CheckPoint(session.GetUserId()) break } } @@ -68,21 +68,16 @@ func (this *Mline) CheckPoint(uid string) bool { return false } for _, v := range list { - b := false - for _, v1 := range this.configure.GetAllChapterID() { - if v.ChapterId == v1 { - b = true - continue + mLineConf := this.configure.GetMainChapterConf(v.ChapterId) + if mLineConf == nil { + return false + } + awardConf := this.configure.GetMainStarRewardConf(mLineConf.Starreward) + for _, v1 := range awardConf { + if _, ok := v.Award[v1.Starnum]; !ok { // 找到没有领奖的数据 + return true } } - if !b { - return false - } - // 查看所有小关是否通关 - szStage := this.configure.GetAllStageByChapterID(v.ChapterId) - if len(szStage) != len(v.Star) { - return false - } } return false } diff --git a/modules/reddot/api_get.go b/modules/reddot/api_get.go index 38c59ffeb..76215a7aa 100644 --- a/modules/reddot/api_get.go +++ b/modules/reddot/api_get.go @@ -28,8 +28,8 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda reddot[int32(k)] = v } //主线 - case comm.Reddot11100: - for k, v := range this.module.mail.Reddot(session, _rid) { + case comm.Reddot24100: + for k, v := range this.module.mline.Reddot(session, _rid) { reddot[int32(k)] = v } //铁匠铺 diff --git a/modules/reddot/api_getall.go b/modules/reddot/api_getall.go index fb420038e..146bb45db 100644 --- a/modules/reddot/api_getall.go +++ b/modules/reddot/api_getall.go @@ -29,7 +29,7 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq) reddot[int32(k)] = v } //主线 - for k, v := range this.module.mline.Reddot(session, comm.Reddot11100) { + for k, v := range this.module.mline.Reddot(session, comm.Reddot24100) { reddot[int32(k)] = v } //铁匠铺 @@ -67,6 +67,13 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq) for k, v := range this.module.hunting.Reddot(session, comm.Reddot14102) { reddot[int32(k)] = v } + for k, v := range this.module.library.Reddot(session, + comm.Reddot19103, + comm.Reddot19105, + comm.Reddot19109, + comm.Reddot19110) { + reddot[int32(k)] = v + } session.SendMsg(string(this.module.GetType()), "getall", &pb.ReddotGetAllResp{Reddot: reddot}) return