首通奖励发放时机调整
This commit is contained in:
parent
03e4d02fbc
commit
f878aed122
@ -37,9 +37,19 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.StonehengeFinishR
|
||||
}
|
||||
|
||||
// 校验是否是通关
|
||||
if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes+1); conf == nil {
|
||||
stone.Reward[stone.StageID] = true
|
||||
update["reward"] = stone.Reward
|
||||
if stone.Rooms.Complete {
|
||||
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, 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); conf != nil {
|
||||
stone.Integral += conf.WeeklyPoint // 发放积分 和奖励
|
||||
update["integral"] = stone.Integral
|
||||
@ -49,17 +59,9 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.StonehengeFinishR
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if stone.Rooms.Complete { // 完成关卡 发放当前关奖励
|
||||
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...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stone.StageID = 0
|
||||
update["stageID"] = stone.StageID
|
||||
stone.CurRoomIndes = 0
|
||||
|
Loading…
Reference in New Issue
Block a user