diff --git a/PKHeX.Core/Saves/SAV5B2W2.cs b/PKHeX.Core/Saves/SAV5B2W2.cs index c95ac265d..87b6cff34 100644 --- a/PKHeX.Core/Saves/SAV5B2W2.cs +++ b/PKHeX.Core/Saves/SAV5B2W2.cs @@ -21,7 +21,7 @@ EventFlag = EventConst + 0x35E; Daycare = 0x20D00; PokeDex = 0x21400; - PokeDexLanguageFlags = PokeDex + 0x328; // forme flags size is + 8 from bw with new formes (therians) + PokeDexLanguageFlags = 0x328; // forme flags size is + 8 from bw with new formes (therians) BattleSubway = 0x21B00; CGearInfoOffset = 0x1C000; CGearDataOffset = 0x52800; diff --git a/PKHeX.Core/Saves/SAV5BW.cs b/PKHeX.Core/Saves/SAV5BW.cs index 57ad20f0e..18a29e9af 100644 --- a/PKHeX.Core/Saves/SAV5BW.cs +++ b/PKHeX.Core/Saves/SAV5BW.cs @@ -22,7 +22,7 @@ EventFlag = EventConst + 0x27C; Daycare = 0x20E00; PokeDex = 0x21600; - PokeDexLanguageFlags = PokeDex + 0x320; + PokeDexLanguageFlags = 0x320; BattleSubway = 0x21D00; CGearInfoOffset = 0x1C000; CGearDataOffset = 0x52000; diff --git a/PKHeX.Core/Saves/SAV7.cs b/PKHeX.Core/Saves/SAV7.cs index 19f6d5677..f785a2785 100644 --- a/PKHeX.Core/Saves/SAV7.cs +++ b/PKHeX.Core/Saves/SAV7.cs @@ -142,7 +142,7 @@ namespace PKHeX.Core EventFlag = EventConst + (EventConstMax * 2); // After Event Const (u16)*n HoF = EventFlag + (EventFlagMax / 8); // After Event Flags (1b)*(1u8/8b)*n - PokeDexLanguageFlags = PokeDex + 0x550; + PokeDexLanguageFlags = 0x550; WondercardData = WondercardFlags + 0x100; Played = new PlayTime6(this, PlayTime); @@ -202,7 +202,7 @@ namespace PKHeX.Core // Accessible as SAV7 private int TrainerCard { get; set; } = 0x14000; private int Resort { get; set; } - public int PokeDexLanguageFlags { get; private set; } = int.MinValue; + public int PokeDexLanguageFlags { get; private set; } public int Fashion { get; set; } = int.MinValue; protected int Record { get; set; } = int.MinValue; diff --git a/PKHeX.Core/Saves/Substructures/PokeDex/PokeDex7.cs b/PKHeX.Core/Saves/Substructures/PokeDex/PokeDex7.cs index 31efeb28a..a687f8455 100644 --- a/PKHeX.Core/Saves/Substructures/PokeDex/PokeDex7.cs +++ b/PKHeX.Core/Saves/Substructures/PokeDex/PokeDex7.cs @@ -41,7 +41,7 @@ namespace PKHeX.WinForms Displayed[i] = SetBits(Parent.Data, ofs, SeenDispLen); ofs += SeenDispLen; } - LanguageFlags = SetBits(Parent.Data, Parent.PokeDexLanguageFlags, LanguageLen); + LanguageFlags = SetBits(Parent.Data, Parent.PokeDex + Parent.PokeDexLanguageFlags, LanguageLen); } public void Write() @@ -63,7 +63,7 @@ namespace PKHeX.WinForms SetBits(Displayed[i]).CopyTo(Parent.Data, ofs); ofs += SeenDispLen; } - SetBits(LanguageFlags).CopyTo(Parent.Data, Parent.PokeDexLanguageFlags); + SetBits(LanguageFlags).CopyTo(Parent.Data, Parent.PokeDex + Parent.PokeDexLanguageFlags); } public IEnumerable GetAllFormEntries(int spec) diff --git a/PKHeX.Core/Saves/Substructures/PokeDex/Zukan7.cs b/PKHeX.Core/Saves/Substructures/PokeDex/Zukan7.cs index b5ad46d03..39ca886c5 100644 --- a/PKHeX.Core/Saves/Substructures/PokeDex/Zukan7.cs +++ b/PKHeX.Core/Saves/Substructures/PokeDex/Zukan7.cs @@ -21,7 +21,7 @@ namespace PKHeX.Core private IList FormBaseSpecies; - public Zukan7(SaveFile sav, int dex, int langflag) : base(sav, dex, langflag - dex) + public Zukan7(SaveFile sav, int dex, int langflag) : base(sav, dex, langflag) { DexFormIndexFetcher = SAV.USUM ? (Func) DexFormUtil.GetDexFormIndexSM : DexFormUtil.GetDexFormIndexSM; LoadDexList(); diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Pokedex5.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Pokedex5.cs index 2b51fc720..c9e3621d9 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Pokedex5.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Pokedex5.cs @@ -206,7 +206,7 @@ namespace PKHeX.WinForms // Fill Language arrays byte[] langdata = new byte[LangSize]; - Array.Copy(SAV.Data, SAV.PokeDexLanguageFlags, langdata, 0, LangSize); + Array.Copy(SAV.Data, SAV.PokeDex + SAV.PokeDexLanguageFlags, langdata, 0, LangSize); BitArray LangRegion = new BitArray(langdata); for (int b = 0; b < 493; b++) { @@ -257,7 +257,7 @@ namespace PKHeX.WinForms ldata[i>>3] |= (byte)(1 << (i&7)); } - ldata.CopyTo(SAV.Data, SAV.PokeDexLanguageFlags); + ldata.CopyTo(SAV.Data, SAV.PokeDex + SAV.PokeDexLanguageFlags); } int FormDex = SAV.PokeDex + 0x8 + (brSize * 9); formbools.CopyTo(SAV.Data, FormDex); diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs index 0bebfa81d..b47c6c216 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs @@ -210,7 +210,7 @@ namespace PKHeX.WinForms // Fill Language arrays byte[] langdata = new byte[0x280]; - Array.Copy(SAV.Data, SAV.PokeDexLanguageFlags, langdata, 0, langdata.Length); + Array.Copy(SAV.Data, SAV.PokeDex + SAV.PokeDexLanguageFlags, langdata, 0, langdata.Length); BitArray LangRegion = new BitArray(langdata); for (int b = 0; b < SAV.MaxSpeciesID; b++) // 721 Species { @@ -257,7 +257,7 @@ namespace PKHeX.WinForms ldata[i/8] |= (byte) (1 << i%8); } - ldata.CopyTo(SAV.Data, SAV.PokeDexLanguageFlags); + ldata.CopyTo(SAV.Data, SAV.PokeDex + SAV.PokeDexLanguageFlags); formbools.CopyTo(SAV.Data, SAV.PokeDex + 0x368); @@ -418,7 +418,7 @@ namespace PKHeX.WinForms SetEntry(); SetData(); if (mnuComplete == sender) // Turn off Italian Petlil - SAV.Data[SAV.PokeDexLanguageFlags + 0x1DF] &= 0xFE; + SAV.Data[SAV.PokeDex + SAV.PokeDexLanguageFlags + 0x1DF] &= 0xFE; GetData(); GetEntry(); diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs index 9f7d90cb8..e51b296c4 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs @@ -210,7 +210,7 @@ namespace PKHeX.WinForms // Fill Language arrays byte[] langdata = new byte[0x280]; - Array.Copy(SAV.Data, SAV.PokeDexLanguageFlags, langdata, 0, 0x280); + Array.Copy(SAV.Data, SAV.PokeDex + SAV.PokeDexLanguageFlags, langdata, 0, 0x280); BitArray LangRegion = new BitArray(langdata); for (int b = 0; b < 721; b++) // 721 Species { @@ -265,7 +265,7 @@ namespace PKHeX.WinForms ldata[i / 8] |= (byte)(1 << i % 8); } - ldata.CopyTo(SAV.Data, SAV.PokeDexLanguageFlags); + ldata.CopyTo(SAV.Data, SAV.PokeDex + SAV.PokeDexLanguageFlags); } formbools.CopyTo(SAV.Data, SAV.PokeDex + 0x368); @@ -423,7 +423,7 @@ namespace PKHeX.WinForms SetEntry(); SetData(); if (mnuComplete == sender) // Turn off Italian Petlil - SAV.Data[SAV.PokeDexLanguageFlags + 0x1DF] &= 0xFE; + SAV.Data[SAV.PokeDex + SAV.PokeDexLanguageFlags + 0x1DF] &= 0xFE; GetData(); GetEntry();