public override void Start() { WzFile file = MapleFileCache.Instance["Item"]; { List <string> types = new List <string>(); foreach (var item in file.WzDirectory.GetImageByName("ItemOption.img").WzProperties) // 00000001 { int id = Convert.ToInt32(item.Name); string desc = ""; if (item["info"] != null) { desc = item["info"]["string"].ToStringValue(); } SQLStrings.Instance.AppendRow("item_option", id, "desc", desc); foreach (var level in item["level"].WzProperties) // 00000001 { string optionlist = ""; foreach (var option in level.WzProperties) { if (optionlist != "") { optionlist += ';'; } optionlist += option.Name + '=' + option.WzValue.ToString(); } //Console.WriteLine("Optionlist: {0}", optionlist); SqlFileItemOptions.AppendToFile(id, Convert.ToInt32(level.Name), optionlist); } } } foreach (var key in new string[] { "Cash", "Consume", "Install", "Etc" }) { Console.WriteLine("Block {0}", key); HandleItemCategory(file[key] as WzDirectory); } Console.WriteLine("Block Pet"); HandlePets(file["Pet"] as WzDirectory); }
private void button1_Click(object sender, EventArgs e) { button1.Enabled = false; version = getMapleVersion(); chkList.Enabled = false; MapleFileCache.Init(wzFilesDir.Text, version); SqlFileItemOptions.Init(); SQLData.Init(); SQLStrings.Init(); ItemInformation.Init(); SqlFileItemSocket.Init(); FamiliarInfoSQL.Init(); RunNext(); }
private void RunNext() { if (chkList.CheckedIndices.Count == 0) { this.Invoke((MethodInvoker) delegate { button1.Enabled = true; chkList.Enabled = true; }); SQLData.Instance.Dump(wzExtractionDir.Text + "\\Data.sql"); SqlFileItemOptions.EndOfSQL(); SqlFileItemOptions.createSQLFile(wzExtractionDir.Text + "\\Data_Item_Options.sql"); SQLStrings.Instance.Dump(wzExtractionDir.Text + "\\Data_Strings.sql"); ItemInformation.Instance.Finish(wzExtractionDir.Text + "\\Data_Itemdata.sql"); SqlFileItemSocket.Instance.Dump(wzExtractionDir.Text + "\\Data_NebuliteInfo.sql"); FamiliarInfoSQL.Instance.Dump(wzExtractionDir.Text + "\\Data_FamiliarInfo.sql"); return; } selected = chkList.CheckedIndices[0]; this.Invoke((MethodInvoker) delegate { chkList.SetItemCheckState(selected, CheckState.Unchecked); }); if (selected == 0) { (new System.Threading.Thread(() => { new CharacterExtractor(wzExtractionDir.Text, wzFilesDir.Text, version).Start(); RunNext(); }) { IsBackground = true }).Start(); } else if (selected == 1) { (new System.Threading.Thread(() => { new StringsExtractor(wzExtractionDir.Text, wzFilesDir.Text, version).Start(); RunNext(); }) { IsBackground = true }).Start(); } else if (selected == 2) { (new System.Threading.Thread(() => { new PassiveBuffExtractor(wzExtractionDir.Text, wzFilesDir.Text, version).Start(); RunNext(); }) { IsBackground = true }).Start(); } else if (selected == 3) { (new System.Threading.Thread(() => { new ItemsExtractor(wzExtractionDir.Text, wzFilesDir.Text, version).Start(); RunNext(); }) { IsBackground = true }).Start(); } else if (selected == 4) { (new System.Threading.Thread(() => { new GuildInfoExtractor(wzExtractionDir.Text, wzFilesDir.Text, version).Start(); RunNext(); }) { IsBackground = true }).Start(); } else if (selected == 5) { (new System.Threading.Thread(() => { new ZMAPExporter(wzExtractionDir.Text, wzFilesDir.Text, version).Start(); RunNext(); }) { IsBackground = true }).Start(); } else if (selected == 6) { (new System.Threading.Thread(() => { new EtcExporter(wzExtractionDir.Text, wzFilesDir.Text, version).Start(); RunNext(); }) { IsBackground = true }).Start(); } else if (selected == 7) { (new System.Threading.Thread(() => { new EffectsExporter(wzExtractionDir.Text, wzFilesDir.Text, version).Start(); RunNext(); }) { IsBackground = true }).Start(); } }