private void btnGo_Click(object sender, EventArgs e) { string jsonpath = txtJson.Text; string splitpath = txtSplit.Text; bool doSplit = chkSplit.Checked; string processpath = txtProcess.Text; SaveToSettings(); //try //{ var jsons = GFDecoder.LoadCatchDataJsonFile(new FileStream(jsonpath, FileMode.Open)); if (doSplit) { GFDecoder.SaveSplitedJsonFiles(jsons, splitpath); foreach (var f in Directory.GetFiles(splitpath, "*.json")) { string outputpath = Path.Combine(Path.GetDirectoryName(f), Path.GetFileNameWithoutExtension(f) + ".csv"); GFDecoder.Json2Csv(f, outputpath); } } GFDecoder.ProcessJsonData(jsons, processpath); //} //catch (Exception ex) //{ // MessageBox.Show(ex.ToString()); //} }
static void Main(string[] args) { if (args.Length == 0) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new ToolForm()); } else if (args.Length >= 2) { string jsonpath = args[0]; string splitpath = args[1]; string processpath = (args.Length >= 3) ? args[2] : null; GFDecoder.DoSplitAndProcess(jsonpath, splitpath, processpath); } }
private void btnGoImage_Click(object sender, EventArgs e) { SaveToSettings(); //try //{ string jsonpath = txtImageJson.Text; string imagepath = txtImage.Text; int from = int.Parse(txtImageFrom.Text); int to = int.Parse(txtImageTo.Text); GFDecoder.ProcessImages(jsonpath, imagepath, imagepath, from, to); //} //catch (Exception ex) //{ // MessageBox.Show(ex); //} }
public enemy_character_type_info get_info_at_level(int level, int number, Dictionary <int, enemy_standard_attribute_info> lv_info) { enemy_character_type_info result = new enemy_character_type_info(); enemy_standard_attribute_info lv_from = lv_info[this.level]; enemy_standard_attribute_info lv_to = lv_info[level]; result.id = this.id; result.type = this.type; result.name = this.name; result.code = this.code; result.maxlife = GFDecoder.UERound(this.maxlife * lv_to.maxlife / lv_from.maxlife * number); result.pow = GFDecoder.UERound(this.pow * lv_to.pow / lv_from.pow); result.hit = GFDecoder.UERound(this.hit * lv_to.hit / lv_from.hit); result.dodge = GFDecoder.UERound(this.dodge * lv_to.dodge / lv_from.dodge); result.range = this.range; result.speed = this.speed; result.number = number; result.angle = this.angle; result.armor_piercing = GFDecoder.UERound(this.armor_piercing * lv_to.armor_piercing / lv_from.armor_piercing); result.armor = GFDecoder.UERound(this.armor * lv_to.armor / lv_from.armor); result.shield = GFDecoder.UERound(this.shield * lv_to.shield / lv_from.shield); result.rate = this.rate; result.boss_hp = this.boss_hp; result.def = GFDecoder.UERound(this.def * lv_to.def / lv_from.def); result.def_break = GFDecoder.UERound(this.def_break * lv_to.def_break / lv_from.def_break); result.debuff_resistance = this.debuff_resistance; result.level = level; result.character = this.character; result.special_attack = this.special_attack; result.normal_attack = this.normal_attack; result.passive_skill = this.passive_skill; result.effect_ratio = this.effect_ratio; result.unable_buff_type = this.unable_buff_type; result.voice = this.voice; return(result); }
private void btnGo_Click(object sender, EventArgs e) { string jsonpath = txtJson.Text; string splitpath = txtSplit.Text; bool doSplit = chkSplit.Checked; string processpath = txtProcess.Text; SaveToSettings(); try { if (!doSplit) { splitpath = null; } GFDecoder.DoSplitAndProcess(jsonpath, splitpath, processpath); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void btnGoText_Click(object sender, EventArgs e) { string filepath = txtTextFile.Text; string outputpath = txtTextOutput.Text; string inputpath; if (Directory.Exists(filepath)) { inputpath = filepath; } else if (File.Exists(filepath)) { inputpath = Path.GetDirectoryName(filepath); } else { MessageBox.Show("File not found: " + filepath); return; } SaveToSettings(); GFDecoder.ProcessTextTables(inputpath, outputpath); }