上传武馆红点优化

This commit is contained in:
liwei1dao 2023-09-27 18:04:46 +08:00
parent 226f149d62
commit 4d58a75d53
3 changed files with 14 additions and 14 deletions

View File

@ -635,8 +635,8 @@ const (
//每日任务 //每日任务
Reddot25101 ReddotType = 25101 // 每日任务进度红点 Reddot25101 ReddotType = 25101 // 每日任务进度红点
//武馆 //武馆
Reddot26101 ReddotType = 26101 // 每日一练 Reddot18106 ReddotType = 18106 // 每日一练
Reddot26201 ReddotType = 26201 // 今日剩余训练次数x Reddot18111 ReddotType = 18111 // 今日剩余训练次数x
//云朵签到 //云朵签到
Reddot27101 ReddotType = 27101 // 签到进度 Reddot27101 ReddotType = 27101 // 签到进度
//巨怪商队跑商 前端处理 //巨怪商队跑商 前端处理

View File

@ -469,35 +469,35 @@ func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType)
} }
for _, v := range rid { for _, v := range rid {
switch v { switch v {
case comm.Reddot26101: case comm.Reddot18106:
if userex, err = this.ModuleUser.GetUserExpand(session.GetUserId()); err != nil { if userex, err = this.ModuleUser.GetUserExpand(session.GetUserId()); err != nil {
this.Errorln(err) this.Errorln(err)
return return
} }
reddot[comm.Reddot26101] = &pb.ReddotItem{ reddot[comm.Reddot18106] = &pb.ReddotItem{
Rid: int32(comm.Reddot26101), Rid: int32(comm.Reddot18106),
Activated: true, Activated: true,
Progress: room.Gymrefresh, Progress: room.Gymrefresh,
Total: 1, Total: 1,
} }
if userex.Globalbuff == 0 { if userex.Globalbuff == 0 {
reddot[comm.Reddot26101].Progress = 0 reddot[comm.Reddot18106].Progress = 0
} else { } else {
reddot[comm.Reddot26101].Progress = 1 reddot[comm.Reddot18106].Progress = 1
} }
break break
case comm.Reddot26201: case comm.Reddot18111:
if totalusenum > 0 { if totalusenum > 0 {
reddot[comm.Reddot26201] = &pb.ReddotItem{ reddot[comm.Reddot18111] = &pb.ReddotItem{
Rid: int32(comm.Reddot26201), Rid: int32(comm.Reddot18111),
Activated: true, Activated: true,
Progress: usenum, Progress: usenum,
Total: totalusenum, Total: totalusenum,
} }
} else { } else {
reddot[comm.Reddot26201] = &pb.ReddotItem{ reddot[comm.Reddot18111] = &pb.ReddotItem{
Rid: int32(comm.Reddot26201), Rid: int32(comm.Reddot18111),
Activated: false, Activated: false,
} }
} }

View File

@ -50,8 +50,8 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
//武馆 //武馆
for k, v := range this.module.practice.Reddot(session, for k, v := range this.module.practice.Reddot(session,
comm.Reddot26101, comm.Reddot18106,
comm.Reddot26201, comm.Reddot18111,
) { ) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }