diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index 8902afa99..a68799aa7 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -84,11 +84,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal mapData["pagodaId"] = conf.LayerNum mapData["type"] = pagoda.Type - // 通关奖励 - code = this.module.DispenseRes(session, conf.Reward, true) - if code != pb.ErrorCode_Success { - return - } pagoda.PagodaId = conf.LayerNum // 更新层数 code = this.module.ModifyPagodaData(session.GetUserId(), mapData) session.SendMsg(string(this.module.GetType()), PagodaChallengeOverResp, &pb.PagodaChallengeOverResp{Data: pagoda}) @@ -168,7 +163,11 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal session.SendMsg(string(this.module.GetType()), PagodaChallengeOverResp, &pb.PagodaChallengeOverResp{Data: pagoda}) } - + // 通关奖励 + code = this.module.DispenseRes(session, conf.Reward, true) + if code != pb.ErrorCode_Success { + return + } // 任务相关 if req.PagodaType == comm.PagodaType { this.module.ModuleRtask.SendToRtask(session, comm.Rtype58, 1)