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