Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ItemField Field = (ItemField)listBoxItems.Items[listBoxItems.Items.Count - 1];
            int ItemIndex = Field.ItemCode + 1;

            MuDef.MUFile_Item Item = new MuDef.MUFile_Item();
            Item.ItemInfo = new MuDef.MUFile_ItemInfo()
            {
                Classes = new byte[7],
                Resistances = new byte[7],
            };

            Item.ItemID = ItemIndex;
            Item.ItemInfo.Name = "New item " + (Item.ItemID % 512);
            Item.TexturePath = "Data\\Item\\";
            Item.ModelName = "Item" + Item.ItemID + ".bmd";

            //swap items info
            object[] NewItems = new object[m_Items.Length + 1];
            m_Items.CopyTo(NewItems, 0);
            NewItems[m_Items.Length] = Item;
            m_Items = NewItems;

            updateItemList();
            listBoxItems.SelectedIndex = listBoxItems.Items.Count - 1; //jump to new item
        }
Пример #2
0
        public override void SaveAsBmd(string OutputPath, object[] items)
        {
            try
            {
               
                FileStream OutputStream = File.Open(OutputPath, FileMode.Create, FileAccess.Write);
                int nSizeOfItem = Marshal.SizeOf(typeof(MuDef.MUFile_Item));
                List<MuDef.MUFile_Item> TmpList = new List<MuDef.MUFile_Item>(512);
                MuDef.MUFile_Item CurrentItem = new MuDef.MUFile_Item();

                object[] cur_group;
                byte[] FileBuffer = new byte[nSizeOfItem * items.Length];

                int nTotalItems = 0;

                for (int i = 0; i < 16; i++)
                {
                    cur_group = GetItemsByGroupID(items, i);
                    //each item in group
                    int nItemCounter = 0;

                    while(nItemCounter < 512)
                    {
                        if (cur_group[i] != null)
                        {
                            try
                            {
                                CurrentItem = ((MuDef.MUFile_Item)(cur_group[nItemCounter]));


                                byte[] buf = StructureToByteArray(cur_group[nItemCounter]);
                                XorFilter(ref buf, Marshal.SizeOf(typeof(MuDef.MUFile_Item)));

                                buf.CopyTo(FileBuffer, nTotalItems * nSizeOfItem);

                                nTotalItems++;
                                nItemCounter++;
                            }
                            catch { break;  }
                        }
                        else break;
                        
                    }
                }

                OutputStream.Write(BitConverter.GetBytes(nTotalItems), 0, 4);
                OutputStream.Write(FileBuffer, 0, nTotalItems * nSizeOfItem);
                byte[] crc_bytes = BitConverter.GetBytes(GetCRC(FileBuffer, nTotalItems * nSizeOfItem));
                OutputStream.Write(crc_bytes, 0, sizeof(int));

                OutputStream.Flush();
                OutputStream.Close();
            }
            catch { MessageBox.Show("Failed to save file"); }
        }
Пример #3
0
        void OnCellEditEnd(object sender, DataGridViewCellEventArgs e)
        {
            m_NeedsSaving = true;
            bool flag = false;
            //TODO: mov ethis to item.bmd (made in hurry)
            if (m_File.MyType == BmdFile.FileType.Item)
            {
                try
                {
                    //find structure with matching index
                    int index = int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());

                    MuDef.MUFile_Item tmp_item = new MuDef.MUFile_Item();

                    for (int i = 0; i < m_AllStructures.Length; i++)
                    {
                        if (m_AllStructures[i] != null)
                        {
                            tmp_item = ((MuDef.MUFile_Item)(m_AllStructures[i]));

                          
                            if (tmp_item.ItemID == nCurItemID)
                            {
                                flag = true;
                                tmp_item = new MuDef.MUFile_Item();
                                tmp_item.ItemInfo = new MuDef.MUFile_ItemInfo()
                                {
                                    Classes = new byte[7],
                                    Resistances = new byte[7],
                                };

                                tmp_item.ItemID = int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
                                tmp_item.Index = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString());
                                tmp_item.Number = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString());
                                tmp_item.TexturePath = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();
                                tmp_item.ModelName = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString();


                                tmp_item.ItemInfo.Name = dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString();
                                tmp_item.ItemInfo.Type1 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[6].Value.ToString());
                                tmp_item.ItemInfo.Type2 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[7].Value.ToString());
                                tmp_item.ItemInfo.Type3 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[8].Value.ToString());

                                tmp_item.ItemInfo.TwoHands = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[9].Value.ToString());

                                tmp_item.ItemInfo.ItemLvl = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[10].Value.ToString());
                                tmp_item.ItemInfo.ItemSlot = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[11].Value.ToString());
                                tmp_item.ItemInfo.ItemSkill = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[12].Value.ToString());

                                tmp_item.ItemInfo.X = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[13].Value.ToString());
                                tmp_item.ItemInfo.Y = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[14].Value.ToString());

                                tmp_item.ItemInfo.DmgMin = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[15].Value.ToString());
                                tmp_item.ItemInfo.DmgMax = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[16].Value.ToString());
                                tmp_item.ItemInfo.DefRate = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[17].Value.ToString());
                                tmp_item.ItemInfo.Defence = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[18].Value.ToString());
                                tmp_item.ItemInfo.Unknown1 = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[19].Value.ToString());

                                tmp_item.ItemInfo.AtkSpeed = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[20].Value.ToString());
                                tmp_item.ItemInfo.WalkSpeed = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[21].Value.ToString());
                                tmp_item.ItemInfo.Durability = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[22].Value.ToString());
                                tmp_item.ItemInfo.MagicDur = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[23].Value.ToString());
                                tmp_item.ItemInfo.MagicPwr = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[24].Value.ToString());
                                tmp_item.ItemInfo.Unknown2 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[25].Value.ToString());


                                tmp_item.ItemInfo.ReqStr = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[26].Value.ToString());
                                tmp_item.ItemInfo.ReqDex = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[27].Value.ToString());
                                tmp_item.ItemInfo.ReqEne = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[28].Value.ToString());
                                tmp_item.ItemInfo.ReqVit = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[29].Value.ToString());
                                tmp_item.ItemInfo.ReqLea = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[30].Value.ToString());
                                tmp_item.ItemInfo.ReqLvl = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[31].Value.ToString());
                                tmp_item.ItemInfo.ItemValue = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[32].Value.ToString());

                                tmp_item.ItemInfo.Zen = int.Parse(dataGridView1.Rows[e.RowIndex].Cells[33].Value.ToString());
                                tmp_item.ItemInfo.SetOption = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[34].Value.ToString());

                                //clasees
                                tmp_item.ItemInfo.Classes[0] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[35].Value.ToString());
                                tmp_item.ItemInfo.Classes[1] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[36].Value.ToString());
                                tmp_item.ItemInfo.Classes[2] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[37].Value.ToString());
                                tmp_item.ItemInfo.Classes[3] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[38].Value.ToString());
                                tmp_item.ItemInfo.Classes[4] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[39].Value.ToString());
                                tmp_item.ItemInfo.Classes[5] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[40].Value.ToString());
                                tmp_item.ItemInfo.Classes[6] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[41].Value.ToString());

                                //resist
                                tmp_item.ItemInfo.Resistances[0] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[42].Value.ToString());
                                tmp_item.ItemInfo.Resistances[1] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[43].Value.ToString());
                                tmp_item.ItemInfo.Resistances[2] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[44].Value.ToString());
                                tmp_item.ItemInfo.Resistances[3] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[45].Value.ToString());
                                tmp_item.ItemInfo.Resistances[4] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[46].Value.ToString());
                                tmp_item.ItemInfo.Resistances[5] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[47].Value.ToString());
                                tmp_item.ItemInfo.Resistances[6] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[48].Value.ToString());

                                //unknown
                                tmp_item.ItemInfo.IsApplyToDrop = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[49].Value.ToString());
                                tmp_item.ItemInfo.Unknown3 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[50].Value.ToString());
                                tmp_item.ItemInfo.Unknown4 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[51].Value.ToString());
                                tmp_item.ItemInfo.Unknown5 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[52].Value.ToString());
                                tmp_item.ItemInfo.Unknown6 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[53].Value.ToString());
                                tmp_item.ItemInfo.IsExpensive = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[54].Value.ToString());
                                tmp_item.ItemInfo.Unknown7 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[55].Value.ToString());
                                tmp_item.ItemInfo.StackMax = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[56].Value.ToString());

                                //???
                                tmp_item.ItemInfo.Pad = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[57].Value.ToString());

                                m_AllStructures[i] = tmp_item;
                            }
                        }







                    }


                    if (!flag)
                    {
                        int n = Item.GetFirstFreeItemPlace(m_AllStructures, CurrentGroupID);
                        bool success = true;
                     


                        tmp_item = new MuDef.MUFile_Item();
                        tmp_item.ItemInfo = new MuDef.MUFile_ItemInfo()
                        {
                            Classes = new byte[7],
                            Resistances = new byte[7],
                        };

                        try
                        {
                            tmp_item.ItemID = int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
                            tmp_item.Index = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString());
                            tmp_item.Number = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString());
                            tmp_item.TexturePath = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();
                            tmp_item.ModelName = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString();


                            tmp_item.ItemInfo.Name = dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString();
                            tmp_item.ItemInfo.Type1 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[6].Value.ToString());
                            tmp_item.ItemInfo.Type2 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[7].Value.ToString());
                            tmp_item.ItemInfo.Type3 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[8].Value.ToString());

                            tmp_item.ItemInfo.TwoHands = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[9].Value.ToString());

                            tmp_item.ItemInfo.ItemLvl = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[10].Value.ToString());
                            tmp_item.ItemInfo.ItemSlot = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[11].Value.ToString());
                            tmp_item.ItemInfo.ItemSkill = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[12].Value.ToString());

                            tmp_item.ItemInfo.X = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[13].Value.ToString());
                            tmp_item.ItemInfo.Y = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[14].Value.ToString());

                            tmp_item.ItemInfo.DmgMin = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[15].Value.ToString());
                            tmp_item.ItemInfo.DmgMax = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[16].Value.ToString());
                            tmp_item.ItemInfo.DefRate = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[17].Value.ToString());
                            tmp_item.ItemInfo.Defence = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[18].Value.ToString());
                            tmp_item.ItemInfo.Unknown1 = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[19].Value.ToString());

                            tmp_item.ItemInfo.AtkSpeed = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[20].Value.ToString());
                            tmp_item.ItemInfo.WalkSpeed = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[21].Value.ToString());
                            tmp_item.ItemInfo.Durability = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[22].Value.ToString());
                            tmp_item.ItemInfo.MagicDur = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[23].Value.ToString());
                            tmp_item.ItemInfo.MagicPwr = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[24].Value.ToString());
                            tmp_item.ItemInfo.Unknown2 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[25].Value.ToString());


                            tmp_item.ItemInfo.ReqStr = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[26].Value.ToString());
                            tmp_item.ItemInfo.ReqDex = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[27].Value.ToString());
                            tmp_item.ItemInfo.ReqEne = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[28].Value.ToString());
                            tmp_item.ItemInfo.ReqVit = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[29].Value.ToString());
                            tmp_item.ItemInfo.ReqLea = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[30].Value.ToString());
                            tmp_item.ItemInfo.ReqLvl = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[31].Value.ToString());
                            tmp_item.ItemInfo.ItemValue = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[32].Value.ToString());

                            tmp_item.ItemInfo.Zen = int.Parse(dataGridView1.Rows[e.RowIndex].Cells[33].Value.ToString());
                            tmp_item.ItemInfo.SetOption = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[34].Value.ToString());

                            //clasees
                            tmp_item.ItemInfo.Classes[0] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[35].Value.ToString());
                            tmp_item.ItemInfo.Classes[1] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[36].Value.ToString());
                            tmp_item.ItemInfo.Classes[2] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[37].Value.ToString());
                            tmp_item.ItemInfo.Classes[3] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[38].Value.ToString());
                            tmp_item.ItemInfo.Classes[4] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[39].Value.ToString());
                            tmp_item.ItemInfo.Classes[5] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[40].Value.ToString());
                            tmp_item.ItemInfo.Classes[6] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[41].Value.ToString());

                            //resist
                            tmp_item.ItemInfo.Resistances[0] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[42].Value.ToString());
                            tmp_item.ItemInfo.Resistances[1] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[43].Value.ToString());
                            tmp_item.ItemInfo.Resistances[2] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[44].Value.ToString());
                            tmp_item.ItemInfo.Resistances[3] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[45].Value.ToString());
                            tmp_item.ItemInfo.Resistances[4] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[46].Value.ToString());
                            tmp_item.ItemInfo.Resistances[5] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[47].Value.ToString());
                            tmp_item.ItemInfo.Resistances[6] = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[48].Value.ToString());

                            tmp_item.ItemInfo.IsApplyToDrop = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[49].Value.ToString());
                            tmp_item.ItemInfo.Unknown3 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[50].Value.ToString());
                            tmp_item.ItemInfo.Unknown4 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[51].Value.ToString());
                            tmp_item.ItemInfo.Unknown5 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[52].Value.ToString());
                            tmp_item.ItemInfo.Unknown6 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[53].Value.ToString());
                            tmp_item.ItemInfo.IsExpensive = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[54].Value.ToString());
                            tmp_item.ItemInfo.Unknown7 = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[55].Value.ToString());
                            tmp_item.ItemInfo.StackMax = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[56].Value.ToString());

                            //???
                            tmp_item.ItemInfo.Pad = byte.Parse(dataGridView1.Rows[e.RowIndex].Cells[57].Value.ToString());
                        }
                        catch { success = false; }

                        if (success)
                        {
                            m_AllStructures[n] = new MuDef.MUFile_Item()
                            {
                                ItemInfo = new MuDef.MUFile_ItemInfo()
                                {
                                    Classes = new byte[7],
                                    Resistances = new byte[7],
                                }
                            };

                            m_AllStructures[n] = tmp_item;
                        }
                    }

                   
                }
                catch { }
            }
            /*else if (m_File.MyType == BmdFile.FileType.ItemTRSData)
            {
                try
                {
                    //find structure with matching index
                    int index = int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());

                    MuDef.MUFile_ItemTRSData tmp_item = new MuDef.MUFile_ItemTRSData();

                    for (int i = 0; i < m_AllStructures.Length; i++)
                    {
                        if (m_AllStructures[i] != null)
                        {
                            tmp_item = ((MuDef.MUFile_ItemTRSData)(m_AllStructures[i]));


                            if (tmp_item.ItemCode == nCurItemID)
                            {
                                flag = true;
                                tmp_item = new MuDef.MUFile_ItemTRSData();
                                tmp_item.ItemCode = int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
                                tmp_item.TranslationX = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString());
                                tmp_item.TranslationY = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString());
                                tmp_item.TranslationZ = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString());
                                tmp_item.Rotation = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString());
                                tmp_item.ScaleX = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString());
                                tmp_item.ScaleY = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[6].Value.ToString());
                                tmp_item.ScaleZ = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[7].Value.ToString());
                                m_AllStructures[i] = tmp_item;
                            }
                        }
                    }


                    if (!flag)
                    {
                        int n = Item.GetFirstFreeItemPlace(m_AllStructures, CurrentGroupID);
                        bool success = true;

                        tmp_item = new MuDef.MUFile_ItemTRSData();


                        try
                        {
                            tmp_item.ItemCode = int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
                            tmp_item.TranslationX = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString());
                            tmp_item.TranslationY = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString());
                            tmp_item.TranslationZ = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString());
                            tmp_item.Rotation = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString());
                            tmp_item.ScaleX = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString());
                            tmp_item.ScaleY = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[6].Value.ToString());
                            tmp_item.ScaleZ = float.Parse(dataGridView1.Rows[e.RowIndex].Cells[7].Value.ToString());
                        }
                        catch { success = false; }

                        if (success)
                        {
                            m_AllStructures[n] = new MuDef.MUFile_ItemTRSData();
                            m_AllStructures[n] = tmp_item;
                        }
                    }


                }
                catch { }
            }*/

        }