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 }