mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Read swarm slots correctly
This commit is contained in:
parent
367859c536
commit
2e8586f364
1 changed files with 5 additions and 3 deletions
|
@ -9,14 +9,16 @@ namespace PKHeX.Core
|
|||
/// </summary>
|
||||
internal static class Encounters3
|
||||
{
|
||||
private static readonly EncounterArea3[] SlotsSwarmRSE = Get("rse_swarm", "rs", RSE);
|
||||
private static readonly EncounterArea3[] SlotsSwarmRSE = GetSwarm("rse_swarm", "rs", RSE);
|
||||
internal static readonly EncounterArea3[] SlotsR = ArrayUtil.ConcatAll(Get("r", "ru", R), SlotsSwarmRSE);
|
||||
internal static readonly EncounterArea3[] SlotsS = ArrayUtil.ConcatAll(Get("s", "sa", S), SlotsSwarmRSE);
|
||||
internal static readonly EncounterArea3[] SlotsE = ArrayUtil.ConcatAll(Get("e", "em", E), SlotsSwarmRSE);
|
||||
internal static readonly EncounterArea3[] SlotsFR = Get("fr", "fr", FR);
|
||||
internal static readonly EncounterArea3[] SlotsLG = Get("lg", "lg", LG);
|
||||
private static EncounterArea3[] Get(string resource, string ident, GameVersion game)
|
||||
=> EncounterArea3.GetAreas(BinLinker.Unpack(Util.GetBinaryResource($"encounter_{resource}.pkl"), ident), game);
|
||||
|
||||
private static byte[][] ReadUnpack(string resource, string ident) => BinLinker.Unpack(Util.GetBinaryResource($"encounter_{resource}.pkl"), ident);
|
||||
private static EncounterArea3[] Get(string resource, string ident, GameVersion game) => EncounterArea3.GetAreas(ReadUnpack(resource, ident), game);
|
||||
private static EncounterArea3[] GetSwarm(string resource, string ident, GameVersion game) => EncounterArea3.GetAreasSwarm(ReadUnpack(resource, ident), game);
|
||||
|
||||
static Encounters3()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue