Example #1
0
        private void setEntry()
        {
            if (species < 0)
            {
                return;
            }

            specbools[0, species - 1] = CHK_P1.Checked;
            specbools[1, species - 1] = CHK_P2.Checked;
            specbools[2, species - 1] = CHK_P3.Checked;
            specbools[3, species - 1] = CHK_P4.Checked;
            specbools[4, species - 1] = CHK_P5.Checked;
            specbools[5, species - 1] = CHK_P6.Checked;
            specbools[6, species - 1] = CHK_P7.Checked;
            specbools[7, species - 1] = CHK_P8.Checked;
            specbools[8, species - 1] = CHK_P9.Checked;
            if (CHK_F1.Enabled) // species < 650 // (1-649)
            {
                foreignbools[species - 1] = CHK_F1.Checked;
            }

            langbools[0, species - 1] = CHK_L1.Checked;
            langbools[1, species - 1] = CHK_L2.Checked;
            langbools[2, species - 1] = CHK_L3.Checked;
            langbools[3, species - 1] = CHK_L4.Checked;
            langbools[4, species - 1] = CHK_L5.Checked;
            langbools[5, species - 1] = CHK_L6.Checked;
            langbools[6, species - 1] = CHK_L7.Checked;

            int fc = SAV.Personal[species].FormeCount;
            int f  = SaveUtil.getDexFormIndexORAS(species, fc);

            if (f < 0)
            {
                return;
            }

            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen
            {
                formbools[f + i + 0 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i);
            }
            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++)  // Seen Shiny
            {
                formbools[f + i + 1 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i + CLB_FormsSeen.Items.Count / 2);
            }

            editing = true;
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed
            {
                formbools[f + i + 2 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i);
            }
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++)  // Displayed Shiny
            {
                formbools[f + i + 3 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i + CLB_FormDisplayed.Items.Count / 2);
            }
            editing = false;
        }
Example #2
0
    private void SetEntry()
    {
        if (species < 0)
        {
            return;
        }

        var Dex = SAV.Zukan;

        Dex.SetCaught(species, CP[0].Checked);
        for (int i = 0; i < 4; i++)
        {
            Dex.SetSeen(species, i, CP[i + 1].Checked);
        }

        for (int i = 0; i < 4; i++)
        {
            Dex.SetDisplayed(species - 1, i, CP[i + 5].Checked);
        }

        if (species <= 493)
        {
            for (int i = 0; i < 7; i++)
            {
                Dex.SetLanguageFlag(species - 1, i, CL[i].Checked);
            }
        }

        int fc = SAV.Personal[species].FormCount;
        int f  = SAV is SAV5B2W2?DexFormUtil.GetDexFormIndexB2W2(species, fc) : DexFormUtil.GetDexFormIndexBW(species, fc);

        if (f < 0)
        {
            return;
        }

        for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen
        {
            Dex.SetFormFlag(f + i, 0, CLB_FormsSeen.GetItemChecked(i));
        }
        for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++)  // Seen Shiny
        {
            Dex.SetFormFlag(f + i, 1, CLB_FormsSeen.GetItemChecked(i + (CLB_FormsSeen.Items.Count / 2)));
        }

        editing = true;
        for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed
        {
            Dex.SetFormFlag(f + i, 2, CLB_FormDisplayed.GetItemChecked(i));
        }
        for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++)  // Displayed Shiny
        {
            Dex.SetFormFlag(f + i, 3, CLB_FormDisplayed.GetItemChecked(i + (CLB_FormDisplayed.Items.Count / 2)));
        }
        editing = false;
    }
Example #3
0
        private void SetEntry()
        {
            if (species < 0)
            {
                return;
            }

            specbools[0, species - 1] = CHK_P1.Checked;
            specbools[1, species - 1] = CHK_P2.Checked;
            specbools[2, species - 1] = CHK_P3.Checked;
            specbools[3, species - 1] = CHK_P4.Checked;
            specbools[4, species - 1] = CHK_P5.Checked;
            specbools[5, species - 1] = CHK_P6.Checked;
            specbools[6, species - 1] = CHK_P7.Checked;
            specbools[7, species - 1] = CHK_P8.Checked;
            specbools[8, species - 1] = CHK_P9.Checked;

            langbools[0, species - 1] = CHK_L1.Checked;
            langbools[1, species - 1] = CHK_L2.Checked;
            langbools[2, species - 1] = CHK_L3.Checked;
            langbools[3, species - 1] = CHK_L4.Checked;
            langbools[4, species - 1] = CHK_L5.Checked;
            langbools[5, species - 1] = CHK_L6.Checked;
            langbools[6, species - 1] = CHK_L7.Checked;

            BitConverter.GetBytes((ushort)Math.Min(0xFFFF, Util.ToUInt32(MT_Count.Text))).CopyTo(SAV.Data, SAV.EncounterCount + (species - 1) * 2);

            int fc = SAV.Personal[species].FormeCount;
            int f  = SaveUtil.GetDexFormIndexORAS(species, fc);

            if (f < 0)
            {
                return;
            }

            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen
            {
                formbools[f + i + 0 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i);
            }
            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++)  // Seen Shiny
            {
                formbools[f + i + 1 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i + CLB_FormsSeen.Items.Count / 2);
            }

            editing = true;
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed
            {
                formbools[f + i + 2 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i);
            }
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++)  // Displayed Shiny
            {
                formbools[f + i + 3 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i + CLB_FormDisplayed.Items.Count / 2);
            }
            editing = false;
        }
Example #4
0
        private void SetEntry()
        {
            if (species < 0)
            {
                return;
            }

            Zukan.SetCaught(species, CP[0].Checked);
            for (int i = 0; i < 4; i++)
            {
                Zukan.SetSeen(species, i, CP[i + 1].Checked);
            }
            for (int i = 0; i < 4; i++)
            {
                Zukan.SetDisplayed(species - 1, i, CP[i + 5].Checked);
            }

            for (int i = 0; i < CL.Length; i++)
            {
                Zukan.SetLanguageFlag(species - 1, i, CL[i].Checked);
            }

            if (CHK_F1.Enabled) // species < 650 // (1-649)
            {
                Zukan.SetForeignFlag(species - 1, CHK_F1.Checked);
            }

            int fc = SAV.Personal[species].FormeCount;
            int f  = DexFormUtil.GetDexFormIndexORAS(species, fc);

            if (f < 0)
            {
                return;
            }

            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen
            {
                Zukan.SetFormFlag(f, 0, CLB_FormsSeen.GetItemChecked(i));
            }
            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++)  // Seen Shiny
            {
                Zukan.SetFormFlag(f, 1, CLB_FormsSeen.GetItemChecked(i + (CLB_FormsSeen.Items.Count / 2)));
            }

            editing = true;
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed
            {
                Zukan.SetFormFlag(f, 2, CLB_FormDisplayed.GetItemChecked(i));
            }
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++)  // Displayed Shiny
            {
                Zukan.SetFormFlag(f, 3, CLB_FormDisplayed.GetItemChecked(i + (CLB_FormDisplayed.Items.Count / 2)));
            }
            editing = false;
        }
Example #5
0
        private void SetEntry()
        {
            if (species < 0)
            {
                return;
            }

            Zukan.SetCaught(species, CP[0].Checked);
            for (int i = 0; i < 4; i++)
            {
                Zukan.SetSeen(species, i, CP[i + 1].Checked);
            }
            for (int i = 0; i < 4; i++)
            {
                Zukan.SetDisplayed(species - 1, i, CP[i + 5].Checked);
            }

            for (int i = 0; i < CL.Length; i++)
            {
                Zukan.SetLanguageFlag(species - 1, i, CL[i].Checked);
            }

            ushort count = (ushort)Math.Min(0xFFFF, Util.ToUInt32(MT_Count.Text));

            Zukan.SetEncounterCount(species - 1, count);

            int fc = SAV.Personal[species].FormeCount;
            int f  = DexFormUtil.GetDexFormIndexORAS(species, fc);

            if (f < 0)
            {
                return;
            }

            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen
            {
                Zukan.SetFormFlag(f, 0, CLB_FormsSeen.GetItemChecked(i));
            }
            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++)  // Seen Shiny
            {
                Zukan.SetFormFlag(f, 1, CLB_FormsSeen.GetItemChecked(i + (CLB_FormsSeen.Items.Count / 2)));
            }

            editing = true;
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed
            {
                Zukan.SetFormFlag(f, 2, CLB_FormDisplayed.GetItemChecked(i));
            }
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++)  // Displayed Shiny
            {
                Zukan.SetFormFlag(f, 3, CLB_FormDisplayed.GetItemChecked(i + (CLB_FormDisplayed.Items.Count / 2)));
            }
            editing = false;
        }
Example #6
0
        private void SetEntry()
        {
            if (species < 0)
            {
                return;
            }

            for (int i = 0; i < 9; i++)
            {
                specbools[i, species - 1] = CP[i].Checked;
            }

            if (species <= 493)
            {
                for (int i = 0; i < 7; i++)
                {
                    langbools[i, species - 1] = CL[i].Checked;
                }
            }

            int fc = SAV.Personal[species].FormeCount;
            int f  = SAV.B2W2 ? SaveUtil.GetDexFormIndexB2W2(species, fc) : SaveUtil.GetDexFormIndexBW(species, fc);

            if (f < 0)
            {
                return;
            }

            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen
            {
                formbools[f + i + 0 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i);
            }
            for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++)  // Seen Shiny
            {
                formbools[f + i + 1 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i + CLB_FormsSeen.Items.Count / 2);
            }

            editing = true;
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed
            {
                formbools[f + i + 2 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i);
            }
            for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++)  // Displayed Shiny
            {
                formbools[f + i + 3 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i + CLB_FormDisplayed.Items.Count / 2);
            }
            editing = false;
        }