Fix levelup spread evenly

value was a decimal which wasn't parsed back correctly as an int.
Closes #135
This commit is contained in:
Kurt 2017-07-07 20:53:00 -07:00
parent f0923d5997
commit be332e7411
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ private void B_RandAll_Click(object sender, EventArgs e)
dgv.Rows[j].Cells[0].Value = lv + (j - count) + 1;
}
if (CHK_Spread.Checked)
dgv.Rows[j].Cells[0].Value = (j * (NUD_Level.Value / (dgv.Rows.Count - 1))).ToString();
dgv.Rows[j].Cells[0].Value = ((int)(j * (NUD_Level.Value / (dgv.Rows.Count - 1)))).ToString();
}
}
CB_Species.SelectedIndex = 0;

View File

@ -181,7 +181,7 @@ private void B_RandAll_Click(object sender, EventArgs e)
dgv.Rows[j].Cells[0].Value = lv + (j - count) + 1;
}
if (CHK_Spread.Checked)
dgv.Rows[j].Cells[0].Value = (j * (NUD_Level.Value / (dgv.Rows.Count - 1))).ToString();
dgv.Rows[j].Cells[0].Value = ((int)(j * (NUD_Level.Value / (dgv.Rows.Count - 1)))).ToString();
}
}
CB_Species.SelectedIndex = 0;