diff --git a/modules/stonehenge/api_finish.go b/modules/stonehenge/api_finish.go index aa0a2d67e..9c4e0cc77 100644 --- a/modules/stonehenge/api_finish.go +++ b/modules/stonehenge/api_finish.go @@ -35,20 +35,19 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.StonehengeFinishR return } - if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes); conf != nil { - stone.Integral += conf.WeeklyPoint // 发放积分 和奖励 - update["integral"] = stone.Integral - curintegral = conf.WeeklyPoint - // 再发天赋奖励 - if errdata, atno = this.module.DispenseAtno(session, []*cfg.Gameatn{conf.TalentItem}, true); errdata != nil { - return - } - } - // 校验是否是通关 if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes+1); conf == nil { stone.Reward[stone.StageID] = true update["reward"] = stone.Reward + if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes); conf != nil { + stone.Integral += conf.WeeklyPoint // 发放积分 和奖励 + update["integral"] = stone.Integral + curintegral = conf.WeeklyPoint + // 再发天赋奖励 + if errdata, atno = this.module.DispenseAtno(session, []*cfg.Gameatn{conf.TalentItem}, true); errdata != nil { + return + } + } } stone.StageID = 0