示例#1
0
        void save_edits()
        {
            ECT_editor.ectfile.setData(BitConverter.GetBytes((UInt16)item_box.SelectedIndex).ToArray(), pk + 0x2);

            ECT_editor.ectfile.setData(StringConverter.SetG3Str(namebox.Text, jap_check.Checked), pk + 0x20);

            ECT_editor.ectfile.setData(BitConverter.GetBytes((UInt16)move1.SelectedIndex).ToArray(), pk + 0x4);
            ECT_editor.ectfile.setData(BitConverter.GetBytes((UInt16)move2.SelectedIndex).ToArray(), pk + 0x6);
            ECT_editor.ectfile.setData(BitConverter.GetBytes((UInt16)move3.SelectedIndex).ToArray(), pk + 0x8);
            ECT_editor.ectfile.setData(BitConverter.GetBytes((UInt16)move4.SelectedIndex).ToArray(), pk + 0xA);

            PPUP_1 = (int)pp1.Value;
            PPUP_2 = (int)pp1.Value;
            PPUP_3 = (int)pp1.Value;
            PPUP_4 = (int)pp1.Value;

            ECT_editor.ectfile.Data[pk + 0x0C] = (byte)level.Value;
            ECT_editor.ectfile.Data[pk + 0x2B] = (byte)friendship.Value;

            ECT_editor.ectfile.setData(BitConverter.GetBytes((UInt16)otid.Value).ToArray(), pk + 0x14);
            ECT_editor.ectfile.setData(BitConverter.GetBytes((UInt16)otsid.Value).ToArray(), pk + 0x16);

            ECT_editor.ectfile.setData(BitConverter.GetBytes((UInt32)pid.Value).ToArray(), pk + 0x1c);


            ECT_editor.ectfile.Data[pk + 0x0E] = (byte)ev1.Value;
            ECT_editor.ectfile.Data[pk + 0x0F] = (byte)ev2.Value;
            ECT_editor.ectfile.Data[pk + 0x10] = (byte)ev3.Value;
            ECT_editor.ectfile.Data[pk + 0x11] = (byte)ev4.Value;
            ECT_editor.ectfile.Data[pk + 0x12] = (byte)ev5.Value;
            ECT_editor.ectfile.Data[pk + 0x13] = (byte)ev6.Value;


            IV_HP  = (int)iv1.Value;
            IV_ATK = (int)iv1.Value;
            IV_DEF = (int)iv3.Value;
            IV_SPE = (int)iv4.Value;
            IV_SPA = (int)iv5.Value;
            IV_SPD = (int)iv6.Value;

            IV_Ability = (int)ability.Value;
        }
示例#2
0
        void set_ectData()
        {
            ectfile.Data[0]   = (byte)tower_appearance_num.Value;
            ectfile.Data[0x1] = (byte)trainer_class_value.Value;
            ectfile.Data[0x2] = (byte)tower_floor.Value;

            ectfile.setData(StringConverter.SetG3Str(name.Text, jap_check.Checked), (int)0x04);

            ectfile.setData(BitConverter.GetBytes((UInt16)TID.Value).ToArray(), (int)0xC);
            ectfile.setData(BitConverter.GetBytes((UInt16)SID.Value).ToArray(), (int)0xC);

            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textA1.SelectedIndex]), 0x10);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textA2.SelectedIndex]), 0x12);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textA3.SelectedIndex]), 0x14);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textA4.SelectedIndex]), 0x16);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textA5.SelectedIndex]), 0x18);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textA6.SelectedIndex]), 0x1A);

            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textB1.SelectedIndex]), 0x1C);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textB2.SelectedIndex]), 0x1E);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textB3.SelectedIndex]), 0x20);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textB4.SelectedIndex]), 0x22);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textB5.SelectedIndex]), 0x24);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textB6.SelectedIndex]), 0x26);

            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textC1.SelectedIndex]), 0x28);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textC2.SelectedIndex]), 0x2A);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textC3.SelectedIndex]), 0x2C);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textC4.SelectedIndex]), 0x2E);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textC5.SelectedIndex]), 0x30);
            ectfile.setData(BitConverter.GetBytes(easy_chat_IDs[textC6.SelectedIndex]), 0x32);

            ectfile.setData(BitConverter.GetBytes((UInt16)pkm1.SelectedIndex).ToArray(), 0x34);
            ectfile.setData(BitConverter.GetBytes((UInt16)pkm2.SelectedIndex).ToArray(), 0x60);
            ectfile.setData(BitConverter.GetBytes((UInt16)pkm3.SelectedIndex).ToArray(), 0x8C);
        }