From 32e1c43c2c84b477cf4b757e59ce81306a0bd59c Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 23 Feb 2024 15:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BC=9A=E4=BB=BB=E5=8A=A1=E7=BA=A2?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/sociaty/module.go | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/modules/sociaty/module.go b/modules/sociaty/module.go index a5ee91c29..4d02845a0 100644 --- a/modules/sociaty/module.go +++ b/modules/sociaty/module.go @@ -360,13 +360,20 @@ func (this *Sociaty) BuriedsNotify(session comm.IUserSession, conds []*pb.ConIPr log.Debug("公会任务通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "condIds", Value: conds}) - - session.SendMsg(string(comm.ModuleReddot), "change", &pb.ReddotChangePush{Rids: []*pb.ReddotItem{ - { - Rid: int32(comm.Reddot15301), - Activated: true, - }, - }}) + ok := false + for _, v := range conds { + if v.State == pb.BuriedItemFinishState_buried_finish { + ok = true + } + } + if ok { + session.SendMsg(string(comm.ModuleReddot), "change", &pb.ReddotChangePush{Rids: []*pb.ReddotItem{ + { + Rid: int32(comm.Reddot15301), + Activated: true, + }, + }}) + } } func (this *Sociaty) RpcUpdateUserTask(ctx context.Context, p *TaskParams, reply *pb.EmptyResp) error {