Libraries Login to Add Favorites
  • World of Warcraft
  • 1,470 Monthly Downloads
  • Supports: 6.0.3
  • 8,612 Total Downloads
  • Updated Jul 19, 2016
  • Created Jan 10, 2014
  • 1 Favorites
  • Project Site
  • Release Type: Release
  • License: GNU General Public License version 3 (GPLv3)
  • Newest File: 0.2

About LibPlayerSpells-1.0


Build Status Gitter chat

LibPlayerSpells-1.0 is a library providing data about the spells of the eleven character classes in World of Warcraft. It also includes additional spells derived from racial traits and other sources. The word "spells" is used here in the general sense; it includes active skills as well as passive spells that are found in the players' spellbook. Buffs and debuffs that are applied by the player from other sources are also covered.

This library is born from the need to centralize similar data used in several addons to reduce the maintenance cost and to have a better consistency across those addons.

It provides answers to questions like:
  • Does this spell have a cooldown ?
  • Does this spell apply one or several buff(s) or debuff(s) ?
  • Is this spell a survival cooldown, or used for dps ?
  • Does this spell regenerate mana or some other resource ?
  • What are the survival buffs of all the classes ?
  • Which spell interrupt abilities are available ?

Each class has his own data file that can be updated separately from the main code.

Supported classes & specs

Not all classes and specializations are 100% supported yet. However, most interrupts, dispels, and survival cooldowns are complete.

If LibPlayerSpells is missing something specific from your class please file a detailed bug on Github or contribute to the project yourself if you are feeling brave! In the second case, be sure to read the contribution guidelines.


Copy the library files in your addon and list the lib.xml file in the TOC file.

LibPlayerSpells-1.0 uses LibStub:
local LibPlayerSpells = LibStub('LibPlayerSpells-1.0')

Querying information from a spell

You can then obtain information about a given spell with GetSpellInfo:
local flags, providers, modifiedSpells[, moreFlags] = LibPlayerSpells:GetSpellinfo(spellId)

  • spellId is the numerical spell identifier.
  • flags is a bitfield containing data about the spells (see below).
  • providers is the identifier (or a table of) identifier(s) of the spell(s) to; said otherwise, if the provider is not found in the player's spellbook, the given spell is unavailable. For example, the provider spell can be a passive spell given by a talent.
  • modifiedSpells is the (or a table of) identifier(s) of the spell(s) affected by the given spells.
  • if the given spell is a special case (see below), moreFlags contains another bitfield.

Querying the spell database

You can iterate the database, looking for certain spells, using IterateSpells:
for spellId, flags, providers, modifiedSpells, moreFlags in LibPlayerSpells:IterateSpells(oneOfFlags, requiredFlags, rejectedFlags) do -- Do something with the loot end
flags, providers, modifiedSpells, moreFlags have the same meaning as the values returned by GetSpellinfo. spellId is obviously the numerical identifier of the current spell.

The three method arguments are used to build a filter. They are bitmask specifications. They can be passed as an numerical bitmask computed using bit.bor and library constants, or a string containing the flags separated by white spaces or commas. For example, bit.bor(LibPlayerSpells.constants.HUNTER, LibPlayerSpells.constants.BURST) is the same bitmask as "HUNTER BURST".

IterateSpells lists all spells that:

  • has at least one of the flags listed by oneOfFlags
  • and has all flags listed by requiredFlags,
  • and has none of the flags in rejectedFlags.

If a bitmask is empty or not provided, the corresponding condition is ignored. With no arguments, all spells are listed.

-- Iterate through spells that have a cooldown, are/apply an aura and are either survival or mana-regenerating skills. for spellId, flags, providers, modifiedSpells, moreFlags in LibPlayerSpells:IterateSpells("SURVIVAL REGEN_MANA", "AURA COOLDOWN") do -- Do something with it ! end


Most spell information is stored in a bitfield to compact storage and easily test or filter spells. The bit value constants are available in the LibPlayerSpells.constants table.

The presence of a specific flag can be tested this way:
if, LibPlayerSpells.constants.AURA) ~= 0 then -- This spell is an aura, do something meaningful with it. end

However, the library provides a way to easily build flag tests.

Special spell types

These flags indicate special spells, that (will) have additional data.

  • CROWD_CTRL: this is a crowd-control spell; additional data is a bitfield indicating the diminishing returns category (disorient, taunt, etc.).
  • DISPEL: this spell can dispel either allies' debuffs or enemies' buffs; no additional data yet.
Crowd control flags

These flags are used in the additional data for crowd control spells and indicate the diminishing returns category a spell belongs to. While INTERRUPT and KNOCKBACK are technically DR categories themselves, they do not always have an associated aura and are not traceable through the UNIT_AURA event. Thus they are just ordinary flags in the spell bitmask.

  • ROOT
  • STUN

Spell sources

These flags indicate the source of the spell. The constants are self-explanatory: DEATHKNIGHT, DRUID, HUNTER, MAGE, MONK, PALADIN, PRIEST, ROGUE, SHAMAN, WARLOCK, WARRIOR, RACIAL.


These flags hints about the targeting mechanism of the spell. They are exclusive most of the time.

  • HELPFUL: The spell can be cast on any ally, including the player and his pet.
  • HARMFUL: The spell can be cast on any enemy.
  • PERSONAL: The spell automatically targets the player.
  • PET: The spell automatically targets the player's pet.


  • AURA: The spell applies (or is) a buff on allies, or a debuff on enemies.
  • UNIQUE_AURA: A given character can have only one instance of this (de)buff at a time, even if several players cast the same spell on it, e.g. Hunter's Mark.
  • COOLDOWN: This spell has a meaningful cooldown.
  • SURVIVAL: This spell is considered a survival skill.
  • BURST: This spell is considered a burst skill (either damaging or healing).
  • POWER_REGEN: This spell allows the target to recharge some kind of alternative resource e.g. Energizing Brew
  • IMPORTANT: An important spell the player should react to.
  • INVERT_AURA: The aura logic of this spell is inverted. It applies a debuff on allies or a buff on enemies (this case has yet to be found), e.g. the Weakened Soul applied by Power Word: Shield.


Thanks to ckaotik, Rainrider, mjmurray88, arcadepro for their testing and contributions to the class spells.


LibPlayerSpells-1.0 is licensed using GPL v3. This means that any addon using it must have a compatible license (see there).

tag 0.2
Adirelle <>
2014-12-19 17:57:50 +0100

Update wowace release.


Guillaume Perréal:
    - Added gitter badge.
    - Added webhook.
    - Monk: fixed Enveloping Mist id.
    - Monk: fixed Renewing Mist and Enveloping Mist.
    - Warrior: flag "Shield Wall" as survival.
    - War: Fixed Glyph of Heroic Leap
    - Hunter: added Sniper Training, and also consider Steady Focus as important.
    - Hunter: added the missing buffs of Lone Wolf.
    - Druid: added Lunar Inspiration.
    - Priest: fixed the buff id of Devouring Plague.
    - Druid: consider Pulverize as important.
    - Druid: hopefully fixed Sunfire.
    Should fix
    - Monk: added Renewing Mist.
    - priest: fix Dispel Magic
    the dispel tabel was closed one line too early
    - Priest: fixed whitespaces.
    - Priest: display Shadow Word: Insanity on Insanity.
    Should fix
    - Paladin: added Beacon of Faith.
    - rogue: sort by spell id
    follow the guidelines
    - rogue: fix Smoke Bomb and add Burst of Speed
    fixes gh-63
    - rogue: fixes Hemorrhage and Crimson Tempest
    Fixes gh-64 and gh-65
    - Revert "Merge remote-tracking branch 'dafzor/patch-1'"
    This reverts commit 69fd0539d9bcc698845c43b589fff92591a7b522, reversing
    changes made to 864a04b4921843ff0248c71822b5aeb38cb9f58a.
    - Fixed Rend and Deep Wounds
    Made it so Rend and deep wounds are marked as personal debuffs so they only show the one the player applied.
    - Added a .gitattributes file.
    - Priest.lua - add Void Entropy
    - Druid: added Moonkin Form.
    - Priest: added Dispel Magic.
    - Druid: added Solar/Lunar Empowerment and fixed Sunfire.
    - Monk: fixed Dizzying Haze.
    - Fixed the database tests.
    - Monk: added Vital Mists and Dizzying Haze.
    - Monk ((Brewmaster)): display Shuffle on Chi Explosion.
    - War: Fixed Glad Shield Charge.
    - Cleaning up Shaman.lua
    - Druid: added Rejuvenation (Germination).
    - Druid: added Cenarion Ward and Pulverize.
    - Hunter: fixed Beast Lore, Aspect of the Beast and Misdirection.
    - Druid: display Tooth and Claw on Maul.
    - druid: fix Savage Defense
    Fixes Adirelle/AdiButtonAuras#102
    - Monk: fixed Zen Sphere & Momentum.
    - Monk: added several auras.
    - Rogue: listed the provider of the Hemorrhage debuff.
    - Warrior: Added Fury Spells, HS Glyph
    - Typo
    - Druid: Fixes
    Fixes Faerie Fire, Mighty Bash, Skull Bash, Berserk (alternating forms),
    Hurricane, Prowl, Forms, Ursols Vortex, Tree Form Buff, Stampeding Roar,
    Infected Wounds
    - DK: Necrotic Plague, Breath of Sindragosa
    - Reorganized and uncommented the spells with just a cooldown and no aura.
    - Some additional restoration spells, hacked fixed the lack of maelstrom and echo of element auras.
    - Completed shaman for enhancement and elemental, minus totem effects.
    - Bump
    - Druid: Fixes Glyph of Savage Roar
    - Mage: revision bump.
    - Mage: listed all polymorph variants.
    - Mage: tidied file (comments, whitespaces, order).
    - Mage: fixed Alter Time.
    - Mage: show Heating Up on Pyroblast.
    Should fix
    - DK: Fixes Howling Blast
    - Warrior: Fixed Intervene, Safeguard, Sudden Death
    Intervene, Safeguard, Sudden Death, Level 100 Talents, Re-ordered lists,
    Added more descriptions.
    - Warlock: updated Immolate, Incinerate, Conflagrate and Backdraft (including (Fire and Brimstone versions).
    - Tidied hunter spells (order and comments).
    - hunter: display Beast Cleave on Multishot.
    - Monk data tidying.
    - Monk: display Crane's Zeal on Blackout Kick (Stance of the Spirited Crane).
    - Added a link to the contribution guidelines.
    - Druid and warlock revision bump.
Tim Bellefleur:
    - Fix extraneous comma
    - Warlock: Hand of Guldan & Meta: Chaos Wave debuffs
    - Corruption, Drain Life, and Drain Soul
    Fixes #72
    (cherry picked from commit f767a3c445d7c8d68b0ef65190aaf40865458b13)
    - Fixes
    - Corruption, Drain Life, and Drain Soul
    Fixes #72
    - Fixed some Blood specific problems.
    Rune Tap, Blood Shield, Icy Touch, Plague Strike.
    - More small changes
    - English and Typo Fixes
    - Druid: updated Moonfire and Sunfire ids.
    Fixes GH-37.
    - Removed the tradeskills since they do not give any bonus anymore.
    - README updated to reflect WoD changes.
    - Update version
    Merged Steady focus change.
    - Some fixes.
    Aspect of the Beast, Black Ice, Deterrence Id, Binding Shot afflicted.
    - Hunter: removed Fervor and added Steady Focus.
    - Warrior revision bump.
    - Fixed Spaces
    Save us from the space police.
Michael Murray:
    - Add Amplify Magic as a Helpful Survival CD
    - 6.0 additions
    Tidyup and a couple of additions from Daf.
    - 6.0 changes.
    Some minor fixes and additions.
Michael Murray:
    - Some Mage Clean-ups
    - Fixed database conflict testing.
    - Druid: Symbiosis is gone too.
    - Removed all ids that do not exist anymore.
    I'm pretty sure half of these spells have new ids.
    - Spit only one big error per category, instead of one for each spell.
    - Added standard Hawk Aspect
    Oops. :)
    - Added some missing spells
    Aspects, Black Ice, Posthaste
    - Bump data revisions.
    - Fixed indentation.
    - fixed void tendrils added power word barrier
    - Several paladin spells added
    - Added Rogue's Mark for Death
    - Added rogue Combat Readiness duration
    - Cleanup of presences... again.
    - Added Death Strike Aura for blood shield Added Army of the Dead Aura for damage reduction while channeling
    - Added Burning Rush (talent) and Rain of Fire Aura
    - Added Death Knight Presences since there's no default highlight on which is active
    - Fixed Orc Blood Fury Spell ID (AP)
    - Warrior Changes
    - tests: check conflicts between databases.
    - Paladin: Fixed id of "Lay on Hands".
    - Added more tests.
    - Added lint and checkstyle scripts.
    - Update README.textile
    - Update README.textile
    - Fixed some bugs revealed by the tests.
    - Added some unit testing.
    - Bumped some revisions.
    - Some Minor Typos and Formatting.
    - Core: track spell sources.
    This allows to easily get version information about a spell.
    - Copyright update.
    - Added Shadow Form
    - Fixed Levitate
    - Added Angelic Feather
    - Added Spectral Guise
    - Added Mind Flay & Insanity
    - Fixed HotW again.
    - DK: added Presences.
    Fixes Adirelle/AdiButtonAuras#32.
    - Warlock: added Rain of fire (closes GH-27) and Burning Rush (closes GH-26).
    - Fixed indent in Warrior.lua
    - Warrior: added Glyph of Incite.
    Fixed GH-24.
    - Core: track spell sources.
    This allows to easily get version information about a spell.
    - Druid: also map the Heart of the Wild buffs to the talent.
    - Copyright update.
    - Druid: revision bump.
    - Fixes Druid HotW aura. Issue #25
    HotW Buff Aura matches spellbook id. It is, however, different for each
    - Hunter: added Lone Wolf buffs and reordered other raid buffs.
    - Added contributors to README.textile
Michael Murray:
    - One more time for Thrill of the Hunt
    - Updates to Lock and Load
    - Mage: Added polymorphs, modified spells and a few cooldowns/auras.
    - Paladin: Fixed incorrect nesting of HELPFUL/PERSONAL
    - Paladin: Added several spells, providers and modifiers.
    - Stupid web interface.
    - Delete Warrior.lua
    - Reverted to personal setup.
    - RAIDBUFF category re-enabled for pull.
    - Protection & Arms 100% functional.
    - Update Warrior.lua
    - Update Warrior.lua
    - Update Warrior.lua
    - Update Warrior.lua
    - monk: add brewmaster and windwalker spells
    - hunter: bump spells version
    Build 18716 should be fully covered now
    - hunter: add Netherwinds
    Flourish is now Savage Vigor
    - hunter: Improved Camouflage removed
    - Hunter: enabled hunter (de)buffs again.
    - Core: emits warnings on invalid spells, instead of causing an error.
    - Added Ultimatum. 'RAIDBUFF' just doesn't work.
    - Removed Shouts, Added Sudden Execute.
    - Update Warrior.lua
    - Update Warrior.lua
    Make Prot and Arms usable for Adibuttonauras. Tested in game. Will tidy up categories later.
Michael Murray:
    - Comments and one cleanup
    - Update to put translations in the proper tables
    - Updates from testing and more Mage spells
    - Add some Fire auras
    Removed Invoker's Energy since it didn't seem to be working.
    - Additional Mage cooldowns
    - Add Mage bombs and some Frost/Arcane procs
    - hunter: fix non SV camouflage
    - hunter: add WoD talents
    - hunter: add WoD marksman spells
    - hunter: add WoD beast master spells
    - hunter: add WoD survival spells
    - data: direct combat benefits from professions removed
    - data: revisit racials
    - data: clean up; add WoD raid buffs
    - core: add support for WoD raid buff categories
    - bump TOC to 6.0
    - add some survival raid cooldowns
    - Paladin: Track Inquisition Buff
    - Deathknight: Frost Fever is also applied by Howling Blast
    - Warlock: bump data version
    - Warlock: add Hellfire
    - Warlock: fix Chaos Wave (Metamorphosis)
    - Warlock: add Life Tap
    - Warlock: fix Corruption
    - Hunter: bump data version
    - Hunter: fix The Beast Within
    - Hunter: fix Frenzy
    - Hunter: fix Focus Fire
    - Hunter: fix Freezing Trap
    - Hunter: fix Master's Call
    - Hunter: fix Camouflage
    - Monk: Add Zen Sphere
    - Druid: Thrash spellbook id is different from ids in action bars.
    - Warlock: fix the spell id of glyphed Health Funnel.
    - Warlock: fixed Shadowburn ids.
    - Monk: added Storm, Earth, and Fire.
    - Warlock: fix Enslave Demon
    AURA and INVERT_AURA are not mutually exclusive but complementary
    - Deathknight: fix Control Undead
    AURA and INVERT_AURA are not mutually exclusive but complementary
    - Added an Acknowledgment section in the README.
    - Deathknight: include most spells
    - Shaman: added Maelstrom Weapon.
    - Monk: fixed Rising Sun Kick mapping.
    - Rogue: removed some entries as they are handled through DRData
    - Rogue: added most spells
    - Priest: fixed Evangelism provider id.
    - Changed Priest rules: Added healer's Void Shift, added Mind Bender cd, changed evangelism spellID (works for discipline), added Archangel spellID
    - Fixed Druid's Savage Defense
    - Monk: fixed Healing Sphere buff id.