diff --git a/modules/stonehenge/api_finish.go b/modules/stonehenge/api_finish.go index 6a993b1db..28b99f7f8 100644 --- a/modules/stonehenge/api_finish.go +++ b/modules/stonehenge/api_finish.go @@ -60,6 +60,28 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.StonehengeFinishR } } + } else { // 没有通关也不要紧 发前面关卡奖励 + if stone.CurRoomIndes > 1 { + if conf := this.module.configure.GetStageConfByStageid(stone.StageID, 1); conf != nil { + if len(conf.FirstReward) > 0 { // 完成关卡 发放当前关奖励 + if errdata, reward = this.module.DispenseAtno(session, conf.FirstReward, true); errdata != nil { + return + } + atno = append(atno, reward...) + } + } + + if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes-1); 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