Allara Boss Core

API Reference

ABC:CancelPossibleWipe(fight)

Cancels a possible wipe.
A "possible wipe" occurs when ABC detects that the entire raid is either dead, or not affecting combat. Rather than wiping immediately, ABC flags a "possible wipe" and waits a certain number of seconds before checking again. If the second check also indicates a wipe, ABC actually executes the wipe.

CancelPossibleWipe can be called during the delay between the first and second checks. It will cancel the second check. This is useful for encounters (such as The Lich King) that contain a very long period where the entire raid is dead.

Parameters

fight


ABC:Debug(...)

If debug mode is on, prints something using ABC:Print().
Turn debug mode on by typing /allarabosscore debug.

Parameters

...


ABC:EndAllFights(silent)

Immediately ends all fights.

Parameters

silent
(Optional) Used for debug mode only. Instructs the function to not output any debug text.


ABC:EndFight(fight, silent)

Immediately ends the selected fight.

Parameters

fight
The fight object. This should be the fight table, not the fight's key string.
silent
(Optional) Used for debug mode only. Instructs the function to not output any debug text.


ABC:GetBossTarget(_cid, _fn, _delay)

After a specified delay, locates the requested boss and finds it's target.

Parameters

_cid
The NPC ID of the boss.
_fn
The callback function to execute. The only parameter to this function will be the name of the player that is targetted.
_delay
The delay in seconds before the target should be scanned for.


ABC:GetBossTargetChange(_cid, _fn)

Watches a boss to see if it changes targets within 0.3 seconds.
If it does, your callback function is called. If the boss doesn't change targets, whatever it's target is after 0.3 seconds is used. This algorithm is necessary for certain boss mechanics.

Parameters

_cid
The NPC ID of the boss.
_fn
The callback function to execute. The only parameter to this function will be the name of the player that is targetted.


ABC:GetCIDFromGUID(guid)

Returns the NPC ID of a given unit from it's GUID.

Parameters

guid
The unit's GUID.


ABC:GetNumActiveFights()

Returns the number of fights currently active.


ABC:GetUnitCreatureId(unit)

Returns the NPC ID of a given unit ID

Parameters

unit
The unit ID (i.e. player, raid1target, etc.)


ABC:IsFightStarted(fight)

Returns true if the selected fight is currently active, false if not.

Parameters

fight
The fight object. This should be the fight table, not the fight's key string.


ABC:IsHeroicRaid()

Returns true if the current raid instance is in heroic mode.


ABC:LoadZone(zone, now)

Loads any load-on-demand add-ons that requested to be loaded for the current (or designated) zone.

Parameters

zone
(Optional) If specified, LoadZone loads any add-ons belonging to the specified zone. This parameter is expected to be in the enUS locale. If you don't specify this, uses the current zone.
now
(Optional) Causes load-on-demand add-ons to be loaded immediately. Without this parameter, the add-ons would be loaded after a 3 second delay.


ABC:RegisterEncounter(name, definition)

Registers an encounter definition.
Your encounter will not be validated for errors.

Parameters

name
The unique key string for this encounter. This key must be unique across all add-ons that use ABC. If a duplicate key is registered twice, an error will be thrown.
definition
The encounter definition table. See http://www.wowace.com/addons/allara-boss-core/pages/how-to-write-an-add-on-that-uses-abc/ for details about this format.


ABC:RegisterEncounters(encounters)

Registers a table of encounters.
The keys in the table are used as the unique fight keys. Each table entry is an encounter definition table.

Parameters

encounters
A table of encounter definitions (which are themselves tables).


ABC:StartFight(fight, startDelay, silent)

Starts the selected fight.

Parameters

fight
The fight definition table to start, or the fight's unique key string.
startDelay
(Optional) The delay in seconds between when the fight should have started, and when it actually started.
silent
(Optional) Used for debug mode only. Instructs the function to not output any debug text.


ABC:Sync(fight, object)

Sends arbitrary data to other players in your raid.
When received, your encounter definition will receive the onSync event. The data is only sent to your encounter, not any other encounters that may be running.

Parameters

fight
The fight object. This should be the fight table, not the fight's key string. If calling from within the encounter, simply pass "self" as this parameter.
object
Any arbitrary object to send. This can be any value, or a table.


You must login to post a comment. Don't have an account? Register to get one!