Rebornbuddy
Loading...
Searching...
No Matches
ff14bot.Behavior.TreeHooks Class Referencesealed

A simplistic class to facilitate hooking into logic trees. More...

Public Member Functions

void AddHook (string location, Composite behavior)
 Inserts a hook at the specified location. This appends the behavior to the end of the list.
void InsertHook (string location, int index, Composite behavior)
 Inserts a hook at the specified location. This inserts the behavior to the specified index in the hook list.
void RemoveHook (string location, Composite behavior)
 Removes a hook at the specified location.
void ClearHook (string location)
 Removes all hooks at the specified location.
void ReplaceHook (string location, Composite behavior)
 Replaces all hooks at the specified location, with one that you provide.
void ClearAll ()
 Clears all registered hooks in the TreeHooks system.

Properties

static TreeHooks Instance [get]
 Gets the singleton instance of the TreeHooks class.
List< HookDescriptionHookDescriptions [get]
 Gets or sets the list of hook descriptions associated with the logic trees.
Dictionary< string, List< Composite > > Hooks [get]
 Gets the collection of hooks associated with the logic trees.

Events

EventHandler OnHooksCleared
 Event queue for all listeners interested in OnHooksCleared events.

Detailed Description

A simplistic class to facilitate hooking into logic trees.

Created 3/22/2011.

Member Function Documentation

◆ AddHook()

void ff14bot.Behavior.TreeHooks.AddHook ( string location,
Composite behavior )

Inserts a hook at the specified location. This appends the behavior to the end of the list.

Created 3/9/2011.

Parameters
locationThe location.
behaviorThe behavior.

◆ ClearAll()

void ff14bot.Behavior.TreeHooks.ClearAll ( )

Clears all registered hooks in the TreeHooks system.

This method removes all existing hooks, clears the hook cache, and triggers the OnHooksCleared event. It is typically used to reset and reinitialize the hook system.

◆ ClearHook()

void ff14bot.Behavior.TreeHooks.ClearHook ( string location)

Removes all hooks at the specified location.

Parameters
locationThe location.

◆ InsertHook()

void ff14bot.Behavior.TreeHooks.InsertHook ( string location,
int index,
Composite behavior )

Inserts a hook at the specified location. This inserts the behavior to the specified index in the hook list.

Created 3/9/2011.

Parameters
locationThe location.
index
behaviorThe behavior.

◆ RemoveHook()

void ff14bot.Behavior.TreeHooks.RemoveHook ( string location,
Composite behavior )

Removes a hook at the specified location.

Created 1/28/2012.

Parameters
locationThe location.
behaviorThe behavior.

◆ ReplaceHook()

void ff14bot.Behavior.TreeHooks.ReplaceHook ( string location,
Composite behavior )

Replaces all hooks at the specified location, with one that you provide.

Created 3/9/2011.

Parameters
locationThe location.
behaviorThe behavior.

Property Documentation

◆ HookDescriptions

List<HookDescription> ff14bot.Behavior.TreeHooks.HookDescriptions
get

Gets or sets the list of hook descriptions associated with the logic trees.

Used to provide metadata about hooks, including their names and descriptions.

◆ Hooks

Dictionary<string, List<Composite> > ff14bot.Behavior.TreeHooks.Hooks
get

Gets the collection of hooks associated with the logic trees.

◆ Instance

TreeHooks ff14bot.Behavior.TreeHooks.Instance
staticget

Gets the singleton instance of the TreeHooks class.

This property provides access to the globally shared TreeHooks instance, which facilitates managing hooks in logic trees.

Event Documentation

◆ OnHooksCleared

EventHandler ff14bot.Behavior.TreeHooks.OnHooksCleared

Event queue for all listeners interested in OnHooksCleared events.