Esempio n. 1
0
        public MonHunSave(string fileName)
        {
            using (FileStream fs = new FileStream(fileName, FileMode.Open))
            {
                BinaryReader reader = new BinaryReader(fs);

                // Read character slot offsets
                slotOffsets = new uint[3];
                fs.Seek(0x10, SeekOrigin.Begin);
                for (int i = 0; i < 3; i++)
                {
                    slotOffsets[i] = reader.ReadUInt32();
                }

                // read character slots
                MemoryStream[] ms = new MemoryStream[3];
                slots = new MonHunCharacter[3];
                for (int i = 0; i < 3; i++)
                {
                    // Read a character
                    fs.Seek(slotOffsets[i], SeekOrigin.Begin);
                    ms[i]    = new MemoryStream(reader.ReadBytes(0xEB52C));
                    slots[i] = new MonHunCharacter(ms[i]);
                }
            }
        }
Esempio n. 2
0
        private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            selSlot = _save.slots[toolStripComboBox1.SelectedIndex];

            textBoxName.Text     = selSlot.name;
            textBoxPlayTime.Text = selSlot.playTime.ToString();
            textBoxZenny.Text    = selSlot.Funds.ToString();
            textBoxRank.Text     = selSlot.hr.ToString();

            textBoxRankPoints.Text    = selSlot.hrPoints.ToString();
            textBoxAcademyPoints.Text = selSlot.academyPoints.ToString();
            textBoxBerunaPoints.Text  = selSlot.berunaPoints.ToString();
            textBoxKokotoPoints.Text  = selSlot.kokotoPoints.ToString();
            textBoxPokkePoints.Text   = selSlot.pokkePoints.ToString();
            textBoxYukumoPoints.Text  = selSlot.yukumoPoints.ToString();

            labelCharacterWeapon.Text       = selSlot.equippedWeapon.ID;
            pictureBoxCharacterWeapon.Image = selSlot.equippedWeapon.GetIcon();

            checkBoxItemBoxP11.Checked  = selSlot.ItemBoxP11Unlocked;
            checkBoxItemBoxP12.Checked  = selSlot.ItemBoxP12Unlocked;
            checkBoxPalicoBoxP6.Checked = selSlot.PalicoBoxP6Unlocked;
            checkBoxPalicoBoxP7.Checked = selSlot.PalicoBoxP7Unlocked;

            textBoxCraftableArmors.Text = selSlot.Craftables.UnlockedArmorCount.ToString();
            textBoxMeals.Text           = selSlot.Meals.CountUnlocked.ToString();
            textBoxComboList.Text       = selSlot.Combolist.CountUnlocked.ToString();

            monHunItemBindingSource.Clear();
            foreach (var item in selSlot.itemBox)
            {
                monHunItemBindingSource.Add(item);
            }

            monHunEquipBindingSource.Clear();
            foreach (var item in selSlot.equipBox)
            {
                monHunEquipBindingSource.Add(item);
            }
        }
Esempio n. 3
0
 private void textBoxName_TextChanged(object sender, EventArgs e)
 {
     selSlot      = _save.slots[toolStripComboBox1.SelectedIndex];
     selSlot.name = textBoxName.Text;
 }