Exemplo n.º 1
0
        private void InstallHook()
        {
            s_prevNavigator = Navigator.NavigationProvider;
            var avoidNavigator = new AvoidanceNavigationProvider();;

            Navigator.NavigationProvider = avoidNavigator;
            avoidNavigator.UpdateMaps();
            s_hook = new ActionRunCoroutine(ctx => HookHelpers.ExecuteHook(this, HookHandler));
            TreeHooks.Instance.InsertHook("Combat_Main", 0, s_hook);
            BotEvents.OnPulse      += BotEvents_OnPulse;
            BotEvents.OnBotStopped += BotEvents_OnBotStopped;
            BotEvents.Profile.OnNewOuterProfileLoaded  += Profile_OnNewOuterProfileLoaded;
            LootTargeting.Instance.RemoveTargetsFilter += Instance_RemoveTargetsFilter;
            QBCLog.Info("Installed avoidance system");
        }
Exemplo n.º 2
0
 public Composite CreateHook()
 {
     return(new ActionRunCoroutine(ctx => HookHelpers.ExecuteHook(this, MainCoroutine)));
 }
Exemplo n.º 3
0
 private Composite CreateDoWhenHook()
 {
     return(new ActionRunCoroutine(context => HookHelpers.ExecuteHook(this, MainCoroutine, ActivityKey_Name, LogExecution)));
 }