Exemplo n.º 1
0
        private void B_Save_Click(object sender, EventArgs e)
        {
            if (tabControl1.Controls.Contains(TAB_Joyful) && SAV is IGen3Joyful j)
            {
                SaveJoyful(j);
            }
            if (tabControl1.Controls.Contains(TAB_Ferry))
            {
                SaveFerry();
            }
            if (tabControl1.Controls.Contains(TAB_BF))
            {
                SaveBattleFrontier();
            }
            if (SAV is SAV3FRLG frlg)
            {
                frlg.RivalName = TB_RivalName.Text;
                ComboBox[] cba = { CB_TCM1, CB_TCM2, CB_TCM3, CB_TCM4, CB_TCM5, CB_TCM6 };
                for (int i = 0; i < cba.Length; i++)
                {
                    SAV.SetEventConst(0x43 + i, (ushort)(int)cba[i].SelectedValue);
                }
            }

            if (SAV is SAV3E se)
            {
                se.BP = (ushort)NUD_BP.Value;
            }
            SAV.Coin = (ushort)NUD_Coins.Value;

            Origin.CopyChangesFrom(SAV);
            Close();
        }
Exemplo n.º 2
0
        private void B_Save_Click(object sender, EventArgs e)
        {
            if (tabControl1.Controls.Contains(TAB_Joyful))
            {
                SaveJoyful();
            }
            if (tabControl1.Controls.Contains(TAB_Ferry))
            {
                SaveFerry();
            }
            if (tabControl1.Controls.Contains(TAB_BF))
            {
                SaveBattleFrontier();
            }
            if (SAV.FRLG)
            {
                SAV.SetData(SAV.Large, SAV.SetString(TB_RivalName.Text, TB_RivalName.MaxLength), 0x3A4C);
                ComboBox[] cba = { CB_TCM1, CB_TCM2, CB_TCM3, CB_TCM4, CB_TCM5, CB_TCM6 };
                for (int i = 0; i < cba.Length; i++)
                {
                    SAV.SetEventConst(0x43 + i, (ushort)(int)cba[i].SelectedValue);
                }
            }

            if (!SAV.RS)
            {
                SAV.BP = (ushort)NUD_BP.Value;
            }
            SAV.Coin = (ushort)NUD_Coins.Value;

            Origin.CopyChangesFrom(SAV);
            Close();
        }