diff --git a/pk3DS/Subforms/RSWE.cs b/pk3DS/Subforms/RSWE.cs index bdfc4b5..346549e 100644 --- a/pk3DS/Subforms/RSWE.cs +++ b/pk3DS/Subforms/RSWE.cs @@ -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 { diff --git a/pk3DS/Subforms/XYWE.cs b/pk3DS/Subforms/XYWE.cs index 64e2336..7c5a690 100644 --- a/pk3DS/Subforms/XYWE.cs +++ b/pk3DS/Subforms/XYWE.cs @@ -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) {