副本小怪获取

This commit is contained in:
meixiongfeng 2022-12-22 10:31:44 +08:00
parent dcbc9b5490
commit 27745d5d83

View File

@ -54,7 +54,15 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
if !ok { // 类型校验 if !ok { // 类型校验
enchant.Boss[req.BossType] = 0 enchant.Boss[req.BossType] = 0
} }
// 获取分数
var score int32
var format []int32
score = int32(enchant.Boss[req.BossType])
for _, v := range cfgData {
if v.ScoreLow >= score && v.ScoreUp >= score {
format = v.Boss
}
}
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
Ptype: pb.PlayType_enchant, Ptype: pb.PlayType_enchant,
Title: "", Title: "",
@ -62,8 +70,9 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
Leadpos: req.Leadpos, Leadpos: req.Leadpos,
Format: req.Teamids, Format: req.Teamids,
}, },
//Mformat: cfgData.Boss, Mformat: format,
}) })
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {
return return
} }