コード例 #1
0
        private void salvarStrDefbinToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                using (SaveFileDialog save = new SaveFileDialog())
                {
                    save.Filter = "*.bin|*.bin";
                    save.Title  = "Selecione onde deseja salvar sua strdef.bin";
                    save.ShowDialog();

                    if (save.FileName != "")
                    {
                        External.g_pStrdef.Checksum = 26115295;


                        byte[] toSave = Pak.ToByteArray(External.g_pStrdef);

                        for (int i = 0; i < toSave.Length - 4; i++)
                        {
                            toSave[i] ^= 0x5A;
                        }

                        File.Create(save.FileName).Close();
                        File.WriteAllBytes(save.FileName, toSave);

                        MessageBox.Show($"Arquivo {save.FileName} salvo com sucesso!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #2
0
        private void salvarSkillDatabinToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                using (SaveFileDialog save = new SaveFileDialog())
                {
                    save.Filter = "*.bin|*.bin";
                    save.Title  = "Selecione onde deseja salvar sua SkillData.bin";
                    save.ShowDialog();

                    if (save.FileName != "")
                    {
                        byte[] toSave   = Pak.ToByteArray(External.g_pSkillData);
                        byte[] pKeyList = File.ReadAllBytes("./Keys.bin");
                        Array.Resize(ref pKeyList, pKeyList.Length + 1);



                        for (int i = 0; i < toSave.Length; i++)
                        {
                            toSave[i] ^= (pKeyList[i & 63]);
                        }


                        File.Create(save.FileName).Close();
                        File.WriteAllBytes(save.FileName, toSave);

                        MessageBox.Show($"Arquivo {save.FileName} salvo com sucesso!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #3
0
        public void SalvaritemIconBIN()
        {
            try
            {
                using (SaveFileDialog save = new SaveFileDialog())
                {
                    save.Filter = "*.bin|*.bin";
                    save.Title  = "Selecione onde deseja salvar sua ItemIcon.bin";
                    save.ShowDialog();

                    if (save.FileName != "")
                    {
                        byte[] toSave = Pak.ToByteArray(this.ItemIcon);
                        File.Create(save.FileName).Close();
                        File.WriteAllBytes(save.FileName, toSave);
                        MessageBox.Show($"Arquivo {save.FileName} salvo no modo Encode com sucesso!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }