From 90f40af815b6f1f037011fe6b42421ca457aaa9b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 29 Sep 2022 16:11:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=88=AC=E5=A1=94=20=E5=85=88=E5=8F=91?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E8=8B=B1=E9=9B=84=E7=BB=8F=E9=AA=8C=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E5=9C=A8=E6=8E=A8=E9=80=81=E7=BB=93=E6=9E=9C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pagoda/api_challengeover.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index cc2748c2c..cea9b9120 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -65,7 +65,14 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal } } // 校验通过 - + // 加经验 + if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { + for _, v := range req.Report.Info.Redflist[0].Team { + if conf.Exp > 0 { + this.module.ModuleHero.AddHeroExp(session, v.Oid, conf.Exp) + } + } + } if !expand.CompletePagoda { // 普通塔 pagoda.Type = req.PagodaType mapData["pagodaId"] = conf.LayerNum @@ -128,14 +135,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal code = this.module.ModifySeasonPagodaData(session.GetUserId(), mapData) session.SendMsg(string(this.module.GetType()), PagodaChallengeOverResp, &pb.PagodaChallengeOverResp{Data: pagoda}) } - // 加经验 - if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { - for _, v := range req.Report.Info.Redflist[0].Team { - if conf.Exp > 0 { - this.module.ModuleHero.AddHeroExp(session, v.Oid, conf.Exp) - } - } - } + // 任务相关 if req.PagodaType == comm.PagodaType { this.module.ModuleRtask.SendToRtask(session, comm.Rtype58, 1)