mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Fix Gen4 Misc options when no Poketch is obtained. (#1448)
* Fix Gen4 Misc options when no Poketch is obtained. closes #1447
This commit is contained in:
parent
62f99bf5b8
commit
1123c24b0c
2 changed files with 6 additions and 6 deletions
|
@ -515,7 +515,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
public override int SecondsToStart { get => BitConverter.ToInt32(Data, AdventureInfo + 0x34); set => BitConverter.GetBytes(value).CopyTo(Data, AdventureInfo + 0x34); }
|
||||
public override int SecondsToFame { get => BitConverter.ToInt32(Data, AdventureInfo + 0x3C); set => BitConverter.GetBytes(value).CopyTo(Data, AdventureInfo + 0x3C); }
|
||||
public int CurrentPoketchApp { get => Data[_currentPoketchApp]; set => Data[_currentPoketchApp] = (byte)Math.Min(24, value); /* Alarm Clock */ }
|
||||
public int CurrentPoketchApp { get => (sbyte)Data[_currentPoketchApp]; set => Data[_currentPoketchApp] = (byte)Math.Min(24, value); /* Alarm Clock */ }
|
||||
private int _currentPoketchApp;
|
||||
|
||||
// Storage
|
||||
|
|
|
@ -182,17 +182,17 @@ namespace PKHeX.WinForms
|
|||
private void ReadPoketch()
|
||||
{
|
||||
string[] PoketchTitle = new[] {
|
||||
"01 - Digital Watch", "02 - Calculator", "03 - Memo Pad", "04 - Pedometer", "05 - Pokémon List",
|
||||
"Unavailable", "01 - Digital Watch", "02 - Calculator", "03 - Memo Pad", "04 - Pedometer", "05 - Pokémon List",
|
||||
"06 - Friendship Checker", "07 - Dowsing Machine", "08 - Berry Searcher", "09 - Day Care Checker", "10 - Pokémon History",
|
||||
"11 - Counter", "12 - Analog Watch", "13 - Marking Map", "14 - Link Searcher", "15 - Coin Toss",
|
||||
"16 - Move Tester", "17 - Calendar", "18 - Dot Artist", "19 - Roulette", "20 - Trainer Counter",
|
||||
"21 - Kitchen Timer", "22 - Color Changer", "23 - Matchup Checker", "24 - Stopwatch", "25 - Alarm Clock"
|
||||
};
|
||||
CB_CurrentApp.Items.AddRange(PoketchTitle);
|
||||
CB_CurrentApp.SelectedIndex = SAV.CurrentPoketchApp;
|
||||
CB_CurrentApp.SelectedIndex = SAV.CurrentPoketchApp + 1;
|
||||
oldPoketchVal = new bool[PoketchTitle.Length];
|
||||
CLB_Poketch.Items.Clear();
|
||||
for (int i = 0; i < PoketchTitle.Length; i++)
|
||||
for (int i = 1; i < PoketchTitle.Length; i++)
|
||||
{
|
||||
oldPoketchVal[i] = SAV.Data[ofsPoketch + i] != 0;
|
||||
CLB_Poketch.Items.Add(PoketchTitle[i], oldPoketchVal[i]);
|
||||
|
@ -229,7 +229,7 @@ namespace PKHeX.WinForms
|
|||
SAV.Data[ofsPoketch - 1] = 0;
|
||||
DotArtistByte.CopyTo(SAV.Data, ofsPoketch + 0x27);
|
||||
SAV.Data[ofsPoketch - 3] |= 0x04; // "Touch!"
|
||||
SAV.CurrentPoketchApp = CB_CurrentApp.SelectedIndex;
|
||||
SAV.CurrentPoketchApp = CB_CurrentApp.SelectedIndex - 1;
|
||||
}
|
||||
|
||||
private void SetPictureBoxFromFlags(byte[] inp)
|
||||
|
@ -732,4 +732,4 @@ namespace PKHeX.WinForms
|
|||
SAV.PokewalkerCoursesUnlockAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue