主线关卡领取奖励红点推送

This commit is contained in:
meixiongfeng 2023-06-15 20:54:13 +08:00
parent acfb281523
commit a766977fbd
4 changed files with 25 additions and 19 deletions

View File

@ -437,7 +437,7 @@ const (
Reddot15102 ReddotType = 15102 //公会----签到红点 Reddot15102 ReddotType = 15102 //公会----签到红点
Reddot15201 ReddotType = 15201 //公会----申请红点 Reddot15201 ReddotType = 15201 //公会----申请红点
//主线关卡 //主线关卡
Reddot11100 ReddotType = 11100 //主线关卡----可挑战红点 //Reddot11100 ReddotType = 11100 //主线关卡----可挑战红点 -- 废弃
// 铁匠铺 // 铁匠铺
Reddot17102 ReddotType = 17102 // 铁匠铺手册台 Reddot17102 ReddotType = 17102 // 铁匠铺手册台
Reddot17106 ReddotType = 17106 // 铁匠铺手册台收藏家奖励上 Reddot17106 ReddotType = 17106 // 铁匠铺手册台收藏家奖励上
@ -459,10 +459,14 @@ const (
Reddot25 ReddotType = 10025 //熊猫武馆----可领取奖励红点 Reddot25 ReddotType = 10025 //熊猫武馆----可领取奖励红点
Reddot33 ReddotType = 10033 //附魔副本 有挑战次数 Reddot33 ReddotType = 10033 //附魔副本 有挑战次数
// 羁绊
Reddot19103 ReddotType = 19103 // 当好感度奖励可以领取时,出现好感度奖励领取红点 Reddot19103 ReddotType = 19103 // 当好感度奖励可以领取时,出现好感度奖励领取红点
Reddot19105 ReddotType = 19105 //当英雄等级解锁到一定程度,下方传记解锁新的传记的时候 Reddot19105 ReddotType = 19105 //当英雄等级解锁到一定程度,下方传记解锁新的传记的时候
Reddot19109 ReddotType = 19109 // 当存在好感度羁绊可以激活的时候 Reddot19109 ReddotType = 19109 // 当存在好感度羁绊可以激活的时候
Reddot19110 ReddotType = 19110 // 当存在好感度羁绊可以升级的时候,好感度羁绊界面激活 Reddot19110 ReddotType = 19110 // 当存在好感度羁绊可以升级的时候,好感度羁绊界面激活
// 主线
Reddot24100 ReddotType = 24100 // 主线章节有奖励没领取
) )
type TaskType int32 type TaskType int32

View File

@ -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) { func (this *Mline) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
reddot = make(map[comm.ReddotType]bool) reddot = make(map[comm.ReddotType]bool)
for _, v := range rid { for _, v := range rid {
if v == comm.Reddot11100 { if v == comm.Reddot24100 {
reddot[comm.Reddot11100] = this.CheckPoint(session.GetUserId()) reddot[comm.Reddot24100] = this.CheckPoint(session.GetUserId())
break break
} }
} }
@ -68,20 +68,15 @@ func (this *Mline) CheckPoint(uid string) bool {
return false return false
} }
for _, v := range list { for _, v := range list {
b := false mLineConf := this.configure.GetMainChapterConf(v.ChapterId)
for _, v1 := range this.configure.GetAllChapterID() { if mLineConf == nil {
if v.ChapterId == v1 {
b = true
continue
}
}
if !b {
return false return false
} }
// 查看所有小关是否通关 awardConf := this.configure.GetMainStarRewardConf(mLineConf.Starreward)
szStage := this.configure.GetAllStageByChapterID(v.ChapterId) for _, v1 := range awardConf {
if len(szStage) != len(v.Star) { if _, ok := v.Award[v1.Starnum]; !ok { // 找到没有领奖的数据
return false return true
}
} }
} }
return false return false

View File

@ -28,8 +28,8 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda
reddot[int32(k)] = v reddot[int32(k)] = v
} }
//主线 //主线
case comm.Reddot11100: case comm.Reddot24100:
for k, v := range this.module.mail.Reddot(session, _rid) { for k, v := range this.module.mline.Reddot(session, _rid) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
//铁匠铺 //铁匠铺

View File

@ -29,7 +29,7 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
reddot[int32(k)] = v 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 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) { for k, v := range this.module.hunting.Reddot(session, comm.Reddot14102) {
reddot[int32(k)] = v 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}) session.SendMsg(string(this.module.GetType()), "getall", &pb.ReddotGetAllResp{Reddot: reddot})
return return