上传红点进度信息
This commit is contained in:
parent
75d72cd542
commit
5b1a020ffa
@ -569,6 +569,7 @@ const (
|
||||
Reddot25101 ReddotType = 25101 // 每日任务进度红点
|
||||
//武馆
|
||||
Reddot26101 ReddotType = 26101 // 每日一练
|
||||
Reddot26201 ReddotType = 26201 // 今日剩余训练次数:x
|
||||
//云朵签到
|
||||
Reddot27101 ReddotType = 27101 // 签到进度
|
||||
//巨怪商队跑商
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/sys/db"
|
||||
"time"
|
||||
|
||||
@ -411,14 +412,35 @@ func (this *Practice) GetAllJxRes() (res []string, err error) {
|
||||
// 红点
|
||||
func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) {
|
||||
var (
|
||||
room *pb.DBPracticeRoom
|
||||
err error
|
||||
room *pb.DBPracticeRoom
|
||||
pconf *cfg.GamePandamasMzData
|
||||
usenum int32
|
||||
totalusenum int32
|
||||
err error
|
||||
)
|
||||
reddot = make(map[comm.ReddotType]*pb.ReddotItem)
|
||||
if room, err = this.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
if room.Pillar1.Isunlock == 2 {
|
||||
usenum += room.Pillar1.Usenum
|
||||
if pconf, err = this.configure.getGamePandamasMz(room.Pillar1.Lv); err == nil {
|
||||
totalusenum += pconf.Limitation
|
||||
}
|
||||
}
|
||||
if room.Pillar2.Isunlock == 2 {
|
||||
usenum += room.Pillar2.Usenum
|
||||
if pconf, err = this.configure.getGamePandamasMz(room.Pillar2.Lv); err == nil {
|
||||
totalusenum += pconf.Limitation
|
||||
}
|
||||
}
|
||||
if room.Pillar3.Isunlock == 2 {
|
||||
usenum += room.Pillar3.Usenum
|
||||
if pconf, err = this.configure.getGamePandamasMz(room.Pillar3.Lv); err == nil {
|
||||
totalusenum += pconf.Limitation
|
||||
}
|
||||
}
|
||||
for _, v := range rid {
|
||||
switch v {
|
||||
case comm.Reddot26101:
|
||||
@ -429,7 +451,16 @@ func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType)
|
||||
Total: 1,
|
||||
}
|
||||
break
|
||||
case comm.Reddot26201:
|
||||
reddot[comm.Reddot26101] = &pb.ReddotItem{
|
||||
Rid: int32(comm.Reddot26101),
|
||||
Activated: true,
|
||||
Progress: usenum,
|
||||
Total: totalusenum,
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user