Rebornbuddy
Loading...
Searching...
No Matches
ff14bot.Managers.AvoidanceManager Class Reference

Manager responsible for handling avoidance pathing and navigation around obstacles. More...

Static Public Member Functions

static void AddAvoid (AvoidInfo avoid)
 Adds a single avoidance area to the collection of areas to avoid during navigation.
static void AddAvoids (IEnumerable< AvoidInfo > avoids)
 Adds multiple avoidance areas to the collection of areas to avoid during navigation.
static void RemoveAvoid (AvoidInfo avoidInfo)
 Removes a specific avoidance area from the collection of areas to avoid during navigation.
static void RemoveAllAvoids (Predicate< AvoidInfo > match)
 Removes all avoidance areas from the collection that match the specified condition.
static void Pulse ()
 Pulses this instance.
static void ResetNavigation ()
 Resets the internal navigation system.
static AvoidInfo AddAvoidObject< T > (Func< bool > canRun, float radius, params uint[] unitIds)
 Adds the avoid object.
static AvoidInfo AddAvoidObject< T > (Func< bool > canRun, Func< T, float > radiusProducer, params uint[] unitIds)
 Adds the avoid object.
static AvoidInfo AddAvoidObject< T > (Func< bool > canRun, float radius, Predicate< T > objectSelector, Func< T, Vector3 > locationProducer=null, bool ignoreIfBlocking=false)
 Adds the avoid object.
static AvoidInfo AddAvoidObject< T > (Func< bool > canRun, Func< T, float > radiusProducer, Predicate< T > objectSelector, Func< T, Vector3 > locationProducer=null, bool ignoreIfBlocking=false)
 Runs away from a unit or object if within range.
static AvoidInfo AddAvoidObject< T > (Func< bool > canRun, Func< Vector3 > leashPointProducer, float leashRadius, float radius, params uint[] unitIds)
 Runs away from a unit or object if within range.
static AvoidInfo AddAvoidObject< T > (Func< bool > canRun, Func< Vector3 > leashPointProducer, float leashRadius, Func< T, float > radiusProducer, params uint[] unitIds)
 Runs away from a unit or object if within range.
static AvoidInfo AddAvoidObject< T > (Func< bool > canRun, Func< Vector3 > leashPointProducer, float leashRadius, float radius, Predicate< T > objectSelector, Func< T, Vector3 > locationProducer=null, bool ignoreIfBlocking=false)
 Runs away from a unit or object if within range.
static AvoidInfo AddAvoidObject< T > (Func< bool > canRun, Func< Vector3 > leashPointProducer, float leashRadius, Func< T, float > radiusProducer, Predicate< T > objectSelector, Func< T, Vector3 > locationProducer=null, bool ignoreIfBlocking=false)
 Runs away from a unit or object if within range.
static AvoidInfo AddAvoidLocation (Func< bool > canRun, float radius, Func< Vector3 > locationProducer, bool ignoreIfBlocking=false)
 Run away from location.
static AvoidInfo AddAvoidLocation< T > (Func< bool > canRun, Func< T, float > radiusProducer, Func< T, Vector3 > locationProducer, Func< IEnumerable< T > > collectionProducer, Func< T, bool > objectValidator=null, bool ignoreIfBlocking=false)
 Run away from location.
static AvoidInfo AddAvoidLocation (Func< bool > canRun, Func< Vector3 > leashPointProducer, float leashRadius, float radius, Func< Vector3 > locationProducer, bool ignoreIfBlocking=false)
 Run away from location.
static AvoidInfo AddAvoidLocation< T > (Func< bool > canRun, Func< Vector3 > leashPointProducer, float leashRadius, Func< T, float > radiusProducer, Func< T, Vector3 > locationProducer, Func< IEnumerable< T > > collectionProducer, Func< T, bool > objectValidator=null, bool ignoreIfBlocking=false)
 Run away from location.
static AvoidInfo AddAvoidPolygon< T > (Func< bool > condition, Func< Vector3 > leashPointProducer, float leashRadius, Func< T, float > rotationProducer, Func< T, float > scaleProducer, Func< T, float > heightProducer, Func< T, Vector2[]> pointsProducer, Func< T, Vector3 > locationProducer, Func< IEnumerable< T > > collectionProducer, Func< T, bool > objectValidator=null, bool ignoreIfBlocking=false, AvoidancePriority priority=AvoidancePriority.Medium)
 Initializes a new instance of the AvoidPolygonInfo<T> class.
static AvoidInfo AddAvoidUnitCone< T > (Func< bool > canRun, Predicate< T > objectSelector, Func< Vector3 > leashPointProducer, float leashRadius, float rotationDegrees, float radius, float arcDegrees, Func< T, Vector3 > locationProducer=null, bool ignoreIfBlocking=false, AvoidancePriority priority=AvoidancePriority.Medium)
 Avoids cone-shaped area effects on a WoWUnit

Properties

static List< AvoidInfoAvoidInfos = new List<AvoidInfo>() [get]
 Collection of avoidance information used for navigation around obstacles.
static List< AvoidAvoids = new List<Avoid>() [get]
 List of active avoidance objects currently being used for navigation.
static bool IsRunningOutOfAvoid [get]
 Gets a value indicating whether toon is running out of an area being avoided.

Events

static EventHandler< EventArgs > OnRunningOut
 Triggered when running out of an avoided area.

Detailed Description

Manager responsible for handling avoidance pathing and navigation around obstacles.

Member Function Documentation

◆ AddAvoid()

void ff14bot.Managers.AvoidanceManager.AddAvoid ( AvoidInfo avoid)
static

Adds a single avoidance area to the collection of areas to avoid during navigation.

Parameters
avoidThe avoidance information to add.

◆ AddAvoidLocation() [1/2]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidLocation ( Func< bool > canRun,
float radius,
Func< Vector3 > locationProducer,
bool ignoreIfBlocking = false )
static

Run away from location.

Parameters
canRunThe condition.
radiusThe radius.
locationProducerThe location selector.
ignoreIfBlockingIf set to true the object will be ignored if no path can be generated around it (default: false)

◆ AddAvoidLocation() [2/2]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidLocation ( Func< bool > canRun,
Func< Vector3 > leashPointProducer,
float leashRadius,
float radius,
Func< Vector3 > locationProducer,
bool ignoreIfBlocking = false )
static

Run away from location.

Parameters
canRunThe condition.
leashPointProducerThe leash point selector.
leashRadiusThe leash radius.
radiusThe max distance to run.
locationProducerThe location selector.
ignoreIfBlockingIf set to true the object will be ignored if no path can be generated around it (default: false)

◆ AddAvoidLocation< T >() [1/2]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidLocation< T > ( Func< bool > canRun,
Func< T, float > radiusProducer,
Func< T, Vector3 > locationProducer,
Func< IEnumerable< T > > collectionProducer,
Func< T, bool > objectValidator = null,
bool ignoreIfBlocking = false )
static

Run away from location.

Parameters
canRunThe condition.
radiusProducerThe max distance to run.
locationProducerThe location selector.
collectionProducerOptional collection of objects that are passed as args to locationProducer
ignoreIfBlockingIf set to true the object will be ignored if no path can be generated around it (default: false)

◆ AddAvoidLocation< T >() [2/2]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidLocation< T > ( Func< bool > canRun,
Func< Vector3 > leashPointProducer,
float leashRadius,
Func< T, float > radiusProducer,
Func< T, Vector3 > locationProducer,
Func< IEnumerable< T > > collectionProducer,
Func< T, bool > objectValidator = null,
bool ignoreIfBlocking = false )
static

Run away from location.

Parameters
canRunThe condition.
leashPointProducerThe leash point selector.
leashRadiusThe leash radius.
radiusProducerThe max distance to run.
locationProducerThe location selector.
collectionProducerOptional collection of objects that are passed as args to locationProducer
ignoreIfBlockingIf set to true the object will be ignored if no path can be generated around it (default: false)

◆ AddAvoidObject< T >() [1/8]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidObject< T > ( Func< bool > canRun,
float radius,
params uint[] unitIds )
static

Adds the avoid object.

Parameters
canRunThe can run.
radiusThe radius.
unitIdsThe unit ids.
Type Constraints
T :GameObject 

◆ AddAvoidObject< T >() [2/8]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidObject< T > ( Func< bool > canRun,
float radius,
Predicate< T > objectSelector,
Func< T, Vector3 > locationProducer = null,
bool ignoreIfBlocking = false )
static

Adds the avoid object.

Parameters
canRunThe can run.
radiusThe radius.
objectSelectorThe object selector.
locationProducerThe location selector.
ignoreIfBlockingif set to true [ignore if blocking].
Type Constraints
T :GameObject 

◆ AddAvoidObject< T >() [3/8]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidObject< T > ( Func< bool > canRun,
Func< T, float > radiusProducer,
params uint[] unitIds )
static

Adds the avoid object.

Parameters
canRunThe can run.
radiusProducerThe radius selector.
unitIdsThe unit ids.
Type Constraints
T :GameObject 

◆ AddAvoidObject< T >() [4/8]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidObject< T > ( Func< bool > canRun,
Func< T, float > radiusProducer,
Predicate< T > objectSelector,
Func< T, Vector3 > locationProducer = null,
bool ignoreIfBlocking = false )
static

Runs away from a unit or object if within range.

Parameters
canRunThe 'can run' condition.
radiusProducerThe distance to avoid
objectSelectorThe object selector.
locationProducerThe location selector
ignoreIfBlockingIf set to true the object will be ignored if no path can be generated around it
Type Constraints
T :GameObject 

◆ AddAvoidObject< T >() [5/8]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidObject< T > ( Func< bool > canRun,
Func< Vector3 > leashPointProducer,
float leashRadius,
float radius,
params uint[] unitIds )
static

Runs away from a unit or object if within range.

Parameters
canRunThe 'can run' condition.
leashPointProducerThe leash center point selector. Unit location if null
leashRadiusThe max distance to run from leash.
radiusThe radius.
unitIdsThe unit ids.
Type Constraints
T :GameObject 

◆ AddAvoidObject< T >() [6/8]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidObject< T > ( Func< bool > canRun,
Func< Vector3 > leashPointProducer,
float leashRadius,
float radius,
Predicate< T > objectSelector,
Func< T, Vector3 > locationProducer = null,
bool ignoreIfBlocking = false )
static

Runs away from a unit or object if within range.

Parameters
canRunThe 'can run' condition.
leashPointProducerThe leash center point selector. Unit location if null
radiusThe distance to avoid
leashRadiusThe max distance to run from leash.
objectSelectorThe object selector.
locationProducerThe location selector
ignoreIfBlockingIf set to true the object will be ignored if no path can be generated around it
Returns
Type Constraints
T :GameObject 

◆ AddAvoidObject< T >() [7/8]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidObject< T > ( Func< bool > canRun,
Func< Vector3 > leashPointProducer,
float leashRadius,
Func< T, float > radiusProducer,
params uint[] unitIds )
static

Runs away from a unit or object if within range.

Parameters
canRunThe 'can run' condition.
leashPointProducerThe leash center point selector. Unit location if null
leashRadiusThe max distance to run from leash.
radiusProducerThe distance to avoid
unitIdsThe unit ids.
Type Constraints
T :GameObject 

◆ AddAvoidObject< T >() [8/8]

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidObject< T > ( Func< bool > canRun,
Func< Vector3 > leashPointProducer,
float leashRadius,
Func< T, float > radiusProducer,
Predicate< T > objectSelector,
Func< T, Vector3 > locationProducer = null,
bool ignoreIfBlocking = false )
static

Runs away from a unit or object if within range.

Parameters
canRunThe 'can run' condition.
leashPointProducerThe leash center point selector. Unit location if null
radiusProducerThe distance to avoid
leashRadiusThe max distance to run from leash.
objectSelectorThe object selector.
locationProducerThe location selector
ignoreIfBlockingIf set to true the object will be ignored if no path can be generated around it
Returns
Type Constraints
T :GameObject 

◆ AddAvoidPolygon< T >()

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidPolygon< T > ( Func< bool > condition,
Func< Vector3 > leashPointProducer,
float leashRadius,
Func< T, float > rotationProducer,
Func< T, float > scaleProducer,
Func< T, float > heightProducer,
Func< T, Vector2[]> pointsProducer,
Func< T, Vector3 > locationProducer,
Func< IEnumerable< T > > collectionProducer,
Func< T, bool > objectValidator = null,
bool ignoreIfBlocking = false,
AvoidancePriority priority = AvoidancePriority::Medium )
static

Initializes a new instance of the AvoidPolygonInfo<T> class.

Parameters
conditionThe condition.
locationProducerProduces the location. Polygon is rotated and scaled around produced location on the xy plane.
rotationProducerProduces the polygon's rotation.
scaleProducerProduces the polygon's scale
heightProducerProduces the height of the polygon. Half of the produced height extends above location produced by locationProducer and the other half below
pointsProducerProduces the points that form the polygon
collectionProducerProduces a collection of objects that should be avoided.
leashPointProducerThe leash point producer. Can be null. Used in conjunction with leashRadius
leashRadiusThe leash radius. If leashPointProducer is not null, bot will not navigate furthar than this distance from point returned from leashPointProducer while running out of avoid
ignoreIfBlockingIgnore avoid if set to true and it can't be navigated around.
objectValidatorIndecates whether objects produced by collectionProducer are valid
priorityThe priority.

◆ AddAvoids()

void ff14bot.Managers.AvoidanceManager.AddAvoids ( IEnumerable< AvoidInfo > avoids)
static

Adds multiple avoidance areas to the collection of areas to avoid during navigation.

Parameters
avoidsThe collection of avoidance information to add.

◆ AddAvoidUnitCone< T >()

AvoidInfo ff14bot.Managers.AvoidanceManager.AddAvoidUnitCone< T > ( Func< bool > canRun,
Predicate< T > objectSelector,
Func< Vector3 > leashPointProducer,
float leashRadius,
float rotationDegrees,
float radius,
float arcDegrees,
Func< T, Vector3 > locationProducer = null,
bool ignoreIfBlocking = false,
AvoidancePriority priority = AvoidancePriority::Medium )
static

Avoids cone-shaped area effects on a WoWUnit

Template Parameters
T
Parameters
canRun
objectSelectorSelects the WoWUnit
leashPointProducer
leashRadius
rotationDegreesRotation in degrees that's relative to the WoWUnit's rotaton
radiusthe radius of the cone
arcDegreesthe arc of the cone in degrees
locationProducerSelects the location to avoid. This is the apex of the cone
ignoreIfBlocking
priority
Type Constraints
T :GameObject 

◆ Pulse()

void ff14bot.Managers.AvoidanceManager.Pulse ( )
static

Pulses this instance.

◆ RemoveAllAvoids()

void ff14bot.Managers.AvoidanceManager.RemoveAllAvoids ( Predicate< AvoidInfo > match)
static

Removes all avoidance areas from the collection that match the specified condition.

Parameters
matchThe predicate that defines the condition for the avoidance areas to remove.

◆ RemoveAvoid()

void ff14bot.Managers.AvoidanceManager.RemoveAvoid ( AvoidInfo avoidInfo)
static

Removes a specific avoidance area from the collection of areas to avoid during navigation.

Parameters
avoidInfoThe avoidance information to remove.

◆ ResetNavigation()

void ff14bot.Managers.AvoidanceManager.ResetNavigation ( )
static

Resets the internal navigation system.

This should only be called when the local collidable geometry has changed, such as a door closing when engaging a boss.

Property Documentation

◆ AvoidInfos

List<AvoidInfo> ff14bot.Managers.AvoidanceManager.AvoidInfos = new List<AvoidInfo>()
staticget

Collection of avoidance information used for navigation around obstacles.

◆ Avoids

List<Avoid> ff14bot.Managers.AvoidanceManager.Avoids = new List<Avoid>()
staticget

List of active avoidance objects currently being used for navigation.

◆ IsRunningOutOfAvoid

bool ff14bot.Managers.AvoidanceManager.IsRunningOutOfAvoid
staticget

Gets a value indicating whether toon is running out of an area being avoided.

Event Documentation

◆ OnRunningOut

EventHandler<EventArgs> ff14bot.Managers.AvoidanceManager.OnRunningOut
static

Triggered when running out of an avoided area.