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)