Fix Vivillon Form loading/saving

Thanks KingGengar & Favna!
This commit is contained in:
Kurt
2015-03-28 20:50:59 -07:00
parent ed9335bcc0
commit c46d609e7d
2 changed files with 6 additions and 3 deletions

View File

@@ -525,5 +525,6 @@ http://projectpokemon.org/forums/showthread.php?36986
- Fixed: Add ORAS Items to Memory Item Usage List. Thanks liopds!
- Fixed: Trash Bytes now are no longer cleared when saving data. Thanks SciresM & Lunarcookies!
- Fixed: Re-ordered controls to make tabbing flow down the form. Thanks Favna!
- Fixed: Vivillon Form selection in the Trainer (Save)Data editor will now function with refactored code. Thanks KingGengar & Favna!
- Changed: PKRS Days capped at legal limits.
- Changed: Forms drop-down and label will be hidden if a Pokémon has no forms.

View File

@@ -328,6 +328,8 @@ private void getComboBoxes()
CB_Multi.DataSource = oras_sprite_list;
L_Vivillon.Text = Form1.specieslist[666] + ":";
CB_Vivillon.DisplayMember = "Text";
CB_Vivillon.ValueMember = "Value";
m_parent.setForms(666, CB_Vivillon);
}
private void getBadges()
@@ -492,8 +494,8 @@ private void getTextBoxes()
MT_1403F.Text = sav[TrainerCard + 0x3F + savshift].ToString();
// Vivillon
int vivillon = sav[VivillonForm + savshift];
CB_Vivillon.SelectedValue = vivillon;
byte vivillon = sav[VivillonForm + savshift];
CB_Vivillon.SelectedIndex = vivillon;
}
private void save()
{
@@ -612,7 +614,7 @@ private void save()
sav[TrainerCard + 0x3F + savshift] = Byte.Parse(MT_1403F.Text);
// Vivillon
sav[VivillonForm + savshift] = (byte)Util.ToUInt32(CB_Vivillon.SelectedValue.ToString());
sav[VivillonForm + savshift] = (byte)CB_Vivillon.SelectedIndex;
}
private void clickOT(object sender, MouseEventArgs e)