主线关卡领取奖励红点推送
This commit is contained in:
parent
acfb281523
commit
a766977fbd
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
//铁匠铺
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user