Prevent duplicated egg moves

This commit is contained in:
Kurt
2015-07-18 15:38:09 -07:00
parent 614a09d954
commit 430c51a858

View File

@@ -82,7 +82,7 @@ private void setList()
for (int i = 0; i < dgv.Rows.Count - 1; i++)
{
int move = Array.IndexOf(movelist, dgv.Rows[i].Cells[0].Value);
if (move > 0) moves.Add((ushort)move);
if (move > 0 && !moves.Contains((ushort)move)) moves.Add((ushort)move);
}
pkm.Moves = moves.ToArray();