Exemple #1
0
        public void SaveItemListCSV()
        {
            try
            {
                using (SaveFileDialog save = new SaveFileDialog())
                {
                    save.Filter = "*.csv|*.csv";
                    save.Title  = "Selecione onde deseja salvar sua ItemList.csv";
                    save.ShowDialog();

                    if (save.FileName != "")
                    {
                        File.Create(save.FileName).Close();

                        List <string> Itens = new List <string>();
                        ComboBox      Combo = new ComboBox();
                        string        Temp  = "";

                        Defines.ItemEffects(Combo);

                        for (int i = 0; i < 6500; i++)
                        {
                            st_ItemListItem Item = this.List.Item[i];

                            if (Item.Name != "")
                            {
                                Temp = $"{i},{Item.Name},{Item.Mesh}.{Item.Texture},{Item.Level}.{Item.Str}.{Item.Int}.{Item.Dex}.{Item.Con},{Item.Unique},{Item.Price},{Item.Pos},{Item.Extreme},{Item.Grade},{Item.MountType},{Item.MountData}";

                                for (int j = 0; j < Item.Effect.Length; j++)
                                {
                                    if (Item.Effect[j].Index != 0 && Item.Effect[j].Index > 0 && Item.Effect[j].Index < Combo.Items.Count)
                                    {
                                        if (Item.Effect[j].Index == 0)
                                        {
                                            continue;
                                        }
                                        Temp += $",{Combo.Items[Item.Effect[j].Index]},{Item.Effect[j].Value}";
                                    }
                                }

                                Itens.Add(Temp);
                            }
                        }

                        File.WriteAllLines(save.FileName, Itens);

                        MessageBox.Show($"Arquivo {save.FileName} salvo com sucesso!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #2
0
        public void SaveItemNameCSV()
        {
            try
            {
                using (SaveFileDialog save = new SaveFileDialog())
                {
                    save.Filter = "*.csv|*.csv";
                    save.Title  = "Selecione onde deseja salvar sua ItemName.csv";
                    save.ShowDialog();

                    if (save.FileName != "")
                    {
                        File.Create(save.FileName).Close();

                        List <string> Itens = new List <string>();
                        ComboBox      Combo = new ComboBox();
                        string        Temp  = "";

                        Defines.ItemEffects(Combo);

                        for (int i = 0; i < 6500; i++)
                        {
                            st_ItemListItem _Item     = this.List.Item[i];
                            st_ItemNameItem _itemName = this.SaveItemName.Item[i];

                            if (!string.IsNullOrEmpty(_Item.Name) && !string.IsNullOrEmpty(_itemName.Name))
                            {
                                Temp = $"{i} {_Item.Name} {_itemName.Name}";
                            }
                            else
                            {
                                continue;
                            }


                            Itens.Add(Temp);
                        }

                        File.WriteAllLines(save.FileName, Itens);

                        MessageBox.Show($"Arquivo {save.FileName} salvo com sucesso!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #3
0
        private void FixNumericValues( )
        {
            try {
                this.mesh.Minimum = short.MinValue;
                this.mesh.Maximum = short.MaxValue;

                this.textura.Minimum = int.MinValue;
                this.textura.Maximum = int.MaxValue;


                this.Visual.Minimum = short.MinValue;
                this.Visual.Maximum = short.MaxValue;


                this.level.Minimum = short.MinValue;
                this.level.Maximum = short.MaxValue;

                this.forca.Minimum = short.MinValue;
                this.forca.Maximum = short.MaxValue;

                this.inteligencia.Minimum = short.MinValue;
                this.inteligencia.Maximum = short.MaxValue;

                this.destreza.Minimum = short.MinValue;
                this.destreza.Maximum = short.MaxValue;

                this.constituicao.Minimum = short.MinValue;
                this.constituicao.Maximum = short.MaxValue;

                this.preco.Minimum = int.MinValue;
                this.preco.Maximum = int.MaxValue;

                this.unique.Minimum = ushort.MinValue;
                this.unique.Maximum = ushort.MaxValue;

                this.anct.Minimum = int.MinValue;
                this.anct.Maximum = int.MaxValue;

                this.grau.Minimum = ushort.MinValue;
                this.grau.Maximum = ushort.MaxValue;



                this.UNK1.Minimum = int.MinValue;
                this.UNK1.Maximum = int.MaxValue;

                this.UNK2.Minimum = int.MinValue;
                this.UNK2.Maximum = int.MaxValue;


                this.UNK3.Minimum = int.MinValue;
                this.UNK3.Maximum = int.MaxValue;


                this.UNK4.Minimum = int.MinValue;
                this.UNK4.Maximum = int.MaxValue;


                Defines.ItemEffects(this.EF1);
                Defines.ItemEffects(this.EF2);
                Defines.ItemEffects(this.EF3);
                Defines.ItemEffects(this.EF4);
                Defines.ItemEffects(this.EF5);
                Defines.ItemEffects(this.EF6);
                Defines.ItemEffects(this.EF7);
                Defines.ItemEffects(this.EF8);
                Defines.ItemEffects(this.EF9);
                Defines.ItemEffects(this.EF10);
                Defines.ItemEffects(this.EF11);
                Defines.ItemEffects(this.EF12);

                this.EF1.SelectedIndex  = 0;
                this.EF2.SelectedIndex  = 0;
                this.EF3.SelectedIndex  = 0;
                this.EF4.SelectedIndex  = 0;
                this.EF5.SelectedIndex  = 0;
                this.EF6.SelectedIndex  = 0;
                this.EF7.SelectedIndex  = 0;
                this.EF8.SelectedIndex  = 0;
                this.EF9.SelectedIndex  = 0;
                this.EF10.SelectedIndex = 0;
                this.EF11.SelectedIndex = 0;
                this.EF12.SelectedIndex = 0;

                this.EFV1.Minimum = short.MinValue;
                this.EFV1.Maximum = short.MaxValue;

                this.EFV2.Minimum = short.MinValue;
                this.EFV2.Maximum = short.MaxValue;

                this.EFV3.Minimum = short.MinValue;
                this.EFV3.Maximum = short.MaxValue;

                this.EFV4.Minimum = short.MinValue;
                this.EFV4.Maximum = short.MaxValue;

                this.EFV5.Minimum = short.MinValue;
                this.EFV5.Maximum = short.MaxValue;

                this.EFV6.Minimum = short.MinValue;
                this.EFV6.Maximum = short.MaxValue;

                this.EFV7.Minimum = short.MinValue;
                this.EFV7.Maximum = short.MaxValue;

                this.EFV8.Minimum = short.MinValue;
                this.EFV8.Maximum = short.MaxValue;

                this.EFV9.Minimum = short.MinValue;
                this.EFV9.Maximum = short.MaxValue;

                this.EFV10.Minimum = short.MinValue;
                this.EFV10.Maximum = short.MaxValue;

                this.EFV11.Minimum = short.MinValue;
                this.EFV11.Maximum = short.MaxValue;

                this.EFV12.Minimum = short.MinValue;
                this.EFV12.Maximum = short.MaxValue;
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }