2022-06-18 18:04:24 +00:00
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Encounter data from <see cref="GameVersion.GO"/>, which has multiple generations of origin.
|
|
|
|
|
/// </summary>
|
2021-09-22 02:42:14 +00:00
|
|
|
|
#if !DEBUG
|
2020-11-11 06:10:53 +00:00
|
|
|
|
internal static class EncountersGO
|
|
|
|
|
{
|
2020-11-27 20:14:13 +00:00
|
|
|
|
internal const int MAX_LEVEL = 50;
|
2020-11-13 04:41:01 +00:00
|
|
|
|
|
2022-02-05 01:20:56 +00:00
|
|
|
|
internal static readonly EncounterArea7g[] SlotsGO_GG = EncounterArea7g.GetArea(EncounterUtil.Get("go_lgpe", "go"));
|
|
|
|
|
internal static readonly EncounterArea8g[] SlotsGO = EncounterArea8g.GetArea(EncounterUtil.Get("go_home", "go"));
|
2020-11-11 06:10:53 +00:00
|
|
|
|
}
|
2021-09-22 02:42:14 +00:00
|
|
|
|
#else
|
2022-06-18 18:04:24 +00:00
|
|
|
|
public static class EncountersGO
|
|
|
|
|
{
|
|
|
|
|
internal const int MAX_LEVEL = 50;
|
2021-09-22 02:42:14 +00:00
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
|
internal static EncounterArea7g[] SlotsGO_GG = EncounterArea7g.GetArea(Get("go_lgpe", "go"));
|
|
|
|
|
internal static EncounterArea8g[] SlotsGO = EncounterArea8g.GetArea(Get("go_home", "go"));
|
2021-09-22 02:42:14 +00:00
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
|
public static void Reload()
|
|
|
|
|
{
|
|
|
|
|
SlotsGO_GG = EncounterArea7g.GetArea(Get("go_lgpe", "go"));
|
|
|
|
|
SlotsGO = EncounterArea8g.GetArea(Get("go_home", "go"));
|
|
|
|
|
}
|
2021-09-22 02:42:14 +00:00
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
|
private static BinLinkerAccessor Get(string resource, string ident)
|
|
|
|
|
{
|
|
|
|
|
var name = $"encounter_{resource}.pkl";
|
|
|
|
|
var data = System.IO.File.Exists(name) ? System.IO.File.ReadAllBytes(name) : Util.GetBinaryResource(name);
|
|
|
|
|
return BinLinkerAccessor.Get(data, ident);
|
2021-09-22 02:42:14 +00:00
|
|
|
|
}
|
2020-11-11 06:10:53 +00:00
|
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
|
#endif
|