Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2022-09-06 20:20:53 +08:00
commit e608ef00d1

View File

@ -9,7 +9,7 @@ import (
//参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) {
if req.MainlineId == 0 {
if req.MainlineId == 0 || req.ChapterObj == "" || req.Leadpos >= 5 || len(req.Teamids) > 5 || req.Leadpos < 0 {
code = pb.ErrorCode_ReqParameterError
return
}
@ -58,6 +58,9 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
Teamids: req.Teamids,
Mformat: node.FormatList,
})
if code != pb.ErrorCode_Success {
return
}
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{Info: &pb.BattleInfo{
Id: record.Id,
Btype: record.Btype,