コード例 #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");
        }
コード例 #2
0
 public Composite CreateHook()
 {
     return(new ActionRunCoroutine(ctx => HookHelpers.ExecuteHook(this, MainCoroutine)));
 }
コード例 #3
0
 private Composite CreateDoWhenHook()
 {
     return(new ActionRunCoroutine(context => HookHelpers.ExecuteHook(this, MainCoroutine, ActivityKey_Name, LogExecution)));
 }