Ejemplo n.º 1
0
        private void setEntry()
        {
            if (entry < 0)
            {
                return;
            }
            if (debugToolDumping)
            {
                return;
            }

            // Set the data back into the class object
            // Currently only the first two files.
            setZoneData(); // File 0
            setOWSData();
            // setMSData();
            // setEncounterData();
            // if (Main.oras)
            //     setUnknown();

            // Reassemble files
            byte[][] data = CurrentZone.Write();

            // Debug Check (can stay, why not.)
            if (!locationData.Where((t, i) => !data[i].SequenceEqual(t)).Any())
            {
                return;
            }

            // Util.Alert("Zone has been edited!");
            System.Media.SystemSounds.Asterisk.Play();

            // Package the files into the permanent package file.
            byte[] raw = CTR.mini.packMini(data, "ZO");
            File.WriteAllBytes(filepaths[entry], raw);
        }