WoW LibStormEarthAndFire-1.0 addon Shadowlands/classic 2020
logo
wow addon LibStormEarthAndFire-1.0

LibStormEarthAndFire-1.0

Game Version: 6.0.3
Total Downloads: 3,409
Updated: Nov 18, 2014
Created: Mar 11, 2013
download LibStormEarthAndFire-1.0Download Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
v1.0.5 release 11.03 KB Nov 18, 2014 6.0.3 1,759 download LibStormEarthAndFire-1.0 v1.0.5 releaseDownload
v1.0.4 release 10.91 KB Sep 16, 2013 5.4.0 783 download LibStormEarthAndFire-1.0 v1.0.4 releaseDownload
v1.0.3 release 10.91 KB May 22, 2013 5.3.0 236 download LibStormEarthAndFire-1.0 v1.0.3 releaseDownload
v1.0.2 release 11.04 KB Mar 18, 2013 5.2.0 222 download LibStormEarthAndFire-1.0 v1.0.2 releaseDownload
v1.0.1 release 11.08 KB Mar 13, 2013 5.2.0 73 download LibStormEarthAndFire-1.0 v1.0.1 releaseDownload
v1.0 release 10.85 KB Mar 11, 2013 5.2.0 71 download LibStormEarthAndFire-1.0 v1.0 releaseDownload
v1.0.4-3-g743df49 alpha 10.97 KB Nov 18, 2014 6.0.3 37 download LibStormEarthAndFire-1.0 v1.0.4-3-g743df49 alphaDownload
v1.0.4-2-gb0792b9 alpha 10.96 KB Nov 18, 2014 6.0.3 35 download LibStormEarthAndFire-1.0 v1.0.4-2-gb0792b9 alphaDownload
v1.0.4-1-g7ca819e alpha 10.95 KB Nov 18, 2014 5.4.8 47 download LibStormEarthAndFire-1.0 v1.0.4-1-g7ca819e alphaDownload
v1.0.1-1-g531dfb7 alpha 10.99 KB Mar 16, 2013 5.2.0 41 download LibStormEarthAndFire-1.0 v1.0.1-1-g531dfb7 alphaDownload
v1.0-1-gb205c23 alpha 11.01 KB Mar 13, 2013 5.2.0 26 download LibStormEarthAndFire-1.0 v1.0-1-gb205c23 alphaDownload
r20130311191602 alpha 10.80 KB Mar 11, 2013 5.2.0 27 download LibStormEarthAndFire-1.0 r20130311191602 alphaDownload
r20130311190826 alpha 7.42 KB Mar 11, 2013 5.2.0 28 download LibStormEarthAndFire-1.0 r20130311190826 alphaDownload
r20130311190113 alpha 7.38 KB Mar 11, 2013 5.2.0 24 download LibStormEarthAndFire-1.0 r20130311190113 alphaDownload

Description

Share this:

Library to track Storm, Earth, and Fire spirits.

This library requires both LibStub and CallbackHandler-1.0.

This library exposes a set of functions to query the current state, and embeds CallbackHandler-1.0 to provide callbacks when the state changes. These callbacks can be registered with the usual RegisterCallback(), UnregisterCallback(), and UnregisterAllCallbacks() methods.


Functions

:Enabled()

Returns whether the tracker is enabled. The tracker is enabled when the player is a monk in Windwalker spec.

Returns

enabled
Boolean – Returns true if tracking is enabled, false otherwise

:SpiritInfoByTargetGUID(guid)

Returns info about a spirit targeting that GUID.

Arguments

guid
String – GUID of the target

Returns

If no spirit has that target, nothing is returned. Otherwise:

name
String – Name of the spirit
guid
String – GUID of the spirit
icon
String – Texture for the spirit icon

:NumSpirits()

Returns the number of active spirits.

Returns

count
Number – Number of active spirits, or 0 if none

:SpiritInfoByIndex(index)

Returns info about a spirit by index from 1 to NumSpirits().

Arguments

index
Number – Index from 1 to NumSpirits()

Returns

If no spirit by that index, nothing is returned. Otherwise:

name
String – Name of the spirit
guid
String – GUID of the spirit
target
String – Name of the spirit's target
targetGUID
String – GUID of the spirit's target
icon
String – Texture for the spirit's icon

Callbacks

ENABLED

Called when the tracker enables itself. This is generally in response to PLAYER_ENTERING_WORLD or PLAYER_SPECIALIZATION_CHANGED.

DISABLED

Called when the tracker disables itself. This is generally in response to PLAYER_SPECIALIZATION_CHANGED.

NEW_SPIRIT

Called when a new Storm, Earth, or Fire spirit is summoned.

Arguments

name
String – Name of the spirit (e.g. "Storm Spirit")
guid
String – GUID of the spirit
target
String – Name of the spirit's target
targetGUID
String – GUID of the spirit's target
icon
String – Texture for the spirit's icon

DEAD_SPIRIT

Called when a spirit disappears (is killed, kills its target, or is cancelled).

Arguments

name
String – Name of the spirit
guid
String – GUID of the spirit

SPIRIT_TARGET

Called when the player targets the same mob as one of the summoned spirits. If the player summons a spirit on their current target, this event will fire immediately after NEW_SPIRIT.

If the player is targeting one of their spirits' targets and switches to the other spirit's target, this event is fired a second time without an intervening SPIRIT_TARGET_END. Therefore do not expect them to always be balanced.

Arguments

name
String – Name of the spirit
guid
String – GUID of the spirit
target
String – Name of the spirit's target
targetGUID
String – GUID of the spirit's target

SPIRIT_TARGET_END

Called when the player is no longer targeting the same mob as one of the summoned spirits. This may be due to the player changing their target or the spirit dying.

When the spirit with the same target dies, this is fired after DEAD_SPIRIT.


Examples

Using callbacks

local tracker = LibStub("LibStormEarthAndFire-1.0")
tracker.RegisterCallback(myAddon, "ENABLED", function(event)
    print("LibStormEarthAndFire-1.0: enabled")
end)
tracker.RegisterCallback(myAddon, "DISABLED", function(event)
    print("LibStormEarthAndFire-1.0: disabled")
end)
tracker.RegisterCallback(myAddon, "NEW_SPIRIT", function(event, name, guid, target, targetGUID, icon)
    print("LibStormEarthAndFire-1.0: |T"..icon..":0|t " .. name .. " summoned on " .. target)
end)
tracker.RegisterCallback(myAddon, "DEAD_SPIRIT", function(event, name, guid)
    print("LibStormEarthAndFire-1.0: " .. name .. " died")
end)
tracker.RegisterCallback(myAddon, "SPIRIT_TARGET", function(event, name, guid, target, targetGUID)
    print("LibStormEarthAndFire-1.0: sharing a target with " .. name)
end)
tracker.RegisterCallback(myAddon, "SPIRIT_TARGET_END", function(event)
    print("LibStormEarthAndFire-1.0: no longer sharing a target")
end)

Comments

Add a comment