WoWInterface SVN ReadySpells

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 15 to Rev 16
    Reverse comparison

Rev 15 → Rev 16

trunk/ReadySpells/embeds.xml
14,4 → 14,5
<Include file="libs\AceBucket-3.0\AceBucket-3.0.xml"></Include>
<Script file="libs\libDualSpec-1.0\libDualSpec-1.0.lua" />
<Script file="libs\LibSpellName2SID-1.0\LibSpellName2SID-1.0.lua" />
<Script file="libs\LibSpellName2SID-1.0-Passives\LibSpellName2SID-1.0-Passives.lua" />
</Ui>
\ No newline at end of file
trunk/ReadySpells/Init.lua
67,6 → 67,10
local function validateSpell(spellname)
spellname = SID[spellname] or spellname;
if ReadySpells.db.profile.spellList[spellname] == nil then
-- We should use spellList (AddonEnv.spellList) instead of ReadySpells.db.profile.spellList. The
-- later is saved into the profile and there's no point in this, as the spelllist (list of all
-- available spells, watched by ReadySpells or not) is loaded fresd from the server (Spellbook
-- et al) on each session start (as it should), as well as at some other times.
-- DBG Start
-- if spellname then
-- print(AddonName.. ": did NOT validate (existing) ".. tostring(spellname).. ": ".. tostring(SID[spellname]).. ": ".. tostring(LSN[spellname]));
432,7 → 436,32
end
]]--
 
table.sort(spellList);
-- table.sort(spellList);
-- AmberAlert (addon) message on Lvl13 Mage:
--[[
Message: attempt to compare string with number
Time: 04/15/18 17:58:23
Count: 1
Stack: attempt to compare string with number
(tail call): ?
[C]: in function `sort'
Interface\AddOns\ReadySpells\Init.lua:439: in function `getSpellList'
Interface\AddOns\ReadySpells\Core.lua:1585: in function `RefreshConfig'
Interface\AddOns\ReadySpells\Core.lua:1482: in function `OnProfileEnable'
Interface\AddOns\ReadySpells\Core.lua:1550: in function <Interface\AddOns\ReadySpells\Core.lua:1507>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[1]"]:9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?
...\AddOns\!Vendorer\libs\AceAddon-3.0\AceAddon-3.0.lua:558: in function `EnableAddon'
...\AddOns\!Vendorer\libs\AceAddon-3.0\AceAddon-3.0.lua:651: in function <...\AddOns\!Vendorer\libs\AceAddon-3.0\AceAddon-3.0.lua:636>
[C]: in function `LoadAddOn'
Interface\FrameXML\UIParent.lua:429: in function `UIParentLoadAddOn'
Interface\FrameXML\UIParent.lua:528: in function `TimeManager_LoadUI'
Interface\FrameXML\UIParent.lua:1114: in function <Interface\FrameXML\UIParent.lua:1011>
 
Locals: <none>
]]--
end
 
 
608,11 → 637,11
order = 20,
args ={
spelllist ={
name = 'Spell List',
desc = 'These are your Available Spells',
name = 'Class spells',
-- desc = 'Available Class spells',
type = 'input',
order = 50,
multiline = 25, -- Number of *visible* lines in the scrolling editbox;
multiline = 16, -- Number of *visible* lines in the scrolling editbox;
-- allows inputing many more, viewable by scrolling;
-- if set to 'true' (instead of number), defaults to 4.
get = function()
642,11 → 671,136
ReadySpells:getSpellList();
end,
}, -- spelllist
--[[
spelllistPet ={
name = 'Pet Spells',
-- desc = 'Available Class-Pet spells',
type = 'input',
order = 51,
multiline = 4, -- Number of *visible* lines in the scrolling editbox;
-- allows inputing many more, viewable by scrolling;
-- if set to 'true' (instead of number), defaults to 4.
get = function()
-- print(AddonName.. ": In spelllist->get()");
]]--[[
local v , dString
-- if spellList ~= nil then
for k, v in pairs(ReadySpells.db.profile.spellList) do
-- LSN[k] gets the localized spell name of the saved spell,
-- regardless of what language the spell was saved in, or
-- whether it's even a spell name or rather a spell ID.
-- The values of k here were saved as SID[k] by function
-- getSpellList().
-- 'v' is the order index in the spell list and was already
-- being correctly handled, namely it's sorted in set func.
k = LSN[k] or k;
if dString ~= nil then
dString = dString .. k .. "\n"
else
dString = k .. "\n";
end
end
-- end
return dString;
]]--
--[[end,
set = function()
]]--[[
-- print(AddonName.. ": In spelllist->set()");
ReadySpells:getSpellList();
]]--
--[[end,
}, -- spelllistPet
spelllistGeneral ={
name = 'General Tab Spells',
-- desc = 'Available General Tab spells',
type = 'input',
order = 60,
multiline = 8, -- Number of *visible* lines in the scrolling editbox;
-- allows inputing many more, viewable by scrolling;
-- if set to 'true' (instead of number), defaults to 4.
get = function()
-- print(AddonName.. ": In spelllist->get()");
]]--[[
local v , dString
-- if spellList ~= nil then
for k, v in pairs(ReadySpells.db.profile.spellList) do
-- LSN[k] gets the localized spell name of the saved spell,
-- regardless of what language the spell was saved in, or
-- whether it's even a spell name or rather a spell ID.
-- The values of k here were saved as SID[k] by function
-- getSpellList().
-- 'v' is the order index in the spell list and was already
-- being correctly handled, namely it's sorted in set func.
k = LSN[k] or k;
if dString ~= nil then
dString = dString .. k .. "\n"
else
dString = k .. "\n";
end
end
-- end
return dString;
]]--[[
end,
set = function()
]]--[[
-- print(AddonName.. ": In spelllist->set()");
ReadySpells:getSpellList();
]]--[[
end,
}, -- spelllistGeneral ]]
}, -- args
}, -- pickOcell
} -- args
}, -- general
displaySettings = {
}, -- args
} -- ReadySpells.options
 
for i = 1, GetNumSpecializations() do
local _, specName = GetSpecializationInfo(i);
ReadySpells.options.args.general.args.pickOcell.args[specName] = {
name = specName.. " Talent-Spells",
-- desc = 'Available General Tab spells',
type = 'input',
order = 60 + i,
multiline = 4, -- Number of *visible* lines in the scrolling editbox;
-- allows inputing many more, viewable by scrolling;
-- if set to 'true' (instead of number), defaults to 4.
get = function()
-- print(AddonName.. ": In spelllist->get()");
--[[
local v , dString
-- if spellList ~= nil then
for k, v in pairs(ReadySpells.db.profile.spellList) do
-- LSN[k] gets the localized spell name of the saved spell,
-- regardless of what language the spell was saved in, or
-- whether it's even a spell name or rather a spell ID.
-- The values of k here were saved as SID[k] by function
-- getSpellList().
-- 'v' is the order index in the spell list and was already
-- being correctly handled, namely it's sorted in set func.
k = LSN[k] or k;
if dString ~= nil then
dString = dString .. k .. "\n"
else
dString = k .. "\n";
end
end
-- end
return dString;
]]--
end,
set = function()
--[[
-- print(AddonName.. ": In spelllist->set()");
ReadySpells:getSpellList();
]]--
end,
} -- [specName]
end -- ReadySpells.options.args.general.args.pickOcell.args
 
ReadySpells.options.args.displaySettings = {
type = 'group',
name = 'Display Settings',
order = 1,
831,9 → 985,9
} -- args
}, -- mouseOver
} -- args
}, -- displaySettings
}, -- args
} -- ReadySpells.options
} -- displaySettings
-- }, -- args
-- } -- ReadySpells.options
 
-- Ace3 Menu (Game Menu->Interface->AddOns->ReadySpells): Watch Spells --
-- do
trunk/ReadySpells/libs/LibSpellName2SID-1.0-Passives/LibSpellName2SID-1.0-Passives.lua New file
0,0 → 1,1316
---------------------
-- LibSpellName2SID-Passives - fork off LibSpellName2SID by aallkkaa
--
-- V.10008: 2018 First release, by aallkkaa [1]
--
-- [1] https://www.wowinterface.com/forums/member.php?u=335646
---------------------
-- API:
-- LibSpellName2SID-Passives.SID["EnglishSpellName"] -- Spell ID of English Spell Name
-- LibSpellName2SID-Passives.LSN["EnglishSpellName"] -- Localized Spell Name
-- LibSpellName2SID-Passives:GetNumSpells() -- Get the number of spells in the database - TEMP. OUT
-- LibSpellName2SID-Passives:Cleanup() -- Clean up the database (remove from RAM) - DEPRECATED
---------------------
 
-- Initialisation --
--------------------
 
AddonName, AddonEnv = ...;
 
-- Library's version values --
local LibSpellName2SID_MAJOR = "LibSpellName2SID-Passives";
local LibSpellName2SID_MINOR = 10008;
-- print(LibSpellName2SID_MAJOR.. "-".. LibSpellName2SID_MINOR.. ": AddonName = ".. AddonName);
 
-- DataSource --
-- gameBuild = 26124
-- clientLocale = enUS
 
-- Register with LibStub --
assert(LibStub, LibSpellName2SID_MAJOR.. "-".. LibSpellName2SID_MINOR.." requires LibStub.");
local LibSN2SIDP = LibStub:NewLibrary(LibSpellName2SID_MAJOR, LibSpellName2SID_MINOR);
if not LibSN2SIDP then -- Same version or newer already loaded;
return; -- I.e. nothing else to do.
end
 
 
-- Set the library database contents --
---------------------------------------
 
LibSN2SIDP.owner = AddonName;
LibSN2SIDP.minor = LibSpellName2SID_MINOR;
 
LibSN2SIDP.DB = {}; -- Clear old version's contents, if applicable
LibSN2SIDP.DB = {
["General"] = {
["Spells"] = {
["Inner Peace"] = 107074,
["Draenor Pathfinder"] = 191645,
["Expansive Mind"] = 20591,
["Armor Skills"] = 76282,
["Beast Slaying"] = 20557,
["Journeyman Riding"] = 33391,
["Wisp Spirit"] = 20585,
["Time is Money"] = 69042,
["Touch of Elune"] = 154748,
["Gemcutting"] = 28875,
["The Quick and the Dead"] = 83950,
["Arcane Acuity"] = 154742,
["Mount Up"] = 78633,
["Frost Resistance"] = 20596,
["Engineering Specialization"] = 20593,
["Nimble Fingers"] = 92680,
["Guild Mail"] = 83951,
["Hasty Hearth"] = 83944,
["Bouncy"] = 107076,
["Gourmand"] = 107073,
["Epicurean"] = 107072,
["Flayer"] = 68978,
["Explorer"] = 92682,
["Endurance"] = 20550,
["Expert Riding"] = 34090,
["Better Living Through Chemistry"] = 69045,
["Viciousness"] = 68975,
["Shadow Resistance"] = 20579,
["Aberration"] = 68976,
["Regeneration"] = 20555,
["Command"] = 21563,
["Brawn"] = 154743,
["Languages"] = 79739,
["Heroic Presence"] = 6562,
["Quickness"] = 20582,
["Hardiness"] = 20573,
["Best Deals Anywhere"] = 69044,
["Weapon Skills"] = 76292,
["Da Voodoo Shuffle"] = 58943,
["Cultivation"] = 20552,
["Master Riding"] = 90265,
["Nature Resistance"] = 20551,
["Arcane Resistance"] = 822,
["Might of the Mountain"] = 59224,
["Apprentice Riding"] = 33388,
["Diplomacy"] = 20599,
["Arcane Affinity"] = 28877,
["The Human Spirit"] = 20598,
["Artisan Riding"] = 34091,
["Touch of the Grave"] = 5227,
},
["METADATA"] = {
["raceBuilds"] = {
["Draenei"] = "26124",
["NightElf"] = "26124",
["Scourge"] = "26124",
["Orc"] = "26124",
["Gnome"] = "26124",
["Troll"] = "26124",
["Tauren"] = "26124",
["Dwarf"] = "26124",
["Worgen"] = "26124",
["BloodElf"] = "26124",
["Human"] = "26124",
["Pandaren"] = "26124",
["Goblin"] = "26124",
},
},
},
["DEATHKNIGHT"] = {
["Frost"] = {
["Rime"] = 59057,
["Runic Empowerment"] = 81229,
["Killing Machine"] = 51128,
["On a Pale Horse"] = 51986,
["Mastery: Frozen Heart"] = 77514,
["Dark Succor"] = 178819,
},
["Blood_Talents"] = {
["March of the Damned"] = 219779,
["Foul Bulwark"] = 206974,
["Heartbreaker"] = 221536,
["Ossuary"] = 219786,
["Rapid Decomposition"] = 194662,
["Tremble Before Me"] = 206960,
["Tightening Grasp"] = 206970,
["Heart of Ice"] = 246426,
["Spectral Deflection"] = 211078,
["Bloodworms"] = 195679,
["Anti-Magic Barrier"] = 205727,
["Red Thirst"] = 205723,
["Will of the Necropolis"] = 206967,
["Purgatory"] = 114556,
},
["Frost_Talents"] = {
["Icy Talons"] = 194878,
["Frozen Pulse"] = 194909,
["Permafrost"] = 207200,
["Abomination's Might"] = 207161,
["Avalanche"] = 207142,
["Freezing Fog"] = 207060,
["Inexorable Assault"] = 253593,
["Volatile Shielding"] = 207188,
["Shattering Strikes"] = 207057,
["Murderous Efficiency"] = 207061,
["Runic Attenuation"] = 207104,
["Gathering Storm"] = 194912,
["Icecap"] = 207126,
["Winter is Coming"] = 207170,
},
["Unholy"] = {
["Sudden Doom"] = 49530,
["Mastery: Dreadblade"] = 77515,
["On a Pale Horse"] = 51986,
["Runic Corruption"] = 51462,
["Dark Succor"] = 178819,
},
["METADATA"] = {
["Specs"] = {
["Unholy"] = 252,
["Frost"] = 251,
["Blood"] = 250,
},
},
["Unholy_Talents"] = {
["All Will Serve"] = 194916,
["Debilitating Infestation"] = 207316,
["Castigator"] = 207305,
["Ebon Fever"] = 207269,
["Sludge Belcher"] = 207313,
["Shadow Infusion"] = 198943,
["Bursting Sores"] = 207264,
["Pestilent Pustules"] = 194917,
["Spell Eater"] = 207321,
["Unholy Frenzy"] = 207289,
["Lingering Apparition"] = 212763,
["Necrosis"] = 207346,
["Infected Claws"] = 207272,
},
["Blood"] = {
["On a Pale Horse"] = 51986,
["Veteran of the Third War"] = 48263,
["Crimson Scourge"] = 81136,
["Mastery: Blood Shield"] = 77513,
},
},
["DEMONHUNTER"] = {
["Havoc_Talents"] = {
["First Blood"] = 206416,
["Bloodlet"] = 206473,
["Demon Reborn"] = 193897,
["Unleashed Power"] = 206477,
["Demonic"] = 213410,
["Prepared"] = 203551,
["Soul Rending"] = 204909,
["Desperate Instincts"] = 205411,
["Demonic Appetite"] = 206478,
["Momentum"] = 206476,
["Master of the Glaive"] = 203556,
["Fel Mastery"] = 192939,
["Blind Fury"] = 203550,
["Demon Blades"] = 203555,
["Chaos Cleave"] = 206475,
},
["Vengeance_Talents"] = {
["Blade Turning"] = 247254,
["Feed the Demon"] = 218612,
["Last Resort"] = 209258,
["Feast of Souls"] = 207697,
["Fallout"] = 227174,
["Razor Spikes"] = 209400,
["Agonizing Flames"] = 207548,
["Concentrated Sigils"] = 207666,
["Quickened Sigils"] = 209281,
["Burning Alive"] = 207739,
["Soul Rending"] = 217996,
["Flame Crash"] = 227322,
["Abyssal Strike"] = 207550,
},
["Havoc"] = {
["Mastery: Demonic Presence"] = 185164,
["Double Jump"] = 196055,
["Shattered Souls"] = 178940,
},
["Vengeance"] = {
["Demonic Wards"] = 203513,
["Shattered Souls"] = 204254,
["Double Jump"] = 196055,
["Mastery: Fel Blood"] = 203747,
},
["METADATA"] = {
["Specs"] = {
["Havoc"] = 577,
["Vengeance"] = 581,
},
},
},
["DRUID"] = {
["Feral_Talents"] = {
["Moment of Clarity"] = 236068,
["Jagged Wounds"] = 202032,
["Blood Scent"] = 202022,
["Predator"] = 202021,
["Soul of the Forest"] = 158476,
["Balance Affinity"] = 197488,
["Bloodtalons"] = 155672,
["Lunar Inspiration"] = 155580,
["Sabertooth"] = 202031,
["Restoration Affinity"] = 197492,
["Guardian Affinity"] = 217615,
},
["Feral"] = {
["Omen of Clarity"] = 16864,
["Mastery: Razor Claws"] = 77493,
["Feline Swiftness"] = 131768,
["Travel Form"] = 159456,
["Tiger's Fury"] = 231055,
["Predatory Swiftness"] = 16974,
["Feral Instinct"] = 16949,
["Ferocious Bite"] = 231056,
["Shred"] = 231057,
["Rake"] = 231052,
["Primal Fury"] = 159286,
["Infected Wounds"] = 48484,
["Swipe"] = 231283,
},
["Balance"] = {
["Mastery: Starlight"] = 77492,
["Moonkin Form"] = 231042,
["Astral Influence"] = 197524,
["Starfall"] = 231049,
["Sunfire"] = 231050,
["Travel Form"] = 159456,
["Starsurge"] = 231021,
},
["Guardian"] = {
["Mastery: Nature's Guardian"] = 155783,
["Ironfur"] = 231070,
["Lightning Reflexes"] = 231065,
["Thick Hide"] = 16931,
["Gore"] = 210706,
["Feline Swiftness"] = 131768,
["Mangle"] = 231064,
["Travel Form"] = 159456,
},
["Restoration_Talents"] = {
["Inner Peace"] = 197073,
["Spring Blossoms"] = 207385,
["Cultivation"] = 200390,
["Feral Affinity"] = 197490,
["Soul of the Forest"] = 158478,
["Abundance"] = 207383,
["Balance Affinity"] = 197632,
["Moment of Clarity"] = 155577,
["Guardian Affinity"] = 197491,
["Germination"] = 155675,
["Prosperity"] = 200383,
["Stonebark"] = 197061,
},
["METADATA"] = {
["Specs"] = {
["Feral"] = 103,
["Balance"] = 102,
["Guardian"] = 104,
["Restoration"] = 105,
},
},
["Balance_Talents"] = {
["Starlord"] = 202345,
["Nature's Balance"] = 202430,
["Stellar Drift"] = 202354,
["Shooting Stars"] = 202342,
["Guardian Affinity"] = 197491,
["Restoration Affinity"] = 197492,
["Soul of the Forest"] = 114107,
["Feral Affinity"] = 202157,
},
["Restoration"] = {
["Ysera's Gift"] = 145108,
["Travel Form"] = 159456,
["Omen of Clarity"] = 113043,
["Regrowth"] = 231032,
["Rejuvenation"] = 231040,
["Sunfire"] = 231050,
["Mastery: Harmony"] = 77495,
["Living Seed"] = 48500,
},
["Guardian_Talents"] = {
["Blood Frenzy"] = 203962,
["Restoration Affinity"] = 197492,
["Rend and Tear"] = 204053,
["Feral Affinity"] = 202155,
["Soul of the Forest"] = 158477,
["Balance Affinity"] = 197488,
["Brambles"] = 203953,
["Galactic Guardian"] = 203964,
["Guardian of Elune"] = 155578,
["Earthwarden"] = 203974,
["Survival of the Fittest"] = 203965,
["Guttural Roars"] = 204012,
},
},
["HUNTER"] = {
["Pets"] = {
["Great Stamina"] = 61688,
["Blood of the Rhino"] = 53482,
["Combat Experience"] = 20782,
["Cornered"] = 53497,
["Avoidance"] = 65220,
["Hunting Companion"] = 191336,
["Spiked Collar"] = 53184,
["Boar's Speed"] = 19596,
},
["Beast Mastery"] = {
["Disengage"] = 231549,
["Bestial Wrath"] = 231548,
["Exhilaration"] = 231546,
["Beast Cleave"] = 115939,
["Kindred Spirits"] = 56315,
["Wild Call"] = 185789,
["Mastery: Master of Beasts"] = 76657,
["Cobra Shot"] = 262838,
},
["Beast Mastery_Talents"] = {
["Trailblazer"] = 199921,
["Stomp"] = 199530,
["One with the Pack"] = 199528,
["Way of the Cobra"] = 194397,
["Big Game Hunter"] = 204308,
["Aspect of the Beast"] = 191384,
["Dire Stable"] = 193532,
["Posthaste"] = 109215,
["Farstrider"] = 199523,
["Blink Strikes"] = 130392,
["Bestial Fury"] = 194306,
["Killer Cobra"] = 199532,
},
["Survival"] = {
["Survivalist"] = 164856,
["Raptor Strike"] = 262839,
["Exhilaration"] = 231546,
["Mastery: Hunting Companion"] = 191334,
["Waylay"] = 234955,
["Flanking Strike"] = 237327,
["Harpoon"] = 231550,
["Aspect of the Eagle"] = 231555,
},
["Marksmanship"] = {
["Disengage"] = 231549,
["Marksman's Focus"] = 231554,
["Exhilaration"] = 231546,
["Hunting Party"] = 212658,
["Hunter's Mark"] = 185987,
["Mastery: Sniper Training"] = 193468,
["Bombardment"] = 35110,
},
["Survival_Talents"] = {
["Trailblazer"] = 199921,
["Serpent Sting"] = 87935,
["Aspect of the Beast"] = 191384,
["Mortal Wounds"] = 201075,
["Guerrilla Tactics"] = 236698,
["Expert Trapper"] = 199543,
["Way of the Mok'Nathal"] = 201082,
["Posthaste"] = 109215,
["Animal Instincts"] = 204315,
},
["Marksmanship_Talents"] = {
["Trailblazer"] = 199921,
["Careful Aim"] = 53238,
["Lock and Load"] = 194595,
["Posthaste"] = 109215,
["Lone Wolf"] = 155228,
["Steady Focus"] = 193533,
["Farstrider"] = 199523,
["Patient Sniper"] = 234588,
["True Aim"] = 199527,
["Trick Shot"] = 199522,
},
["METADATA"] = {
["Specs"] = {
["Marksmanship"] = 254,
["Beast Mastery"] = 253,
["Survival"] = 255,
},
},
},
["MAGE"] = {
["Arcane_Talents"] = {
["Amplification"] = 236628,
["Mana Shield"] = 235463,
["Incanter's Flow"] = 1463,
["Words of Power"] = 205035,
["Chrono Shift"] = 235711,
["Unstable Magic"] = 157976,
["Overpowered"] = 155147,
["Slipstream"] = 236457,
["Erosion"] = 205039,
["Temporal Flux"] = 234302,
["Ice Ward"] = 205036,
["Resonance"] = 205028,
},
["Frost"] = {
["Brain Freeze"] = 190447,
["Mastery: Icicles"] = 76613,
["Fingers of Frost"] = 112965,
["Shatter"] = 12982,
},
["Pets"] = {
["Avoidance"] = 65220,
},
["Frost_Talents"] = {
["Frigid Winds"] = 235224,
["Incanter's Flow"] = 1463,
["Splitting Ice"] = 56377,
["Frozen Touch"] = 205030,
["Lonely Winter"] = 205024,
["Unstable Magic"] = 157976,
["Bone Chilling"] = 205027,
["Arctic Gale"] = 205038,
["Ice Ward"] = 205036,
["Glacial Insulation"] = 235297,
["Thermal Void"] = 155149,
},
["Arcane"] = {
["Arcane Barrage"] = 231564,
["Mastery: Savant"] = 190740,
["Evocation"] = 231565,
},
["Fire"] = {
["Cauterize"] = 86949,
["Fire Blast"] = 231567,
["Enhanced Pyrotechnics"] = 157642,
["Critical Mass"] = 117216,
["Hot Streak"] = 195283,
["Mastery: Ignite"] = 12846,
},
["Fire_Talents"] = {
["Blazing Soul"] = 235365,
["Incanter's Flow"] = 1463,
["Conflagration"] = 205023,
["Pyromaniac"] = 205020,
["Firestarter"] = 205026,
["Alexstrasza's Fury"] = 235870,
["Controlled Burn"] = 205033,
["Unstable Magic"] = 157976,
["Frenetic Speed"] = 236058,
["Flame Patch"] = 205037,
["Flame On"] = 205029,
["Ice Ward"] = 205036,
["Kindling"] = 155148,
},
["METADATA"] = {
["Specs"] = {
["Fire"] = 63,
["Frost"] = 64,
["Arcane"] = 62,
},
},
},
["MONK"] = {
["Mistweaver"] = {
["Teachings of the Monastery"] = 116645,
["Thunder Focus Tea"] = 231876,
["Mastery: Gust of Mists"] = 117907,
["Enveloping Mist"] = 231605,
["Essence Font"] = 231633,
["Rising Sun Kick"] = 262840,
["Soothing Mist"] = 193884,
["Renewing Mist"] = 231606,
},
["Brewmaster"] = {
["Gift of the Ox"] = 124502,
["Mastery: Elusive Brawler"] = 117906,
["Brewmaster's Balance"] = 245013,
["Stagger"] = 115069,
["Effuse"] = 231602,
["Celestial Fortune"] = 216519,
},
["Mistweaver_Talents"] = {
["Rising Thunder"] = 210804,
["Focused Thunder"] = 197895,
["Mist Wrap"] = 197900,
["Spirit of the Crane"] = 210802,
["Lifecycles"] = 197915,
["Celerity"] = 115173,
},
["Windwalker"] = {
["Mastery: Combo Strikes"] = 115636,
["Windwalking"] = 157411,
["Afterlife"] = 116092,
},
["Brewmaster_Talents"] = {
["Special Delivery"] = 196730,
["Eye of the Tiger"] = 196607,
["Celerity"] = 115173,
["Blackout Combo"] = 196736,
["Gift of the Mists"] = 196719,
["Elusive Dance"] = 196738,
["Light Brewing"] = 196721,
["High Tolerance"] = 196737,
["Mystic Vitality"] = 237076,
},
["Windwalker_Talents"] = {
["Ascension"] = 115396,
["Power Strikes"] = 121817,
["Eye of the Tiger"] = 196607,
["Hit Combo"] = 196740,
["Chi Orbit"] = 196743,
["Celerity"] = 115173,
},
["METADATA"] = {
["Specs"] = {
["Windwalker"] = 269,
["Brewmaster"] = 268,
["Mistweaver"] = 270,
},
},
},
["PALADIN"] = {
["Protection"] = {
["Heart of the Crusader"] = 32223,
["Judgment"] = 231657,
["Grand Crusader"] = 85043,
["Avenger's Shield"] = 231665,
["Mastery: Divine Bulwark"] = 76671,
},
["Holy"] = {
["Infusion of Light"] = 53576,
["Judgment"] = 231644,
["Mastery: Lightbringer"] = 183997,
["Righteousness"] = 227068,
["Crusader Strike"] = 231667,
["Beacon of Light"] = 231642,
["Heart of the Crusader"] = 32223,
},
["Retribution_Talents"] = {
["Divine Intervention"] = 213313,
["The Fires of Justice"] = 203316,
["Divine Purpose"] = 223817,
["Judgment of Light"] = 183778,
["Fist of Justice"] = 234299,
["Cavalier"] = 230332,
["Virtue's Blade"] = 202271,
["Final Verdict"] = 198038,
["Greater Judgment"] = 218178,
["Blade of Wrath"] = 231832,
},
["Holy_Talents"] = {
["Devotion Aura"] = 183425,
["Fervent Martyr"] = 196923,
["Divine Purpose"] = 197646,
["Judgment of Light"] = 183778,
["Aura of Sacrifice"] = 183416,
["Aura of Mercy"] = 183415,
["Beacon of the Lightbringer"] = 197446,
["Cavalier"] = 230332,
["Crusader's Might"] = 196926,
["Fist of Justice"] = 198054,
["Unbreakable Spirit"] = 114154,
["Sanctified Wrath"] = 53376,
},
["Protection_Talents"] = {
["Crusader's Judgment"] = 204023,
["First Avenger"] = 203776,
["Consecrated Ground"] = 204054,
["Retribution Aura"] = 203797,
["Judgment of Light"] = 183778,
["Fist of Justice"] = 198054,
["Last Defender"] = 203791,
["Final Stand"] = 204077,
["Consecrated Hammer"] = 203785,
["Holy Shield"] = 152261,
["Cavalier"] = 230332,
["Righteous Protector"] = 204074,
["Knight Templar"] = 204139,
},
["Retribution"] = {
["Judgment"] = 231663,
["Mastery: Divine Judgment"] = 76672,
["Retribution"] = 183435,
["Heart of the Crusader"] = 32223,
},
["METADATA"] = {
["Specs"] = {
["Protection"] = 66,
["Holy"] = 65,
["Retribution"] = 70,
},
},
},
["PRIEST"] = {
["Holy_Talents"] = {
["Enduring Renewal"] = 200153,
["Enlightenment"] = 193155,
["Afterlife"] = 196707,
["Divinity"] = 197031,
["Guardian Angel"] = 200209,
["Censure"] = 200199,
["Perseverance"] = 235189,
["Light of the Naaru"] = 196985,
["Benediction"] = 193157,
["Piety"] = 197034,
["Trail of Light"] = 200128,
["Surge of Light"] = 109186,
},
["Shadow"] = {
["Mastery: Madness"] = 77486,
["Voidform"] = 228264,
["Void Bolt"] = 228266,
["Shadowy Apparitions"] = 78203,
["Mind Sear"] = 234702,
},
["Shadow_Talents"] = {
["Psychic Voice"] = 196704,
["Legacy of the Void"] = 193225,
["Dominant Mind"] = 205367,
["Mania"] = 193173,
["Masochism"] = 193063,
["Fortress of the Mind"] = 193195,
["Body and Soul"] = 64129,
["Auspicious Spirits"] = 155271,
["Reaper of Souls"] = 199853,
["Twist of Fate"] = 109142,
["Shadowy Insight"] = 162452,
["Void Ray"] = 205371,
["San'layn"] = 199855,
["Misery"] = 238558,
["Lingering Insanity"] = 199849,
},
["Holy"] = {
["Holy Fire"] = 231687,
["Focused Will"] = 45243,
["Smite"] = 262861,
["Serendipity"] = 63733,
["Mastery: Echo of Light"] = 77485,
["Spirit of Redemption"] = 20711,
},
["Discipline"] = {
["Mastery: Absolution"] = 77484,
["Focused Will"] = 45243,
["Atonement"] = 81749,
["Smite"] = 231682,
},
["Discipline_Talents"] = {
["Dominant Mind"] = 205367,
["Twist of Fate"] = 109142,
["Castigation"] = 193134,
["Body and Soul"] = 64129,
["Sanctuary"] = 246393,
["Masochism"] = 193063,
["Psychic Voice"] = 196704,
["Shield Discipline"] = 197045,
["Grace"] = 200309,
},
["METADATA"] = {
["Specs"] = {
["Discipline"] = 256,
["Holy"] = 257,
["Shadow"] = 258,
},
},
},
["ROGUE"] = {
["Outlaw_Talents"] = {
["Cheat Death"] = 31230,
["Deeper Stratagem"] = 193531,
["Anticipation"] = 114015,
["Hit and Run"] = 196922,
["Vigor"] = 14983,
["Quick Draw"] = 196938,
["Prey on the Weak"] = 131511,
["Acrobatic Strikes"] = 196924,
["Iron Stomach"] = 193546,
["Dirty Tricks"] = 108216,
["Swordmaster"] = 200733,
["Elusiveness"] = 79008,
["Alacrity"] = 193539,
},
["Subtlety"] = {
["Deepening Shadows"] = 185314,
["Mastery: Executioner"] = 76808,
["Relentless Strikes"] = 58423,
["Fleet Footed"] = 31209,
["Shadow Techniques"] = 196912,
["Shuriken Combo"] = 245639,
},
["Assassination"] = {
["Sprint"] = 231691,
["Mastery: Potent Poisons"] = 76803,
["Garrote"] = 231719,
["Fleet Footed"] = 31209,
["Venomous Wounds"] = 79134,
["Seal Fate"] = 14190,
},
["Outlaw"] = {
["Ruthlessness"] = 14161,
["Mastery: Main Gauche"] = 76806,
["Combat Potency"] = 35551,
["Between the Eyes"] = 235484,
["Fleet Footed"] = 31209,
["Sprint"] = 231691,
["Restless Blades"] = 79096,
},
["Assassination_Talents"] = {
["Shadow Focus"] = 108209,
["Subterfuge"] = 108208,
["Venom Rush"] = 152152,
["Cheat Death"] = 31230,
["Anticipation"] = 114015,
["Deeper Stratagem"] = 193531,
["Internal Bleeding"] = 154904,
["Vigor"] = 14983,
["Prey on the Weak"] = 131511,
["Nightstalker"] = 14062,
["Elusiveness"] = 79008,
["Alacrity"] = 193539,
["Master Poisoner"] = 196864,
["Elaborate Planning"] = 193640,
["Thuggee"] = 196861,
},
["Subtlety_Talents"] = {
["Shadow Focus"] = 108209,
["Cheat Death"] = 31230,
["Tangled Shadow"] = 200778,
["Dark Shadow"] = 245687,
["Enveloping Shadows"] = 238104,
["Strike from the Shadows"] = 196951,
["Elusiveness"] = 79008,
["Master of Subtlety"] = 31223,
["Subterfuge"] = 108208,
["Anticipation"] = 114015,
["Deeper Stratagem"] = 193531,
["Vigor"] = 14983,
["Prey on the Weak"] = 131511,
["Master of Shadows"] = 196976,
["Nightstalker"] = 14062,
["Weaponmaster"] = 193537,
["Alacrity"] = 193539,
["Soothing Darkness"] = 200759,
},
["METADATA"] = {
["Specs"] = {
["Outlaw"] = 260,
["Subtlety"] = 261,
["Assassination"] = 259,
},
},
},
["SHAMAN"] = {
["Enhancement"] = {
["Windfury"] = 33757,
["Maelstrom Weapon"] = 187880,
["Mastery: Enhanced Elements"] = 77223,
["Healing Surge"] = 190899,
["Feral Spirit"] = 231723,
["Stormbringer"] = 201845,
["Stormlash"] = 195255,
["Reincarnation"] = 20608,
},
["METADATA"] = {
["Specs"] = {
["Enhancement"] = 263,
["Elemental"] = 262,
["Restoration"] = 264,
},
},
["Elemental"] = {
["Lava Surge"] = 77756,
["Lava Burst"] = 231721,
["Flame Shock"] = 232643,
["Elemental Fury"] = 60188,
["Mastery: Elemental Overload"] = 168534,
["Elemental Focus"] = 16164,
["Chain Lightning"] = 231722,
["Reincarnation"] = 20608,
},
["Restoration_Talents"] = {
["High Tide"] = 157154,
["Bottomless Depths"] = 197467,
["Graceful Spirit"] = 192088,
["Torrent"] = 200072,
["Deluge"] = 200076,
["Undulation"] = 200071,
["Echo of the Elements"] = 108283,
["Crashing Waves"] = 197464,
["Ancestral Vigor"] = 207401,
},
["Elemental_Talents"] = {
["Lightning Rod"] = 210689,
["Primal Elementalist"] = 117013,
["Aftershock"] = 210707,
["Elemental Fusion"] = 192235,
["Ancestral Swiftness"] = 192087,
["Echo of the Elements"] = 108283,
["Earthen Rage"] = 170374,
["Path of Flame"] = 201909,
},
["Pets"] = {
},
["Restoration"] = {
["Lava Surge"] = 77756,
["Lava Burst"] = 231721,
["Mastery: Deep Healing"] = 77226,
["Chain Heal"] = 231780,
["Riptide"] = 231725,
["Tidal Waves"] = 51564,
["Resurgence"] = 16196,
["Reincarnation"] = 20608,
},
["Enhancement_Talents"] = {
["Crashing Storm"] = 192246,
["Tempest"] = 192234,
["Hailstorm"] = 210853,
["Hot Hand"] = 201900,
["Empowered Stormlash"] = 210731,
["Overcharge"] = 210727,
["Ancestral Swiftness"] = 192087,
["Landslide"] = 197992,
["Boulderfist"] = 246035,
},
},
["WARLOCK"] = {
["Pets"] = {
["Avoidance"] = 32233,
["Void Reflexes"] = 117225,
},
["METADATA"] = {
["Specs"] = {
["Demonology"] = 266,
["Affliction"] = 265,
["Destruction"] = 267,
},
},
["Destruction"] = {
["Mastery: Chaotic Energies"] = 77220,
["Soul Leech"] = 108370,
["Soul Shards"] = 246985,
["Firebolt"] = 231795,
["Unending Resolve"] = 231794,
["Soulstone"] = 231811,
["Conflagrate"] = 231793,
},
["Demonology_Talents"] = {
["Grimoire of Synergy"] = 171975,
["Hand of Doom"] = 196283,
["Demonic Calling"] = 205145,
["Shadowy Inspiration"] = 196269,
["Power Trip"] = 196605,
["Impending Doom"] = 196270,
["Soul Conduit"] = 215941,
["Improved Dreadstalkers"] = 196272,
["Grimoire of Service"] = 108501,
["Grimoire of Supremacy"] = 152107,
["Demon Skin"] = 219272,
},
["Demonology"] = {
["Mastery: Master Demonologist"] = 77219,
["Soul Leech"] = 108370,
["Soul Shards"] = 246985,
["Soul Link"] = 108415,
},
["Destruction_Talents"] = {
["Eradication"] = 196412,
["Roaring Blaze"] = 205184,
["Backdraft"] = 196406,
["Demon Skin"] = 219272,
["Fire and Brimstone"] = 196408,
["Grimoire of Supremacy"] = 152107,
["Soul Conduit"] = 215941,
["Empowered Life Tap"] = 235157,
["Grimoire of Service"] = 108501,
["Wreak Havoc"] = 196410,
["Reverse Entropy"] = 205148,
},
["Affliction"] = {
["Agony"] = 231792,
["Shadow Bite"] = 231799,
["Soul Shards"] = 246985,
["Soulstone"] = 231811,
["Soul Leech"] = 108370,
["Unstable Affliction"] = 231791,
["Mastery: Potent Afflictions"] = 77215,
},
["Affliction_Talents"] = {
["Contagion"] = 196105,
["Sow the Seeds"] = 196226,
["Grimoire of Service"] = 108501,
["Malefic Grasp"] = 235155,
["Absolute Corruption"] = 196103,
["Grimoire of Supremacy"] = 152107,
["Soul Conduit"] = 215941,
["Empowered Life Tap"] = 235157,
["Writhe in Agony"] = 196102,
["Death's Embrace"] = 234876,
["Demon Skin"] = 219272,
},
},
["WARRIOR"] = {
["Protection"] = {
["Shield Slam"] = 231834,
["Mastery: Critical Block"] = 76857,
["Shield Block"] = 231847,
["Deep Wounds"] = 115768,
},
["Arms_Talents"] = {
["Fervor of Battle"] = 202316,
["Trauma"] = 215538,
["Dauntless"] = 202297,
["Double Time"] = 103827,
["Opportunity Strikes"] = 203179,
["Sweeping Strikes"] = 202161,
["Deadly Calm"] = 227266,
["Second Wind"] = 29838,
["Titanic Might"] = 202612,
["Bounding Stride"] = 202163,
["Mortal Combo"] = 202593,
["Anger Management"] = 152278,
["In For The Kill"] = 248621,
},
["Fury"] = {
["Enrage"] = 184361,
["Titan's Grip"] = 46917,
["Mastery: Unshackled Fury"] = 76856,
["Whirlwind"] = 12950,
["Execute"] = 231827,
["Furious Slash"] = 231824,
},
["Arms"] = {
["Mastery: Colossal Might"] = 76838,
["Tactician"] = 184783,
},
["Protection_Talents"] = {
["Safeguard"] = 223657,
["Bounding Stride"] = 202163,
["Booming Voice"] = 202743,
["Vengeance"] = 202572,
["Indomitable"] = 202095,
["Never Surrender"] = 202561,
["Renewed Fury"] = 202288,
["Inspiring Presence"] = 205484,
["Devastator"] = 236279,
["Warbringer"] = 103828,
["Warlord's Challenge"] = 223662,
["Crackling Thunder"] = 203201,
["Into the Fray"] = 202603,
["Anger Management"] = 152278,
["Heavy Repercussions"] = 203177,
["Best Served Cold"] = 202560,
},
["Fury_Talents"] = {
["Furious Charge"] = 202224,
["Outburst"] = 206320,
["Wrecking Ball"] = 215569,
["Inner Rage"] = 215573,
["Frenzy"] = 206313,
["Double Time"] = 103827,
["Bounding Stride"] = 202163,
["Warpaint"] = 208154,
["War Machine"] = 215556,
["Reckless Abandon"] = 202751,
["Fresh Meat"] = 215568,
["Carnage"] = 202922,
["Massacre"] = 206315,
["Endless Rage"] = 202296,
["Frothing Berserker"] = 215571,
},
["METADATA"] = {
["Specs"] = {
["Arms"] = 71,
["Fury"] = 72,
["Protection"] = 73,
},
},
},
};
 
 
-- Helper functions: Default lookup priorities --
-------------------------------------------------
 
local playerUniversalClassName; -- Player only, gathered upon PLAYER_LOGIN
 
local GetEnglishSpecialisationName = function(specID, ...) -- Any class/spec
-- Arguments (1 to 2):
-- specID (number) *mandatory - Specialisation ID for which we want to get the English Name.
-- universalClassName (string) *optional - Class where the specialisation should be found;
-- Defaults to the current Player's class.
-- Returns (2):
-- engSpecName (string): English name for the given Specialisation; Nil if the spec wasn't
-- found.
-- uniClassName (string): Non-localised name of the Class the spec belongs to (given as arg2
-- or otherwise discovered if the given class was wrong or nil). Nil if the spec wasn't
-- found.
--
-- Look first in the provided universal class name (or the player class if argument is missing)
local lookupFirstInClass = ... or playerUniversalClassName;
for engSpecName, DBspecID in pairs(LibSN2SIDP.DB[lookupFirstInClass].METADATA.Specs) do
if DBspecID == specID then
return engSpecName, lookupFirstInClass;
end
end
-- Look up the specialisation ID in all other classes
local generalTabName = (GetSpellTabInfo(1));
local uniClassName = (next(LibSN2SIDP.DB, nil));
while uniClassName do
if (uniClassName ~= generalTabName) and (uniClassName ~= lookupFirstInClass) then
for engSpecName, DBspecID in pairs(LibSN2SIDP.DB[uniClassName].METADATA.Specs) do
-- print(uniClassName);
if DBspecID == specID then
return engSpecName, uniClassName;
end
end
end
uniClassName = (next(LibSN2SIDP.DB, uniClassName));
end
-- Could not find the given specID in the database
return nil, nil;
end
 
local GetActiveEnglishSpecialisationName = function() -- Player only
-- Returns(3):
-- engSpecName (string) - English name for the active Player Specialisation; Nil if no spec
-- is active (e.g. if character level < 10).
-- uniClassName (string) - Non-localised name of the Player Class. Nil if no active spec.
-- activeSpecID (number) - Specialisation ID for the active spec. Nil if no active spec.
--
local activeSpecIndex = (GetSpecialization());
-- print(tostring(activeSpecIndex));
if activeSpecIndex then
local activeSpecID = (GetSpecializationInfo(activeSpecIndex));
-- print(tostring(activeSpecID));
return GetEnglishSpecialisationName(activeSpecID, playerUniversalClassName), activeSpecID;
else
return nil, nil, nil; -- Player does not have an active specialisation
end
end
 
local LookupOrder_table = {}; -- Any class/spec
-- Order to lookup spells in the DB:
-- 1st: Player's class:
-- 1.1. Active spec baseline spells;
-- 1.2. Active spec Talents' spells;
-- 1.3. Pets (if there are spells for);
-- 1.4. Other specs' baseline spells;
-- 1.5. Other specs' Talents' spells;
-- 2nd: GeneralTab;
-- 3rd: Other classes:
-- 3.1. Each spec baseline spells;
-- 3.2. Each spec Talents' spells;
-- 3.3. Pets (if there are spells for).
local SetLookupOrder = function()
-- LookupOrder_table = {}; -- Reset the table
wipe(LookupOrder_table); -- Reset the table
local classOrderIndex = 1;
local classKey = (next(LibSN2SIDP.DB, nil));
-- print(tostring(classKey));
while classKey do
if classKey == playerUniversalClassName then
tinsert(LookupOrder_table, 1, classKey);
LookupOrder_table[classKey] = {};
-- print(tostring(LookupOrder_table[1]));
-- Order specs et al
local playerActiveEnglishSpecName = (GetActiveEnglishSpecialisationName());
-- print("Active SpecName = ".. tostring(playerActiveEnglishSpecName));
local specOrderIndex = 1;
local specKey = (next(LibSN2SIDP.DB[classKey].METADATA.Specs, nil));
while specKey do
if specKey == playerActiveEnglishSpecName then
tinsert(LookupOrder_table[classKey], 1, specKey);
tinsert(LookupOrder_table[classKey], 2, specKey.."_Talents");
-- print(tostring(LookupOrder_table[classKey][1]).. " *");
else
tinsert(LookupOrder_table[classKey], specKey);
tinsert(LookupOrder_table[classKey], specKey.."_Talents");
-- print(tostring(LookupOrder_table[classKey][(specOrderIndex == 1) and specOrderIndex or (specOrderIndex +specOrderIndex -1)]));
end
specKey = (next(LibSN2SIDP.DB[classKey].METADATA.Specs, specKey));
specOrderIndex = specOrderIndex + 1;
end
if LibSN2SIDP.DB[classKey].Pets then
tinsert(LookupOrder_table[classKey], 3, "Pets");
end
elseif classKey ~= "General" then
tinsert(LookupOrder_table, classKey);
-- print(tostring(LookupOrder_table[classOrderIndex]));
LookupOrder_table[classKey] = {};
local specOrderIndex = 1;
local specKey = (next(LibSN2SIDP.DB[classKey].METADATA.Specs, nil));
while specKey do
tinsert(LookupOrder_table[classKey], specKey);
tinsert(LookupOrder_table[classKey], specKey.."_Talents");
-- print(tostring(LookupOrder_table[classKey][specOrderIndex]));
specKey = (next(LibSN2SIDP.DB[classKey].METADATA.Specs, specKey));
specOrderIndex = specOrderIndex + 2;
end
if LibSN2SIDP.DB[classKey].Pets then
tinsert(LookupOrder_table[classKey], "Pets");
end
end
classKey = (next(LibSN2SIDP.DB, classKey));
classOrderIndex = classOrderIndex + 1;
end
tinsert(LookupOrder_table, 2, "General");
LookupOrder_table["General"] = {};
tinsert(LookupOrder_table["General"], "Spells");
end
 
-- Get Player's character data when it's available
local libFrame = CreateFrame("Frame");
libFrame:RegisterEvent("PLAYER_LOGIN");
libFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
libFrame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
libFrame:SetScript("OnEvent", function(self, event)
if event == "PLAYER_LOGIN" or event == "PLAYER_ENTERING_WORLD" then
local stubVal;
stubVal, playerUniversalClassName = UnitClass("player");
end
SetLookupOrder();
-- for i = 1, #LookupOrder_table do
-- local classKey = LookupOrder_table[i];
-- print(AddonName.. ": ".. i.. ". ".. tostring(classKey));
-- for ii = 1, #(LookupOrder_table[classKey]) do
-- print(AddonName.. ": ".. i.. ".".. ii.. ". ".. tostring(LookupOrder_table[classKey][ii]));
-- end
-- end
end);
 
 
-- API --
---------
 
-- Return SpellID of the English Spell Name
LibSN2SIDP.SID = setmetatable(
{}, -- We do start with an empty table, passed as 'tbl' to '__index' bellow.
{ __index = function(tbl, engSpellName) -- If spell name not found in 'tbl'.
local paramType = type(engSpellName);
-- print(AddonName.. ": ".. engSpellName.. " is a ".. paramType);
if (paramType == "string") then
for classIndex = 1, #LookupOrder_table do
local classKey = LookupOrder_table[classIndex];
-- print(AddonName.. ": ".. tostring(classKey));
for specIndex = 1, #(LookupOrder_table[classKey]) do
local specKey = LookupOrder_table[classKey][specIndex];
-- print(AddonName.. ": ".. tostring(specKey));
local spID = LibSN2SIDP.DB[classKey][specKey][engSpellName] or nil;
if spID then
return spID;
end
end
end
-- Didn't find the given spell name in our database. So try and get it from game API
local locSpellName, _, _, _, _, _, spID = GetSpellInfo(engSpellName);
-- if locSpellName then
-- if tbl == nil then
-- tbl = {[locSpellName] = spID}; -- Create 'tbl' and cache the key/value pair
-- elseif tbl[locSpellName] == nil then
-- tbl[locSpellName] = spID; -- Cache the key/value pair
-- end
-- end
return spID;
elseif (paramType == "number") then
local locSpellName = (GetSpellInfo(engSpellName));
-- print(locSpellName);
-- if locSpellName then
-- if tbl == nil then
-- tbl = {[locSpellName] = engSpellName}; -- Create 'tbl' and cache the key/value pair
-- elseif tbl[locSpellName] == nil then
-- tbl[locSpellName] = engSpellName; -- Cache the key/value pair
-- end
-- end
return engSpellName;
else
-- TODO: error() ?
return nil;
end
end
}
);
-- For backwards compatibility (LibSpellName2SID_MINOR < 10008)
LibSN2SIDP.ID = LibSN2SIDP.SID;
 
-- Return Localised Name of the English Spell Name
LibSN2SIDP.LSN = setmetatable(
{}, -- We do start with an empty table, passed as 'tbl' to '__index' bellow.
{ __index = function(tbl, engSpellName)
-- print("LSN __index");
local paramType = type(engSpellName);
-- print(AddonName.. ": ".. engSpellName.. " is a ".. paramType);
if paramType == "string" then
for classIndex = 1, #LookupOrder_table do
local classKey = LookupOrder_table[classIndex];
-- print(AddonName.. ": ".. tostring(classKey));
for specIndex = 1, #(LookupOrder_table[classKey]) do
local specKey = LookupOrder_table[classKey][specIndex];
-- print(AddonName.. ": ".. tostring(specKey));
local spID = LibSN2SIDP.DB[classKey][specKey][engSpellName] or nil;
if spID then
-- print("Found in ".. classKey.. ": ".. specKey);
local locSpellName = (GetSpellInfo(spID)); -- Localised spell name
return locSpellName;
end
end
end
-- Didn't find the given spell name in our database. So try and get it from game API
local locSpellName, _, _, _, _, _, spID = GetSpellInfo(engSpellName);
-- if locSpellName then
-- if tbl == nil then
-- tbl = {[locSpellName] = spID}; -- Create 'tbl' and cache the key/value pair
-- elseif tbl[locSpellName] == nil then
-- tbl[locSpellName] = spID; -- Cache the key/value pair
-- end
-- end
return locSpellName;
elseif paramType == "number" then
local locSpellName = (GetSpellInfo(engSpellName));
-- print(locSpellName);
-- if locSpellName then
-- if tbl == nil then
-- tbl = {[locSpellName] = engSpellName}; -- Create 'tbl' and cache the key/value pair
-- elseif tbl[locSpellName] == nil then
-- tbl[locSpellName] = engSpellName; -- Cache the key/value pair
-- end
-- end
return locSpellName;
else
-- TODO: error() ?
return nil;
end
end
}
);
 
-- Get the number of spells in the database
-- TODO: Redo for new DB structure in 10008+ !
function LibSN2SIDP:GetNumSpells()
-- local count = 0;
-- for _ in pairs(LibSN2SIDP.DB) do
-- count = count + 1;
-- end
-- return count;
end
 
-- REMOVED. This was in twobits' original version (10000), when it was still
-- only used in ReadySpells. With my release of LibSpellName2SID as a freely
-- accessible library, the implications of calling this function are not clear
-- to me. Therefore, at least for now, this function will be made unaccessible.
-- Clean up (free the RAM) if the data isn't needed anymore
-- NB: 'Clean up ONLY IF we're (embeded) ...' feature added by aallkkaa
function LibSN2SIDP:Cleanup()
--[[
-- Clean up ONLY IF we're (embeded) within the scope of another addon,
-- not if we're a Global library, which may be in use by several addons.
-- print("LibSN2SIDP.owner = ".. LibSN2SIDP.owner);
-- print("LibSN2SIDP: AddonName = ".. AddonName);
if LibSN2SIDP.owner ~= "LibSpellName2SID-1.0" then
LibSN2SIDP.DB = {};
-- print(AddonName.. ": LibSN2SIDP.DB NOW has ".. LibSN2SIDP.GetNumSpells().. " keys.");
return true;
else
-- print(AddonName.. ": LibSN2SIDP.DB STILL has ".. LibSN2SIDP.GetNumSpells().. " keys.");
-- TODO: error();
return false;
end
]]--
end
 
 
------------------------------------------
-- print(AddonName.. ": LibSN2SIDP.DB has ".. LibSN2SIDP.GetNumSpells().. " keys.");
trunk/ReadySpells/libs/LibSpellName2SID-1.0/LibSpellName2SID-1.0.lua
3,7 → 3,7
-- V.10000: 2009, originally by Twobits[1], as part of ReadySpells[2]
-- 2010, edited by benots4[3]
-- 2017, published as an addon of its own by aallkkaa[4]
-- V.10001 - 10007: 2017-2018 WoW-7.3.x up to date version by aallkkaa [4]
-- V.10001 - 10008: 2017-2018 WoW-7.3.x up to date version by aallkkaa [4]
--
-- [1] https://www.wowinterface.com/forums/member.php?userid=139157
-- https://www.curseforge.com/members/twobits
15,981 → 15,1823
-- API:
-- LibSpellName2SID.ID["EnglishSpellName"] -- Spell ID of English Spell Name
-- LibSpellName2SID.LSN["EnglishSpellName"] -- Localized Spell Name
-- LibSpellName2SID:GetNumSpells() -- Get the number of spells in the database
-- LibSpellName2SID:Cleanup() -- Clean up the database (remove from RAM)
-- LibSpellName2SID:GetNumSpells() -- Get the number of spells in the database - TEMPORARILY OUT
-- LibSpellName2SID:Cleanup() -- Clean up the database (remove from RAM) - DEPRECATED
---------------------
 
-- Initialisation --
--------------------
 
AddonName, AddonEnv = ...;
 
-- Library's version values --
local LibSpellName2SID_MAJOR = "LibSpellName2SID";
local LibSpellName2SID_MINOR = 10007;
local LibSpellName2SID_MINOR = 10008;
-- print(LibSpellName2SID_MAJOR.. "-".. LibSpellName2SID_MINOR.. ": AddonName = ".. AddonName);
 
-- DataSource --
-- gameBuild = 26124
-- clientLocale = enUS
 
-- Register with LibStub --
assert(LibStub, LibSpellName2SID_MAJOR.. "-".. LibSpellName2SID_MINOR.." requires LibStub.");
local LibSN2SID = LibStub:NewLibrary(LibSpellName2SID_MAJOR, LibSpellName2SID_MINOR);
if not LibSN2SID then -- Same version or newer instance already loaded.
if not LibSN2SID then -- Same version or newer already loaded;
return; -- I.e. nothing else to do.
end
 
------------------------------
-- Set the library contents --
------------------------------
 
-- Set the library database contents --
---------------------------------------
 
LibSN2SID.owner = AddonName;
LibSN2SID.minor = LibSpellName2SID_MINOR;
 
LibSN2SID.ID = {}; -- Clear old version's contents, if applicable
LibSN2SID.ID = setmetatable(
{
-- General tab
["Every Man for Himself"] = 59752,
["Darkflight"] = 68992,
["Escape Artist"] = 20589,
["Stoneform"] = 20594,
["Shoot"] = 5019,
["Blood Fury"] = 20572,
["Honorable Medallion"] = 195710,
["Two Forms"] = 68996,
["Pack Hobgoblin"] = 69046,
["Gift of the Naaru"] = 59547,
["Cannibalize"] = 20577,
["Rocket Barrage"] = 69041,
["Quaking Palm"] = 107079,
["Mobile Banking"] = 83958,
["Running Wild"] = 87840,
["Arcane Torrent"] = 28730,
["Rocket Jump"] = 69070,
["Berserking"] = 26297,
["Shadowmeld"] = 58984,
["Will of the Forsaken"] = 7744,
["Auto Attack"] = 6603,
["War Stomp"] = 20549,
["Auto Shot"] = 75,
LibSN2SID.DB = {}; -- Clear old version's contents, if applicable
 
-- DEATHKNIGHT
["Mind Freeze"] = 47528,
["Soul Reaper"] = 130736,
["Sudden Doom"] = 49530,
["Mark of Blood"] = 206940,
["Army of the Dead"] = 42650,
["Killing Machine"] = 51128,
["Anti-Magic Shell"] = 48707,
["Blood Mirror"] = 206977,
["Death Grip"] = 49576,
["Summon Gargoyle"] = 49206,
["Wraith Walk"] = 212552,
["Pillar of Frost"] = 51271,
["Raise Dead"] = 46584,
["Epidemic"] = 207317,
["Marrowrend"] = 195182,
["Bonestorm"] = 194844,
["Dark Arbiter"] = 49206,
["Crimson Scourge"] = 81136,
["Clawing Shadows"] = 55090,
["On a Pale Horse"] = 51986,
["Death's Caress"] = 195292,
["Horn of Winter"] = 57330,
["Path of Frost"] = 3714,
["Veteran of the Third War"] = 48263,
["Outbreak"] = 77575,
["Rune Tap"] = 194679,
["Death and Decay"] = 43265,
["Death Coil"] = 47541,
["Blood Tap"] = 221699,
["Rime"] = 59057,
["Gorefiend's Grasp"] = 108199,
["Festering Strike"] = 85948,
["Heart Strike"] = 206930,
["Raise Ally"] = 61999,
["Corpse Shield"] = 207319,
["Dark Transformation"] = 63560,
["Obliterate"] = 49020,
["Frost Strike"] = 49143,
["Scourge Strike"] = 55090,
["Hungering Rune Weapon"] = 47568,
["Runeforging"] = 53428,
["Tombstone"] = 219809,
["Defile"] = 43265,
["Blooddrinker"] = 206931,
["Dancing Rune Weapon"] = 49028,
["Glacial Advance"] = 194913,
["Chains of Ice"] = 45524,
["Runic Corruption"] = 51462,
["Death Strike"] = 49998,
["Dark Succor"] = 178819,
["Remorseless Winter"] = 196770,
["Howling Blast"] = 49184,
["Obliteration"] = 207256,
["Blinding Sleet"] = 207167,
["Frostscythe"] = 207230,
["Death Gate"] = 50977,
["Runic Empowerment"] = 81229,
["Blood Boil"] = 50842,
["Breath of Sindragosa"] = 152279,
["Vampiric Blood"] = 55233,
["Control Undead"] = 111673,
["Icebound Fortitude"] = 48792,
["Asphyxiate"] = 221562,
["Empower Rune Weapon"] = 47568,
["Blighted Rune Weapon"] = 194918,
["Dark Command"] = 56222,
-- DEATHKNIGHT Pet
["Gnaw"] = 47481,
["Claw"] = 47468,
["Huddle"] = 47484,
["Leap"] = 47482,
-- Faction variants
-- ["Bloodlust"] = 2825,
-- ["Heroism"] = 32182,
 
-- DEMONHUNTER
["Chaos Blades"] = 247938,
["Torment"] = 198589,
["Fiery Brand"] = 179057,
["Shear"] = 203782,
["Demon Blades"] = 162243,
["Eye Beam"] = 198013,
["Spectral Sight"] = 188501,
["Double Jump"] = 196055,
["Fel Rush"] = 195072,
["Shattered Souls"] = 178940,
["Fel Eruption"] = 211881,
["Consume Magic"] = 183752,
["Blade Dance"] = 188499,
["Empower Wards"] = 218256,
["Blur"] = 198589,
["Fel Barrage"] = 211053,
["Chaos Nova"] = 179057,
["Fury of the Illidari"] = 201467,
["Soul Barrier"] = 227225,
["Darkness"] = 196718,
["Demonic Wards"] = 203513,
["Fel Devastation"] = 212084,
["Demon's Bite"] = 162243,
["Netherwalk"] = 196555,
["Vengeful Retreat"] = 198793,
["Sigil of Silence"] = 202137,
["Demon Spikes"] = 198793,
["Imprison"] = 217832,
["Chaos Strike"] = 162794,
["Spirit Bomb"] = 247454,
["Sigil of Chains"] = 202138,
["Sigil of Misery"] = 207684,
["Fracture"] = 209795,
["Felblade"] = 232893,
["Immolation Aura"] = 198013,
["Soul Cleave"] = 162794,
["Metamorphosis"] = 191427,
["Infernal Strike"] = 195072,
["Throw Glaive"] = 185123,
["Nemesis"] = 206491,
["Demonic Infusion"] = 236189,
["Soul Carver"] = 207407,
["Sigil of Flame"] = 188499,
["Glide"] = 131347,
LibSN2SID.DB = {
["General"] = {
["Spells"] = {
["Every Man for Himself"] = 59752,
["Darkflight"] = 68992,
["Revive Battle Pets"] = 125439,
["Escape Artist"] = 20589,
["Stoneform"] = 20594,
["Shoot"] = 5019,
["Rocket Barrage"] = 69041,
["Honorable Medallion"] = 195710,
["Two Forms"] = 68996,
["Pack Hobgoblin"] = 69046,
["Gift of the Naaru"] = 59547,
["Cannibalize"] = 20577,
["Auto Attack"] = 6603,
["Auto Shot"] = 75,
["Quaking Palm"] = 107079,
["Blood Fury"] = 20572,
["Running Wild"] = 87840,
["Arcane Torrent"] = 28730,
["Rocket Jump"] = 69070,
["Berserking"] = 26297,
["Shadowmeld"] = 58984,
["Mobile Banking"] = 83958,
["War Stomp"] = 20549,
["Will of the Forsaken"] = 7744,
},
["METADATA"] = {
["raceBuilds"] = {
["Draenei"] = "26124",
["NightElf"] = "26124",
["Scourge"] = "26124",
["Orc"] = "26124",
["Gnome"] = "26124",
["Dwarf"] = "26124",
["Tauren"] = "26124",
["Worgen"] = "26124",
["BloodElf"] = "26124",
["Troll"] = "26124",
["Human"] = "26124",
["Pandaren"] = "26124",
["Goblin"] = "26124",
},
},
},
["DEATHKNIGHT"] = {
["Pets"] = {
["Avoidance"] = 62137,
["Gnaw"] = 47481,
["Claw"] = 47468,
["Huddle"] = 47484,
["Leap"] = 47482,
},
["Frost"] = {
["Wraith Walk"] = 212552,
["Pillar of Frost"] = 51271,
["Mind Freeze"] = 47528,
["Runeforging"] = 53428,
["Chains of Ice"] = 45524,
["Death Strike"] = 49998,
["Raise Ally"] = 61999,
["Howling Blast"] = 49184,
["Death Gate"] = 50977,
["Empower Rune Weapon"] = 47568,
["Dark Command"] = 56222,
["Anti-Magic Shell"] = 48707,
["Frost Strike"] = 49143,
["Remorseless Winter"] = 196770,
["Path of Frost"] = 3714,
["Icebound Fortitude"] = 48792,
["Control Undead"] = 111673,
["Obliterate"] = 49020,
["Death Grip"] = 49576,
},
["Blood_Talents"] = {
["Tombstone"] = 219809,
["Blood Mirror"] = 206977,
["Mark of Blood"] = 206940,
["Blooddrinker"] = 206931,
["Bonestorm"] = 194844,
["Blood Tap"] = 221699,
["Rune Tap"] = 194679,
},
["Frost_Talents"] = {
["Horn of Winter"] = 57330,
["Obliteration"] = 207256,
["Blinding Sleet"] = 207167,
["Frostscythe"] = 207230,
["Hungering Rune Weapon"] = 207127,
["Breath of Sindragosa"] = 152279,
["Glacial Advance"] = 194913,
},
["Unholy_Talents"] = {
["Defile"] = 152280,
["Corpse Shield"] = 207319,
["Asphyxiate"] = 108194,
["Clawing Shadows"] = 207311,
["Blighted Rune Weapon"] = 194918,
["Epidemic"] = 207317,
["Dark Arbiter"] = 207349,
["Soul Reaper"] = 130736,
},
["METADATA"] = {
["Specs"] = {
["Unholy"] = 252,
["Frost"] = 251,
["Blood"] = 250,
},
},
["Unholy"] = {
["Summon Gargoyle"] = 49206,
["Scourge Strike"] = 55090,
["Death and Decay"] = 43265,
["Death Coil"] = 47541,
["Mind Freeze"] = 47528,
["Runeforging"] = 53428,
["Festering Strike"] = 85948,
["Chains of Ice"] = 45524,
["Army of the Dead"] = 42650,
["Death Strike"] = 49998,
["Raise Ally"] = 61999,
["Dark Transformation"] = 63560,
["Death Gate"] = 50977,
["Dark Command"] = 56222,
["Anti-Magic Shell"] = 48707,
["Death Grip"] = 49576,
["Icebound Fortitude"] = 48792,
["Path of Frost"] = 3714,
["Wraith Walk"] = 212552,
["Control Undead"] = 111673,
["Raise Dead"] = 46584,
["Outbreak"] = 77575,
},
["Blood"] = {
["Wraith Walk"] = 212552,
["Death and Decay"] = 43265,
["Control Undead"] = 111673,
["Runeforging"] = 53428,
["Marrowrend"] = 195182,
["Dancing Rune Weapon"] = 49028,
["Gorefiend's Grasp"] = 108199,
["Icebound Fortitude"] = 48792,
["Heart Strike"] = 206930,
["Death Strike"] = 49998,
["Raise Ally"] = 61999,
["Death Gate"] = 50977,
["Blood Boil"] = 50842,
["Death's Caress"] = 195292,
["Dark Command"] = 56222,
["Anti-Magic Shell"] = 48707,
["Path of Frost"] = 3714,
["Asphyxiate"] = 221562,
["Vampiric Blood"] = 55233,
["Mind Freeze"] = 47528,
["Death Grip"] = 49576,
},
},
["DEMONHUNTER"] = {
["Havoc_Talents"] = {
["Fel Eruption"] = 211881,
["Nemesis"] = 206491,
["Chaos Blades"] = 247938,
["Felblade"] = 232893,
["Fel Barrage"] = 211053,
["Netherwalk"] = 196555,
},
["Vengeance_Talents"] = {
["Fracture"] = 209795,
["Sigil of Chains"] = 202138,
["Demonic Infusion"] = 236189,
["Soul Barrier"] = 227225,
["Fel Devastation"] = 212084,
["Felblade"] = 232893,
["Fel Eruption"] = 211881,
["Spirit Bomb"] = 247454,
},
["Havoc"] = {
["Chaos Strike"] = 162794,
["Soul Carver"] = 207407,
["Blur"] = 198589,
["Fel Rush"] = 195072,
["Chaos Nova"] = 179057,
["Imprison"] = 217832,
["Spectral Sight"] = 188501,
["Consume Magic"] = 183752,
["Demon's Bite"] = 162243,
["Glide"] = 131347,
["Throw Glaive"] = 185123,
["Darkness"] = 196718,
["Metamorphosis"] = 191427,
["Blade Dance"] = 188499,
["Vengeful Retreat"] = 198793,
["Eye Beam"] = 198013,
},
["Vengeance"] = {
["Blur"] = 198589,
["Chaos Nova"] = 179057,
["Torment"] = 185245,
["Fiery Brand"] = 204021,
["Metamorphosis"] = 191427,
["Immolation Aura"] = 178740,
["Shear"] = 203782,
["Vengeful Retreat"] = 198793,
["Eye Beam"] = 198013,
["Chaos Strike"] = 162794,
["Sigil of Flame"] = 204596,
["Spectral Sight"] = 188501,
["Fel Rush"] = 195072,
["Soul Cleave"] = 228477,
["Soul Carver"] = 207407,
["Infernal Strike"] = 189110,
["Consume Magic"] = 183752,
["Blade Dance"] = 188499,
["Glide"] = 131347,
["Throw Glaive"] = 185123,
["Sigil of Misery"] = 207684,
["Sigil of Silence"] = 202137,
["Imprison"] = 217832,
["Demon Spikes"] = 203720,
["Empower Wards"] = 218256,
},
["METADATA"] = {
["Specs"] = {
["Havoc"] = 577,
["Vengeance"] = 581,
},
},
},
["DRUID"] = {
["Feral_Talents"] = {
["Mass Entanglement"] = 102359,
["Brutal Slash"] = 202028,
["Savage Roar"] = 52610,
["Typhoon"] = 132469,
["Mighty Bash"] = 5211,
["Wild Charge"] = 102401,
["Displacer Beast"] = 102280,
["Elune's Guidance"] = 202060,
["Renewal"] = 108238,
["Incarnation: King of the Jungle"] = 102543,
},
["Feral"] = {
["Prowl"] = 5215,
["Stampeding Roar"] = 106898,
["Regrowth"] = 8936,
["Ferocious Bite"] = 22568,
["Skull Bash"] = 106839,
["Growl"] = 6795,
["Maim"] = 22570,
["Revive"] = 50769,
["Swipe"] = 213764,
["Cat Form"] = 768,
["Dash"] = 1850,
["Rake"] = 1822,
["Rip"] = 1079,
["Tiger's Fury"] = 5217,
["Remove Corruption"] = 2782,
["Rebirth"] = 20484,
["Thrash"] = 106832,
["Shred"] = 5221,
["Teleport: Moonglade"] = 18960,
["Berserk"] = 106951,
["Entangling Roots"] = 339,
["Survival Instincts"] = 61336,
["Bear Form"] = 5487,
["Moonfire"] = 8921,
["Travel Form"] = 783,
},
["Balance"] = {
["Prowl"] = 5215,
["Lunar Strike"] = 194153,
["Regrowth"] = 8936,
["Growl"] = 6795,
["Celestial Alignment"] = 194223,
["Revive"] = 50769,
["Bear Form"] = 5487,
["Innervate"] = 29166,
["Moonkin Form"] = 24858,
["Solar Wrath"] = 190984,
["Barkskin"] = 22812,
["Starfall"] = 191034,
["Remove Corruption"] = 2782,
["Cat Form"] = 768,
["Starsurge"] = 78674,
["Entangling Roots"] = 339,
["Teleport: Moonglade"] = 18960,
["Rebirth"] = 20484,
["Moonfire"] = 8921,
["Dash"] = 1850,
["Sunfire"] = 93402,
["Solar Beam"] = 78675,
["Travel Form"] = 783,
},
["Guardian"] = {
["Prowl"] = 5215,
["Stampeding Roar"] = 106898,
["Regrowth"] = 8936,
["Ferocious Bite"] = 22568,
["Skull Bash"] = 106839,
["Entangling Roots"] = 339,
["Growl"] = 6795,
["Swipe"] = 213764,
["Mangle"] = 33917,
["Dash"] = 1850,
["Revive"] = 50769,
["Frenzied Regeneration"] = 22842,
["Thrash"] = 106832,
["Shred"] = 5221,
["Rake"] = 1822,
["Rip"] = 1079,
["Moonfire"] = 8921,
["Remove Corruption"] = 2782,
["Cat Form"] = 768,
["Barkskin"] = 22812,
["Rebirth"] = 20484,
["Teleport: Moonglade"] = 18960,
["Ironfur"] = 192081,
["Maul"] = 6807,
["Survival Instincts"] = 61336,
["Bear Form"] = 5487,
["Incapacitating Roar"] = 99,
["Travel Form"] = 783,
},
["Restoration_Talents"] = {
["Mass Entanglement"] = 102359,
["Flourish"] = 197721,
["Typhoon"] = 132469,
["Mighty Bash"] = 5211,
["Wild Charge"] = 102401,
["Displacer Beast"] = 102280,
["Renewal"] = 108238,
["Incarnation: Tree of Life"] = 33891,
["Cenarion Ward"] = 102351,
},
["METADATA"] = {
["Specs"] = {
["Feral"] = 103,
["Balance"] = 102,
["Guardian"] = 104,
["Restoration"] = 105,
},
},
["Balance_Talents"] = {
["Force of Nature"] = 205636,
["Stellar Flare"] = 202347,
["Typhoon"] = 132469,
["Astral Communion"] = 202359,
["Blessing of the Ancients"] = 202360,
["Renewal"] = 108238,
["Warrior of Elune"] = 202425,
["Mighty Bash"] = 5211,
["Wild Charge"] = 102401,
["Displacer Beast"] = 102280,
["Fury of Elune"] = 202770,
["Incarnation: Chosen of Elune"] = 102560,
["Mass Entanglement"] = 102359,
},
["Restoration"] = {
["Healing Touch"] = 5185,
["Prowl"] = 5215,
["Solar Wrath"] = 5176,
["Regrowth"] = 8936,
["Wild Growth"] = 48438,
["Entangling Roots"] = 339,
["Nature's Cure"] = 88423,
["Ursol's Vortex"] = 102793,
["Efflorescence"] = 145205,
["Revive"] = 50769,
["Tranquility"] = 740,
["Innervate"] = 29166,
["Dash"] = 1850,
["Swiftmend"] = 18562,
["Sunfire"] = 93402,
["Rejuvenation"] = 774,
["Rebirth"] = 20484,
["Moonfire"] = 8921,
["Barkskin"] = 22812,
["Cat Form"] = 768,
["Teleport: Moonglade"] = 18960,
["Revitalize"] = 212040,
["Growl"] = 6795,
["Ironbark"] = 102342,
["Bear Form"] = 5487,
["Lifebloom"] = 33763,
["Travel Form"] = 783,
},
["Guardian_Talents"] = {
["Mass Entanglement"] = 102359,
["Bristling Fur"] = 155835,
["Lunar Beam"] = 204066,
["Pulverize"] = 80313,
["Typhoon"] = 132469,
["Intimidating Roar"] = 236748,
["Mighty Bash"] = 5211,
["Incarnation: Guardian of Ursoc"] = 102558,
["Wild Charge"] = 102401,
},
},
["HUNTER"] = {
["Pets"] = {
["Charge"] = 61685,
["Heart of the Phoenix"] = 55709,
["Boar's Speed"] = 19596,
["Great Stamina"] = 61688,
["Growl"] = 2649,
["Bullheaded"] = 53490,
["Cornered"] = 53497,
["Spiked Collar"] = 53184,
["Combat Experience"] = 20782,
["Hunting Companion"] = 191336,
["Thunderstomp"] = 63900,
["Roar of Sacrifice"] = 53480,
["Last Stand"] = 53478,
["Avoidance"] = 65220,
["Claw"] = 16827,
["Blood of the Rhino"] = 53482,
["Dash"] = 61684,
},
["Beast Mastery"] = {
["Pet Utility"] = 103,
["Bestial Wrath"] = 19574,
["Kill Command"] = 34026,
["Feign Death"] = 5384,
["Misdirection"] = 34477,
["Multi-Shot"] = 2643,
["Aspect of the Turtle"] = 186265,
["Disengage"] = 781,
["Counter Shot"] = 147362,
["Aspect of the Wild"] = 193530,
["Cobra Shot"] = 193455,
["Call Pet"] = 9,
["Aspect of the Cheetah"] = 186257,
["Exhilaration"] = 109304,
["Eagle Eye"] = 6197,
["Flare"] = 1543,
["Concussive Shot"] = 5116,
["Dire Beast"] = 120679,
["Traps"] = 102,
},
["Beast Mastery_Talents"] = {
["Dire Frenzy"] = 217200,
["A Murder of Crows"] = 131894,
["Wyvern Sting"] = 19386,
["Stampede"] = 201430,
["Chimaera Shot"] = 53209,
["Volley"] = 194386,
["Intimidation"] = 19577,
["Binding Shot"] = 109248,
["Barrage"] = 120360,
},
["Survival"] = {
["Harpoon"] = 190925,
["Flare"] = 1543,
["Lacerate"] = 185855,
["Feign Death"] = 5384,
["Muzzle"] = 187707,
["Flanking Strike"] = 202800,
["Aspect of the Turtle"] = 186265,
["Raptor Strike"] = 186270,
["Eagle Eye"] = 6197,
["Hatchet Toss"] = 193265,
["Aspect of the Eagle"] = 186289,
["Carve"] = 187708,
["Aspect of the Cheetah"] = 186257,
["Exhilaration"] = 109304,
["Pet Utility"] = 103,
["Call Pet"] = 9,
["Mongoose Bite"] = 190928,
["Wing Clip"] = 195645,
["Traps"] = 102,
},
["Marksmanship"] = {
["Pet Utility"] = 103,
["Flare"] = 1543,
["Feign Death"] = 5384,
["Arcane Shot"] = 185358,
["Aimed Shot"] = 19434,
["Multi-Shot"] = 2643,
["Aspect of the Turtle"] = 186265,
["Disengage"] = 781,
["Trueshot"] = 193526,
["Counter Shot"] = 147362,
["Call Pet"] = 9,
["Aspect of the Cheetah"] = 186257,
["Eagle Eye"] = 6197,
["Exhilaration"] = 109304,
["Misdirection"] = 34477,
["Marked Shot"] = 185901,
["Concussive Shot"] = 5116,
["Bursting Shot"] = 186387,
["Traps"] = 102,
},
["Survival_Talents"] = {
["Disengage"] = 781,
["Dragonsfire Grenade"] = 194855,
["A Murder of Crows"] = 206505,
["Throwing Axes"] = 200163,
["Spitting Cobra"] = 194407,
["Ranger's Net"] = 200108,
["Snake Hunter"] = 201078,
["Sticky Bomb"] = 191241,
["Butchery"] = 212436,
["Steel Trap"] = 162488,
["Camouflage"] = 199483,
["Caltrops"] = 194277,
},
["Marksmanship_Talents"] = {
["Piercing Shot"] = 198670,
["Camouflage"] = 199483,
["Wyvern Sting"] = 19386,
["Binding Shot"] = 109248,
["Explosive Shot"] = 212431,
["Sidewinders"] = 214579,
["Sentinel"] = 206817,
["Volley"] = 194386,
["A Murder of Crows"] = 131894,
["Black Arrow"] = 194599,
["Barrage"] = 120360,
},
["METADATA"] = {
["Specs"] = {
["Marksmanship"] = 254,
["Beast Mastery"] = 253,
["Survival"] = 255,
},
},
},
["MAGE"] = {
["Arcane_Talents"] = {
["Mirror Image"] = 55342,
["Rune of Power"] = 116011,
["Nether Tempest"] = 114923,
["Supernova"] = 157980,
["Ring of Frost"] = 113724,
["Arcane Orb"] = 153626,
["Shimmer"] = 212653,
["Arcane Familiar"] = 205022,
["Charged Up"] = 205032,
},
["Frost"] = {
["Spellsteal"] = 30449,
["Blizzard"] = 190356,
["Frostbolt"] = 116,
["Frozen Orb"] = 84714,
["Polymorph"] = 118,
["Cold Snap"] = 235219,
["Ice Lance"] = 30455,
["Ice Barrier"] = 11426,
["Portal"] = 11,
["Teleport"] = 1,
["Icy Veins"] = 12472,
["Summon Water Elemental"] = 31687,
["Flurry"] = 44614,
["Counterspell"] = 2139,
["Fire Blast"] = 108853,
["Blink"] = 1953,
["Ice Block"] = 45438,
["Slow Fall"] = 130,
["Frost Nova"] = 122,
["Conjure Refreshment"] = 190336,
["Cone of Cold"] = 120,
["Time Warp"] = 80353,
},
["Pets"] = {
["Waterbolt"] = 31707,
["Water Jet"] = 135029,
["Freeze"] = 33395,
},
["Frost_Talents"] = {
["Ice Nova"] = 157997,
["Frost Bomb"] = 112948,
["Mirror Image"] = 55342,
["Rune of Power"] = 116011,
["Ice Floes"] = 108839,
["Shimmer"] = 212653,
["Ring of Frost"] = 113724,
["Ray of Frost"] = 205021,
["Glacial Spike"] = 199786,
["Comet Storm"] = 153595,
},
["Arcane"] = {
["Arcane Blast"] = 30451,
["Arcane Power"] = 12042,
["Arcane Explosion"] = 1449,
["Prismatic Barrier"] = 235450,
["Polymorph"] = 118,
["Presence of Mind"] = 205025,
["Slow"] = 31589,
["Conjure Refreshment"] = 190336,
["Portal"] = 11,
["Teleport"] = 1,
["Time Warp"] = 80353,
["Arcane Missiles"] = 5143,
["Slow Fall"] = 130,
["Evocation"] = 12051,
["Counterspell"] = 2139,
["Blink"] = 1953,
["Greater Invisibility"] = 110959,
["Ice Block"] = 45438,
["Frost Nova"] = 122,
["Arcane Barrage"] = 44425,
["Spellsteal"] = 30449,
["Displacement"] = 212801,
},
["Fire"] = {
["Fireball"] = 133,
["Dragon's Breath"] = 31661,
["Fire Blast"] = 108853,
["Polymorph"] = 118,
["Pyroblast"] = 11366,
["Scorch"] = 2948,
["Flamestrike"] = 2120,
["Conjure Refreshment"] = 190336,
["Portal"] = 11,
["Teleport"] = 1,
["Combustion"] = 190319,
["Blazing Barrier"] = 235313,
["Blink"] = 1953,
["Ice Block"] = 45438,
["Frost Nova"] = 122,
["Counterspell"] = 2139,
["Slow Fall"] = 130,
["Spellsteal"] = 30449,
["Time Warp"] = 80353,
},
["Fire_Talents"] = {
["Shimmer"] = 212653,
["Cinderstorm"] = 198929,
["Meteor"] = 153561,
["Blast Wave"] = 157981,
["Mirror Image"] = 55342,
["Rune of Power"] = 116011,
["Ring of Frost"] = 113724,
["Living Bomb"] = 44457,
},
["METADATA"] = {
["Specs"] = {
["Fire"] = 63,
["Frost"] = 64,
["Arcane"] = 62,
},
},
},
["MONK"] = {
["Mistweaver"] = {
["Life Cocoon"] = 116849,
["Revival"] = 115310,
["Resuscitate"] = 115178,
["Fortifying Brew"] = 243435,
["Renewing Mist"] = 115151,
["Detox"] = 115450,
["Roll"] = 109132,
["Transcendence"] = 101643,
["Vivify"] = 116670,
["Effuse"] = 116694,
["Zen Pilgrimage"] = 126892,
["Rising Sun Kick"] = 107428,
["Transcendence: Transfer"] = 119996,
["Provoke"] = 115546,
["Spinning Crane Kick"] = 101546,
["Tiger Palm"] = 100780,
["Thunder Focus Tea"] = 116680,
["Blackout Kick"] = 100784,
["Enveloping Mist"] = 124682,
["Crackling Jade Lightning"] = 117952,
["Reawaken"] = 212051,
["Paralysis"] = 115078,
["Essence Font"] = 191837,
},
["Brewmaster"] = {
["Resuscitate"] = 115178,
["Blackout Strike"] = 205523,
["Breath of Fire"] = 115181,
["Fortifying Brew"] = 115203,
["Expel Harm"] = 115072,
["Detox"] = 218164,
["Roll"] = 109132,
["Spear Hand Strike"] = 116705,
["Zen Meditation"] = 115176,
["Transcendence"] = 101643,
["Keg Smash"] = 121253,
["Zen Pilgrimage"] = 126892,
["Tiger Palm"] = 100780,
["Crackling Jade Lightning"] = 117952,
["Purifying Brew"] = 119582,
["Provoke"] = 115546,
["Paralysis"] = 115078,
["Transcendence: Transfer"] = 119996,
["Effuse"] = 116694,
["Ironskin Brew"] = 115308,
},
["Mistweaver_Talents"] = {
["Chi Burst"] = 123986,
["Chi Wave"] = 115098,
["Dampen Harm"] = 122278,
["Diffuse Magic"] = 122783,
["Invoke Chi-Ji, the Red Crane"] = 198664,
["Mana Tea"] = 197908,
["Ring of Peace"] = 116844,
["Chi Torpedo"] = 115008,
["Refreshing Jade Wind"] = 196725,
["Summon Jade Serpent Statue"] = 115313,
["Zen Pulse"] = 124081,
["Tiger's Lust"] = 116841,
["Healing Elixir"] = 122281,
["Leg Sweep"] = 119381,
["Song of Chi-Ji"] = 198898,
},
["Windwalker"] = {
["Fists of Fury"] = 113656,
["Resuscitate"] = 115178,
["Touch of Death"] = 115080,
["Detox"] = 218164,
["Roll"] = 109132,
["Touch of Karma"] = 122470,
["Spear Hand Strike"] = 116705,
["Storm, Earth, and Fire"] = 137639,
["Effuse"] = 116694,
["Zen Pilgrimage"] = 126892,
["Transcendence"] = 101643,
["Flying Serpent Kick"] = 101545,
["Crackling Jade Lightning"] = 117952,
["Transcendence: Transfer"] = 119996,
["Spinning Crane Kick"] = 101546,
["Blackout Kick"] = 100784,
["Provoke"] = 115546,
["Paralysis"] = 115078,
["Rising Sun Kick"] = 107428,
["Tiger Palm"] = 100780,
["Disable"] = 116095,
},
["Brewmaster_Talents"] = {
["Chi Burst"] = 123986,
["Summon Black Ox Statue"] = 115315,
["Black Ox Brew"] = 115399,
["Ring of Peace"] = 116844,
["Leg Sweep"] = 119381,
["Chi Wave"] = 115098,
["Invoke Niuzao, the Black Ox"] = 132578,
["Rushing Jade Wind"] = 116847,
["Tiger's Lust"] = 116841,
["Healing Elixir"] = 122281,
["Dampen Harm"] = 122278,
["Chi Torpedo"] = 115008,
},
["Windwalker_Talents"] = {
["Chi Burst"] = 123986,
["Summon Black Ox Statue"] = 115315,
["Energizing Elixir"] = 115288,
["Serenity"] = 152173,
["Leg Sweep"] = 119381,
["Invoke Xuen, the White Tiger"] = 123904,
["Ring of Peace"] = 116844,
["Chi Torpedo"] = 115008,
["Chi Wave"] = 115098,
["Rushing Jade Wind"] = 116847,
["Dampen Harm"] = 122278,
["Tiger's Lust"] = 116841,
["Healing Elixir"] = 122281,
["Whirling Dragon Punch"] = 152175,
["Diffuse Magic"] = 122783,
},
["METADATA"] = {
["Specs"] = {
["Windwalker"] = 269,
["Brewmaster"] = 268,
["Mistweaver"] = 270,
},
},
},
["PALADIN"] = {
["Protection"] = {
["Divine Shield"] = 642,
["Guardian of Ancient Kings"] = 86659,
["Judgment"] = 20271,
["Light of the Protector"] = 184092,
["Hand of Reckoning"] = 62124,
["Hammer of Justice"] = 853,
["Consecration"] = 26573,
["Shield of the Righteous"] = 53600,
["Redemption"] = 7328,
["Cleanse Toxins"] = 213644,
["Blessing of Freedom"] = 1044,
["Avenging Wrath"] = 31884,
["Lay on Hands"] = 633,
["Blessing of Sacrifice"] = 6940,
["Hammer of the Righteous"] = 53595,
["Blessing of Protection"] = 1022,
["Rebuke"] = 96231,
["Flash of Light"] = 19750,
["Avenger's Shield"] = 31935,
["Ardent Defender"] = 31850,
["Divine Steed"] = 190784,
},
["Holy"] = {
["Divine Shield"] = 642,
["Avenging Wrath"] = 31842,
["Cleanse"] = 4987,
["Judgment"] = 20271,
["Light of the Martyr"] = 183998,
["Holy Shock"] = 20473,
["Hand of Reckoning"] = 62124,
["Hammer of Justice"] = 853,
["Consecration"] = 26573,
["Beacon of Light"] = 53563,
["Divine Protection"] = 498,
["Blessing of Protection"] = 1022,
["Redemption"] = 7328,
["Crusader Strike"] = 35395,
["Absolution"] = 212056,
["Lay on Hands"] = 633,
["Light of Dawn"] = 85222,
["Blessing of Sacrifice"] = 6940,
["Aura Mastery"] = 31821,
["Flash of Light"] = 19750,
["Blessing of Freedom"] = 1044,
["Holy Light"] = 82326,
["Divine Steed"] = 190784,
},
["Retribution_Talents"] = {
["Word of Glory"] = 210191,
["Blinding Light"] = 115750,
["Divine Hammer"] = 198034,
["Justicar's Vengeance"] = 215661,
["Zeal"] = 217020,
["Execution Sentence"] = 213757,
["Repentance"] = 20066,
["Consecration"] = 205228,
["Eye for an Eye"] = 205191,
["Crusade"] = 231895,
["Holy Wrath"] = 210220,
},
["Holy_Talents"] = {
["Holy Avenger"] = 105809,
["Blinding Light"] = 115750,
["Beacon of Faith"] = 156910,
["Bestow Faith"] = 223306,
["Light's Hammer"] = 114158,
["Beacon of Virtue"] = 200025,
["Rule of Law"] = 214202,
["Holy Prism"] = 114165,
["Repentance"] = 20066,
},
["Protection_Talents"] = {
["Bastion of Light"] = 204035,
["Blessing of Spellwarding"] = 204018,
["Blessed Hammer"] = 204019,
["Blinding Light"] = 115750,
["Seraphim"] = 152262,
["Hand of the Protector"] = 213652,
["Aegis of Light"] = 204150,
["Repentance"] = 20066,
},
["Retribution"] = {
["Divine Shield"] = 642,
["Avenging Wrath"] = 31884,
["Divine Storm"] = 53385,
["Shield of Vengeance"] = 184662,
["Judgment"] = 20271,
["Redemption"] = 7328,
["Hand of Reckoning"] = 62124,
["Hammer of Justice"] = 853,
["Rebuke"] = 96231,
["Blessing of Protection"] = 1022,
["Hand of Hindrance"] = 183218,
["Lay on Hands"] = 633,
["Blade of Justice"] = 184575,
["Blessing of Freedom"] = 1044,
["Cleanse Toxins"] = 213644,
["Crusader Strike"] = 35395,
["Greater Blessing of Kings"] = 203538,
["Flash of Light"] = 19750,
["Templar's Verdict"] = 85256,
["Greater Blessing of Wisdom"] = 203539,
["Divine Steed"] = 190784,
},
["METADATA"] = {
["Specs"] = {
["Protection"] = 66,
["Holy"] = 65,
["Retribution"] = 70,
},
},
},
["PRIEST"] = {
["Holy_Talents"] = {
["Halo"] = 120517,
["Symbol of Hope"] = 64901,
["Binding Heal"] = 32546,
["Angelic Feather"] = 121536,
["Circle of Healing"] = 204883,
["Divine Star"] = 110744,
["Shining Force"] = 204263,
["Apotheosis"] = 200183,
["Body and Mind"] = 214121,
},
["Shadow"] = {
["Purify Disease"] = 213634,
["Resurrection"] = 2006,
["Shackle Undead"] = 9484,
["Shadow Word: Pain"] = 589,
["Fade"] = 586,
["Mind Vision"] = 2096,
["Mass Dispel"] = 32375,
["Silence"] = 15487,
["Dispersion"] = 47585,
["Mind Blast"] = 8092,
["Shadowform"] = 232698,
["Levitate"] = 1706,
["Void Eruption"] = 228260,
["Shadow Mend"] = 186263,
["Mind Flay"] = 15407,
["Dispel Magic"] = 528,
["Shadow Word: Death"] = 32379,
["Psychic Scream"] = 8122,
["Mind Control"] = 605,
["Power Word: Shield"] = 17,
["Smite"] = 585,
["Shadowfiend"] = 34433,
["Vampiric Touch"] = 34914,
["Flash Heal"] = 2061,
["Vampiric Embrace"] = 15286,
},
["Shadow_Talents"] = {
["Power Infusion"] = 10060,
["Mindbender"] = 200174,
["Mind Bomb"] = 205369,
["Shadow Word: Void"] = 205351,
["Surrender to Madness"] = 193223,
["Shadow Crash"] = 205385,
},
["Holy"] = {
["Renew"] = 139,
["Resurrection"] = 2006,
["Shackle Undead"] = 9484,
["Holy Nova"] = 132157,
["Fade"] = 586,
["Mass Dispel"] = 32375,
["Holy Word: Serenity"] = 2050,
["Mind Control"] = 605,
["Desperate Prayer"] = 19236,
["Holy Fire"] = 14914,
["Levitate"] = 1706,
["Flash Heal"] = 2061,
["Guardian Spirit"] = 47788,
["Leap of Faith"] = 73325,
["Mass Resurrection"] = 212036,
["Holy Word: Sanctify"] = 34861,
["Holy Word: Chastise"] = 88625,
["Heal"] = 2060,
["Divine Hymn"] = 64843,
["Smite"] = 585,
["Dispel Magic"] = 528,
["Prayer of Healing"] = 596,
["Prayer of Mending"] = 33076,
["Purify"] = 527,
},
["Discipline"] = {
["Power Word: Radiance"] = 194509,
["Resurrection"] = 2006,
["Shackle Undead"] = 9484,
["Rapture"] = 47536,
["Pain Suppression"] = 33206,
["Fade"] = 586,
["Mind Vision"] = 2096,
["Plea"] = 200829,
["Mass Dispel"] = 32375,
["Levitate"] = 1706,
["Penance"] = 47540,
["Mind Control"] = 605,
["Shadow Mend"] = 186263,
["Dispel Magic"] = 528,
["Mass Resurrection"] = 212036,
["Psychic Scream"] = 8122,
["Leap of Faith"] = 73325,
["Power Word: Shield"] = 17,
["Smite"] = 585,
["Shadowfiend"] = 34433,
["Purify"] = 527,
["Shadow Word: Pain"] = 589,
["Power Word: Barrier"] = 62618,
},
["Discipline_Talents"] = {
["Evangelism"] = 246287,
["Power Infusion"] = 10060,
["Schism"] = 214621,
["Mindbender"] = 123040,
["Halo"] = 120517,
["Shadow Covenant"] = 204065,
["Angelic Feather"] = 121536,
["Power Word: Solace"] = 129250,
["Divine Star"] = 110744,
["Clarity of Will"] = 152118,
["Shining Force"] = 204263,
["Purge the Wicked"] = 204197,
},
["METADATA"] = {
["Specs"] = {
["Discipline"] = 256,
["Holy"] = 257,
["Shadow"] = 258,
},
},
},
["ROGUE"] = {
["Outlaw_Talents"] = {
["Death from Above"] = 152150,
["Slice and Dice"] = 5171,
["Parley"] = 199743,
["Ghostly Strike"] = 196937,
["Cannonball Barrage"] = 185767,
["Grappling Hook"] = 195457,
["Marked for Death"] = 137619,
["Killing Spree"] = 51690,
},
["Subtlety"] = {
["Sprint"] = 2983,
["Cloak of Shadows"] = 31224,
["Backstab"] = 53,
["Symbols of Death"] = 212283,
["Crimson Vial"] = 185311,
["Shadowstep"] = 36554,
["Shadow Blades"] = 121471,
["Shadowstrike"] = 185438,
["Eviscerate"] = 196819,
["Blind"] = 2094,
["Stealth"] = 1784,
["Kick"] = 1766,
["Pick Pocket"] = 921,
["Kidney Shot"] = 408,
["Shadow Dance"] = 185313,
["Pick Lock"] = 1804,
["Nightblade"] = 195452,
["Shroud of Concealment"] = 114018,
["Distract"] = 1725,
["Evasion"] = 5277,
["Shuriken Storm"] = 197835,
["Sap"] = 6770,
["Shuriken Toss"] = 114014,
["Feint"] = 1966,
["Tricks of the Trade"] = 57934,
["Cheap Shot"] = 1833,
["Vanish"] = 1856,
},
["Assassination"] = {
["Sprint"] = 2983,
["Cloak of Shadows"] = 31224,
["Garrote"] = 703,
["Envenom"] = 32645,
["Crimson Vial"] = 185311,
["Shadowstep"] = 36554,
["Rupture"] = 1943,
["Evasion"] = 5277,
["Vendetta"] = 79140,
["Kidney Shot"] = 408,
["Pick Pocket"] = 921,
["Blind"] = 2094,
["Mutilate"] = 1329,
["Pick Lock"] = 1804,
["Stealth"] = 1784,
["Shroud of Concealment"] = 114018,
["Distract"] = 1725,
["Kick"] = 1766,
["Fan of Knives"] = 51723,
["Sap"] = 6770,
["Poisoned Knife"] = 185565,
["Feint"] = 1966,
["Tricks of the Trade"] = 57934,
["Cheap Shot"] = 1833,
["Vanish"] = 1856,
},
["Outlaw"] = {
["Sprint"] = 2983,
["Cloak of Shadows"] = 31224,
["Riposte"] = 199754,
["Pistol Shot"] = 185763,
["Blade Flurry"] = 13877,
["Between the Eyes"] = 199804,
["Crimson Vial"] = 185311,
["Run Through"] = 2098,
["Saber Slash"] = 193315,
["Roll the Bones"] = 193316,
["Stealth"] = 1784,
["Ambush"] = 8676,
["Blind"] = 2094,
["Feint"] = 1966,
["Pick Lock"] = 1804,
["Bribe"] = 199740,
["Shroud of Concealment"] = 114018,
["Distract"] = 1725,
["Adrenaline Rush"] = 13750,
["Gouge"] = 1776,
["Sap"] = 6770,
["Pick Pocket"] = 921,
["Kick"] = 1766,
["Tricks of the Trade"] = 57934,
["Cheap Shot"] = 1833,
["Vanish"] = 1856,
},
["Assassination_Talents"] = {
["Leeching Poison"] = 108211,
["Toxic Blade"] = 245388,
["Hemorrhage"] = 16511,
["Exsanguinate"] = 200806,
["Marked for Death"] = 137619,
["Death from Above"] = 152150,
},
["Subtlety_Talents"] = {
["Death from Above"] = 152150,
["Marked for Death"] = 137619,
["Gloomblade"] = 200758,
},
["METADATA"] = {
["Specs"] = {
["Outlaw"] = 260,
["Subtlety"] = 261,
["Assassination"] = 259,
},
},
},
["SHAMAN"] = {
["Enhancement"] = {
["Astral Shift"] = 108271,
["Healing Surge"] = 188070,
["Crash Lightning"] = 187874,
["Lava Lash"] = 60103,
["Ghost Wolf"] = 2645,
["Flametongue"] = 193796,
["Feral Spirit"] = 51533,
["Water Walking"] = 546,
["Earthbind Totem"] = 2484,
["Hex"] = 51514,
["Far Sight"] = 6196,
["Ancestral Spirit"] = 2008,
["Hex Variants"] = 106,
["Rockbiter"] = 193786,
["Cleanse Spirit"] = 51886,
["Frostbrand"] = 196834,
["Lightning Bolt"] = 187837,
["Gift of the Queen"] = 207778,
["Wind Shear"] = 57994,
["Astral Recall"] = 556,
["Purge"] = 370,
["Spirit Walk"] = 58875,
["Bloodlust"] = 2825,
["Heroism"] = 32182,
["Stormstrike"] = 17364,
},
["METADATA"] = {
["Specs"] = {
["Enhancement"] = 263,
["Elemental"] = 262,
["Restoration"] = 264,
},
},
["Elemental"] = {
["Astral Shift"] = 108271,
["Healing Surge"] = 8004,
["Ghost Wolf"] = 2645,
["Flame Shock"] = 188389,
["Earthquake"] = 61882,
["Earth Elemental"] = 198103,
["Ancestral Spirit"] = 2008,
["Water Walking"] = 546,
["Earthbind Totem"] = 2484,
["Hex"] = 51514,
["Thunderstorm"] = 51490,
["Purge"] = 370,
["Far Sight"] = 6196,
["Hex Variants"] = 106,
["Frost Shock"] = 196840,
["Lightning Bolt"] = 188196,
["Fire Elemental"] = 198067,
["Bloodlust"] = 2825,
["Heroism"] = 32182,
["Gift of the Queen"] = 207778,
["Wind Shear"] = 57994,
["Astral Recall"] = 556,
["Lava Burst"] = 51505,
["Cleanse Spirit"] = 51886,
["Chain Lightning"] = 188443,
["Earth Shock"] = 8042,
},
["Restoration_Talents"] = {
["Voodoo Totem"] = 196932,
["Wind Rush Totem"] = 192077,
["Ancestral Protection Totem"] = 207399,
["Earthen Shield Totem"] = 198838,
["Unleash Life"] = 73685,
["Lightning Surge Totem"] = 192058,
["Gust of Wind"] = 192063,
["Wellspring"] = 197995,
["Cloudburst Totem"] = 157153,
["Ascendance"] = 114052,
["Ancestral Guidance"] = 108281,
["Earthgrab Totem"] = 51485,
},
["Elemental_Talents"] = {
["Liquid Magma Totem"] = 192222,
["Elemental Mastery"] = 16166,
["Totem Mastery"] = 210643,
["Icefury"] = 210714,
["Wind Rush Totem"] = 192077,
["Lightning Surge Totem"] = 192058,
["Storm Elemental"] = 192249,
["Gust of Wind"] = 192063,
["Voodoo Totem"] = 196932,
["Elemental Blast"] = 117014,
["Ascendance"] = 114050,
["Ancestral Guidance"] = 108281,
["Earthgrab Totem"] = 51485,
},
["Pets"] = {
["Fire Nova"] = 117588,
["Eye of the Storm"] = 157382,
["Wind Gust"] = 157331,
["Gale Force"] = 157375,
["Immolate"] = 118297,
["Fire Blast"] = 57984,
["Harden Skin"] = 118337,
["Call Lightning"] = 157348,
["Angered Earth"] = 36213,
["Pulverize"] = 118345,
},
["Restoration"] = {
["Astral Shift"] = 108271,
["Healing Surge"] = 8004,
["Healing Tide Totem"] = 108280,
["Ghost Wolf"] = 2645,
["Flame Shock"] = 188838,
["Spiritwalker's Grace"] = 79206,
["Healing Wave"] = 77472,
["Purify Spirit"] = 77130,
["Ancestral Spirit"] = 2008,
["Water Walking"] = 546,
["Far Sight"] = 6196,
["Earthbind Totem"] = 2484,
["Hex"] = 51514,
["Purge"] = 370,
["Ancestral Vision"] = 212048,
["Astral Recall"] = 556,
["Hex Variants"] = 106,
["Gift of the Queen"] = 207778,
["Lightning Bolt"] = 403,
["Healing Rain"] = 73920,
["Riptide"] = 61295,
["Lava Burst"] = 51505,
["Wind Shear"] = 57994,
["Chain Heal"] = 1064,
["Bloodlust"] = 2825,
["Heroism"] = 32182,
["Healing Stream Totem"] = 5394,
["Chain Lightning"] = 421,
["Spirit Link Totem"] = 98008,
},
["Enhancement_Talents"] = {
["Voodoo Totem"] = 196932,
["Wind Rush Totem"] = 192077,
["Rainfall"] = 215864,
["Earthen Spike"] = 188089,
["Earthgrab Totem"] = 51485,
["Lightning Shield"] = 192106,
["Windsong"] = 201898,
["Fury of Air"] = 197211,
["Sundering"] = 197214,
["Ascendance"] = 114051,
["Feral Lunge"] = 196884,
["Lightning Surge Totem"] = 192058,
},
},
["WARLOCK"] = {
["Pets"] = {
["Consuming Shadows"] = 3716,
["Singe Magic"] = 89808,
["Felstorm"] = 89751,
["Axe Toss"] = 89766,
["Shadow Shield"] = 115232,
["Lash of Pain"] = 7814,
["Lesser Invisibility"] = 7870,
["Whiplash"] = 6360,
["Legion Strike"] = 30213,
["Shadow Bulwark"] = 17767,
["Suffering"] = 119907,
["Threatening Presence"] = 112042,
["Pursuit"] = 30151,
["Seduction"] = 6358,
["Void Reflexes"] = 117225,
["Shadow Bite"] = 54049,
["Devour Magic"] = 19505,
["Flee"] = 89792,
["Avoidance"] = 32233,
["Firebolt"] = 3110,
["Spell Lock"] = 119910,
["Cauterize Master"] = 119905,
},
["METADATA"] = {
["Specs"] = {
["Demonology"] = 266,
["Affliction"] = 265,
["Destruction"] = 267,
},
},
["Destruction"] = {
["Soulstone"] = 20707,
["Grimoire of Service"] = 67,
["Create Soulwell"] = 29893,
["Conflagrate"] = 17962,
["Ritual of Summoning"] = 698,
["Health Funnel"] = 755,
["Eye of Kilrogg"] = 126,
["Unending Resolve"] = 104773,
["Fear"] = 5782,
["Immolate"] = 348,
["Banish"] = 710,
["Demonic Gateway"] = 111771,
["Enslave Demon"] = 1098,
["Incinerate"] = 29722,
["Drain Life"] = 234153,
["Summon Doomguard"] = 18540,
["Life Tap"] = 1454,
["Chaos Bolt"] = 116858,
["Create Healthstone"] = 6201,
["Havoc"] = 80240,
["Command Demon"] = 119898,
["Unending Breath"] = 5697,
["Summon Demon"] = 10,
["Summon Infernal"] = 1122,
["Rain of Fire"] = 5740,
},
["Demonology_Talents"] = {
["Soul Harvest"] = 196098,
["Mortal Coil"] = 6789,
["Shadowflame"] = 205181,
["Implosion"] = 196277,
["Summon Darkglare"] = 205180,
["Demonic Circle"] = 48018,
["Dark Pact"] = 108416,
["Shadowfury"] = 30283,
["Burning Rush"] = 111400,
["Demonbolt"] = 157695,
},
["Demonology"] = {
["Call Dreadstalkers"] = 104316,
["Soulstone"] = 20707,
["Grimoire of Service"] = 67,
["Create Soulwell"] = 29893,
["Ritual of Summoning"] = 698,
["Health Funnel"] = 755,
["Doom"] = 603,
["Fear"] = 5782,
["Demonic Empowerment"] = 193396,
["Command Demon"] = 119898,
["Demonwrath"] = 193440,
["Demonic Gateway"] = 111771,
["Banish"] = 710,
["Hand of Gul'dan"] = 105174,
["Drain Life"] = 234153,
["Unending Breath"] = 5697,
["Shadow Bolt"] = 686,
["Eye of Kilrogg"] = 126,
["Create Healthstone"] = 6201,
["Life Tap"] = 1454,
["Summon Doomguard"] = 18540,
["Enslave Demon"] = 1098,
["Summon Demon"] = 10,
["Summon Infernal"] = 1122,
["Unending Resolve"] = 104773,
},
["Destruction_Talents"] = {
["Grimoire of Sacrifice"] = 108503,
["Soul Harvest"] = 196098,
["Mortal Coil"] = 6789,
["Demonic Circle"] = 48018,
["Channel Demonfire"] = 196447,
["Shadowburn"] = 17877,
["Cataclysm"] = 152108,
["Shadowfury"] = 30283,
["Burning Rush"] = 111400,
["Dark Pact"] = 108416,
},
["Affliction"] = {
["Corruption"] = 172,
["Soulstone"] = 20707,
["Grimoire of Service"] = 67,
["Create Soulwell"] = 29893,
["Agony"] = 980,
["Ritual of Summoning"] = 698,
["Health Funnel"] = 755,
["Eye of Kilrogg"] = 126,
["Fear"] = 5782,
["Demonic Gateway"] = 111771,
["Banish"] = 710,
["Life Tap"] = 1454,
["Drain Soul"] = 198590,
["Unstable Affliction"] = 30108,
["Seed of Corruption"] = 27243,
["Command Demon"] = 119898,
["Create Healthstone"] = 6201,
["Unending Breath"] = 5697,
["Summon Doomguard"] = 18540,
["Summon Infernal"] = 1122,
["Summon Demon"] = 10,
["Unending Resolve"] = 104773,
["Enslave Demon"] = 1098,
},
["Affliction_Talents"] = {
["Grimoire of Sacrifice"] = 108503,
["Soul Harvest"] = 196098,
["Howl of Terror"] = 5484,
["Demonic Circle"] = 48018,
["Phantom Singularity"] = 205179,
["Mortal Coil"] = 6789,
["Haunt"] = 48181,
["Dark Pact"] = 108416,
["Burning Rush"] = 111400,
["Siphon Life"] = 63106,
},
},
["WARRIOR"] = {
["Protection"] = {
["Shield Wall"] = 871,
["Berserker Rage"] = 18499,
["Shield Block"] = 2565,
["Shield Slam"] = 23922,
["Taunt"] = 355,
["Devastate"] = 20243,
["Demoralizing Shout"] = 1160,
["Ignore Pain"] = 190456,
["Last Stand"] = 12975,
["Intercept"] = 198304,
["Spell Reflection"] = 23920,
["Battle Cry"] = 1719,
["Revenge"] = 6572,
["Pummel"] = 6552,
["Heroic Leap"] = 6544,
["Victory Rush"] = 34428,
["Heroic Throw"] = 57755,
["Thunder Clap"] = 6343,
},
["Arms_Talents"] = {
["Shockwave"] = 46968,
["Defensive Stance"] = 197690,
["Storm Bolt"] = 107570,
["Avatar"] = 107574,
["Rend"] = 772,
["Overpower"] = 7384,
["Ravager"] = 152277,
["Focused Rage"] = 207982,
},
["Fury"] = {
["Taunt"] = 355,
["Intimidating Shout"] = 5246,
["Execute"] = 5308,
["Whirlwind"] = 190411,
["Furious Slash"] = 100130,
["Piercing Howl"] = 12323,
["Berserker Rage"] = 18499,
["Commanding Shout"] = 97462,
["Raging Blow"] = 85288,
["Rampage"] = 184367,
["Bloodthirst"] = 23881,
["Battle Cry"] = 1719,
["Enraged Regeneration"] = 184364,
["Heroic Leap"] = 6544,
["Pummel"] = 6552,
["Heroic Throw"] = 57755,
["Charge"] = 100,
},
["Arms"] = {
["Taunt"] = 355,
["Intimidating Shout"] = 5246,
["Cleave"] = 845,
["Execute"] = 163201,
["Whirlwind"] = 1680,
["Mortal Strike"] = 12294,
["Berserker Rage"] = 18499,
["Commanding Shout"] = 97462,
["Hamstring"] = 1715,
["Colossus Smash"] = 167105,
["Charge"] = 100,
["Battle Cry"] = 1719,
["Die by the Sword"] = 118038,
["Heroic Leap"] = 6544,
["Pummel"] = 6552,
["Bladestorm"] = 227847,
["Victory Rush"] = 34428,
["Heroic Throw"] = 57755,
["Slam"] = 1464,
},
["Protection_Talents"] = {
["Shockwave"] = 46968,
["Impending Victory"] = 202168,
["Storm Bolt"] = 107570,
["Ravager"] = 228920,
["Avatar"] = 107574,
},
["Fury_Talents"] = {
["Shockwave"] = 46968,
["Storm Bolt"] = 107570,
["Bladestorm"] = 46924,
["Dragon Roar"] = 118000,
["Avatar"] = 107574,
["Bloodbath"] = 12292,
},
["METADATA"] = {
["Specs"] = {
["Arms"] = 71,
["Fury"] = 72,
["Protection"] = 73,
},
},
},
};
 
 
-- DRUID
["Swiftmend"] = 18562,
["Solar Wrath"] = 5176,
["Skull Bash"] = 106839,
["Savage Roar"] = 52610,
["Nature's Cure"] = 88423,
["Mangle"] = 33917,
["Omen of Clarity"] = 113043,
["Tiger's Fury"] = 231055,
["Remove Corruption"] = 2782,
["Thrash"] = 106832,
["Incarnation: King of the Jungle"] = 106951,
["Regrowth"] = 231032,
["Intimidating Roar"] = 99,
["Wild Charge"] = 102401,
["Revive"] = 50769,
["Frenzied Regeneration"] = 22842,
["Rake"] = 231052,
["Rip"] = 1079,
["Pulverize"] = 80313,
["Maim"] = 22570,
["Berserk"] = 106951,
["Barkskin"] = 22812,
["Elune's Guidance"] = 202060,
["Teleport: Moonglade"] = 18960,
["Survival Instincts"] = 61336,
["Sunfire"] = 93402,
["Solar Beam"] = 78675,
["Mass Entanglement"] = 175682,
["Lunar Strike"] = 194153,
["Feline Swiftness"] = 131768,
["Astral Influence"] = 197524,
["Revitalize"] = 212040,
["Thick Hide"] = 16931,
["Efflorescence"] = 145205,
["Incapacitating Roar"] = 99,
["Starsurge"] = 231021,
["Lightning Reflexes"] = 231065,
["Cenarion Ward"] = 102351,
["Bear Form"] = 5487,
["Dash"] = 1850,
["Rebirth"] = 20484,
["Displacer Beast"] = 102280,
["Ysera's Gift"] = 145108,
["Brutal Slash"] = 213764,
["Ironfur"] = 192081,
["Bristling Fur"] = 155835,
["Typhoon"] = 175682,
["Ironbark"] = 102342,
["Cat Form"] = 768,
["Travel Form"] = 783,
["Healing Touch"] = 5185,
["Prowl"] = 5215,
["Infected Wounds"] = 48484,
["Tranquility"] = 740,
["Ferocious Bite"] = 231056,
["Growl"] = 6795,
["Wild Growth"] = 48438,
["Living Seed"] = 48500,
["Celestial Alignment"] = 194223,
["Shred"] = 231057,
["Lifebloom"] = 33763,
["Rejuvenation"] = 231040,
["Maul"] = 6807,
["Primal Fury"] = 159286,
["Entangling Roots"] = 339,
["Swipe"] = 231283,
["Feral Instinct"] = 16949,
["Moonkin Form"] = 231042,
["Ursol's Vortex"] = 102793,
["Starfall"] = 231049,
["Stampeding Roar"] = 106898,
["Predatory Swiftness"] = 16974,
["Moonfire"] = 8921,
["Lunar Beam"] = 204066,
["Renewal"] = 108238,
["Flourish"] = 197721,
["Mighty Bash"] = 175682,
["Incarnation: Guardian of Ursoc"] = 102558,
["Gore"] = 210706,
["Innervate"] = 29166,
["Incarnation: Tree of Life"] = 33891,
["Blessing of the Ancients"] = 202360,
-- Helper functions: Default lookup priorities --
-------------------------------------------------
 
-- HUNTER
["Harpoon"] = 190925,
["Call Pet"] = 9,
["Marked Shot"] = 185901,
["Flanking Strike"] = 202800,
["Snake Hunter"] = 201078,
["Aimed Shot"] = 19434,
["Multi-Shot"] = 2643,
["Dire Beast"] = 120679,
["Raptor Strike"] = 186270,
["Counter Shot"] = 147362,
["Kindred Spirits"] = 56315,
["Eagle Eye"] = 6197,
["Concussive Shot"] = 5116,
["Bursting Shot"] = 186387,
["Barrage"] = 120360,
["Dire Frenzy"] = 120679,
["Bestial Wrath"] = 231548,
["Kill Command"] = 34026,
["Traps"] = 102,
["Misdirection"] = 34477,
["Explosive Shot"] = 212431,
["Waylay"] = 234955,
["Aspect of the Turtle"] = 186265,
["Dragonsfire Grenade"] = 194855,
["Beast Cleave"] = 115939,
["Aspect of the Eagle"] = 186289,
["Sidewinders"] = 2643,
["Exhilaration"] = 231546,
["Mongoose Bite"] = 190928,
["Wing Clip"] = 195645,
["A Murder of Crows"] = 206505,
["Chimaera Shot"] = 53209,
["Muzzle"] = 187707,
["Butchery"] = 187708,
["Black Arrow"] = 194599,
["Sticky Bomb"] = 175686,
["Carve"] = 187708,
["Sentinel"] = 206817,
["Hatchet Toss"] = 193265,
["Cobra Shot"] = 193455,
["Lacerate"] = 185855,
["Feign Death"] = 5384,
["Arcane Shot"] = 185358,
["Ranger's Net"] = 195645,
["Spitting Cobra"] = 194407,
["Hunter's Mark"] = 185987,
["Pet Utility"] = 103,
["Bombardment"] = 35110,
["Aspect of the Wild"] = 193530,
["Disengage"] = 231549,
["Survivalist"] = 164856,
["Trueshot"] = 193526,
["Throwing Axes"] = 200163,
["Wyvern Sting"] = 175686,
["Wild Call"] = 185789,
["Piercing Shot"] = 198670,
["Camouflage"] = 175686,
["Marksman's Focus"] = 231554,
["Aspect of the Cheetah"] = 186257,
["Volley"] = 194386,
["Hunting Party"] = 212658,
["Stampede"] = 201430,
["Intimidation"] = 175686,
["Binding Shot"] = 175686,
["Flare"] = 1543,
-- HUNTER Pets
["Charge"] = 61685,
["Blood of the Rhino"] = 53482,
["Heart of the Phoenix"] = 55709,
["Boar's Speed"] = 19596,
["Great Stamina"] = 61688,
["Thunderstomp"] = 63900,
["Roar of Sacrifice"] = 53480,
["Hunting Companion"] = 191336,
["Growl"] = 2649,
["Last Stand"] = 53478,
["Bullheaded"] = 53490,
["Cornered"] = 53497,
["Dash"] = 61684,
["Claw"] = 16827,
["Spiked Collar"] = 53184,
["Combat Experience"] = 20782,
local playerUniversalClassName; -- Player only, gathered upon PLAYER_LOGIN
 
-- MAGE
["Cinderstorm"] = 198929,
["Ice Floes"] = 108839,
["Polymorph"] = 118,
["Presence of Mind"] = 205025,
["Ring of Frost"] = 113724,
["Flurry"] = 44614,
["Freeze"] = 231596,
["Portal"] = 11,
["Teleport"] = 1,
["Blink"] = 1953,
["Blazing Barrier"] = 235313,
["Counterspell"] = 2139,
["Fireball"] = 133,
["Arcane Power"] = 12042,
["Mirror Image"] = 55342,
["Prismatic Barrier"] = 235450,
["Cold Snap"] = 235219,
["Ice Lance"] = 108853,
["Slow"] = 31589,
["Ray of Frost"] = 205021,
["Summon Water Elemental"] = 31687,
["Greater Invisibility"] = 110959,
["Critical Mass"] = 117216,
["Cone of Cold"] = 120,
["Invisibility"] = 66,
["Glacial Spike"] = 199786,
["Living Bomb"] = 44457,
["Pyroblast"] = 11366,
["Fingers of Frost"] = 112965,
["Comet Storm"] = 153595,
["Arcane Familiar"] = 205022,
["Ice Barrier"] = 11426,
["Combustion"] = 190319,
["Enhanced Pyrotechnics"] = 157642,
["Brain Freeze"] = 190447,
["Blast Wave"] = 157981,
["Arcane Barrage"] = 231564,
["Arcane Blast"] = 30451,
["Supernova"] = 157980,
["Frozen Orb"] = 84714,
["Water Jet"] = 231598,
["Charged Up"] = 205032,
["Frostbolt"] = 116,
["Arcane Explosion"] = 1449,
["Meteor"] = 153561,
["Slow Fall"] = 130,
["Frost Bomb"] = 112948,
["Blizzard"] = 190356,
["Arcane Orb"] = 153626,
["Scorch"] = 2948,
["Flamestrike"] = 2120,
["Ice Nova"] = 157997,
["Rune of Power"] = 116011,
["Conjure Refreshment"] = 190336,
["Time Warp"] = 80353,
["Ice Block"] = 45438,
["Frost Nova"] = 122,
["Spellsteal"] = 30449,
["Arcane Missiles"] = 5143,
["Displacement"] = 212801,
["Fire Blast"] = 231567,
["Dragon's Breath"] = 31661,
["Nether Tempest"] = 114923,
["Cauterize"] = 86949,
["Shimmer"] = 1953,
["Shatter"] = 12982,
["Evocation"] = 231565,
["Icy Veins"] = 12472,
["Hot Streak"] = 195283,
-- MAGE Pet
["Waterbolt"] = 31707,
["Water Jet"] = 135029,
["Freeze"] = 33395,
local GetEnglishSpecialisationName = function(specID, ...) -- Any class/spec
-- Arguments (1 to 2):
-- specID (number) *mandatory - Specialisation ID for which we want to get the English Name.
-- universalClassName (string) *optional - Class where the specialisation should be found;
-- Defaults to the current Player's class.
-- Returns (2):
-- engSpecName (string): English name for the given Specialisation; Nil if the spec wasn't
-- found.
-- uniClassName (string): Non-localised name of the Class the spec belongs to (given as arg2
-- or otherwise discovered if the given class was wrong or nil). Nil if the spec wasn't
-- found.
--
-- Look first in the provided universal class name (or the player class if argument is missing)
local lookupFirstInClass = ... or playerUniversalClassName;
for engSpecName, DBspecID in pairs(LibSN2SID.DB[lookupFirstInClass].METADATA.Specs) do
if DBspecID == specID then
return engSpecName, lookupFirstInClass;
end
end
-- Look up the specialisation ID in all other classes
local generalTabName = (GetSpellTabInfo(1));
local uniClassName = (next(LibSN2SID.DB, nil));
while uniClassName do
if (uniClassName ~= generalTabName) and (uniClassName ~= lookupFirstInClass) then
for engSpecName, DBspecID in pairs(LibSN2SID.DB[uniClassName].METADATA.Specs) do
-- print(uniClassName);
if DBspecID == specID then
return engSpecName, uniClassName;
end
end
end
uniClassName = (next(LibSN2SID.DB, uniClassName));
end
-- Could not find the given specID in the database
return nil, nil;
end
 
-- MONK
["Fists of Fury"] = 113656,
["Revival"] = 115310,
["Resuscitate"] = 115178,
["Blackout Strike"] = 205523,
["Fortifying Brew"] = 243435,
["Renewing Mist"] = 231606,
["Expel Harm"] = 115072,
["Detox"] = 115450,
["Spinning Crane Kick"] = 101546,
["Touch of Karma"] = 122470,
["Zen Meditation"] = 115176,
["Transcendence"] = 101643,
["Tiger Palm"] = 100780,
["Provoke"] = 115546,
["Crackling Jade Lightning"] = 117952,
["Rising Sun Kick"] = 107428,
["Disable"] = 116095,
["Gift of the Ox"] = 124502,
["Thunder Focus Tea"] = 231876,
["Breath of Fire"] = 115181,
["Touch of Death"] = 115080,
["Transcendence: Transfer"] = 119996,
["Effuse"] = 116694,
["Roll"] = 109132,
["Brewmaster's Balance"] = 245013,
["Spear Hand Strike"] = 116705,
["Windwalking"] = 157411,
["Life Cocoon"] = 116849,
["Essence Font"] = 231633,
["Storm, Earth, and Fire"] = 137639,
["Blackout Kick"] = 100784,
["Ironskin Brew"] = 115308,
["Keg Smash"] = 121253,
["Stagger"] = 115069,
["Afterlife"] = 116092,
["Flying Serpent Kick"] = 101545,
["Celestial Fortune"] = 216519,
["Teachings of the Monastery"] = 116645,
["Zen Pilgrimage"] = 126892,
["Purifying Brew"] = 119582,
["Enveloping Mist"] = 231605,
["Paralysis"] = 115078,
["Reawaken"] = 212051,
["Vivify"] = 116670,
["Soothing Mist"] = 193884,
 
-- PALADIN
["Avenging Wrath"] = 31884,
["Cleanse"] = 4987,
["Light of the Protector"] = 184092,
["Eye for an Eye"] = 205191,
["Hammer of Justice"] = 853,
["Retribution"] = 183435,
["Divine Protection"] = 498,
["Hand of Hindrance"] = 183218,
["Aegis of Light"] = 204150,
["Absolution"] = 212056,
["Light of Dawn"] = 85222,
["Templar's Verdict"] = 85256,
["Guardian of Ancient Kings"] = 86659,
["Holy Avenger"] = 105809,
["Shield of Vengeance"] = 184662,
["Beacon of Faith"] = 156910,
["Light of the Martyr"] = 183998,
["Divine Hammer"] = 184575,
["Holy Shock"] = 20473,
["Hand of Reckoning"] = 62124,
["Consecration"] = 26573,
["Grand Crusader"] = 85043,
["Holy Wrath"] = 210220,
["Word of Glory"] = 210191,
["Infusion of Light"] = 53576,
["Rebuke"] = 96231,
["Blade of Justice"] = 184575,
["Justicar's Vengeance"] = 215661,
["Righteousness"] = 227068,
["Blessing of Freedom"] = 1044,
["Divine Steed"] = 190784,
["Blinding Light"] = 115750,
["Judgment"] = 231657,
["Shield of the Righteous"] = 53600,
["Hammer of the Righteous"] = 53595,
["Zeal"] = 35395,
["Cleanse Toxins"] = 213644,
["Lay on Hands"] = 633,
["Flash of Light"] = 19750,
["Ardent Defender"] = 31850,
["Divine Shield"] = 642,
["Divine Storm"] = 53385,
["Bestow Faith"] = 223306,
["Beacon of Virtue"] = 53563,
["Greater Blessing of Kings"] = 203538,
["Holy Light"] = 82326,
["Blessing of Sacrifice"] = 6940,
["Rule of Law"] = 214202,
["Execution Sentence"] = 213757,
["Seraphim"] = 152262,
["Greater Blessing of Wisdom"] = 203539,
["Crusade"] = 31884,
["Crusader Strike"] = 231667,
["Heart of the Crusader"] = 32223,
["Blessing of Protection"] = 1022,
["Bastion of Light"] = 204035,
["Hand of the Protector"] = 184092,
["Beacon of Light"] = 231642,
["Blessed Hammer"] = 35395,
["Blessing of Spellwarding"] = 1022,
["Light's Hammer"] = 114158,
["Aura Mastery"] = 31821,
["Redemption"] = 7328,
["Avenger's Shield"] = 231665,
["Holy Prism"] = 114165,
["Repentance"] = 20066,
local GetActiveEnglishSpecialisationName = function() -- Player only
-- Returns(3):
-- engSpecName (string) - English name for the active Player Specialisation; Nil if no spec
-- is active (e.g. if character level < 10).
-- uniClassName (string) - Non-localised name of the Player Class. Nil if no active spec.
-- activeSpecID (number) - Specialisation ID for the active spec. Nil if no active spec.
--
local activeSpecIndex = (GetSpecialization());
-- print(tostring(activeSpecIndex));
if activeSpecIndex then
local activeSpecID = (GetSpecializationInfo(activeSpecIndex));
-- print(tostring(activeSpecID));
return GetEnglishSpecialisationName(activeSpecID, playerUniversalClassName), activeSpecID;
else
return nil, nil, nil; -- Player does not have an active specialisation
end
end
 
-- PRIEST
["Renew"] = 139,
["Power Infusion"] = 10060,
["Shadow Word: Pain"] = 589,
["Power Word: Solace"] = 129250,
["Plea"] = 200829,
["Holy Word: Serenity"] = 2050,
["Purge the Wicked"] = 589,
["Mind Flay"] = 585,
["Psychic Scream"] = 8122,
["Shadow Crash"] = 205385,
["Holy Word: Chastise"] = 88625,
["Void Bolt"] = 228266,
["Power Word: Radiance"] = 194509,
["Resurrection"] = 2006,
["Schism"] = 214621,
["Mindbender"] = 34433,
["Symbol of Hope"] = 64901,
["Binding Heal"] = 32546,
["Divine Star"] = 110744,
["Mass Dispel"] = 32375,
["Voidform"] = 228264,
["Shining Force"] = 204263,
["Spirit of Redemption"] = 20711,
["Shadow Covenant"] = 204065,
["Apotheosis"] = 200183,
["Angelic Feather"] = 121536,
["Mass Resurrection"] = 212036,
["Vampiric Touch"] = 34914,
["Atonement"] = 81749,
["Purify Disease"] = 213634,
["Focused Will"] = 45243,
["Rapture"] = 47536,
["Pain Suppression"] = 33206,
["Fade"] = 586,
["Power Word: Barrier"] = 62618,
["Silence"] = 15487,
["Surrender to Madness"] = 193223,
["Mind Sear"] = 234702,
["Purify"] = 527,
["Flash Heal"] = 2061,
["Halo"] = 120517,
["Shadow Mend"] = 186263,
["Holy Word: Sanctify"] = 34861,
["Smite"] = 585,
["Dispel Magic"] = 528,
["Clarity of Will"] = 152118,
["Body and Mind"] = 214121,
["Shadowy Apparitions"] = 78203,
["Evangelism"] = 246287,
["Prayer of Mending"] = 33076,
["Holy Nova"] = 132157,
["Mind Vision"] = 2096,
["Power Word: Shield"] = 17,
["Heal"] = 2060,
["Divine Hymn"] = 64843,
["Leap of Faith"] = 73325,
["Shackle Undead"] = 9484,
["Serendipity"] = 63733,
["Dispersion"] = 47585,
["Desperate Prayer"] = 19236,
["Holy Fire"] = 231687,
["Prayer of Healing"] = 596,
["Levitate"] = 1706,
["Vampiric Embrace"] = 15286,
["Mind Blast"] = 8092,
["Void Eruption"] = 228260,
["Shadow Word: Death"] = 32379,
["Shadowform"] = 232698,
["Mind Control"] = 605,
["Penance"] = 47540,
["Guardian Spirit"] = 47788,
["Shadowfiend"] = 34433,
["Circle of Healing"] = 204883,
["Shadow Word: Void"] = 205351,
["Mind Bomb"] = 8122,
local LookupOrder_table = {}; -- Any class/spec
-- Order to lookup spells in the DB:
-- 1st: Player's class:
-- 1.1. Active spec baseline spells;
-- 1.2. Active spec Talents' spells;
-- 1.3. Pets (if there are spells for);
-- 1.4. Other specs' baseline spells;
-- 1.5. Other specs' Talents' spells;
-- 2nd: GeneralTab;
-- 3rd: Other classes:
-- 3.1. Each spec baseline spells;
-- 3.2. Each spec Talents' spells;
-- 3.3. Pets (if there are spells for).
local SetLookupOrder = function()
-- LookupOrder_table = {}; -- Reset the table
wipe(LookupOrder_table); -- Reset the table
local classOrderIndex = 1;
local classKey = (next(LibSN2SID.DB, nil));
-- print(tostring(classKey));
while classKey do
if classKey == playerUniversalClassName then
tinsert(LookupOrder_table, 1, classKey);
LookupOrder_table[classKey] = {};
-- print(tostring(LookupOrder_table[1]));
-- Order specs et al
local playerActiveEnglishSpecName = (GetActiveEnglishSpecialisationName());
-- print("Active SpecName = ".. tostring(playerActiveEnglishSpecName));
local specOrderIndex = 1;
local specKey = (next(LibSN2SID.DB[classKey].METADATA.Specs, nil));
while specKey do
if specKey == playerActiveEnglishSpecName then
tinsert(LookupOrder_table[classKey], 1, specKey);
tinsert(LookupOrder_table[classKey], 2, specKey.."_Talents");
-- print(tostring(LookupOrder_table[classKey][1]).. " *");
else
tinsert(LookupOrder_table[classKey], specKey);
tinsert(LookupOrder_table[classKey], specKey.."_Talents");
-- print(tostring(LookupOrder_table[classKey][(specOrderIndex == 1) and specOrderIndex or (specOrderIndex +specOrderIndex -1)]));
end
specKey = (next(LibSN2SID.DB[classKey].METADATA.Specs, specKey));
specOrderIndex = specOrderIndex + 1;
end
if LibSN2SID.DB[classKey].Pets then
tinsert(LookupOrder_table[classKey], 3, "Pets");
end
elseif classKey ~= "General" then
tinsert(LookupOrder_table, classKey);
-- print(tostring(LookupOrder_table[classOrderIndex]));
LookupOrder_table[classKey] = {};
local specOrderIndex = 1;
local specKey = (next(LibSN2SID.DB[classKey].METADATA.Specs, nil));
while specKey do
tinsert(LookupOrder_table[classKey], specKey);
tinsert(LookupOrder_table[classKey], specKey.."_Talents");
-- print(tostring(LookupOrder_table[classKey][specOrderIndex]));
specKey = (next(LibSN2SID.DB[classKey].METADATA.Specs, specKey));
specOrderIndex = specOrderIndex + 2;
end
if LibSN2SID.DB[classKey].Pets then
tinsert(LookupOrder_table[classKey], "Pets");
end
end
classKey = (next(LibSN2SID.DB, classKey));
classOrderIndex = classOrderIndex + 1;
end
tinsert(LookupOrder_table, 2, "General");
LookupOrder_table["General"] = {};
tinsert(LookupOrder_table["General"], "Spells");
end
 
-- ROGUE
["Shadow Techniques"] = 196912,
["Evasion"] = 5277,
["Symbols of Death"] = 212283,
["Riposte"] = 199754,
["Shadow Dance"] = 185313,
["Shadow Blades"] = 121471,
["Shadowstrike"] = 185438,
["Exsanguinate"] = 200806,
["Seal Fate"] = 14190,
["Blind"] = 2094,
["Pick Lock"] = 1804,
["Bribe"] = 199740,
["Sinister Strike"] = 1752,
["Nightblade"] = 195452,
["Shuriken Toss"] = 114014,
["Cannonball Barrage"] = 185767,
["Stealth"] = 1784,
["Venomous Wounds"] = 79134,
["Backstab"] = 53,
["Death from Above"] = 152150,
["Run Through"] = 2098,
["Saber Slash"] = 193315,
["Kidney Shot"] = 408,
["Marked for Death"] = 137619,
["Adrenaline Rush"] = 13750,
["Sap"] = 6770,
["Tricks of the Trade"] = 57934,
["Cheap Shot"] = 1833,
["Vanish"] = 1856,
["Combat Potency"] = 35551,
["Garrote"] = 231719,
["Toxic Blade"] = 245388,
["Crimson Vial"] = 185311,
["Slice and Dice"] = 193316,
["Rupture"] = 1943,
["Gloomblade"] = 53,
["Vendetta"] = 79140,
["Ambush"] = 8676,
["Mutilate"] = 1329,
["Shuriken Storm"] = 197835,
["Poisons"] = 66,
["Sprint"] = 231691,
["Pistol Shot"] = 185763,
["Eviscerate"] = 196819,
["Shadowstep"] = 36554,
["Cloak of Shadows"] = 31224,
["Between the Eyes"] = 235484,
["Envenom"] = 32645,
["Shuriken Combo"] = 245639,
["Blade Flurry"] = 13877,
["Kick"] = 1766,
["Restless Blades"] = 79096,
["Pick Pocket"] = 921,
["Fan of Knives"] = 51723,
["Poisoned Knife"] = 185565,
["Gouge"] = 1776,
["Roll the Bones"] = 193316,
["Shroud of Concealment"] = 114018,
["Distract"] = 1725,
["Deepening Shadows"] = 185314,
["Hemorrhage"] = 16511,
["Grappling Hook"] = 195457,
["Ghostly Strike"] = 196937,
["Feint"] = 1966,
["Parley"] = 2094,
["Ruthlessness"] = 14161,
["Killing Spree"] = 51690,
-- Get Player's character data when it's available
local libFrame = CreateFrame("Frame");
libFrame:RegisterEvent("PLAYER_LOGIN");
libFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
libFrame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
libFrame:SetScript("OnEvent", function(self, event)
if event == "PLAYER_LOGIN" or event == "PLAYER_ENTERING_WORLD" then
local stubVal;
stubVal, playerUniversalClassName = UnitClass("player");
end
SetLookupOrder();
-- for i = 1, #LookupOrder_table do
-- local classKey = LookupOrder_table[i];
-- print(AddonName.. ": ".. i.. ". ".. tostring(classKey));
-- for ii = 1, #(LookupOrder_table[classKey]) do
-- print(AddonName.. ": ".. i.. ".".. ii.. ". ".. tostring(LookupOrder_table[classKey][ii]));
-- end
-- end
end);
 
-- SHAMAN
["Totem Mastery"] = 210643,
["Frostbrand"] = 196834,
["Lava Lash"] = 60103,
["Purify Spirit"] = 77130,
["Ancestral Spirit"] = 2008,
["Resurgence"] = 16196,
["Stormlash"] = 195255,
["Healing Rain"] = 73920,
["Unleash Life"] = 73685,
["Lightning Shield"] = 192106,
["Gift of the Queen"] = 207778,
["Chain Lightning"] = 421,
["Earthgrab Totem"] = 216965,
["Ancestral Vision"] = 212048,
["Earthquake"] = 61882,
["Purge"] = 370,
["Elemental Blast"] = 117014,
["Feral Lunge"] = 196884,
["Spirit Link Totem"] = 98008,
["Hex"] = 51514,
["Wind Rush Totem"] = 192077,
["Stormbringer"] = 201845,
["Riptide"] = 231725,
["Spirit Walk"] = 58875,
["Rainfall"] = 215864,
["Healing Surge"] = 8004,
["Healing Tide Totem"] = 108280,
["Earthen Shield Totem"] = 198838,
["Flame Shock"] = 188838,
["Spiritwalker's Grace"] = 79206,
["Windsong"] = 201898,
["Thunderstorm"] = 51490,
["Stormstrike"] = 17364,
["Water Walking"] = 546,
["Maelstrom Weapon"] = 187880,
["Liquid Magma Totem"] = 192222,
["Frost Shock"] = 196840,
["Cleanse Spirit"] = 51886,
["Windfury"] = 33757,
["Stormkeeper"] = 205495,
["Tidal Waves"] = 231785,
["Astral Recall"] = 556,
["Sundering"] = 197214,
["Healing Stream Totem"] = 5394,
["Ascendance"] = 114050,
["Earth Shock"] = 8042,
["Fury of Air"] = 197211,
["Lava Burst"] = 231721,
["Far Sight"] = 6196,
["Rockbiter"] = 193786,
["Crash Lightning"] = 187874,
["Ancestral Protection Totem"] = 207399,
["Wellspring"] = 197995,
["Cloudburst Totem"] = 157153,
["Heroism"] = 32182,
["Earthbind Totem"] = 2484,
["Flametongue"] = 193796,
["Earth Elemental"] = 198103,
["Feral Spirit"] = 231723,
["Fire Elemental"] = 198067,
["Ancestral Guidance"] = 108281,
["Astral Shift"] = 108271,
["Voodoo Totem"] = 51514,
["Elemental Mastery"] = 16166,
["Earthen Spike"] = 188089,
["Gust of Wind"] = 192063,
["Doom Winds"] = 204945,
["Lightning Surge Totem"] = 216965,
["Lightning Bolt"] = 403,
["Ghost Wolf"] = 2645,
["Healing Wave"] = 77472,
["Storm Elemental"] = 198067,
["Wind Shear"] = 57994,
["Chain Heal"] = 231780,
["Elemental Fury"] = 60188,
["Elemental Focus"] = 16164,
["Lava Surge"] = 77756,
["Icefury"] = 210714,
-- SHAMAN Pets
["Fire Nova"] = 117588,
["Eye of the Storm"] = 157382,
["Wind Gust"] = 157331,
["Pulverize"] = 118345,
["Immolate"] = 118297,
["Fire Blast"] = 57984,
["Harden Skin"] = 118337,
["Angered Earth"] = 36213,
["Call Lightning"] = 157348,
["Gale Force"] = 157375,
 
-- WARLOCK
["Corruption"] = 172,
["Call Dreadstalkers"] = 104316,
["Mortal Coil"] = 6789,
["Soulstone"] = 231811,
["Implosion"] = 196277,
["Immolate"] = 348,
["Agony"] = 231792,
["Health Funnel"] = 755,
["Eye of Kilrogg"] = 126,
["Haunt"] = 48181,
["Soul Harvest"] = 196098,
["Demonic Empowerment"] = 193396,
["Grimoire of Sacrifice"] = 108503,
["Demonic Circle"] = 48018,
["Enslave Demon"] = 1098,
["Unstable Affliction"] = 231791,
["Hand of Gul'dan"] = 105174,
["Banish"] = 710,
["Summon Doomguard"] = 18540,
["Phantom Singularity"] = 205179,
["Cataclysm"] = 152108,
["Shadow Bite"] = 231799,
["Shadowburn"] = 17962,
["Firebolt"] = 231795,
["Doom"] = 603,
["Demonwrath"] = 193440,
["Unending Resolve"] = 104773,
["Shadowflame"] = 205181,
["Seed of Corruption"] = 27243,
["Dark Pact"] = 108416,
["Command Demon"] = 119898,
["Summon Darkglare"] = 205180,
["Grimoire of Service"] = 67,
["Life Tap"] = 1454,
["Create Soulwell"] = 29893,
["Conflagrate"] = 17962,
["Drain Soul"] = 198590,
["Ritual of Summoning"] = 698,
["Demonic Gateway"] = 111771,
["Soul Leech"] = 108370,
["Chaos Bolt"] = 116858,
["Fear"] = 5782,
["Summon Infernal"] = 1122,
["Demonbolt"] = 686,
["Suffering"] = 119898,
["Siphon Life"] = 63106,
["Howl of Terror"] = 5484,
["Drain Life"] = 234153,
["Incinerate"] = 686,
["Channel Demonfire"] = 196447,
["Unending Breath"] = 5697,
["Shadow Bolt"] = 686,
["Shadowfury"] = 30283,
["Create Healthstone"] = 6201,
["Havoc"] = 80240,
["Soul Shards"] = 246985,
["Soul Link"] = 108415,
["Summon Demon"] = 10,
["Burning Rush"] = 111400,
["Rain of Fire"] = 5740,
-- WARLOCK Pets
["Consuming Shadows"] = 3716,
["Singe Magic"] = 89808,
["Felstorm"] = 89751,
["Void Reflexes"] = 117225,
["Shadow Shield"] = 115232,
["Lash of Pain"] = 7814,
["Lesser Invisibility"] = 7870,
["Whiplash"] = 119909,
["Legion Strike"] = 30213,
["Shadow Bulwark"] = 17767,
["Suffering"] = 119907,
["Threatening Presence"] = 134477,
["Pursuit"] = 30151,
["Seduction"] = 6358,
["Shadow Bite"] = 54049,
["Axe Toss"] = 89766,
["Flee"] = 89792,
["Devour Magic"] = 19505,
["Firebolt"] = 3110,
["Spell Lock"] = 119910,
["Cauterize Master"] = 119905,
 
-- WARRIOR
["Enrage"] = 184361,
["Charge"] = 100,
["Avatar"] = 107574,
["Slam"] = 1464,
["Whirlwind"] = 12950,
["Rampage"] = 184367,
["Piercing Howl"] = 12323,
["Berserker Rage"] = 18499,
["Impending Victory"] = 34428,
["Devastator"] = 20243,
["Overpower"] = 7384,
["Focused Rage"] = 207982,
["Demoralizing Shout"] = 1160,
["Last Stand"] = 12975,
["Revenge"] = 6572,
["Battle Cry"] = 1719,
["Bladestorm"] = 227847,
["Die by the Sword"] = 118038,
["Dragon Roar"] = 118000,
["Ravager"] = 228920,
["Shield Wall"] = 871,
["Intimidating Shout"] = 5246,
["Victory Rush"] = 34428,
["Cleave"] = 845,
["Execute"] = 231827,
["Rend"] = 772,
["Bloodbath"] = 12292,
["Defensive Stance"] = 197690,
["Tactician"] = 184783,
["Bloodthirst"] = 23881,
["Shield Block"] = 231847,
["Thunder Clap"] = 6343,
["Commanding Shout"] = 97462,
["Raging Blow"] = 85288,
["Furious Slash"] = 231824,
["Shield Slam"] = 231834,
["Deep Wounds"] = 115768,
["Taunt"] = 355,
["Hamstring"] = 1715,
["Storm Bolt"] = 107570,
["Shockwave"] = 46968,
["Ignore Pain"] = 190456,
["Colossus Smash"] = 167105,
["Intercept"] = 198304,
["Spell Reflection"] = 23920,
["Mortal Strike"] = 12294,
["Titan's Grip"] = 46917,
["Enraged Regeneration"] = 184364,
["Heroic Leap"] = 6544,
["Devastate"] = 20243,
["Heroic Throw"] = 57755,
["Pummel"] = 6552,
}, -- Passed as 'tbl' to '__index' function bellow.
 
 
-- API --
---------
 
-- Return SpellID of the English Spell Name
LibSN2SID.SID = setmetatable(
{}, -- We do start with an empty table, passed as 'tbl' to '__index' bellow.
{ __index = function(tbl, engSpellName) -- If spell name not found in 'tbl'.
local paramType = type(engSpellName);
-- print(AddonName.. ": ".. engSpellName.. " is a ".. paramType);
if (paramType == "string") or (paramType == "number") then
if (paramType == "string") then
for classIndex = 1, #LookupOrder_table do
local classKey = LookupOrder_table[classIndex];
-- print(AddonName.. ": ".. tostring(classKey));
for specIndex = 1, #(LookupOrder_table[classKey]) do
local specKey = LookupOrder_table[classKey][specIndex];
-- print(AddonName.. ": ".. tostring(specKey));
local spID = LibSN2SID.DB[classKey][specKey][engSpellName] or nil;
if spID then
return spID; -- FOUND IT!
end
end
end
-- Didn't find the given spell name in our database. So try and get it from game API
local locSpellName, _, _, _, _, _, spID = GetSpellInfo(engSpellName);
if locSpellName then
tbl[locSpellName] = spID; -- Cache the key/value pair
return spID;
-- If the parameter to LibSN2SID.ID[], 'engSpellName', cannot be
-- found in 'tbl', we will fall back to try and get its spell
-- ID - in case this is a valid spell name in the current
-- client's language - as returned by GetSpellInfo(spellName).
-- On a client in a language other than English, GetSpellInfo()
-- will, of course, look for the spell's name in that language.
-- On the other hand, if (paramType == "number") then this works
-- as an alias for GetSpellInfo(spellID).
--
-- Hint: If your addon saves the reference of a spell by its ID,
-- instead of its name, you will ensure the correct spell will
-- be referred to when reloading the saved variable, regardless
-- of the client's language setting in future sessions.
else
return nil;
end
-- if locSpellName then
-- if tbl == nil then
-- tbl = {[locSpellName] = spID}; -- Create 'tbl' and cache the key/value pair
-- elseif tbl[locSpellName] == nil then
-- tbl[locSpellName] = spID; -- Cache the key/value pair
-- end
-- end
return spID;
elseif (paramType == "number") then
local locSpellName = (GetSpellInfo(engSpellName));
-- print(locSpellName);
-- if locSpellName then
-- if tbl == nil then
-- tbl = {[locSpellName] = engSpellName}; -- Create 'tbl' and cache the key/value pair
-- elseif tbl[locSpellName] == nil then
-- tbl[locSpellName] = engSpellName; -- Cache the key/value pair
-- end
-- end
return engSpellName;
else
-- TODO: error()
-- TODO: error() ?
return nil;
end
end
}
);
-- For backwards compatibility (LibSpellName2SID_MINOR < 10008)
LibSN2SID.ID = LibSN2SID.SID;
 
-- Localised version of the English Spell Name
-- Return Localised Name of the English Spell Name
LibSN2SID.LSN = setmetatable(
{}, -- We do start with an empty table, passed as 'tbl' to '__index' bellow.
{ __index = function(tbl, engSpellName)
-- print("LSN __index");
local paramType = type(engSpellName);
-- print(AddonName.. ": ".. engSpellName.. " is a ".. paramType);
local spID, locSpellName;
if paramType == "string" then
spID = LibSN2SID.ID[engSpellName];
if spID then
locSpellName = (GetSpellInfo(spID)); -- Localised spell name
else
locSpellName, _, _, _, _, _, spID = GetSpellInfo(engSpellName);
if locSpellName and (not tbl[locSpellName]) then
tbl[locSpellName] = spID; -- Cache the key/value pair
for classIndex = 1, #LookupOrder_table do
local classKey = LookupOrder_table[classIndex];
-- print(AddonName.. ": ".. tostring(classKey));
for specIndex = 1, #(LookupOrder_table[classKey]) do
local specKey = LookupOrder_table[classKey][specIndex];
-- print(AddonName.. ": ".. tostring(specKey));
local spID = LibSN2SID.DB[classKey][specKey][engSpellName] or nil;
if spID then
-- print("Found in ".. classKey.. ": ".. specKey);
local locSpellName = (GetSpellInfo(spID)); -- Localised spell name
return locSpellName; -- FOUND IT!
end
end
end
-- Didn't find the given spell name in our database. So try and get it from game API
local locSpellName, _, _, _, _, _, spID = GetSpellInfo(engSpellName);
-- if locSpellName then
-- if tbl == nil then
-- tbl = {[locSpellName] = spID}; -- Create 'tbl' and cache the key/value pair
-- elseif tbl[locSpellName] == nil then
-- tbl[locSpellName] = spID; -- Cache the key/value pair
-- end
-- end
return locSpellName;
elseif paramType == "number" then
locSpellName = (GetSpellInfo(engSpellName));
if locSpellName and (not tbl[locSpellName]) then
tbl[locSpellName] = engSpellName; -- Cache the key/value pair
end
local locSpellName = (GetSpellInfo(engSpellName));
-- print(locSpellName);
-- if locSpellName then
-- if tbl == nil then
-- tbl = {[locSpellName] = engSpellName}; -- Create 'tbl' and cache the key/value pair
-- elseif tbl[locSpellName] == nil then
-- tbl[locSpellName] = engSpellName; -- Cache the key/value pair
-- end
-- end
return locSpellName;
else
-- TODO: error()
-- TODO: error() ?
return nil;
end
return locSpellName;
end
}
);
 
-- Get the number of spells in the database
-- TODO: Redo for new DB structure in 10008+ !
function LibSN2SID:GetNumSpells()
local count = 0;
for _ in pairs(LibSN2SID.ID) do
count = count + 1;
end
return count;
-- local count = 0;
-- for _ in pairs(LibSN2SID.DB) do
-- count = count + 1;
-- end
-- return count;
end
 
-- REMOVED. This was in twobits' original version (10000), when it was still
997,24 → 1839,25
-- accessible library, the implications of calling this function are not clear
-- to me. Therefore, at least for now, this function will be made unaccessible.
-- Clean up (free the RAM) if the data isn't needed anymore
-- NB: 'Clean up ONLY IF we're (embeded) ...' feature added by aallkkaa
function LibSN2SID:Cleanup()
--[[
function LibSN2SID:Cleanup()
-- Clean up ONLY IF we're (embeded) within the scope of another addon,
-- not if we're a Global library, which may be in use by several addons.
-- print("LibSN2SID.owner = ".. LibSN2SID.owner);
-- print("LibSN2SID: AddonName = ".. AddonName);
if LibSN2SID.owner ~= "LibSpellName2SID-1.0" then
LibSN2SID.ID = {};
-- print(AddonName.. ": LibSN2SID.ID NOW has ".. LibSN2SID.GetNumSpells().. " keys.");
LibSN2SID.DB = {};
-- print(AddonName.. ": LibSN2SID.DB NOW has ".. LibSN2SID.GetNumSpells().. " keys.");
return true;
else
-- print(AddonName.. ": LibSN2SID.ID STILL has ".. LibSN2SID.GetNumSpells().. " keys.");
-- print(AddonName.. ": LibSN2SID.DB STILL has ".. LibSN2SID.GetNumSpells().. " keys.");
-- TODO: error();
return false;
end
]]--
end
]]--
 
 
------------------------------------------
 
-- print(AddonName.. ": LibSN2SID.ID has ".. LibSN2SID.GetNumSpells().. " keys.");
-- print(AddonName.. ": LibSN2SID.DB has ".. LibSN2SID.GetNumSpells().. " keys.");