From f1ff610f97034f76b3d32ca41b4c7777bb081fdd Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 22 Nov 2016 09:38:50 -0800 Subject: [PATCH] Fix bad Forme setting due to integer conversion --- pk3DS/Subforms/Gen7/SMWE.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pk3DS/Subforms/Gen7/SMWE.cs b/pk3DS/Subforms/Gen7/SMWE.cs index 8e399b7..a3e336a 100644 --- a/pk3DS/Subforms/Gen7/SMWE.cs +++ b/pk3DS/Subforms/Gen7/SMWE.cs @@ -642,7 +642,7 @@ private void B_Randomize_Click(object sender, EventArgs e) } encounter.Species = (uint)species; } - encounter.Forme = (uint)GetRandomForme((int)encounter.Species); + encounter.Forme = GetRandomForme((int)encounter.Species); } } } @@ -655,16 +655,16 @@ private void B_Randomize_Click(object sender, EventArgs e) Util.Alert("Randomized!"); } - public int GetRandomForme(int species) + public uint GetRandomForme(int species) { if (Main.SpeciesStat[species].FormeCount > 1) { if (Legal.Mega_ORAS.Contains((ushort)species)) if (CHK_MegaForm.Checked) - return (int) rnd32()%Main.SpeciesStat[species].FormeCount; // Slot-Random + return (uint) (rnd32()%Main.SpeciesStat[species].FormeCount); // Slot-Random else return 0; - return (int)rnd32() % Main.SpeciesStat[species].FormeCount; // Slot-Random + return (uint)(rnd32() % Main.SpeciesStat[species].FormeCount); // Slot-Random } return 0;