From 03b8514aee12a9f08776436fdaae1ba7a72decc2 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 1 Nov 2023 19:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=98=E5=A2=83=E6=89=8B=E5=8A=A8=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E5=8F=AF=E4=BB=A5=E9=A2=86=E5=8F=96=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E5=85=B3=E5=8D=A1=E7=9A=84=E5=A5=96=E5=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/stonehenge/api_finish.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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