From 5d47ed9b798f104c11b62d4f5a9a5b765ab0df39 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 23 Nov 2022 22:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=98=E6=96=97=E5=8A=A9?= =?UTF-8?q?=E9=98=B5=E9=85=8D=E7=BD=AE=E6=89=BE=E4=B8=8D=E5=88=B0=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/battle/modelBattle.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/battle/modelBattle.go b/modules/battle/modelBattle.go index fd7f43f30..e0481bbb5 100644 --- a/modules/battle/modelBattle.go +++ b/modules/battle/modelBattle.go @@ -118,6 +118,9 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon } if req.Sysformat != nil && len(req.Sysformat) > 0 { for i, v := range req.Sysformat { + if v == 0 { + continue + } if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success { return } @@ -129,6 +132,9 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon } if req.Backupformat != nil && len(req.Backupformat) > 0 { for i, v := range req.Backupformat { + if v == 0 { + continue + } if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success { return }