上传武馆红点优化
This commit is contained in:
parent
226f149d62
commit
4d58a75d53
@ -635,8 +635,8 @@ const (
|
||||
//每日任务
|
||||
Reddot25101 ReddotType = 25101 // 每日任务进度红点
|
||||
//武馆
|
||||
Reddot26101 ReddotType = 26101 // 每日一练
|
||||
Reddot26201 ReddotType = 26201 // 今日剩余训练次数:x
|
||||
Reddot18106 ReddotType = 18106 // 每日一练
|
||||
Reddot18111 ReddotType = 18111 // 今日剩余训练次数:x
|
||||
//云朵签到
|
||||
Reddot27101 ReddotType = 27101 // 签到进度
|
||||
//巨怪商队跑商 前端处理
|
||||
|
@ -469,35 +469,35 @@ func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType)
|
||||
}
|
||||
for _, v := range rid {
|
||||
switch v {
|
||||
case comm.Reddot26101:
|
||||
case comm.Reddot18106:
|
||||
if userex, err = this.ModuleUser.GetUserExpand(session.GetUserId()); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
reddot[comm.Reddot26101] = &pb.ReddotItem{
|
||||
Rid: int32(comm.Reddot26101),
|
||||
reddot[comm.Reddot18106] = &pb.ReddotItem{
|
||||
Rid: int32(comm.Reddot18106),
|
||||
Activated: true,
|
||||
Progress: room.Gymrefresh,
|
||||
Total: 1,
|
||||
}
|
||||
if userex.Globalbuff == 0 {
|
||||
reddot[comm.Reddot26101].Progress = 0
|
||||
reddot[comm.Reddot18106].Progress = 0
|
||||
} else {
|
||||
reddot[comm.Reddot26101].Progress = 1
|
||||
reddot[comm.Reddot18106].Progress = 1
|
||||
}
|
||||
|
||||
break
|
||||
case comm.Reddot26201:
|
||||
case comm.Reddot18111:
|
||||
if totalusenum > 0 {
|
||||
reddot[comm.Reddot26201] = &pb.ReddotItem{
|
||||
Rid: int32(comm.Reddot26201),
|
||||
reddot[comm.Reddot18111] = &pb.ReddotItem{
|
||||
Rid: int32(comm.Reddot18111),
|
||||
Activated: true,
|
||||
Progress: usenum,
|
||||
Total: totalusenum,
|
||||
}
|
||||
} else {
|
||||
reddot[comm.Reddot26201] = &pb.ReddotItem{
|
||||
Rid: int32(comm.Reddot26201),
|
||||
reddot[comm.Reddot18111] = &pb.ReddotItem{
|
||||
Rid: int32(comm.Reddot18111),
|
||||
Activated: false,
|
||||
}
|
||||
}
|
||||
|
@ -50,8 +50,8 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
|
||||
|
||||
//武馆
|
||||
for k, v := range this.module.practice.Reddot(session,
|
||||
comm.Reddot26101,
|
||||
comm.Reddot26201,
|
||||
comm.Reddot18106,
|
||||
comm.Reddot18111,
|
||||
) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user