mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-02 05:46:47 -05:00
add dumper optional code
Generates encounter binary information for PKHeX
This commit is contained in:
@@ -371,6 +371,16 @@ private void parse(byte[] ed)
|
||||
min[i].Value = data[2];
|
||||
max[i].Value = data[3];
|
||||
}
|
||||
|
||||
#if DUMPER
|
||||
int r = CB_LocationID.SelectedIndex * 56 + 0x1C;
|
||||
int loc = zonedata[r] + 0x100 * (zonedata[r + 1] & 1);
|
||||
byte[] edata = BitConverter.GetBytes((ushort) loc).Concat(ed).ToArray();
|
||||
|
||||
if (!Directory.Exists("encounter_ao"))
|
||||
Directory.CreateDirectory("encounter_ao");
|
||||
File.WriteAllBytes(Path.Combine("encounter_ao", loc.ToString("000") + CB_LocationID.SelectedIndex.ToString("000") + ".bin"), edata);
|
||||
#endif
|
||||
}
|
||||
private int[] pslot(byte[] slot) // Parse Slot to Bytes
|
||||
{
|
||||
|
||||
@@ -363,6 +363,16 @@ private void parse(byte[] ed)
|
||||
min[i].Value = data[2];
|
||||
max[i].Value = data[3];
|
||||
}
|
||||
|
||||
#if DUMPER
|
||||
int r = CB_LocationID.SelectedIndex * 56 + 0x1C;
|
||||
int loc = zonedata[r] + 0x100 * (zonedata[r + 1] & 1);
|
||||
byte[] edata = BitConverter.GetBytes((ushort)loc).Concat(ed).ToArray();
|
||||
|
||||
if (!Directory.Exists("encounter_xy"))
|
||||
Directory.CreateDirectory("encounter_xy");
|
||||
File.WriteAllBytes(Path.Combine("encounter_xy", loc.ToString("000") + CB_LocationID.SelectedIndex.ToString("000") + ".bin"), edata);
|
||||
#endif
|
||||
}
|
||||
private int[] pslot(byte[] slot)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user