Exemplo n.º 1
0
        // Add costume
        private void addCostumeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dppPath == "[null]" || pspPath == "[null]" || cspPath == "[null]")
            {
                MessageBox.Show("Please select your default paths (dpp, psp and csp) to use this function.");
                return;
            }

            Tool_AddCostume add = new Tool_AddCostume(this);

            add.ShowDialog();
        }
Exemplo n.º 2
0
        void ImportCostume(byte[] fileBytes, string filepath)
        {
            int    actualindex = 6;
            string basechar    = "";
            string costname    = "";

            byte[] costfile = new byte[0];

            basechar    = Main.b_ReadString(fileBytes, actualindex);
            actualindex = actualindex + basechar.Length + 1;

            costname    = Main.b_ReadString(fileBytes, actualindex);
            actualindex = actualindex + costname.Length + 1;

            int fileLen = Main.b_ReadInt(fileBytes, actualindex);

            actualindex = actualindex + 4;

            costfile = Main.b_ReadByteArray(fileBytes, actualindex, fileLen);
            File.WriteAllBytes(datawin32Path + "/spc/" + costname + "bod1.xfbin", costfile);

            Tool_AddCostume t = new Tool_AddCostume(this);

            t.w_base.Text  = basechar;
            t.w_model.Text = costname;
            int ret = t.AddCostume();

            switch (ret)
            {
            case 1:
                MessageBox.Show("Error importing " + filepath + ": base character " + basechar + " not found in duelPlayerParam.");
                break;

            case 2:
                MessageBox.Show("Error importing " + filepath + ": base character " + basechar + " has its costume list full.");
                break;

            case 3:
                MessageBox.Show("Error importing " + filepath + ": base character " + basechar + " not found in playerSettingParam.");
                break;

            case 4:
                MessageBox.Show("Error importing " + filepath + ": base character " + basechar + " not found in characterSelectParam.");
                break;
            }
        }