internal static void OutOfGamePulse() { ChangeMonitor.CheckForChanges(); Player.UpdateOutOfGame(); EventManager.Update(); SelectBehavior(); }
private void Disable() { Enabled = false; TrinityCombat.Party = DefaultProviders.Party; Log.Info("Plugin disabled! "); CurrentBehavior?.Deactivate(); BotMain.OnStart -= BotMain_OnStart; BotMain.OnStop -= BotMain_OnStop; EventManager.Disable(); EventManager.OnPulseOutOfGame -= Pulse; Service.OnUpdatePreview -= ServiceOnUpdatePreview; Server.ShutdownServer(); Client.ShutdownClient(); TabUi.RemoveTab(); ChangeMonitor.Disable(); }
public void OnEnabled() { Enabled = true; Log.Info(" v{0} Enabled", Version); BotMain.OnStart += BotMain_OnStart; BotMain.OnStop += BotMain_OnStop; CurrentBehavior = DefaultBehavior; EventManager.Enable(); BotHistory.Enable(); TabUi.InstallTab(); ChangeMonitor.Enable(); Service.Connect(); CommunicationThread.ThreadStart(); // When start button is clicked, hooks are cleared, TreeHooks.Instance.OnHooksCleared += OnHooksCleared; }
public void OnDisabled() { Enabled = false; Log.Info("Plugin disabled! "); if (CurrentBehavior != null) { CurrentBehavior.Deactivate(); } BotMain.OnStart -= BotMain_OnStart; BotMain.OnStop -= BotMain_OnStop; EventManager.Disable(); EventManager.OnPulseOutOfGame += Pulse; Service.OnUpdatePreview -= ServiceOnUpdatePreview; BotHistory.Disable(); TabUi.RemoveTab(); ChangeMonitor.Disable(); }
private void Enable() { if (!Application.Current.CheckAccess()) { return; } Enabled = true; TrinityCombat.Party = new AutoFollowPartyProvider(); Log.Info(" v{0} Enabled", Version); BotMain.OnStart += BotMain_OnStart; BotMain.OnStop += BotMain_OnStop; CurrentBehavior = DefaultBehavior; EventManager.Enable(); TabUi.InstallTab(); ChangeMonitor.Enable(); Server.ServerStartAttempts = 0; Client.ConnectionAttempts = 0; Service.Connect(); CommunicationThread.ThreadStart(); TreeHooks.Instance.OnHooksCleared += OnHooksCleared; }