示例#1
0
 internal static void OutOfGamePulse()
 {
     ChangeMonitor.CheckForChanges();
     Player.UpdateOutOfGame();
     EventManager.Update();
     SelectBehavior();
 }
示例#2
0
 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();
 }
示例#3
0
        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;
        }
示例#4
0
        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();
        }
示例#5
0
 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;
 }