mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Double hotfix!
Wondercards with unknown items (null -> load unknown); block Eon Ticket Fix language auto-loading
This commit is contained in:
parent
330fe29055
commit
225302c149
3 changed files with 9 additions and 5 deletions
|
@ -41,12 +41,11 @@ namespace PKHeX
|
|||
CB_MainLanguage.Items.Add(cbItem);
|
||||
|
||||
// Try and detect the language
|
||||
int[] main_langnum = {2, 1, 3, 4, 5, 7, 8, 9};
|
||||
int[] main_langnum = {1, 2, 3, 4, 5, 7, 8, 9};
|
||||
main_langnum = main_langnum.Concat(Enumerable.Range(10, lang_val.Length).Select(i => i).ToArray()).ToArray();
|
||||
string filename = Path.GetFileNameWithoutExtension(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
|
||||
string lastTwoChars = filename.Substring(filename.Length - 2);
|
||||
int lang = Array.IndexOf(main_langnum, Array.IndexOf(lang_val, lastTwoChars));
|
||||
|
||||
int lang = Array.IndexOf(lang_val, lastTwoChars);
|
||||
CB_MainLanguage.SelectedIndex = lang >= 0 ? main_langnum[lang] - 1 : ((lastTwoChars == "jp") ? 1 : 0);
|
||||
|
||||
#region HaX
|
||||
|
|
|
@ -529,4 +529,7 @@ http://projectpokemon.org/forums/showthread.php?36986
|
|||
- Fixed: Vivillon Form selection in the Trainer Info editor will now function with refactored code. Thanks KingGengar & Favna!
|
||||
- Fixed: New PKRS capping code will now behave properly. Thanks Favna and evandixon!
|
||||
- Changed: PKRS Days capped at legal limits.
|
||||
- Changed: Forms drop-down and label will be hidden if a Pokémon has no forms.
|
||||
- Changed: Forms drop-down and label will be hidden if a Pokémon has no forms.
|
||||
- Hotfix: Changing the exe name to auto-load a language will now function properly. Thanks supercarotte!
|
||||
- Hotfix: Wondercard QRs with non-held items will no longer error out. Thanks ShinyMeganium!
|
||||
- Hotfix: Prevented export of Eon Ticket Wondercards via QR because extra data has to be altered in order for it to function.
|
|
@ -316,7 +316,7 @@ namespace PKHeX
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
img = (Image)Properties.Resources.ResourceManager.GetObject("item_" + BitConverter.ToUInt16(data, 0x68));
|
||||
img = (Image)(Properties.Resources.ResourceManager.GetObject("item_" + BitConverter.ToUInt16(data, 0x68)) ?? Properties.Resources.unknown);
|
||||
break;
|
||||
default:
|
||||
img = Properties.Resources.unknown;
|
||||
|
@ -342,6 +342,8 @@ namespace PKHeX
|
|||
{
|
||||
if (wondercard_data.SequenceEqual((new byte[wondercard_data.Length])))
|
||||
{ Util.Alert("No wondercard data found"); return; }
|
||||
if (BitConverter.ToUInt16(wondercard_data, 0x68) == 726 && wondercard_data[0x51] == 1)
|
||||
{ Util.Alert("Eon Ticket Wondercards will not function properly", "Inject to the save file instead."); return; }
|
||||
// Prep data
|
||||
byte[] wcdata = wondercard_data;
|
||||
// Ensure size
|
||||
|
|
Loading…
Reference in a new issue