mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 16:47:15 -05:00
Fix gen3 ability dupe
Thanks @ricksee ! Gen3 second ability for same-ability mons is stored as 0, same deal for gen4. MainPK4 alteration is an unneeded-code removal, gen4 only has abil0&1, not 2 (hidden) like gen5. Closes #256
This commit is contained in:
@@ -1460,7 +1460,7 @@ private void setAbilityList()
|
||||
formnum = CB_Form.SelectedIndex;
|
||||
|
||||
int[] abils = SAV.Personal.getAbilities(species, formnum);
|
||||
if (abils[1] == 0)
|
||||
if (abils[1] == 0 && SAV.Generation != 3)
|
||||
abils[1] = abils[0];
|
||||
string[] abilIdentifier = {" (1)", " (2)", " (H)"};
|
||||
List<string> ability_list = abils.Where(a => a != 0).Select((t, i) => abilitylist[t] + abilIdentifier[i]).ToList();
|
||||
|
||||
@@ -137,8 +137,6 @@ private void populateFieldsPK4()
|
||||
|
||||
if (abil < 0)
|
||||
CB_Ability.SelectedIndex = 0;
|
||||
else if (abil == 2)
|
||||
CB_Ability.SelectedIndex = 2;
|
||||
else if (abils[0] == abils[1] || abils[1] == 0)
|
||||
CB_Ability.SelectedIndex = pk4.PIDAbility;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user