From 8cac73974d8aa93dcb001e69a563f9ffd68caa36 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 27 Sep 2023 15:38:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=8D=87=E7=BA=A7bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/model_user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/user/model_user.go b/modules/user/model_user.go index a2254db48..8a52b8eee 100644 --- a/modules/user/model_user.go +++ b/modules/user/model_user.go @@ -222,7 +222,7 @@ func (this *ModelUser) computeLevel(change *pb.UserResChangedPush) (lvchange boo curExp int64 = change.Exp res int64 ) - + rewards = make([]*cfg.Gameatn, 0) for nextLvConf = this.module.configure.GetPlayerlvConf(curLv + 1); nextLvConf != nil; { if curExp >= int64(nextLvConf.Exp) { curExp = curExp - int64(nextLvConf.Exp) From 226f149d625a4844b2c1e65af5a2b561fd430ffd Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 27 Sep 2023 16:55:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=BA=A2=E7=82=B9=E9=80=BB=E8=BE=91=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/dailytask/module.go | 4 ++++ modules/guildgve/module.go | 4 ++-- modules/practice/api_getgymbuff.go | 2 +- modules/practice/api_gyminfo.go | 2 +- modules/practice/module.go | 11 +++++++++++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/modules/dailytask/module.go b/modules/dailytask/module.go index b7ac33779..39d5d8338 100644 --- a/modules/dailytask/module.go +++ b/modules/dailytask/module.go @@ -122,6 +122,7 @@ func (this *Dailytask) Reddot(session comm.IUserSession, rid ...comm.ReddotType) for _, v := range rid { switch v { case comm.Reddot25101: + for _, v := range dtask.Groups { if v.Complete { progress++ @@ -133,6 +134,9 @@ func (this *Dailytask) Reddot(session comm.IUserSession, rid ...comm.ReddotType) Progress: progress, Total: int32(len(dtask.Groups)), } + if len(dtask.Groups) == 0 { + reddot[comm.Reddot25101].Activated = false + } break } } diff --git a/modules/guildgve/module.go b/modules/guildgve/module.go index 6991b72dd..fd2eefdbe 100644 --- a/modules/guildgve/module.go +++ b/modules/guildgve/module.go @@ -101,8 +101,8 @@ func (this *GuildGve) Reddot(session comm.IUserSession, rid ...comm.ReddotType) for _, v := range rid { switch v { case comm.Reddot15301: - reddot[comm.Reddot26101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot26101), + reddot[comm.Reddot15301] = &pb.ReddotItem{ + Rid: int32(comm.Reddot15301), Activated: true, Progress: member.Boosticket, } diff --git a/modules/practice/api_getgymbuff.go b/modules/practice/api_getgymbuff.go index f2c120a99..8befa131d 100644 --- a/modules/practice/api_getgymbuff.go +++ b/modules/practice/api_getgymbuff.go @@ -14,7 +14,7 @@ func (this *apiComp) GetGymBuffCheck(session comm.IUserSession, req *pb.Practice return } -// /练功请求 +//练功请求 func (this *apiComp) GetGymBuff(session comm.IUserSession, req *pb.PracticeGetGymBuffReq) (errdata *pb.ErrorData) { var ( mryl *cfg.GamePandamasMrylData diff --git a/modules/practice/api_gyminfo.go b/modules/practice/api_gyminfo.go index 08b0fcec5..476ccc079 100644 --- a/modules/practice/api_gyminfo.go +++ b/modules/practice/api_gyminfo.go @@ -13,7 +13,7 @@ func (this *apiComp) GymInfoCheck(session comm.IUserSession, req *pb.PracticeGym return } -// /获取每日一练信息 +//获取每日一练信息 func (this *apiComp) GymInfo(session comm.IUserSession, req *pb.PracticeGymInfoReq) (errdata *pb.ErrorData) { var ( err error diff --git a/modules/practice/module.go b/modules/practice/module.go index 996384827..32ceeec3e 100644 --- a/modules/practice/module.go +++ b/modules/practice/module.go @@ -434,6 +434,7 @@ func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType) model *pandataModel room *pb.DBPracticeRoom pconf *cfg.GamePandamasMzData + userex *pb.DBUserExpand usenum int32 totalusenum int32 err error @@ -469,12 +470,22 @@ func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType) for _, v := range rid { switch v { case comm.Reddot26101: + if userex, err = this.ModuleUser.GetUserExpand(session.GetUserId()); err != nil { + this.Errorln(err) + return + } reddot[comm.Reddot26101] = &pb.ReddotItem{ Rid: int32(comm.Reddot26101), Activated: true, Progress: room.Gymrefresh, Total: 1, } + if userex.Globalbuff == 0 { + reddot[comm.Reddot26101].Progress = 0 + } else { + reddot[comm.Reddot26101].Progress = 1 + } + break case comm.Reddot26201: if totalusenum > 0 {