远征双倍boss类型校验

This commit is contained in:
meixiongfeng 2023-09-27 17:04:24 +08:00
parent 143d07da94
commit d168499bfb
4 changed files with 35 additions and 13 deletions

View File

@ -240,11 +240,20 @@ func (this *Activity) HDCelebration(session comm.IUserSession, systemtype int32,
}
}
if conf, err := this.configure.GetHDCelebration(list.Val); err == nil {
bfound := false
for _, v1 := range conf.Bosstype {
if v1 == 0 { // bosstype 为0 表示所有的boss 类型都算
bosstype = 0
bfound = true
break
}
if v1 == bosstype {
bfound = true
break
}
}
if !bfound {
return false
}
if conf.Systemtype == systemtype {
list.Gotarr[bosstype] += 1

View File

@ -385,6 +385,9 @@ func (this *Items) CleanItemById(session comm.IUserSession, t string) (errdata *
}
if len(itmes) > 0 {
this.modelItems.DeleteUserPack(session.GetUserId(), itmes...)
for _, v := range itmes {
v.Amount = 0
}
this.itemsChangePush(session, itmes) //推送道具背包变化
}
return

View File

@ -441,18 +441,18 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
}
}
if stone.Rooms.Complete { // 完成关卡 发放当前关奖励
if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes); conf != nil {
if len(conf.FirstReward) > 0 {
if errdata, reward = this.module.DispenseAtno(session, conf.FirstReward, true); errdata != nil {
return
}
}
}
// 记录首通
// stone.Reward[stone.StageID] = true
// update["reward"] = stone.Reward
}
// if stone.Rooms.Complete { // 完成关卡 发放当前关奖励
// if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes); conf != nil {
// if len(conf.FirstReward) > 0 {
// if errdata, reward = this.module.DispenseAtno(session, conf.FirstReward, true); errdata != nil {
// return
// }
// }
// }
// // 记录首通
// // stone.Reward[stone.StageID] = true
// // update["reward"] = stone.Reward
// }
if len(eventConf.CostItem) > 0 {
if errdata = this.module.ConsumeRes(session, eventConf.CostItem, true); errdata != nil { //真正的消耗
return

View File

@ -20,6 +20,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.StonehengeFinishR
err error
curintegral int32
atno []*pb.UserAtno
reward []*pb.UserAtno
)
update = make(map[string]interface{})
if errdata = this.FinishCheck(session, req); errdata != nil {
@ -49,7 +50,16 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.StonehengeFinishR
}
}
}
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