mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-01 21:36:43 -05:00
Fix bad Forme setting due to integer conversion
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user