From 30a1b1c409c29c1f0ad6f9a170ec8de1166eb418 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 21 Oct 2022 14:56:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=98=E6=96=97=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=88=A4=E6=96=AD=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/battle/module.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/battle/module.go b/modules/battle/module.go index 3e4cf169a..1ae466621 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -88,8 +88,7 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE this.Errorf("session:%v err:", session, err) return } - if req.Ptype < 0 || req.Ptype > 4 || - req.Format == nil || req.Format.Format == nil || len(req.Format.Format) != 5 { + if req.Format == nil || req.Format.Format == nil || len(req.Format.Format) != 5 { code = pb.ErrorCode_ReqParameterError return } @@ -119,8 +118,7 @@ func (this *Battle) CreatePvbBattle(session comm.IUserSession, req *pb.BattlePVE this.Errorf("session:%v err:", session, err) return } - if req.Ptype < 0 || req.Ptype > 4 || - req.Format == nil || req.Format.Format == nil || len(req.Format.Format) != 5 { + if req.Format == nil || req.Format.Format == nil || len(req.Format.Format) != 5 { code = pb.ErrorCode_ReqParameterError return }