A Bit of Background
LibSpellName2SID was created by twobits and benots4 for ReadySpells (a rotation helper addon, originally by Aldmehr - his last release, future ReadySpells updates will be on this page).
Back then, LibSpellName2SID was a dropin replacement to the defunct LibBabbleSpell. I believe there is a place for such an addon still nowadays. As I plan on reviving ReadySpells, I am starting by bringing this library up to date.
The first version of LibSpellName2SID uploaded to WoWInterface was simply twobits / benots4's original version, packaged into itself.
What It Does and What It Does Not
- LibSpellName2SID does NOT intend to replace GetSpellInfo()
- LibSpellName2SID does NOT intend to replace GetSpellBookItemInfo()
- LibSpellName2SID does NOT intend to replace other Blizzard API functions that retrieve information about spells
- LibSpellName2SID does intend to replace this:
Lua Code:
local spells = {
345679 = true, --spell name
906723 = true, --other spell name
}
with this:
Lua Code:
LibspellName2SID.ID = {
["spell name"] = 345679 ,
["other spell name"] = 906723 ,
}
API
Foreword on the Databases
LibSpellName2SID (this addon) includes the database for player-castable spells;
LibSpellName2SID-Passives (
http://www.wowinterface.com/download...-Passives.html ) includes the database for passive spells;
IMPORTANT: On both LibSpellName2SID and LibSpellName2SID-Passives, the API has changed from that used in 1.0 to the one in current 1.1. Please use the new methods/references as outlined bellow:
Enable in your addon
local Lib = LibStub("LibSpellName2SID-1.1"):NewInstance(
YouNameIt (string));
and/or
local LibP = LibStub("LibSpellName2SID-1.1-Passives"):NewInstance(
YouNameIt (string));
Remove your addon's instance of the library
Lib:RemoveInstance(
YouNameIt (string), DontErrorOnInexistent
(optional boolean));
and/or
LibP:RemoveInstance(
YouNameIt (string), DontErrorOnInexistent
(optional boolean));
Available API
Lib.clients[
YouNameIt].SID["EnglishSpellName"
(string) or SpellID
(number)] -- Returns the Spell ID of English Spell Name
Lib.clients[
YouNameIt].LSN["EnglishSpellName"
(string) or SpellID
(number)] -- Returns the Localized Spell Name of English Spell Name
Lib.SetFaction(faction,
YouNameIt) -- Set which faction version of spells that have the same name but different IDs to return via SID[spell] - If this function is not used, the faction will default to the same as the player's.
Bug reports and Feature requests
Bug reports: http://www.wowinterface.com/portal.p...646&a=listbugs
Feature requests: http://www.wowinterface.com/portal.p...a=listfeatures
Latest Changes
Click on the "Change Log" tab on the top of this page for the full list.
1.1.11b (SVN r192)
- .TOC and Database updated (to
80300, 33115);
- Added Bloodlust and Heroism spell Ids modified by the PvP talent:
Shamanism;
- Added
Mechagnome and
Vulpera racials.
Still TODO:
- Add the
Azerite Essences introduced in WoW 8.3.0;
- Check and add for new Hunter Pet Families / Family Spells' changes;
- Add
automatic runtime checks for (default) spell ID for
active Azerite Essence Ranks, Bloodlust/Heroism spell Id (dependent on presence/absence of Shamanism) etc.
SVN:
svn://svn.wowinterface.com/LibSpellName2SID-1146