Bitten's SpellFlash Library

7M Downloads

When you download one of Bitten's SpellFlash class modules, it comes with a copy of this addon. You do not need to download this addon separately. If you have it installed, you can delete it. That is, of course, unless you like to install the "nolib" versions of addons - but in that case you should know what you are doing and I don't need to give you any more instruction. :)

This is a library to make SpellFlash modules easier to create. Please see the FAQ before posting a question. If that doesn't address your issue, or you have a suggestion to improve this addon, please either leave a comment or create a ticket.

If you are an addon author and want to learn more, read on. If you are not an addon author, there is nothing here you need to worry about - read on only only if you're curious.

Help with cooldown and (de)buff timing

There are often times when want to know whether a certain (de)buff will be present when it's time to cast the next spell. If you use a naive approach of simply checking for the presence of a buff now, and it falls off half way through your current cast, you may have been flashing the wrong spell. There are clones of many (de)buff and cooldown checking functions that allow you to get the information you need easily. For example this library function:

function c.GetMyDebuffDuration(name, noGCD)
    return s.MyDebuffDuration(c.GetID(name)) - c.GetBusyTime(noGCD)
end

Passing a value for noGCD will cause it to ignore the global cooldown, which is useful for spells that are not on the gcd. Otherwise it uses the longer of the gcd and your current cast.

International support without cluttering your code with spell IDs

There are clones of several often-used SpellFlash functions that translate from the spell name you pass to their spell id. For example, you can replace calls that look like

s.Buff(74434--[[Soulburn]], "player")

With calls that look like

c.HasBuff("Soulburn")

Without fear of your code breaking when used on a non-English client. There is also a function, c.GetID("name"), that you can use if a cloned function does not exist in the library. Note that for these functions to work, you must have the spell or buff defined in a.spells.

Estimated Harm and Heal Target Counts

During your rotation function you will have access to the estimated harm and heal targets, to smoothly ramp through AoE rotatinos:

if c.EstimatedHarmTargets > 2 then
if c.EstimatedHealTargets > 5 then
Learning More

There are several other little features, like simplifying your Spam function while supporting options to turn rotations on and off. Feel free to browse the source to learn more. All of Bitten's SpellFlash modules use this library, so any of them provide examples of how to use it.