private void initialisator_DoWork(object sender, DoWorkEventArgs e) { var filepath = Assembly.GetExecutingAssembly().Location; Environment.CurrentDirectory = filepath.Remove(filepath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); // Ignore updates for now. //initialisator.ReportProgress(0, "Checking for updates"); //CraftNetTools.AppUpdates.Check(); // MapleStory 2 doesn't use any AES keys for packet crypto. //initialisator.ReportProgress(0, "Initializing MapleStory AES Keys"); //MapleKeys.Initialize(); initialisator.ReportProgress(0, "Loading Script.NET context"); RuntimeHost.Initialize(); initialisator.ReportProgress(0, "Loading packet definitions"); DefinitionsContainer.Load(); initialisator.ReportProgress(0, "Loading + saving config file"); Config.Instance.Save(); // Disable this for now. //initialisator.ReportProgress(0, "Registering .msb extension"); //RegisterFileAssociation(".msb", "MapleShark", "MapleShark Binary File", filepath, string.Empty, 0); }
private void initialisator_DoWork(object sender, DoWorkEventArgs e) { var filepath = Assembly.GetExecutingAssembly().Location; Environment.CurrentDirectory = filepath.Remove(filepath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); //initialisator.ReportProgress(0, "Checking for updates"); //CraftNetTools.AppUpdates.Check(); initialisator.ReportProgress(0, "Initializing MapleStory AES Keys"); MapleKeys.Initialize(); //initialisator.ReportProgress(0, "Loading Script.NET context"); //ScriptNET.Runtime.RuntimeHost.Initialize(); initialisator.ReportProgress(0, "Loading packet definitions"); DefinitionsContainer.Load(); initialisator.ReportProgress(0, "Loading + 保存配置文件"); Config.Instance.Save(); initialisator.ReportProgress(0, "Loading 加在包头配置"); Config.LoadProperties(); initialisator.ReportProgress(0, "Registering .msb extension"); RegisterFileAssociation(".msb", "MapleShark", "MapleShark Binary File", filepath, string.Empty, 0); }
internal Definition GetDefinition(ushort pBuild, byte pLocale, bool pOutbound, ushort pOpcode) { if (DefinitionsContainer.Instance == null) { DefinitionsContainer.Load(); } return(DefinitionsContainer.Instance.GetDefinition(pLocale, pBuild, pOpcode, pOutbound)); // return Definitions.Find(d => d.Locale == pLocale && d.Build == pBuild && d.Outbound == pOutbound && d.Opcode == pOpcode); }