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 }