diff --git a/comm/const.go b/comm/const.go index ba1b97067..fa30474e2 100644 --- a/comm/const.go +++ b/comm/const.go @@ -486,6 +486,9 @@ const ( Reddot24101 ReddotType = 24101 // 主线章节有奖励没领取 // 好友 Reddot21101 ReddotType = 21101 //当好友申请存在时,一级位置:好友界面左边申请列表图标上右上角位置 当好友申请处理完红点消失 + + //23101 烹饪 + Reddot23101 ReddotType = 23101 // 烹饪奖励菜谱图鉴图标 ) type TaskType int32 diff --git a/modules/gourmet/model_food.go b/modules/gourmet/model_food.go index 4a64b9e98..38c807720 100644 --- a/modules/gourmet/model_food.go +++ b/modules/gourmet/model_food.go @@ -44,3 +44,15 @@ func (this *modelAtlas) getGourmetAtlasList(uid string) (result *pb.DBGourmetAtl func (this *modelAtlas) modifyGourmetAtlasByObjId(uid string, data map[string]interface{}) error { return this.Change(uid, data) } + +// 美食城图鉴红点 +func (this *modelAtlas) checkReddot2301(uid string) bool { + if rst, err := this.getGourmetAtlasList(uid); err == nil { + for _, v := range rst.Atlas { + if v == -1 { + return true + } + } + } + return false +} diff --git a/modules/gourmet/module.go b/modules/gourmet/module.go index 22aea7359..c8fca7e6a 100644 --- a/modules/gourmet/module.go +++ b/modules/gourmet/module.go @@ -44,7 +44,17 @@ func (this *Gourmet) OnInstallComp() { //红点查询 func (this *Gourmet) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - + reddot = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range rid { + switch v { + case comm.Reddot23101: // 铁匠铺手册台 + reddot[comm.Reddot23101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot23101), + Activated: this.modelAtlas.checkReddot2301(session.GetUserId()), + } + break + } + } return }