/// <summary> /// Load a given CombatClass *.cs file into the CombatManager by compiling it at runtime /// </summary> /// <param name="fileName">*.cs CombatClass file</param> public void LoadCombatClassFromFile(string fileName) { AmeisenSettings.Settings.combatClassPath = fileName; AmeisenSettings.SaveToFile(AmeisenSettings.loadedconfName); IAmeisenCombatPackage combatClass = CompileAndLoadCombatClass(fileName); AmeisenStateMachineManager.StateMachine.LoadNewCombatClass(AmeisenDataHolder, combatClass, AmeisenDBManager, AmeisenNavmeshClient); }
/// <summary> /// Stops the bots mechanisms, hooks, ... /// </summary> public void StopBot() { IsLoadingScreenCheckerActive = false; LoadingScreenCheckerThread.Join(); // Disconnect from Server AmeisenClient.Unregister( Me, IPAddress.Parse(AmeisenSettings.Settings.ameisenServerIp), AmeisenSettings.Settings.ameisenServerPort); // Save WoW's window positions SafeNativeMethods.Rect wowRect = AmeisenCore.GetWowDiemsions(WowExe.process.MainWindowHandle); AmeisenSettings.Settings.wowRectT = wowRect.Top; AmeisenSettings.Settings.wowRectB = wowRect.Bottom; AmeisenSettings.Settings.wowRectL = wowRect.Left; AmeisenSettings.Settings.wowRectR = wowRect.Right; // Stop object updates AmeisenObjectManager.Stop(); // Stop the statemachine AmeisenStateMachineManager.Stop(); // Unhook Events AmeisenEventHook?.Stop(); // Unhook the EndScene AmeisenHook.DisposeHooking(); // Detach BlackMagic, causing weird crash right now... //Blackmagic.Close(); // Stop logging AmeisenLogger.Instance.StopLogging(); AmeisenSettings.SaveToFile(AmeisenSettings.loadedconfName); }
/// <summary> /// Save the current Settings to the given file /// </summary> /// <param name="filename">file to save the Settings to</param> public void SaveSettingsToFile(string filename) { AmeisenSettings.SaveToFile(filename); }
/// <summary> /// Load a given CombatClass *.cs file into the CombatManager by compiling it at runtime /// </summary> /// <param name="fileName">*.cs CombatClass file</param> public void LoadCombatClassFromFile(string fileName) { AmeisenSettings.Settings.combatClassPath = fileName; AmeisenSettings.SaveToFile(AmeisenSettings.loadedconfName); CompileAndLoadCombatClass(fileName); }