mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Add R/S roamer data offset
is different from emerald Thanks TetsuyaGR! https://projectpokemon.org/home/forums/topic/44407-bug-rubysapphire-roamer-bug/ (use concatall in encounters4)
This commit is contained in:
parent
75dbec6038
commit
88ce27f26b
|
|
@ -208,7 +208,7 @@ internal static void ReduceAreasSize(ref EncounterArea[] Areas)
|
|||
}).ToArray();
|
||||
}
|
||||
|
||||
internal static T[] ConcatAll<T>(params T[][] arr) => arr.SelectMany(z => z).ToArray();
|
||||
internal static T[] ConcatAll<T>(params IEnumerable<T>[] arr) => arr.SelectMany(z => z).ToArray();
|
||||
|
||||
internal static void MarkEncounterAreaArray(params EncounterArea[][] areas)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -895,11 +895,12 @@ private static void MarkHGSSEncounterTypeSlots(ref EncounterArea[] Areas)
|
|||
new EncounterStaticTyped { Species = 484, Level = 01, Location = 231, Gift = true, TypeEncounter = EncounterType.Starter_Fossil_Gift_Pt_DPTrio }, //Palkia @ Sinjoh Ruins
|
||||
new EncounterStaticTyped { Species = 487, Level = 01, Location = 231, Gift = true, TypeEncounter = EncounterType.Starter_Fossil_Gift_Pt_DPTrio, Form = 1 }, //Giratina @ Sinjoh Ruins
|
||||
};
|
||||
private static readonly EncounterStatic[] Encounter_HGSS = Encounter_HGSS_KantoRoam_Grass.SelectMany(e => e.Clone(Roaming_MetLocation_HGSS_Kanto_Grass)).Concat(
|
||||
Encounter_HGSS_KantoRoam_Surf.SelectMany(e => e.Clone(Roaming_MetLocation_HGSS_Kanto_Surf))).Concat(
|
||||
Encounter_HGSS_JohtoRoam_Grass.SelectMany(e => e.Clone(Roaming_MetLocation_HGSS_Johto_Grass))).Concat(
|
||||
Encounter_HGSS_JohtoRoam_Surf.SelectMany(e => e.Clone(Roaming_MetLocation_HGSS_Johto_Surf))).Concat(
|
||||
Encounter_HGSS_Regular).ToArray();
|
||||
private static readonly EncounterStatic[] Encounter_HGSS = ConcatAll(
|
||||
Encounter_HGSS_KantoRoam_Grass.SelectMany(e => e.Clone(Roaming_MetLocation_HGSS_Kanto_Grass)),
|
||||
Encounter_HGSS_KantoRoam_Surf.SelectMany(e => e.Clone(Roaming_MetLocation_HGSS_Kanto_Surf)),
|
||||
Encounter_HGSS_JohtoRoam_Grass.SelectMany(e => e.Clone(Roaming_MetLocation_HGSS_Johto_Grass)),
|
||||
Encounter_HGSS_JohtoRoam_Surf.SelectMany(e => e.Clone(Roaming_MetLocation_HGSS_Johto_Surf)),
|
||||
Encounter_HGSS_Regular);
|
||||
#endregion
|
||||
#region Trade Tables
|
||||
internal static readonly string[] RanchOTNames = { null, "ユカリ", "Hayley", "EULALIE", "GIULIA", "EUKALIA", null, "Eulalia" };
|
||||
|
|
|
|||
|
|
@ -13,9 +13,11 @@ public Roamer3(SAV3 sav)
|
|||
SAV = sav;
|
||||
Offset = sav.GetBlockOffset(4);
|
||||
if (GameVersion.FRLG.Contains(SAV.Version))
|
||||
Offset += 0x250; // 0x250 - FRLG
|
||||
else
|
||||
Offset += 0x35C; // 0x35C - RSE
|
||||
Offset += 0x250;
|
||||
else if (SAV.Version == GameVersion.E)
|
||||
Offset += 0x35C;
|
||||
else // RS
|
||||
Offset += 0x2C4;
|
||||
IsGlitched = SAV.Version != GameVersion.E;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user