public new void Load(string spellPath) { SpellPath = spellPath; Text = spellPath; Cursor.Current = Cursors.WaitCursor; Cache = new SpellCache(); Cache.LoadSpells(spellPath); SearchCategory.Items.AddRange(Cache.SpellList.SelectMany(x => x.Categories).Distinct().ToArray()); SearchClass_TextChanged(this, null); AutoSearch.Enabled = false; Cursor.Current = Cursors.Default; var html = HtmlBuilder.InitTemplate(); html.AppendFormat("<p>Loaded <strong>{0}</strong> spells from {1}.</p></html>", Cache.SpellList.Count(), SpellPath); html.Append("<p>Use the search button to perform a search on this spell file based on the filters on the left."); html.Append("<p>Use the compare button to compare two different spell files and show the differences. e.g. test server vs live server spells."); html.AppendFormat("<p>This parser is an open source application. Visit <a href='{0}' class='ext' target='_top'>{0}</a> to download updates.", "https://github.com/rumstil/eqspellparser"); //html.Append("<p>Nov 8 2017 - Some spells will now show as 'Mostly Unresistable'. This means they are unresistable by standard resists and can only be resisted by Sanctification/Mystical Shielding AA or SPA 180 spells."); ShowHtml(html.ToString()); }
static void Main(string[] args) { var path = LaunchpadManifest.SPELL_FILE; try { int dec = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalDigits; if (dec < 2) { Console.Error.WriteLine("Your system has been configured to display {0} decimal digits. Some values will be rounded.", dec); } if (args.Length == 0) { Console.Error.WriteLine("You must include a search parameter on the command line."); Thread.Sleep(2000); return; } if (args[0] == "update") { var server = args.Length >= 2 ? args[1] : null; LaunchpadPatcher.DownloadSpellFiles(server); return; } if (File.Exists(args[0])) { path = args[0]; args[0] = "all"; } if (!File.Exists(path)) { LaunchpadPatcher.DownloadSpellFiles(); } Console.Error.Write("Loading {0}... ", path); cache = new SpellCache(); cache.LoadSpells(path); Console.Error.WriteLine("{0} spells", cache.SpellList.Count()); // perform search based on command line parameters var type = args.Length >= 1 ? args[0].ToLower() : null; var value = args.Length >= 2 ? args[1] : null; Console.Error.Write("Searching for {0} {1}... ", type, value); var results = Search(type, value); if (results != null) { Console.Error.WriteLine("{0} results", results.Count); Console.Error.WriteLine(); cache.AddForwardRefs(results); Show(results); } } catch (Exception ex) { Console.Error.WriteLine(ex); } }