WoWInterface SVN LibSpellName2SID

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 120 to Rev 121
    Reverse comparison

Rev 120 → Rev 121

populator/tags/LibSpellName2SID-Populator-1.0.14a/LibspellName2SID-1.0-Populator.lua New file
0,0 → 1,1956
----------
-- (C) 2017-2018 by aallkkaa
-- http://www.wowinterface.com/forums/member.php?action=getinfo&userid=335646
--
-- LibSpellName2SID-1.0: Populator
-- Notes: Populates the library's database
-- http://svn.wowinterface.com/listing.php?repname=LibSpellName2ID&path=%2Fpopulator%2F#_populator_
----------
local AddonName, AddonEnv = ...;
 
-- Local copies of the saved variables' tables: SpellNamesAndIDs and SpellNamesAndIDs_PASSIVES
local SN2SID_table, SN2SID_PASSIVES_table;
 
-- WoW Expansion/Patch constants
local NumberOfTalentTiers = 7; -- Current number of talent tiers - WoW-7.x.y and 8.x.y
-- local NumberOfPVPTalentTiers = 6; -- Current number of PVP talent tiers - WoW-7.x.y
local NumberOfPVPTalentSlots = 4; -- Current number of PVP talent tiers - WoW-8.x.y
 
-- (Usually) One-time ferched values
local generalTabName, universalRaceName, universalClassName;
local petFamily, petSpec;
 
-- "Manually" added/modified spells - normally AFTER regular update functions were called
local postUpdate_Spells2Add = {
["General"] = {
["ZoneAbilities"] = {
-- TODO: Maybe a hooksecurefunc(ZoneAbilityFrame, "Show", function())?
-- Also check: /dump Enum.ZoneAbilityType
-- Dump: value=Enum.ZoneAbilityType
-- [1]={
-- Argus=2,
-- OrderHall=1,
-- Garrison=0
-- }
--
-- Draenor -- These are never added to the Spellbook
["Garrison Ability"] = 161691, -- Cast the Garrison/Outpost ability active on the zone
["Call to Arms"] = 161676, -- Shadowmoon Valley /Frostfire Ridge
["Artillery Strike"] = 162075, -- Talador outpost
["Guardian Orb"] = 161767, -- Talador outpost
["Summon Mechashredder 5000"] = 164050, -- Gorgrond outpost
["Champion's Honor"] = 164221, -- Gorgrond outpost
["Smuggling Run!"] = 170108, -- Spires of Arak
["Home Away from Home"] = 168487, -- Spires of Arak
["Telaari Siege Engine"] = 160240, -- Nagrand
["Telaari Talbuk"] = 165803, -- Nagrand (Alliance)
["Frostwolf War Wolf"] = 164222, -- Nagrand (Horde)
["Logging"] = 167895, -- Mark lumber for gathering in Draenor (requires logging camp)
-- Argus
["Vindicaar Matrix Crystal"] = 251463, -- Cast the one active of the other four
["Light's Judgment"] = 247427, -- Same name, different ID, than that of the Lightforged
-- Draenei Racial spell.
["Summon Lightforged Warframe"] = 250436,
["Fel Heart Bond"] = 248011, -- Passive workings? - tooltip says "Instant"
["Shroud of Arcane Echoes"] = 248779,
},
},
["DEATHKNIGHT"] = {
["Pets"] = {
["Ghoul"] = { -- The Unholy DK regular Ghoul can be temporarily turned to an empowered
-- version (by casting 'Dark Transformation' spell), but it's still a
-- "Ghoul", even though the spells do change:
["Sweeping Claws"] = 91778,
["Monstrous Blow"] = 91797,
["Shambling Rush"] = 91802,
["Putrid Bulwark"] = 91837,
-- The regular spells:
["Claw"] = 47468,
["Gnaw"] = 47481,
["Leap"] = 47482,
["Huddle"] = 47484,
},
-- The Unholy spec talent "Sludge Belcher" which summoned an Abomination instead of a
-- Ghoul before 8.0.1 is no longer ingame. AFAIK, this type of DK pet is now gone.
-- ["Abomination"] = { -- If the talent 'Sludge Belcher' is taken, the Ghoul becomes an
-- -- 'Abomination' instead.
-- ["Cleaver"] = 212333,
-- ["Smash"] = 212336,
-- ["Hook"] = 212468,
-- ["Protective Bile"] = 212384,
-- -- 'Abomination' + 'Dark Transformation':
-- ["Vile Gas"] = 212338,
-- ["Gastric Bloat"] = 212383,
-- },
 
},
},
["DRUID"] = { -- The two different teleports + Abilities learned from Tomes
["Balance"] = {
-- The two different teleports
["Teleport: Moonglade"] = 18960, -- BEFORE the Legion Druid quest that gives:
["Dreamwalk"] = 193753, -- AFTER the Legion Druid quest: [98 - 110] To The Dreamgrove .
-- Abilities learned from Tomes
["Charm Woodland Creature"] = 127757, -- Turn a critter into a minion for 1 hour
["Flap"] = 164862, -- Requires Moonkin Form; channeled, NO CD other than Global
["Stag Form"] = 210053, -- Proper shapeshift (unlike Treant?) == Ground Travel Form
["Track Beasts"] = 210065, -- Cat Form only, can be simultaneous with Track Humanoids
["Treant Form"] = 114282, -- Shapeshift form, appearance only (?); Reportedly randomly
-- switches position with Moonkin Form (WoW-7.0.2 in the
-- Stance Bar (relog and respec); unsure if fixed later on)
-- "Nature's Beacon" is a (Druid-only) TOY
},
["Feral"] = {
-- The two different teleports
["Teleport: Moonglade"] = 18960, -- BEFORE the Legion Druid quest that gives:
["Dreamwalk"] = 193753, -- AFTER the Legion Druid quest: [98 - 110] To The Dreamgrove .
-- Abilities learned from Tomes
["Charm Woodland Creature"] = 127757, -- Turn a critter into a minion for 1 hour
["Flap"] = 164862, -- Requires Moonkin Form; channeled, NO CD other than Global
["Stag Form"] = 210053, -- Proper shapeshift (unlike Treant?) == Ground Travel Form
["Track Beasts"] = 210065, -- Cat Form only, can be simultaneous with Track Humanoids
["Treant Form"] = 114282, -- Shapeshift form, appearance only (?); Reportedly randomly
-- switches position with Moonkin Form (WoW-7.0.2 in the
-- Stance Bar (relog and respec); unsure if fixed later on)
-- "Nature's Beacon" is a (Druid-only) TOY
},
["Guardian"] = {
-- The two different teleports
["Teleport: Moonglade"] = 18960, -- BEFORE the Legion Druid quest that gives:
["Dreamwalk"] = 193753, -- AFTER the Legion Druid quest: [98 - 110] To The Dreamgrove .
-- Abilities learned from Tomes
["Charm Woodland Creature"] = 127757, -- Turn a critter into a minion for 1 hour
["Flap"] = 164862, -- Requires Moonkin Form; channeled, NO CD other than Global
["Stag Form"] = 210053, -- Proper shapeshift (unlike Treant?) == Ground Travel Form
["Track Beasts"] = 210065, -- Cat Form only, can be simultaneous with Track Humanoids
["Treant Form"] = 114282, -- Shapeshift form, appearance only (?); Reportedly randomly
-- switches position with Moonkin Form (WoW-7.0.2 in the
-- Stance Bar (relog and respec); unsure if fixed later on)
-- "Nature's Beacon" is a (Druid-only) TOY
},
["Restoration"] = {
-- The two different teleports
["Teleport: Moonglade"] = 18960, -- BEFORE the Legion Druid quest that gives:
["Dreamwalk"] = 193753, -- AFTER the Legion Druid quest: [98 - 110] To The Dreamgrove .
-- Abilities learned from Tomes
["Charm Woodland Creature"] = 127757, -- Turn a critter into a minion for 1 hour
["Flap"] = 164862, -- Requires Moonkin Form; channeled, NO CD other than Global
["Stag Form"] = 210053, -- Proper shapeshift (unlike Treant?) == Ground Travel Form
["Track Beasts"] = 210065, -- Cat Form only, can be simultaneous with Track Humanoids
["Treant Form"] = 114282, -- Shapeshift form, appearance only (?); Reportedly randomly
-- switches position with Moonkin Form (WoW-7.0.2 in the
-- Stance Bar (relog and respec); unsure if fixed later on)
-- "Nature's Beacon" is a (Druid-only) TOY
},
},
["HUNTER"] = {
["Pets"] = {
-- https://www.wowhead.com/battle-for-azeroth-hunter-pet-guide#hunter-pet-family-list-tenacity
["Ferocity"] = { -- Some pets bite, some claw and some smack (Basic Ability)
["Bite"] = 17253,
["Claw"] = 16827,
["Smack"] = 49966,
-- Til I get myself a high(er) level Hunter with the standard Pet Specializations'
-- abilities (not Class-Trial is currently only lvl 14), I'll add them here.
["Primal Rage"] = 264667, -- Sometimes present on a lvl 14 Hunter!
},
["Tenacity"] = { -- Some pets bite and some pets claw ...
["Bite"] = 17253,
["Claw"] = 16827,
["Smack"] = 49966,
["Survival of the Fittest"] = 272679, -- Present on a lvl 14 Hunter
},
["Cunning"] = { -- Some pets bite and some pets claw ...
["Bite"] = 17253,
["Claw"] = 16827,
["Smack"] = 49966,
["Master's Call"] = 53271, -- NOT present on a lvl 14 Hunter!
},
-- We categorize Hunter Pet spells mainly by their specialiZations, but some pet
-- families also have Special abilites. And yes, same-name diff-ID spells do occur.
-- Spell types: Special, Bonus and Exotic
-- NB: The comment "8.x" bellow denotes I checked the pet on wowhead.com (or ingame)
-- during WoW 8.x, NOT that they were introduced only in WoW 8.x (though of course some
-- were).
["Basilisk"] = { -- 8.x
["Petrifying Gaze"] = 263841,
},
["Bat"] = { -- 8.x
["Sonic Blast"] = 264263,
},
["Bear"] = { -- 8.x
["Rest"] = 94019,
},
["Beetle"] = { -- 8.x
["Harden Carapace"] = 90339,
},
["Bird of Prey"] = { -- 8.x
["Talon Rend"] = 263852,
["Trick"] = 94022,
},
["Boar"] = { -- 8.x
["Bristle"] = 263869,
},
["Carrion Bird"] = { -- 8.x
["Bloody Screech"] = 24423,
},
["Cat"] = { -- 8.x
["Catlike Reflexes"] = 263892,
["Prowl"] = 24450,
},
["Chimaera"] = { -- 8.x
["Frost Breath"] = 54644,
["Froststorm Breath"] = 92380,
},
["Clefthoof"] = { -- 8.x
["Thick Hide"] = 160057,
["Blood of the Rhino"] = 280069,
},
["Core Hound"] = { -- 8.x
["Obsidian Skin"] = 263867,
["Molten Hide"] = 159788,
},
["Crab"] = { -- 8.x
["Pin"] = 50245,
},
["Crane"] = { -- 8.x
["Chi-Ji's Tranquility"] = 264028,
["Trick"] = 126259,
},
["Crocolisk"] = { -- 8.x
["Ankle Crack"] = 50433,
},
["Devilsaur"] = { -- 8.x
["Feast"] = 159953,
["Monstrous Bite"] = 54680,
},
["Direhorn"] = { -- 8.x
["Gore"] = 263861,
},
["Dog"] = { -- 8.x
["Lock Jaw"] = 263423,
},
["Dragonhawk"] ={ -- 8.x
["Dragon's Guile"] = 263887,
},
["Feathermane"] ={ -- 8.x
["Feather Flurry"] = 263916,
["Updraft"] = 160007,
},
["Fox"] = { -- 8.x
["Agile Reflexes"] = 160011,
["Play"] = 90347,
},
["Gorilla"] = { -- 8.x
["Silverback"] = 263939,
},
["Hydra"] = { -- 8.x
["Acid Bite"] = 263863,
},
["Hyena"] = { -- 8.x
["Infected Bite"] = 263853,
},
["Krolusk"] = { -- 8.x
["Bulwark"] = 279410,
},
["Lizard"] = { -- 8.x
["Grievous Bite"] = 279362,
},
["Mechanical"] = { -- 8.x
["Defense Matrix"] = 263868,
},
["Monkey"] = { -- 8.x
["Primal Agility"] = 160044,
},
["Moth"] = { -- 8.x
["Serenity Dust"] = 264055,
},
["Nether Ray"] = { -- 8.x
["Nether Shock"] = 264264,
},
["Oxen"] = { -- 8.x
["Niuzao's Fortitude"] = 264023,
},
["Pterrordax"] = { -- 8.x
["Ancient Hide"] = 279399,
["Updraft"] = 160007,
},
["Quilen"] = { -- 8.x
["Eternal Guardian"] = 267922,
["Stone Armor"] = 160049,
},
["Raptor"] = { -- 8.x
["Savage Rend"] = 263854,
},
["Ravager"] = { -- 8.x
["Ravage"] = 263857,
},
["Riverbeast"] = { -- 8.x
["Gruesome Bite"] = 160018,
},
["Rodent"] = { -- 8.x
["Gnaw"] = 263856,
["Rest"] = 126364,
},
-- ["Rylak"] = { -- Rylak have been merged into Chimaera in 8.x
-- ["Updraft"] = 160007,
-- },
["Scalehide"] = { -- 8.x
["Scale Shield"] = 263865,
},
["Scorpid"] = { -- 8.x
["Deadly Sting"] = 160060,
},
["Serpent"] = { -- 8.x
["Serpent's Swiftness"] = 263904,
},
["Shale Spider"] = { -- 8.x
["Solid Shell"] = 160063,
},
["Silithid"] = { -- 8.x
["Tendon Rip"] = 160065,
["Dune Strider"] = 280151,
},
["Spider"] = { -- 8.x
["Web Spray"] = 160067,
},
["Spirit Beast"] = { -- 8.x
["Spirit Shock"] = 264265,
["Spirit Mend"] = 90361,
["Spirit Walk"] = 90328,
},
["Sporebat"] = { -- 8.x
["Spore Cloud"] = 264056,
},
["Stag"] = { -- 8.x
["Nature's Grace"] = 264266,
},
["Tallstrider"] = { -- 8.x
["Dust Cloud"] = 50285,
},
["Toad"] = { -- 8.x
["Swarm of Flies"] = 279336,
},
["Turtle"] = { -- 8.x
["Shell Shield"] = 26064,
},
["Warp Stalker"] = { -- 8.x
["Warp Time"] = 35346,
},
["Wasp"] = { -- 8.x
["Toxic Sting"] = 263858,
},
["Water Strider"] = { -- 8.x
["Soothing Water"] = 264262,
["Surface Trot"] = 126311,
},
["Wind Serpent"] = { -- 8.x
["Winged Agility"] = 264360,
},
["Wolf"] = { -- 8.x
["Furious Bite"] = 263840,
},
["Worm"] = { -- 8.x
["Acid Spit"] = 263446,
["Burrow Attack"] = 93433,
},
},
},
["MAGE"] = {
["Flyouts"] = {
["Polymorph Variants"] = { -- On WoW 7.x.y, Polymorph variants (including the default
-- "Sheep") are all called "Polymorph", but unlike the
-- Shaman Hex, these variants do bear information about the
-- variant via GetSpellInfo(), on its 2nd return value
-- (spell "rank" / spell subname). This subname can be
-- suffixed onto the spell name to specify the variant, as
-- in e.g. "Polymorph(Sheep)"; works with GetSpellInfo().
-- On WoW 8.x.y Beta. the above still holds true, except the
-- part of the 2nd return value (as Spells' Subnames/Ranks
-- have all been removed from the game). "Polymorph(Sheep)"
-- still works for GetSpellInfo() though, as well as for
-- "7cast".
["Polymorph(Black Cat)"] = 61305,
["Polymorph(Bumblebee)"] = 277792,
["Polymorph(Direhorn)"] = 277787,
["Polymorph(Monkey)"] = 161354,
["Polymorph(Peacock)"] = 161372, -- Fixed with WoW 8.0
["Polymorph(Penguin)"] = 161355, -- No longer obtainable, but still usable if
-- you'd gotten it before ...?
["Polymorph(Pig)"] = 28272, -- Fixed with WoW 8.0
["Polymorph(Porcupine)"] = 126819, -- Fixed with WoW 8.0
["Polymorph(Polar Bear Cub)"] = 161353,
["Polymorph(Rabbit)"] = 61721,
["Polymorph(Serpent)"] = 61025, -- No longer obtainable, but still usable if
-- you'd gotten it before ...?
["Polymorph(Turkey)"] = 61780, -- No longer obtainable, but still usable if
-- you'd gotten it before ...?
["Polymorph(Turtle)"] = 28271,
},
-- The 'Portal: ' and 'Teleport: ' flyouts have (mostly) different destinations for
-- Alliance and for Horde Magi. Thus, we'll add them all here (incl. faction-shared):
["Portal"] = {
["Portal: Exodar"] = 32266, -- Alliance only
["Portal: Stonard"] = 49361, -- Horde only
["Portal: Undercity"] = 11418, -- Horde only
["Portal: Vale of Eternal Blossoms(Alliance)"] = 132620, -- Added: "(Alliance)"
["Portal: Vale of Eternal Blossoms(Horde)"] = 132626, -- Added: "(Horde)"
["Ancient Portal: Dalaran"] = 120146, -- Dalaran Crater (way ABOVE it! -> FALL!)
["Portal: Tol Barad(Alliance)"] = 88345, -- Added: "(Alliance)"
["Portal: Tol Barad(Horde)"] = 88346, -- Added: "(Horde)"
["Portal: Shattrath(Alliance)"] = 33691, -- Added: "(Alliance)"
["Portal: Shattrath(Horde)"] = 35717, -- Added: "(Horde)"
["Portal: Warspear"] = 176244, -- Horde only
["Portal: Theramore"] = 49360, -- Alliance only
["Portal: Thunder Bluff"] = 11420, -- Horde only
["Portal: Darnassus"] = 11419, -- Alliance only
["Portal: Silvermoon"] = 32267, -- Horde only
["Portal: Dalaran - Northrend"] = 53142,
["Portal: Stormwind"] = 10059, -- Alliance only
["Portal: Stormshield"] = 176246, -- Alliance only
["Portal: Dalaran - Broken Isles"] = 224871,
["Portal: Orgrimmar"] = 11417, -- Horde only
["Portal: Ironforge"] = 11416, -- Alliance only
["Portal: Dalaran - Broken Isles"] = 224871,
["Portal: Boralus"] = 281400, -- Alliance only
["Portal: Dazar'alor"] = 281402, -- Horde only
},
["Teleport"] = {
["Teleport: Vale of Eternal Blossoms(Alliance)"] = 132621, -- Added: "(Alliance)"
["Teleport: Vale of Eternal Blossoms(Horde)"] = 132627, -- Added: (Horde)
["Teleport: Dalaran - Northrend"] = 53140,
["Teleport: Shattrath(Alliance)"] = 33690, -- Added: "(Alliance)"
["Teleport: Shattrath(Horde)"] = 35715, -- Added: "(Horde)"
["Teleport: Stonard"] = 49358, -- Horde only
["Teleport: Stormshield"] = 176248, -- Alliance only
["Teleport: Darnassus"] = 3565, -- Alliance only
["Teleport: Dalaran - Broken Isles"] = 224869,
["Teleport: Stormwind"] = 3561, -- Alliance only
["Teleport: Hall of the Guardian"] = 193759, -- Mage Class Hall
["Teleport: Tol Barad(Alliance)"] = 88342, -- Added: "(Alliance)"
["Teleport: Tol Barad(Horde)"] = 88344, -- Added: "(Horde)"
["Teleport: Orgrimmar"] = 3567, -- Horde only
["Teleport: Ironforge"] = 3562, -- Alliance only
["Teleport: Warspear"] = 176242, -- Horde only
["Teleport: Theramore"] = 49359, -- Alliance only
["Teleport: Silvermoon"] = 32272, -- Horde only
["Teleport: Undercity"] = 3563, -- Horde only
["Ancient Teleport: Dalaran"] = 120145, -- Dalaran Crater (way ABOVE it! -> FALL!)
["Teleport: Exodar"] = 32271, -- Alliance only
["Teleport: Thunder Bluff"] = 3566, -- Horde only
["Teleport: Boralus"] = 281403, -- Alliance only
["Teleport: Dazar'alor"] = 281404, -- Horde only
},
},
-- NB: Only the Frost spec has a pet ('Water Elemental')
},
--[[
["ROGUE"] = {
["Flyouts"] = {
["Poisons"] = { -- Since WoW 7.0, Assassintation specialization only; Adding here so
-- that the character doesn't need to have that spec active upon fetch.
["Wound Poison"] = 8679,
["Crippling Poison"] = 3408,
["Deadly Poison"] = 2823,
-- ["Leeching Poison"] = 108211, -- Now only a Passive Assassination talent, with
-- different spell ID?
},
},
},
]]--
["SHAMAN"] = {
["Elemental"] = {
["Bloodlust"] = 2825, -- Horde
["Heroism"] = 32182, -- Alliance
},
["Enhancement"] = {
["Bloodlust"] = 2825, -- Horde
["Heroism"] = 32182, -- Alliance
},
["Restoration"] = {
["Bloodlust"] = 2825, -- Horde
["Heroism"] = 32182, -- Alliance
},
["Flyouts"] = {
["Hex Variants"] = { -- Unlike Mage's Polymorph, Shaman Hex variants all get the
-- same spell name ("Hex", same as default spell) AND NO
-- spell subname, although they do get different spell IDs,
-- icon textures, ... BUT we cannot have the same key value
-- ("Hex") multiple times; thus we'll create our own (re)
-- naming of Hex variants here, replacing the fetched list
-- with one that follows the Mage's Polymorph Variants
-- convention: "Spell(Variant)".
-- Also, see note above, on Polymorph and WoW 8.x.y Beta.
["Hex(Cockroach)"] = 211015,
["Hex(Compy)"] = 210873,
["Hex(Snake)"] = 211010,
["Hex(Spider)"] = 211004,
["Hex(Skeletal Hatchling)"] = 269352,
["Hex(Wicker Mongrel)"] = 277784, -- Alliance only
["Hex(Zandalari Tendonripper)"] = 277778, -- Horde only
},
},
["Pets"] = { -- In WoW 7.x.y, only the Elemental specialization has pets, which are only
-- controllable if the talent "Primal Elementalist"(5,2) is active (they're
-- guardians (no spells castable by the player) otherwise). On top of that,
-- although the Earth Elemental is always available to the Elemental Shaman
-- , the Fire and Storm elementals are mutually exclusive (Fire Elemental
-- becomes Storm Elemental if the talent "Storm Elemental" is chosen).
-- TL;DR: Better make sure the spells bellow are added, rather than going
-- through the gimmick of swithcing the talents every time we update the
-- SHAMAN lists of spells.
["Fire Elemental"] = {
["Meteor"] = 117588, -- Was "Fire Nova" (same ID) on WoW-7.x.y
["Fire Blast"] = 57984,
["Immolate"] = 118297,
},
["Storm Elemental"] = {
-- ["Eye of the Storm"] = 157382, -- WoW-8.0.1: This spell ID still reports the same
-- name (via GetSpellInfo()), but the name returns
-- the "new"spell ID which was previously "Gale
-- Force". NB: The spell IS added automativlly!
["Wind Gust"] = 157331,
["Eye of the Storm"] = 157375, -- Was "Gale Force" (same ID, but different spell).
["Call Lightning"] = 157348,
},
["Earth Elemental"] = {
["Pulverize"] = 118345, -- Stun
["Harden Skin"] = 118337, -- -40% damage taken by the Shaman
["Angered Earth"] = 36213, -- Taunt
},
},
},
["WARLOCK"] = {
["Pets"] = { -- Spells of the glyph-enhanced versions of the regular Warlock Demons.
-- NB: We're including spells that remain the same on both versions of the
-- demon.
["Fel Imp"] = {
["Felbolt"] = 115746, -- Fel Imp
["Sear Magic"] = 115276, -- Fel Imp
["Cauterize Master"] = 119905, -- Fel Imp & Imp
["Flee"] = 89792, -- Fel Imp & Imp
},
["Voidlord"] = {
["Void Shield"] = 115236, -- Voidlord
["Suffering"] = 119907, -- Voidlord & Voidwalker
["Consuming Shadows"] = 3716, -- Voidlord & Voidwalker
["Shadow Bulwark"] = 17767, -- Voidlord & Voidwalker
["Threatening Presence"] = 112042, -- Voidlord & Voidwalker
-- NB: Voidlord & Voidwalker 's "Threatening Presence" has a different spell ID than
-- that of Wrathguard & Felguard.
},
["Observer"] = {
["Optical Blast"] = 115781, -- Observer
["Tongue Lash"] = 115778, -- Observer
["Devour Magic"] = 19505, -- Observer & Felhunter
},
["Shivarra"] = {
["Bladedance"] = 115748, -- Shivarra
["Fellash"] = 115770, -- Shivarra
["Mesmerize"] = 115268, -- Shivarra
["Lesser Invisibility"] = 7870, -- Shivarra & Succubus
},
["Wrathguard"] = {
["Mortal Cleave"] = 115625, -- Wrathguard
["Wrathstorm"] = 115831, -- Wrathguard
["Axe Toss"] = 89766, -- Wrathguard & Felguard
["Pursuit"] = 30151, -- Wrathguard & Felguard
["Threatening Presence"] = 134477 -- Wrathguard & Felguard
-- NB: Voidlord & Voidwalker 's "Threatening Presence" has a different spell ID than
-- that of Wrathguard & Felguard.
},
},
},
};
 
local postUpdate_Spells2Add_PASSIVES = {
["General"] = {
["ZoneAbilities"] = {
-- Draenor
["Dragoon"] = 169605,
["Swift Recovery"] = 169608,
["Trading Pact"] = 170200,
["Upgrades"] = 170733,
},
["Others"] = {
["Battle for Azeroth Pathfinder"] = 281576, -- Parte One
}
},
["DEATHKNIGHT"] = {
["Pets"] = {
-- With talent 'Sludge Belcher':
["Ghoul"] = {
["Avoidance"] = 62137,
},
-- The Unholy spec talent "Sludge Belcher" which summoned an Abomination instead of a
-- Ghoul before 8.0.1 is no longer ingame. AFAIK, this type of DK pet is now gone.
-- ["Abomination"] = {
-- ["Avoidance"] = 62137,
-- },
},
},
["HUNTER"] = {
["Pets"] = {
-- NB: The comment "8.x" bellow denotes I checked the pet on wowhead.com (or ingame)
-- during WoW 8.x, NOT that they were introduced only in WoW 8.x (though of course some
-- were).
-- Specializations
["Ferocity"] = { -- 8.x
["Avoidance"] = 65220, -- Present on a lvl 14 Hunter
["Predator's Thirst"] = 264663, -- Present on a lvl 14 Hunter
},
["Tenacity"] = { -- 8.x
["Avoidance"] = 65220, -- Present on a lvl 14 Hunter
["Endurance Training"] = 264662, -- Present on a lvl 14 Hunter
},
["Cunning"] = { -- 8.x
["Avoidance"] = 65220, -- Present on a lvl 14 Hunter
["Pathfinding"] = 264656, -- Present on a lvl 14 Hunter
},
-- Families
["Bear"] = { -- 8.x
["Thick Fur"] = 263934,
},
["Gorilla"] = { -- 8.x
["Silverback"] = 263939,
},
["Krolusk"] = { -- 8.x
["Calcified Carapace"] = 279254,
},
["Shale Spider"] = { -- 8.x
["Shimmering Shale"] = 279259,
},
},
},
["WARLOCK"] = {
["Pets"] = { -- Spells of the glyph-enhanced versions of the regular Warlock Demons.
-- NB: We're including spells that remain the same on both versions.
["Fel Imp"] = {
["Avoidance"] = 32233, -- Fel Imp & Imp
},
["Voidlord"] = {
["Avoidance"] = 32233, -- Voidlord & Voidwalker
["Void Reflexes"] = 117225, -- Voidlord & Voidwalker
},
["Observer"] = {
["Avoidance"] = 32233, -- Observer & Felhunter
},
["Shivarra"] = {
["Avoidance"] = 32233, -- Shivarra & Succubus
},
["Wrathguard"] = {
["Avoidance"] = 32233, -- Wrathguard & Felguard
["Void Reflexes"] = 117225, -- Wrathguard & Felguard
},
},
},
};
 
 
-- Functions to store information about the dataSource (how up to date it is) and other metadata --
----------------------------------------------------------------------------------------------------
 
-- Update the General tab dataSource + raceBuilds --
-- local updateGeneralTabMetadata_func = function(SN2SID_table, SN2SID_PASSIVES_table, curLocale, gameBuild, universalRaceName, generalTabName, charLevel)
-- local updateGeneralTabMetadata_func = function(curLocale, gameBuild, universalRaceName, generalTabName, charLevel)
-- local updateGeneralTabMetadata_func = function(curLocale, gameBuild, universalRaceName, charLevel)
local updateGeneralTabMetadata_func = function(curLocale, gameBuild, charLevel)
if not updateGeneralTabMetadata then
return;
end
 
-- print(AddonName.. ": Will now check whether the GeneralTab Metadata needs updating.");
-- Actively-cast spells
if charLevel > SN2SID_table[generalTabName].METADATA.dataSource.charLevel then
SN2SID_table[generalTabName].METADATA.dataSource.charLevel = charLevel;
if charLevel > SN2SID_table[generalTabName].METADATA.dataSource.charMaxLevel then
SN2SID_table[generalTabName].METADATA.dataSource.charMaxLevel = charLevel;
end
updateGeneralSpells = true;
end
if gameBuild > SN2SID_table[generalTabName].METADATA.dataSource.gameBuild then
SN2SID_table[generalTabName].METADATA.dataSource.gameBuild = gameBuild;
-- Highest charLevel stored upon the most recent gameBuild
SN2SID_table[generalTabName].METADATA.dataSource.charLevel = charLevel;
-- Highest charLevel ever stored is kept in [...].charMaxLevel
updateGeneralSpells = true;
end
if (not SN2SID_table[generalTabName].METADATA.raceBuilds[universalRaceName]) or
(gameBuild > SN2SID_table[generalTabName].METADATA.raceBuilds[universalRaceName]) then
SN2SID_table[generalTabName].METADATA.raceBuilds[universalRaceName] = gameBuild;
updateGeneralSpells = true;
end
-- Passive spells
if charLevel > SN2SID_PASSIVES_table[generalTabName].METADATA.dataSource.charLevel then
SN2SID_PASSIVES_table[generalTabName].METADATA.dataSource.charLevel = charLevel;
if charLevel > SN2SID_PASSIVES_table[generalTabName].METADATA.dataSource.charMaxLevel then
SN2SID_PASSIVES_table[generalTabName].METADATA.dataSource.charMaxLevel = charLevel;
end
updateGeneralSpells = true;
end
if gameBuild > SN2SID_PASSIVES_table[generalTabName].METADATA.dataSource.gameBuild then
SN2SID_PASSIVES_table[generalTabName].METADATA.dataSource.gameBuild = gameBuild;
-- Highest charLevel stored upon the most recent gameBuild
SN2SID_PASSIVES_table[generalTabName].METADATA.dataSource.charLevel = charLevel;
-- Highest charLevel ever stored is kept in [...].charMaxLevel
updateGeneralSpells = true;
end
if (not SN2SID_PASSIVES_table[generalTabName].METADATA.raceBuilds[universalRaceName]) or
(gameBuild > SN2SID_PASSIVES_table[generalTabName].METADATA.raceBuilds[universalRaceName]) then
SN2SID_PASSIVES_table[generalTabName].METADATA.raceBuilds[universalRaceName] = gameBuild;
updateGeneralSpells = true;
end
updateGeneralTabMetadata = false;
end
 
-- Update the Class dataSource --
-- local updateClassMetadata_func = function(SN2SID_table, SN2SID_PASSIVES_table, curLocale, gameBuild, universalClassName, charLevel)
-- local updateClassMetadata_func = function(curLocale, gameBuild, universalClassName, charLevel)
local updateClassMetadata_func = function(curLocale, gameBuild, charLevel)
if not updateClassMetadata then
return;
end
-- print(AddonName.. ": Will now check whether the ".. universalClassName.. " Metadata needs updating.");
-- Actively-cast spells
if charLevel > SN2SID_table[universalClassName].METADATA.dataSource.charLevel then
SN2SID_table[universalClassName].METADATA.dataSource.charLevel = charLevel;
if charLevel > SN2SID_table[universalClassName].METADATA.dataSource.charMaxLevel then
SN2SID_table[universalClassName].METADATA.dataSource.charMaxLevel = charLevel;
end
updateClassSpells = true;
end
if gameBuild > SN2SID_table[universalClassName].METADATA.dataSource.gameBuild then
SN2SID_table[universalClassName].METADATA.dataSource.gameBuild = gameBuild;
SN2SID_table[universalClassName].METADATA.dataSource.charLevel = charLevel;
updateClassSpells = true;
end
-- Passive spells
if charLevel > SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource.charLevel then
SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource.charLevel = charLevel;
if charLevel > SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource.charMaxLevel then
SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource.charMaxLevel = charLevel;
end
updateClassSpells = true;
end
if gameBuild > SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource.gameBuild then
SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource.gameBuild = gameBuild;
SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource.charLevel = charLevel;
updateClassSpells = true;
end
updateClassMetadata = false;
end
 
 
---- Functions to update the lists of Spell Names and their IDs ----
--------------------------------------------------------------------
 
-- Update the Talents' lists of spells
-- local updateTalentSpells_func = function(SN2SID_table, SN2SID_PASSIVES_table, universalClassName, ClassNumSpecs, ClassSpecNames2IDs)
-- local updateTalentSpells_func = function(universalClassName, ClassNumSpecs, ClassSpecNames2IDs)
local updateTalentSpells_func = function(ClassNumSpecs, ClassSpecNames2IDs)
if not updateClassSpells then -- Sanity check
return;
end
 
for i = 1, ClassNumSpecs do
-- Create "SpecName_Talents" subtables if they doesn't exist yet
local specID, locSpecName = GetSpecializationInfo(i);
if locSpecName then -- Sanity check
-- print(AddonName.. ": locSpecName = ".. locSpecName);
-- Actives
if not SN2SID_table[universalClassName][locSpecName.."_Talents"] then
SN2SID_table[universalClassName][locSpecName.."_Talents"] = {};
end
-- Passives
if not SN2SID_PASSIVES_table[universalClassName][locSpecName.."_Talents"] then
SN2SID_PASSIVES_table[universalClassName][locSpecName.."_Talents"] = {};
end
else
print(AddonName.. ": PVE: NO specialization has been selected for this character!");
return;
end
-- Populate the "SpecName_Talents" subtables
for ii = 1, NumberOfTalentTiers do
for iii = 1, 3 do
local _, spellName, _, _, _, spellID, _, _, _, _, _ = GetTalentInfoBySpecialization(i, ii, iii);
if spellName then
if IsPassiveSpell(spellID) then
SN2SID_PASSIVES_table[universalClassName][locSpecName.."_Talents"][spellName] = spellID;
else
SN2SID_table[universalClassName][locSpecName.."_Talents"][spellName] = spellID;
end
end
end
end
end
end
 
-- local updatePVPTalentSpells_func = function(SN2SID_table, SN2SID_PASSIVES_table, universalClassName, ClassNumSpecs, ClassSpecNames2IDs)
-- local updatePVPTalentSpells_func = function(universalClassName, ClassNumSpecs, ClassSpecNames2IDs)
local updatePVPTalentSpells_func = function(ClassNumSpecs, ClassSpecNames2IDs)
if not updateClassSpells then -- Sanity check
return;
end
 
for i = 1, ClassNumSpecs do
-- Create "SpecName_PVPTalents" subtables if they don't exist yet
local specID, locSpecName = GetSpecializationInfo(i);
if locSpecName then -- Sanity check
-- print(AddonName.. ": locSpecName = ".. locSpecName);
-- Actives
if not SN2SID_table[universalClassName][locSpecName.."_PVPTalents"] then
SN2SID_table[universalClassName][locSpecName.."_PVPTalents"] = {};
end
-- Passives
if not SN2SID_PASSIVES_table[universalClassName][locSpecName.."_PVPTalents"] then
SN2SID_PASSIVES_table[universalClassName][locSpecName.."_PVPTalents"] = {};
end
else
print(AddonName.. ": PVP: NO specialization has been selected for this character!");
return;
end
-- Populate the "SpecName_PVPTalents" subtables
for ii = 1, NumberOfPVPTalentSlots do
local talentOptions = C_SpecializationInfo.GetPvpTalentSlotInfo(ii).availableTalentIDs;
for iii = 1, #talentOptions do
-- local _, spellName, _, _, _, spellID, _, _, _, _, _ = GetPvpTalentInfoBySpecialization(i, ii, iii);
local talentID = talentOptions[iii];
local _, spellName, _, _, _, spellID, _, _, _, _, _ = GetPvpTalentInfoByID(talentID);
-- print(AddonName.. ": PVPTalent spellName = ".. tostring(spellName));
if spellName then
if IsPassiveSpell(spellID) then
SN2SID_PASSIVES_table[universalClassName][locSpecName.."_PVPTalents"][spellName] = spellID;
else
SN2SID_table[universalClassName][locSpecName.."_PVPTalents"][spellName] = spellID;
end
end
end
end
end
end
 
-- Helper functions to function updateSpellbookSpells_func() --
local addSpellbookSpellToGeneral_func = function(spellName, spellSubName, spellID)
-- Store Passive and Active abilities into their own separate tables
if IsPassiveSpell(spellID) then
if spellName == "Armor Skills" then
armorSkills = spellID;
elseif spellName == "Weapon Skills" then
weaponSkills = spellID;
-- NB: See "NB" for non-passive spells bellow
elseif spellSubName and strfind(spellSubName, "Racial") then
if not SN2SID_PASSIVES_table[generalTabName].Racials[universalRaceName] then
SN2SID_PASSIVES_table[generalTabName].Racials[universalRaceName] = { [spellName] = spellID };
else
SN2SID_PASSIVES_table[generalTabName].Racials[universalRaceName][spellName] = spellID;
end
elseif spellSubName and strfind(spellSubName, "Guild") then
if not SN2SID_PASSIVES_table[generalTabName].GuildPerks then
SN2SID_PASSIVES_table[generalTabName].GuildPerks = { [spellName] = spellID };
else
SN2SID_PASSIVES_table[generalTabName].GuildPerks[spellName] = spellID;
end
-- Will now test for the hardcoded ZoneAbilities, to place them in the correct subcategory
elseif postUpdate_Spells2Add_PASSIVES.General.ZoneAbilities[spellName] then
if not SN2SID_table[generalTabName].ZoneAbilities then
SN2SID_PASSIVES_table[generalTabName].ZoneAbilities = { [spellName] = spellID };
else
SN2SID_PASSIVES_table[generalTabName].ZoneAbilities[spellName] = spellID;
end
-- All other spells go into the "Others" subcategory
elseif not SN2SID_PASSIVES_table[generalTabName].Others then
SN2SID_PASSIVES_table[generalTabName].Others = { [spellName] = spellID };
else
SN2SID_PASSIVES_table[generalTabName].Others[spellName] = spellID;
end
else
-- NB: Switched the order of checks: Before, we were checking for the presence of the spell
-- in our list of hardcoded Zone spells first. Now, we do that test last, as there is at
-- least one instance of a spell with the same name, but different IDs, that is a Racial
-- (that we fetch from the server) and also a hardcoded Zone ability: "Light's Judgment".
if spellSubName and strfind(spellSubName, "Racial") then
if not SN2SID_table[generalTabName].Racials[universalRaceName] then
SN2SID_table[generalTabName].Racials[universalRaceName] = { [spellName] = spellID };
else
SN2SID_table[generalTabName].Racials[universalRaceName][spellName] = spellID;
end
elseif spellSubName and strfind(spellSubName, "Guild") then
if not SN2SID_table[generalTabName].GuildPerks then
SN2SID_table[generalTabName].GuildPerks = { [spellName] = spellID };
else
SN2SID_table[generalTabName].GuildPerks[spellName] = spellID;
end
-- Will now test for the hardcoded ZoneAbilities, to place them in the correct subcategory
elseif postUpdate_Spells2Add.General.ZoneAbilities[spellName] then
if not SN2SID_table[generalTabName].ZoneAbilities then
SN2SID_table[generalTabName].ZoneAbilities = { [spellName] = spellID };
else
SN2SID_table[generalTabName].ZoneAbilities[spellName] = spellID;
end
-- All other spells go into the "Others" subcategory
elseif not SN2SID_table[generalTabName].Others then
SN2SID_table[generalTabName].Others = { [spellName] = spellID };
else
SN2SID_table[generalTabName].Others[spellName] = spellID;
end
end
end
 
local addMagePolymorphFlyoutSpell_func = function(flyoutSpellName, flyoutSpellSubname, flyoutSpellID)
local flyoutSpellFullName = flyoutSpellName.. "(".. flyoutSpellSubname.. ")";
-- if SN2SID_table[universalClassName].Flyouts["Polymorph Variants"][flyoutSpellFullName] == nil
if not SN2SID_table[universalClassName].Flyouts["Polymorph Variants"][flyoutSpellFullName]
or SN2SID_table[universalClassName].Flyouts["Polymorph Variants"][flyoutSpellFullName] ~= flyoutSpellID then
-- print(AddonName.. "Adding flyout spellFullName ".. flyoutSpellFullName.. " = ".. flyoutSpellID);
SN2SID_table[universalClassName].Flyouts["Polymorph Variants"][flyoutSpellFullName] = flyoutSpellID;
end
end
-- --
 
-- Update the Spellbook's GeneralTab and ClassTabs lists of spells
-- local updateSpellbookSpells_func = function(SN2SID_table, SN2SID_PASSIVES_table, generalTabName, universalClassName, ClassNumSpecs, ClassSpecNames2IDs)
-- local updateSpellbookSpells_func = function(generalTabName, universalClassName, ClassNumSpecs, ClassSpecNames2IDs)
-- local updateSpellbookSpells_func = function(universalClassName, ClassNumSpecs, ClassSpecNames2IDs)
local updateSpellbookSpells_func = function(ClassNumSpecs, ClassSpecNames2IDs)
-- "Armor Skills" and "Weapon Skills" are found on the Spellbook's General tab, but are indeed
-- different from one class to the other. Therefore, we'll save them into local variables upon
-- fetching the General tab spells and then insert them into the Class Specialisations' tables.
local armorSkills, weaponSkills;
 
-- General tab spells
-- if updateGeneralSpells then -- In current addon version, always true
-- local _, universalRaceName = UnitRace("player");
local stubVal;
stubVal, universalRaceName = UnitRace("player");
if not SN2SID_table[generalTabName].Racials then
SN2SID_table[generalTabName].Racials = {};
end
if not SN2SID_PASSIVES_table[generalTabName].Racials then
SN2SID_PASSIVES_table[generalTabName].Racials = {};
end
if not SN2SID_table[generalTabName].GuildPerks then
SN2SID_table[generalTabName].GuildPerks = {};
end
if not SN2SID_PASSIVES_table[generalTabName].GuildPerks then
SN2SID_PASSIVES_table[generalTabName].GuildPerks = {};
end
if not SN2SID_table[generalTabName].Others then
SN2SID_table[generalTabName].Others = {};
end
if not SN2SID_PASSIVES_table[generalTabName].Others then
SN2SID_PASSIVES_table[generalTabName].Others = {};
end
-- local generalTabName, _, offset, numEntries, _, _, _ = GetSpellTabInfo(1);
generalTabName, _, offset, numEntries, _, _, _ = GetSpellTabInfo(1);
-- name, texture, offset, numEntries, isGuild, offspecID = GetSpellTabInfo(tabIndex)
for i = offset +1, offset +numEntries do
local spellName, spellSubName = GetSpellBookItemName(i, BOOKTYPE_SPELL);
if spellName then
local _, spellID = GetSpellBookItemInfo(i, BOOKTYPE_SPELL);
-- NEW for 1.0.14 --
if (spellSubName == nil) or (spellSubName == "") then
local delayedSpellInfo = Spell:CreateFromSpellID(spellID);
-- I presume we don't actually need to cancel the request for the additional
-- information, i.e. presume once the information is given to us through the
-- function delayedSpellInfo:ContinueOnSpellLoad(), there will be no further
-- activity regarding this- But, just in case, we'll set up a function to
-- cancel the request after we got the information we need.
--
-- RESULT: The request-cancel function is being run BEFORE the requestFulfilled
-- one! But it's still storing the value NO PROB AT ALL! So, maybe we can just
-- do the whole add-spell-to-DB thing upon request cancelation? TODO: TRY IT!
--
-- FURTHER TESTING: Using only :ContinueWithCancelOnSpellLoad(), without
-- :ContinueOnSpellLoad(), does work. But the only spells added this way seem
-- to be spells that don't actually have a Spell Subname (with the eventual
-- exception of "Passive" spells). It would therefore seem we (usually?) get
-- every spell's subname from GetSpellBookItemName(). So, this test is not
-- conclusive. :-(
-- Better revert this to have both :ContinueWithCancelOnSpellLoad() and
-- ContinueOnSpellLoad() be run; ContinueOnSpellLoad() is run anyway after
-- ContinueWithCancelOnSpellLoad, so it should be alright... ?
--
-- MORE TESTING: With the 'Cache' folder and the saved variables' file deleted,
-- the results are the same (with calling only :ContinueWithCancelOnSpellLoad()
-- w/ no call to :ContinueOnSpellLoad() ). I will (again) revert to using both
-- functions, for the sake of safity.
--
 
local spellDataLoadedCancelFunc = delayedSpellInfo:ContinueWithCancelOnSpellLoad(function()
-- We don't need to do anything upon canceling the request
-- print(AddonName.. ": Now cancelling the request for delayed information about spell ID: ".. spellID);
end);
-- Actually get the information and use it to update our database:
delayedSpellInfo:ContinueOnSpellLoad(function()
-- print(AddonName.. ": Will now get the previously delayed information about spell ID: ".. spellID);
-- Although we should only need to update spellSubName, we might
-- have fetched a new spellName + spellID by now. Thus, we'll
-- update those fields too.
spellName = delayedSpellInfo:GetSpellName();
spellSubName = delayedSpellInfo:GetSpellSubtext(); -- Mandatory
spellID = delayedSpellInfo:GetSpellID();
addSpellbookSpellToGeneral_func(spellName, spellSubName, spellID);
-- Now cancel the request:
spellDataLoadedCancelFunc();
spellDataLoadedCancelFunc = nil; -- for safety!
end);
--[[
local spellDataLoadedCancelFunc = delayedSpellInfo:ContinueWithCancelOnSpellLoad(function()
-- We don't need to do anything upon canceling the request
-- print(AddonName.. ": Now cancelling the request for delayed information about spell ID: ".. spellID);
 
-- Although we should only need to update spellSubName, we might
-- have fetched a new spellName + spellID by now. Thus, we'll
-- update those fields too.
spellName = delayedSpellInfo:GetSpellName();
spellSubName = delayedSpellInfo:GetSpellSubtext(); -- Mandatory
spellID = delayedSpellInfo:GetSpellID();
addSpellbookSpellToGeneral_func(spellName, spellSubName, spellID);
 
spellDataLoadedCancelFunc = nil; -- for safety!
end);
]]--
else
addSpellbookSpellToGeneral_func(spellName, spellSubName, spellID);
end
-- --
end
end
-- end
 
-- Class spells
if updateClassSpells then
-- updateTalentSpells_func(SN2SID_table, SN2SID_PASSIVES_table, universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
-- updateTalentSpells_func(universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
updateTalentSpells_func(ClassNumSpecs, ClassSpecNames2IDs);
-- updatePVPTalentSpells_func(SN2SID_table, SN2SID_PASSIVES_table, universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
updatePVPTalentSpells_func(ClassNumSpecs, ClassSpecNames2IDs);
for i = 2, (ClassNumSpecs +1) do
-- Get the current tab's first spell's index, total number of spells therein and specID
local _, _, offset, numEntries, _, _, _, specID = GetSpellTabInfo(i);
if specID then -- Sanity check
local _, locSpecName = GetSpecializationInfoByID(specID);
--- Create SpecName subtables and SpecName_Talents subtables if they doesn't exist yet
if locSpecName then -- Sanity check
if not SN2SID_table[universalClassName][locSpecName] then
SN2SID_table[universalClassName][locSpecName] = {};
end
if not SN2SID_PASSIVES_table[universalClassName][locSpecName] then
SN2SID_PASSIVES_table[universalClassName][locSpecName] = {};
end
end
-- Populate
for ii = offset +1, offset +numEntries do
-- local spellName, spellSubName = GetSpellBookItemName(ii, BOOKTYPE_SPELL);
local spellName = (GetSpellBookItemName(ii, BOOKTYPE_SPELL));
-- We actually don't use spellSubName on the population of the Class-spells list
-- (or at least currently we don't) ; thus we don't need to use the SpellMixin
-- API to retrieve it later; I.e. in this for loop, spellSubName is a stub val.
if spellName then
local spellType, spellID = GetSpellBookItemInfo(ii, BOOKTYPE_SPELL);
 
-- Store Passive and Active abilities into their own separate tables IF they
-- are not already stored in the respective Talents' tables.
if IsPassiveSpell(spellID) and ((not SN2SID_PASSIVES_table[universalClassName][locSpecName.."_Talents"])
or (not SN2SID_PASSIVES_table[universalClassName][locSpecName.."_Talents"][spellName])) then
SN2SID_PASSIVES_table[universalClassName][locSpecName][spellName] = spellID;
elseif (not SN2SID_table[universalClassName][locSpecName.."_Talents"])
or (not SN2SID_table[universalClassName][locSpecName.."_Talents"][spellName]) then
SN2SID_table[universalClassName][locSpecName][spellName] = spellID;
end
-- If it's a Flyout type of button (e.g. Mage Polymorph variants, Hunter Pet
-- Utility spells, etc), then fetch the spells that ... fly out.
if spellType == "FLYOUT" then
-- print(AddonName.. ": SpellID ".. spellID.. " on SpecTab ".. i.. ", Pos ".. ii.. " is a FLYOUT button.");
-- NB: Creating SN2SID_table[universalClassName].Flyouts either via
-- SN2SID_table[universalClassName].Flyouts = []; or via
-- tinsert(SN2SID_table[universalClassName], "Flyouts"); was causing
-- a bug where the same table would have two "Flyouts" fields: one with
-- the correct values and another empty (as if it were a simple member
-- of an array). So we create a STUB value if needed and later remove
-- it when we're done adding the spells.
if not SN2SID_table[universalClassName].Flyouts then
SN2SID_table[universalClassName].Flyouts = { ["STUB"] = 0, };
end
 
if (spellName == "Hex Variants") or (spellName == "Portal") or
(spellName == "Teleport") then
break; -- Do mothing; for different reasons all of these flyouts
-- are added only in post.
else
-- Insert the flyout spell in its proper table
if not SN2SID_table[universalClassName].Flyouts[spellName] then
-- print(AddonName.. ": Adding Flyouts.".. spellName.. " to ".. universalClassName);
SN2SID_table[universalClassName].Flyouts[spellName] = {};
else
-- print(AddonName.. ": Flyouts.".. spellName.. " is already in ".. universalClassName);
end
local _, _, numFlyouts, flyoutKnown = GetFlyoutInfo(spellID);
-- if flyoutKnown then
for flyoutSlot = 1, numFlyouts do
-- local flyoutSpellID, overrideSpellID, flyoutSlotKnown, slotSpecID = GetFlyoutSlotInfo(spellID, flyoutSlot);
local flyoutSpellID, _, _, _ = GetFlyoutSlotInfo(spellID, flyoutSlot);
local flyoutSpellName, flyoutSpellSubname, _, _, _, _, _ = GetSpellInfo(flyoutSpellID);
-- print(AddonName.. ": ".. tostring(flyoutSpellID).. " = ".. tostring(flyoutSpellName));
if spellName == "Polymorph Variants" then -- Mage "Polymorph
-- Variants", like Shaman Hex Variants, are all called
-- "Polymorph". But they are different in that they,
-- unlike Hex's, have a subname specifying the variant
-- AND can be called by suffixing the subname in
-- parenthesis, as in e.g. "Polymorph(Sheep)". We'll do
-- just that.
-- NEW for 1.0.14 --
if (flyoutSpellSubname == nil) or (flyoutSpellSubname == "") then
local delayedFlyoutSpellInfo = Spell:CreateFromSpellID(flyoutSpellID);
-- I presume we don't actually need to cancel the request for the additional
-- information, i.e. presume once the information is given to us through the
-- function delayedSpellInfo:ContinueOnSpellLoad(), there will be no further
-- activity regarding this- But, just in case, we'll set up a function to
-- cancel the request after we got the information we need.
local spellDataLoadedCancelFunc = delayedSpellInfo:ContinueWithCancelOnSpellLoad(function()
-- We don't need to do anything upon canceling the request
-- print(AddonName.. ": Now cancelling the request for delayed information about spell ID: ".. spellID);
end);
-- Actually get the information and use it to update our database:
delayedSpellInfo:ContinueOnSpellLoad(function()
-- print(AddonName.. ": Will now get the previously delayed information about spell ID: ".. spellID);
-- Although we should only need to update spellSubName, we might
-- have fetched a new spellName + spellID by now. Thus, we'll
-- update those fields too.
flyoutSpellName = delayedSpellInfo:GetSpellName();
flyoutSpellSubname = delayedSpellInfo:GetSpellSubtext(); -- Mandatory
flyoutSpellID = delayedSpellInfo:GetSpellID();
addMagePolymorphFlyoutSpell_func(flyoutSpellName, flyoutSpellSubname, flyoutSpellID);
-- Now cancel the request:
spellDataLoadedCancelFunc();
spellDataLoadedCancelFunc = nil; -- for safety!
end);
else
addMagePolymorphFlyoutSpell_func(flyoutSpellName, flyoutSpellSubname, flyoutSpellID);
end
-- --
-- elseif flyoutSpellName and not SN2SID_table[universalClassName].Flyouts[spellName] then
-- SN2SID_table[universalClassName].Flyouts[spellName] = { [flyoutSpellName] = flyoutSpellID };
elseif flyoutSpellName and (not SN2SID_table[universalClassName].Flyouts[spellName][flyoutSpellName]) then
-- print(AddonName.. ": ".. tostring(flyoutSpellName).. " = ".. tostring(flyoutSpellID));
-- tinsert(SN2SID_table[universalClassName].Flyouts[spellName], flyoutSpellName);
SN2SID_table[universalClassName].Flyouts[spellName][flyoutSpellName] = flyoutSpellID;
elseif flyoutSpellName and (SN2SID_table[universalClassName].Flyouts[spellName][flyoutSpellName] ~= flyoutSpellID) then
-- print(AddonName.. ": ".. tostring(flyoutSpellName).. " = ".. tostring(flyoutSpellID));
SN2SID_table[universalClassName].Flyouts[spellName][flyoutSpellName] = flyoutSpellID;
end
end
-- else
-- print(AddonName.. ": BUT is unknown!");
-- end
-- Get rid of the STUB table member that was added upon its creation
SN2SID_table[universalClassName].Flyouts["STUB"] = nil;
--
-- NB: AFAITIK, as far as Warlocks are concerned, only the Demonology
-- specialization has the flyout spells: "Grimoire of Service"->
-- ->"Grimoire: Felguard", "Summon Demon"->"Summon Felguard" and
-- "Summon Demon"->"Summon Wrathguard". But the Affliction and the
-- Destruction specialiZations are also having these spells added into
-- their lists of flyoutSpells spells (using the routine above). These
-- spells are not actually available in the UI spellbook but we're
-- leaving them on the table anyway. Note: Also makes it possible to
-- implement the 'Flyouts' table per Class instead of per Spec.
--
-- NB2: The above applies to Rogue Poisons which, since 7.0, are
-- Assassination spec only, but get fetched for the other specs as
-- well.
--
end
end
end
end
SN2SID_PASSIVES_table[universalClassName][locSpecName]["Armor Skills"] = armorSkills;
SN2SID_PASSIVES_table[universalClassName][locSpecName]["Weapon Skills"] = weaponSkills;
end
end
updateClassSpells = false;
end
end
 
 
-- Update the Pet-Spellbook and PetActionBar's spells --
-- Table of spellnames to exclude from storage
local PetSpellNameExclusions = { PET_ASSIST, PET_ACTION_ATTACK, PET_DEFENSIVE,PET_ACTION_FOLLOW,
PET_ACTION_MOVE_TO, PET_PASSIVE, "Stay" };
-- TABLE ABOVE: The 7 default actions for which GetSpellInfo() returns
-- nil. QUESTION: Would it be desirable to save these spell references,
-- which names would be the tokens (string) above?
 
-- Add one Pet Spell to the apropriate subtable
-- local addSpellbookPetSpell_func = function(spellName, spellSubName, spellID, petFamily)
local addSpellbookPetSpell_func = function(spellName, spellSubName, spellID)
local isPassive = IsPassiveSpell(spellID);
if strfind(spellSubName, "Special") or strfind(spellSubName, "Bonus") or strfind(spellSubName, "Exotic") then -- Pet Family ability
if isPassive then
print(AddonName.. ": Add ".. petFamily.. " Passive : ".. spellName);
-- if SN2SID_PASSIVES_table[universalClassName].Pets[petFamily] == nil then
if not SN2SID_PASSIVES_table[universalClassName].Pets[petFamily] then
SN2SID_PASSIVES_table[universalClassName].Pets[petFamily] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets[petFamily][spellName] = spellID;
end
else
print(AddonName.. ": Add ".. petFamily.. " : ".. spellName);
if not SN2SID_table[universalClassName].Pets[petFamily] then
SN2SID_table[universalClassName].Pets[petFamily] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets[petFamily][spellName] = spellID;
end
end
elseif (strfind(spellSubName, "Basic") or (not isPassive)) and not
(strfind(spellSubName, "Ferocity") or strfind(spellSubName, "Tenacity")
or strfind(spellSubName, "Cunning")) then -- All three Pet Specializations
print(AddonName.. ": Add All Specs : ".. spellName);
-- if SN2SID_table[universalClassName].Pets["Ferocity"] == nil then
if not SN2SID_table[universalClassName].Pets["Ferocity"] then
SN2SID_table[universalClassName].Pets["Ferocity"] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets["Ferocity"][spellName] = spellID;
end
-- if SN2SID_table[universalClassName].Pets["Tenacity"] == nil then
if not SN2SID_table[universalClassName].Pets["Tenacity"] then
SN2SID_table[universalClassName].Pets["Tenacity"] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets["Tenacity"][spellName] = spellID;
end
-- if SN2SID_table[universalClassName].Pets["Cunning"] == nil then
if not SN2SID_table[universalClassName].Pets["Cunning"] then
SN2SID_table[universalClassName].Pets["Cunning"] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets["Cunning"][spellName] = spellID;
end
-- end
elseif isPassive and not (strfind(spellSubName, "Ferocity") or strfind(spellSubName, "Tenacity")
or strfind(spellSubName, "Cunning")) then
print(AddonName.. ": Add All Specs Passive : ".. spellName);
-- if SN2SID_PASSIVES_table[universalClassName].Pets["Ferocity"] == nil then
if not SN2SID_PASSIVES_table[universalClassName].Pets["Ferocity"] then
SN2SID_PASSIVES_table[universalClassName].Pets["Ferocity"] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets["Ferocity"][spellName] = spellID;
end
-- if SN2SID_PASSIVES_table[universalClassName].Pets["Tenacity"] == nil then
if not SN2SID_PASSIVES_table[universalClassName].Pets["Tenacity"] then
SN2SID_PASSIVES_table[universalClassName].Pets["Tenacity"] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets["Tenacity"][spellName] = spellID;
end
-- if SN2SID_PASSIVES_table[universalClassName].Pets["Cunning"] == nil then
if not SN2SID_PASSIVES_table[universalClassName].Pets["Cunning"] then
SN2SID_PASSIVES_table[universalClassName].Pets["Cunning"] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets["Cunning"][spellName] = spellID;
end
else
if strfind(spellSubName, "Ferocity") then -- Ferocity
if isPassive then
print(AddonName.. ": Add Ferocity Passive : ".. spellName);
-- if SN2SID_PASSIVES_table[universalClassName].Pets["Ferocity"] == nil then
if not SN2SID_PASSIVES_table[universalClassName].Pets["Ferocity"] then
SN2SID_PASSIVES_table[universalClassName].Pets["Ferocity"] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets["Ferocity"][spellName] = spellID;
end
else
print(AddonName.. ": Add Ferocity : ".. spellName);
-- if SN2SID_table[universalClassName].Pets["Ferocity"] == nil then
if not SN2SID_table[universalClassName].Pets["Ferocity"] then
SN2SID_table[universalClassName].Pets["Ferocity"] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets["Ferocity"][spellName] = spellID;
end
end
end
if strfind(spellSubName, "Tenacity") then -- Tenacity
if isPassive then
print(AddonName.. ": Add Tenacity Passive : ".. spellName);
-- if SN2SID_PASSIVES_table[universalClassName].Pets["Tenacity"] == nil then
if not SN2SID_PASSIVES_table[universalClassName].Pets["Tenacity"] then
SN2SID_PASSIVES_table[universalClassName].Pets["Tenacity"] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets["Tenacity"][spellName] = spellID;
end
else
print(AddonName.. ": Add Tenacity : ".. spellName);
-- if SN2SID_table[universalClassName].Pets["Tenacity"] == nil then
if not SN2SID_table[universalClassName].Pets["Tenacity"] then
SN2SID_table[universalClassName].Pets["Tenacity"] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets["Tenacity"][spellName] = spellID;
end
end
end
if strfind(spellSubName, "Cunning") then -- Cunning
if isPassive then
print(AddonName.. ": Add Cunning Passive : ".. spellName);
-- if SN2SID_PASSIVES_table[universalClassName].Pets["Cunning"] == nil then
if not SN2SID_PASSIVES_table[universalClassName].Pets["Cunning"] then
SN2SID_PASSIVES_table[universalClassName].Pets["Cunning"] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets["Cunning"][spellName] = spellID;
end
else
print(AddonName.. ": Add Cunning : ".. spellName);
-- if SN2SID_table[universalClassName].Pets["Cunning"] == nil then
if not SN2SID_table[universalClassName].Pets["Cunning"] then
SN2SID_table[universalClassName].Pets["Cunning"] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets["Cunning"][spellName] = spellID;
end
end
end
end
end
 
-- Pet Spells update function
-- local updatePetSpellNames = function(SN2SID_table, SN2SID_PASSIVES_table, universalClassName)
local updatePetSpellNames = function()
-- print(AddonName.. ": Fetching Pet spells");
-- local petHasSpellsConfirmed = false;
-- NOTES:
-- GetSpellInfo(spellName) is the most reliable way to get the SpellID for a give SpellName, 7th
-- return value. BUT we need to get a list of spell names first, and that's where the other two
-- Blizzard functions, GetPetActionInfo(buttonNumber) and GetSpellBookItemName(SpellbookIndex,
-- BOOKTYPE_PET), come in.
--
-- GetPetActionInfo(buttonNumber) only retrieves information for spells on the PetActionBar;
-- given that there might be other Pet Spells - on the PetSpellbook - we will later need to get
-- them using other means. But first we will get these spells from the bar, for these reasons:
-- - One thing to note is the 'isToken' return value from GetPetActionInfo(). This value will be
-- true if the spell is one of the 7 standard spells that every controllable pet gets: Assist,
-- Attack, Defensive, Follow, Move To, Passive, Stay. This flag is NOT returned by any of the
-- the other functions we get info on PetSpells from. Again, unfortunately, GetPetActionInfo()
-- only returns info on spells in the PetActionBar and not all PetSpells are in there.
-- Another important thing to note is that Temporary Controllable-pets (e.g. the Elemental
-- Shaman pets, if the talent 'Primal Elementalist' is active) do not have any spells in a
-- spellbook; but all their spells should be on the PetActionBar. Thus GetPetActionInfo is the
-- only way - and the only way needed - to get info on these pets' spells.
--
-- GetSpellBookItemInfo() not only does not return anything for Temporary Controllable-pets, it
-- also seems BUGGED, as it returns weird values for Pet SpellIDs (9 or 10 digits long numbers,
-- sometimes negatives!).
-- GetSpellBookItemName() (other function) however returns correct SpellNames and is rather
-- exaustive as far as getting them for permanent pets.
 
-- local petName = GetUnitName("pet", nil);
-- local petFamily = UnitCreatureFamily("pet");
petFamily = UnitCreatureFamily("pet");
if not petFamily then -- First time UNIT_PET fires, the info on the Pet hasn't been loaded yet
return; -- UNIT_PET fires two to three times when a new pet is summoned.
end
print(AddonName.. ": Pet Family = ".. tostring(petFamily));
 
local _, isHunterPet = HasPetUI();
 
if isHunterPet then -- Hunter Pets, unlike all others, have specializations, so we'll handle
-- their spells differently
local curPetSpecIndex = GetSpecialization(false, true);
local stubVal;
stubVal, petSpec = GetSpecializationInfo(curPetSpecIndex or 1, false, true);
print(AddonName.. ": Pet Spec #".. tostring(curPetSpecIndex).. "; Pet Family: ".. tostring(petFamily));
 
-- GetSpellBookItemName(SpellbookIndex, BOOKTYPE_PET) + GetSpellInfo(spellName) --
if HasPetSpells() then -- I.e. whether there is a Pet Spellbook. WARNING: Returns 'true' for
-- classes which have pets but are too low level to have control
-- over them; e.g. Hunters and Warlocks under Level 10.
print(AddonName.. ": Getting SBook spells for pet: ".. petFamily);
local i = 0;
repeat
i = i + 1;
local spellName, spellSubName = GetSpellBookItemName(i, BOOKTYPE_PET);
-- print(AddonName.. ": Book: ".. tostring(spellName).. " ; ".. tostring(spellSubName));
if spellName then
-- No isToken flag from GetPetActionInfo() here, so do the check ourselves
local isToken = false;
if PetSpellNameExclusions[spellName] then
isToken = true;
end
if not isToken then
local _, _, _, _, _, _, spellID = GetSpellInfo(spellName);
-- local isPassive = IsPassiveSpell(spellID);
if spellID then -- Sanity check
-- NEW for 1.0.14 --
if (spellSubName == nil) or (spellSubName == "") then
local delayedSpellInfo = Spell:CreateFromSpellID(spellID);
-- I presume we don't actually need to cancel the request for the additional
-- information, i.e. presume once the information is given to us through the
-- function delayedSpellInfo:ContinueOnSpellLoad(), there will be no further
-- activity regarding this- But, just in case, we'll set up a function to
-- cancel the request after we got the information we need.
local spellDataLoadedCancelFunc = delayedSpellInfo:ContinueWithCancelOnSpellLoad(function() -- We don't need to do anything upon canceling the request
-- print(AddonName.. ": Now cancelling the request for delayed information about spell ID: ".. spellID);
end);
-- Actually get the information and use it to update our database:
delayedSpellInfo:ContinueOnSpellLoad(function()
-- print(AddonName.. ": Will now get the previously delayed information about spell ID: ".. spellID);
-- Although we should only need to update spellSubName, we might
-- have fetched a new spellName + spellID by now. Thus, we'll
-- update those fields too.
spellName = delayedSpellInfo:GetSpellName();
spellSubName = delayedSpellInfo:GetSpellSubtext(); -- Mandatory
spellID = delayedSpellInfo:GetSpellID();
addSpellbookPetSpell_func(spellName, spellSubName, spellID);
-- Now cancel the request:
spellDataLoadedCancelFunc();
spellDataLoadedCancelFunc = nil; -- for safety!
end);
else
addSpellbookPetSpell_func(spellName, spellSubName, spellID);
end
-- --
-- else
-- print(AddonName.. ": Pet spell #".. i.. ": NO ID!");
end
-- else
-- print(AddonName.. ": Pet spell #".. i.." is a token.");
end
end
until spellName == nil;
-- petHasSpellsConfirmed = true;
end
else -- NOT a Hunter Pet
-- GetPetActionInfo(buttonNumber) + GetSpellInfo(spellName) --
if PetHasActionBar() then -- As all controllable pets are marked to have. Note: HasPetUI()
-- returns 'true' for classes which have pets but are too low level
-- to have control over them; e.g. Warlocks under Level 10.
-- PetHasActionBar() only returns 1 if a PetActionBar actually
-- should be shown (but regardless of the result of :IsShown).
print(AddonName.. ": Getting ABar spells for pet: ".. petFamily);
for i = 1, NUM_PET_ACTION_SLOTS do
-- local spellName, spellSubName, _, isToken, _, _, _ = GetPetActionInfo(i);
local spellName, _, _, isToken, _, _, _ = GetPetActionInfo(i);
-- NB: We don't actually use the value of 'spellSubName' within the current scope;
-- the value is a stub. Thus there is no need to use the SpellMixin API here.
-- print(AddonName.. ": BarButton".. i..": ".. tostring(spellName));
if spellName and (not isToken) then
local _, _, _, _, _, _, spellID = GetSpellInfo(spellName);
if spellID then -- Sanity check
if IsPassiveSpell(spellID) then
if not SN2SID_PASSIVES_table[universalClassName].Pets[petFamily] then
SN2SID_PASSIVES_table[universalClassName].Pets[petFamily] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets[petFamily][spellName] = spellID;
end
else
if not SN2SID_table[universalClassName].Pets[petFamily] then
SN2SID_table[universalClassName].Pets[petFamily] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets[petFamily][spellName] = spellID;
end
end
end
end
end
-- petHasSpellsConfirmed = true;
end
-- GetSpellBookItemName(SpellbookIndex, BOOKTYPE_PET) + GetSpellInfo(spellName) --
if HasPetSpells() then -- I.e. whether there is a Pet Spellbook. WARNING: Will return TRUE
-- for all characters whose classes have pets, regardless of
-- whether or not the character's level is high enough to have
-- control over them; e.g. TRUE for Warlocks under Level 10.
local i = 0;
repeat
i = i + 1;
-- local spellName, spellSubName = GetSpellBookItemName(i, BOOKTYPE_PET);
local spellName = (GetSpellBookItemName(i, BOOKTYPE_PET));
-- NB: We don't actually use the value of 'spellSubName' within the current scope;
-- the value is a stub. Thus there is no need to use the SpellMixin API here.
-- print(AddonName.. ": Book: ".. tostring(spellName));
if spellName then
local isToken = false;
if PetSpellNameExclusions[spellName] then
isToken = true;
end
if not isToken then
-- local _, spellID = GetSpellBookItemInfo(i, BOOKTYPE_PET);
local _, _, _, _, _, _, spellID = GetSpellInfo(spellName);
if spellID then -- Sanity check
if IsPassiveSpell(spellID) then
-- if SN2SID_PASSIVES_table[universalClassName].Pets[petFamily] == nil then
if not SN2SID_PASSIVES_table[universalClassName].Pets[petFamily] then
SN2SID_PASSIVES_table[universalClassName].Pets[petFamily] = { [spellName] = spellID, };
else
SN2SID_PASSIVES_table[universalClassName].Pets[petFamily][spellName] = spellID;
end
else
-- if SN2SID_table[universalClassName].Pets[petFamily] == nil then
if not SN2SID_table[universalClassName].Pets[petFamily] then
SN2SID_table[universalClassName].Pets[petFamily] = { [spellName] = spellID, };
else
SN2SID_table[universalClassName].Pets[petFamily][spellName] = spellID;
end
end
end
end
end
until spellName == nil;
-- petHasSpellsConfirmed = true;
end
end
-- print(AddonName.. ": Fetched? ".. tostring(petHasSpellsConfirmed));
end
 
-- local addSpellsPostUpdate = function(SN2SID_table, SN2SID_PASSIVES_table, generalTabName, universalClassName)
-- local addSpellsPostUpdate = function(SN2SID_table, SN2SID_PASSIVES_table)
local addSpellsPostUpdate = function()
-- Sanity check
if (postUpdate_Spells2Add ~= nil) and (SN2SID_table ~= nil) then
for key, value in pairs(postUpdate_Spells2Add) do
-- if SN2SID_table[key] == nil then -- Sanity check, key == "General" OR universalClassName
if not SN2SID_table[key] then -- Sanity check, key == "General" OR universalClassName
-- print(AddonName.. ": Adding: ".. tostring(value));
SN2SID_table[key] = value
elseif type(value) == "table" then -- Should always be 'true' i.e. always either
-- specName(..somethingMaybe) OR "Flyouts" OR
-- "Pets" OR someGeneralTabCategory.
for keyk, valuev in pairs(value) do
-- if SN2SID_table[key][keyk] == nil then -- specName(..somethingMaybe) OR
if not SN2SID_table[key][keyk] then -- specName(..somethingMaybe) OR
-- "Flyouts" OR "Pets" OR
-- someGeneralTabCategory.
-- print(AddonName.. ": Adding: ".. tostring(valuev));
SN2SID_table[key][keyk] = valuev;
elseif type(valuev) == "table" then --
--
for keykk, valuevv in pairs(valuev) do
-- if SN2SID_table[key][keyk][keykk] == nil then -- Spell OR Flyouts_spell OR
if not SN2SID_table[key][keyk][keykk] then -- Spell OR Flyouts_spell OR
-- PetFamily is not on the
-- target table yet
-- print(AddonName.. ": Adding: ".. tostring(valuevv));
SN2SID_table[key][keyk][keykk] = valuevv;
end
if type(valuevv) == "table" then -- Flyouts_spell OR PetFamily
for keykkk, valuevvv in pairs(valuevv) do
-- if SN2SID_table[key][keyk][keykk][keykkk] == nil then -- Flyouts_spell_Spell OR
if not SN2SID_table[key][keyk][keykk][keykkk] then -- Flyouts_spell_Spell OR
-- PetFamily_spell is not
-- on the target table yet
-- print(AddonName.. ": Adding: ".. tostring(valuevvv));
SN2SID_table[key][keyk][keykk][keykkk] = valuevvv;
end
end
 
end
end
 
end
end
 
end
end
end
 
if (postUpdate_Spells2Add_PASSIVES ~= nil) and (SN2SID_PASSIVES_table ~= nil) then
for key, value in pairs(postUpdate_Spells2Add_PASSIVES) do
-- if SN2SID_PASSIVES_table[key] == nil then -- Sanity check, key == "General" OR universalClassName
if not SN2SID_PASSIVES_table[key] then -- Sanity check, key == "General" OR universalClassName
-- print(AddonName.. ": Adding: ".. tostring(value));
SN2SID_PASSIVES_table[key] = value;
elseif type(value) == "table" then -- Should always be 'true' i.e. always either "Spells"
-- OR specName(..somethingMaybe) OR "Pets"
for keyk, valuev in pairs(value) do
-- if SN2SID_PASSIVES_table[key][keyk] == nil then -- "Spells" OR specName(..somethingMaybe) OR
if not SN2SID_PASSIVES_table[key][keyk] then -- "Spells" OR specName(..somethingMaybe) OR
-- "Pets" is not on the target table yet
-- print(AddonName.. ": Adding: ".. tostring(valuev));
SN2SID_PASSIVES_table[key][keyk] = valuev;
elseif type(valuev) == "table" then -- "Spells" OR specName(..somethingMaybe) OR
-- "Pets" table
for keykk, valuevv in pairs(valuev) do
-- if SN2SID_PASSIVES_table[key][keyk][keykk] == nil then -- Spell OR Flyouts_spell OR
if not SN2SID_PASSIVES_table[key][keyk][keykk] then -- Spell OR Flyouts_spell OR
-- PetFamily is not on the
-- target table yet
-- print(AddonName.. ": Adding: ".. tostring(valuevv));
SN2SID_PASSIVES_table[key][keyk][keykk] = valuevv;
elseif type(valuevv) == "table" then -- Flyouts_spell OR PetFamily
for keykkk, valuevvv in pairs(valuevv) do
-- if SN2SID_PASSIVES_table[key][keyk][keykk][keykkk] == nil then -- Flyouts_spell_Spell OR
if not SN2SID_PASSIVES_table[key][keyk][keykk][keykkk] then -- Flyouts_spell_Spell OR
-- PetFamily_spell is not
-- on the target table yet
-- print(AddonName.. ": Adding: ".. tostring(valuevvv));
SN2SID_PASSIVES_table[key][keyk][keykk][keykkk] = valuevvv;
end
end
 
end
end
 
end
end
 
end
end
end
end
 
 
-- -- -- RUNTIME -- -- --
-------------------------
 
-- Frame to listen to game events
local SN2SID_frame, SN2SID_events = CreateFrame("Frame", nil), {};
-- NB: When ADDON_LOADED fires, the SpellBook etc aren't available yet, only upon PLAYER_LOGIN.
SN2SID_frame:RegisterEvent("PLAYER_LOGIN");
 
-- Function to call upon PLAYER_LOGIN (see bottom of file)
local lsn2sidpStartup = function()
-- Startup --
print(AddonName.. ": Startup!");
-- Copy the global saved-variables tables to our local tables
-- local SN2SID_table = AddonEnv.SpellNamesAndIDs or SpellNamesAndIDs or {};
-- local SN2SID_PASSIVES_table = AddonEnv.SpellNamesAndIDs_PASSIVES or SpellNamesAndIDs_PASSIVES or {};
SN2SID_table = AddonEnv.SpellNamesAndIDs or SpellNamesAndIDs or {};
SN2SID_PASSIVES_table = AddonEnv.SpellNamesAndIDs_PASSIVES or SpellNamesAndIDs_PASSIVES or {};
-- print(AddonName.. ": AddonEnv.SpellNamesAndIDs = ".. tostring(AddonEnv.SpellNamesAndIDs)); -- nil
-- print(AddonName.. ": AddonEnv.SpellNamesAndIDs_PASSIVES = ".. tostring(AddonEnv.SpellNamesAndIDs_PASSIVES)); -- nil
-- print(AddonName.. ": SpellNamesAndIDs = ".. tostring(SpellNamesAndIDs)); -- TableA
-- print(AddonName.. ": SpellNamesAndIDs_PASSIVES = ".. tostring(SpellNamesAndIDs_PASSIVES)); -- TableB
-- print(AddonName.. ": SN2SID_table = ".. tostring(SN2SID_table));-- TableA
-- print(AddonName.. ": SN2SID_PASSIVES_table = ".. tostring(SN2SID_PASSIVES_table)); -- TableB
 
-- -- Metadata fields: Data source, Class', ... -- --
-- Data source --
-- We're only interested in storing the English names, at least for now
local curLocale = GetLocale();
if ( curLocale ~= "enUS") then
SN2SID_frame:UnregisterAllEvents();
error(AddonName.. " only retrieves data from English (enUS or enGB) clients.");
return;
end
local stubVal;
stubVal, universalRaceName = UnitRace("player");
-- Self-explanatory:
local _, gameBuild = GetBuildInfo();
-- For some reason, the variable gameBuild is being saved as a string; convert to number:
gameBuild = tonumber(gameBuild);
local charLevel = UnitLevel("player");
-- Spells in the General tab: Racial abilities, etc
-- local generalTabName = (GetSpellTabInfo(1)); -- Tab#1 = General
generalTabName = (GetSpellTabInfo(1)); -- Tab#1 = General
-- Class stuff --
-- local universalClassName = select(2, UnitClass("player")); -- Locale-independent Class name
stubVal, universalClassName = UnitClass("player"); -- Locale-independent Class name
local ClassNumSpecs = GetNumSpecializations(false, false); -- Number of Specialisations
-- Ordered list of Class specs' IDs and Names -- Do we still use this?
local specID, specName = GetSpecializationInfo(1);
local ClassSpecNames2IDs = {};
for i = 1, ClassNumSpecs do
local specID, specName = GetSpecializationInfo(i);
ClassSpecNames2IDs[specName] = specID;
end
 
---- Check the tables' skeleton structure and build whatever may be missing ----
--
if not SN2SID_table then -- sanity check
error(AddonName.. "Local copy of saved variables is missing.");
return;
end
if not SN2SID_PASSIVES_table then -- sanity check
error(AddonName.. "Local copy of saved variables is missing.");
return;
end
--
-- If needed, create and populate the Metadata subtables; --
-- Flag spell-lists for update if applicable --
--
-- General tab skeleton + dataSource + raceBuilds
-- NB: We separate the two types of tables in two if-loops for the sake of sanity-keep (against
-- e.g. manual edits to the file).
if not SN2SID_table[generalTabName] then
print(AddonName.. ": Will now create the ".. generalTabName.. " dataSource for Active spells.");
SN2SID_table[generalTabName] = {};
-- SN2SID_table[generalTabName].Spells = {};
SN2SID_table[generalTabName].METADATA = {};
SN2SID_table[generalTabName].METADATA.dataSource = {
clientLocale = curLocale, -- Currently always enUS
gameBuild = gameBuild,
charLevel = charLevel,
charMaxLevel = charLevel,
};
SN2SID_table[generalTabName].METADATA.raceBuilds = { [universalRaceName] = gamebuild };
-- We've just created and populated the GeneralTabMetadata, hence no need to update
updateGeneralTabMetadata = false;
updateGeneralSpells = true; -- Do populate the actual list of spells
else
updateGeneralTabMetadata = true; -- Will check whether it's updated; if not, will update;
-- The function which checks above var will also flag for Spells-list update if needed.
end
if not SN2SID_PASSIVES_table[generalTabName] then
print(AddonName.. ": Will now create the ".. generalTabName.. " dataSource for Passive spells.");
SN2SID_PASSIVES_table[generalTabName] = {};
-- SN2SID_PASSIVES_table[generalTabName].Spells = {};
SN2SID_PASSIVES_table[generalTabName].METADATA = {};
SN2SID_PASSIVES_table[generalTabName].METADATA.dataSource = {
clientLocale = curLocale, -- Currently always enUS
gameBuild = gameBuild,
charLevel = charLevel,
charMaxLevel = charLevel,
};
SN2SID_PASSIVES_table[generalTabName].METADATA.raceBuilds = { [universalRaceName] = gamebuild };
-- We've just created and populated the GeneralTabMetadata, hence no need to update ...
if not updateGeneralTabMetadata then -- ... unless it's needed for the Active spells
updateGeneralTabMetadata = false; -- And this seems redundant. Keep it 'cause I'll forget it otherwise...
end
updateGeneralSpells = true; -- Do populate the actual list of spells
else
updateGeneralTabMetadata = true; -- Will check whether it's updated, if not will update;
-- The function which checks above var will also flag for Spells-list update if needed.
end
-- Run the update function (does both Active and Passive trees), delayed
-- updateGeneralTabMetadata_func(SN2SID_table, SN2SID_PASSIVES_table, curLocale, gameBuild, universalRaceName, generalTabName, charLevel);
-- updateGeneralTabMetadata_func(curLocale, gameBuild, universalRaceName, generalTabName, charLevel);
-- updateGeneralTabMetadata_func(curLocale, gameBuild, universalRaceName, charLevel);
updateGeneralTabMetadata_func(curLocale, gameBuild, charLevel);
 
-- Class spells' Metadata (dataSource only; class Specs will be handled afterwards)
if not SN2SID_table[universalClassName] then
print(AddonName.. ": Will now create the ".. universalClassName.. "'s table and dataSource for Active spells.");
SN2SID_table[universalClassName] = {};
else
updateClassMetadata = true; -- Will check whether it's updated and if not, will update;
-- The function which checks above var will also flag for Spells-list update if needed.
end
if not SN2SID_table[universalClassName].METADATA then
SN2SID_table[universalClassName].METADATA = {};
SN2SID_table[universalClassName].METADATA.dataSource = {
clientLocale = curLocale, -- Currently always enUS
gameBuild = gameBuild,
charLevel = charLevel,
charMaxLevel = charLevel,
};
-- We've just created and populated the Class' dataSource fields, hence no need to update;
-- Class Specs fields are updated in another if-clause, further ahead.
updateClassMetadata = false;
updateClassSpells = true; -- Do populate the actual list of spells.
else
updateClassMetadata = true; -- Will check whether it's updated and if not, will update;
-- The function which checks above var will also flag for Spells-list update if needed.
end
if not SN2SID_PASSIVES_table[universalClassName] then
print(AddonName.. ": Will now create the ".. universalClassName.. "'s table and dataSource for Passive spells.");
SN2SID_PASSIVES_table[universalClassName] = {};
SN2SID_PASSIVES_table[universalClassName].METADATA = {};
SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource = {
clientLocale = curLocale, -- Currently always enUS
gameBuild = gameBuild,
charLevel = charLevel,
charMaxLevel = charLevel,
};
if not updateClassMetadata then -- See above, in the Actives snippet
updateClassMetadata = false;
end
updateClassSpells = true; -- Do populate the actual list of spells.
else
updateClassMetadata = true;
end
 
if not SN2SID_PASSIVES_table[universalClassName].METADATA then
SN2SID_PASSIVES_table[universalClassName].METADATA = {};
SN2SID_PASSIVES_table[universalClassName].METADATA.dataSource = {
clientLocale = curLocale, -- Currently always enUS
gameBuild = gameBuild,
charLevel = charLevel,
charMaxLevel = charLevel,
};
-- We've just created and populated the Class' dataSource fields, hence no need to update;
-- Class Specs fields are updated in another if-clause, further ahead.
updateClassMetadata = false;
updateClassSpells = true; -- Do populate the actual list of spells.
else
updateClassMetadata = true; -- Will check whether it's updated and if not, will update;
-- The function which checks above var will also flag for Spells-list update if needed.
end
 
-- Do the actual update of the Class Metadata (dataSource only now; Specs will be handled next)
-- updateClassMetadata_func(SN2SID_table, SN2SID_PASSIVES_table, curLocale, gameBuild, universalClassName, charLevel);
-- updateClassMetadata_func(curLocale, gameBuild, universalClassName, charLevel);
updateClassMetadata_func(curLocale, gameBuild, charLevel);
 
-- If needed, create and populate Class Specs' Active and Passive Spells --
-- Flag spell-lists for update if applicable --
if not SN2SID_table[universalClassName].METADATA.Specs then
print(AddonName.. ": Will now create the ".. universalClassName.. "'s \'Specs\' (Actives) tables.");
for i = 1, ClassNumSpecs do
local specID, specName = GetSpecializationInfo(i);
-- ClassSpecNames2IDs[i] = { specID, specName };
ClassSpecNames2IDs[specName] = specID;
-- print(AddonName.. ": ".. i.. " = ".. specID.. " = ".. specName); -- For reference
-- local specString = "Spec"..specID;
if not SN2SID_table[universalClassName].METADATA.Specs then
SN2SID_table[universalClassName].METADATA.Specs = {};
SN2SID_table[universalClassName].METADATA.Specs[specName] = specID; -- Reference
SN2SID_table[universalClassName][specName] = {}; -- For "[SpellName] = SpellID"
elseif not SN2SID_table[universalClassName].METADATA.Specs[i] then
SN2SID_table[universalClassName].METADATA.Specs[specName] = specID; -- Reference
SN2SID_table[universalClassName][specName] = {}; -- For "[SpellName] = SpellID"
end
end
updateClassSpells = true; -- Do populate the actual list of spells.
end
if not SN2SID_PASSIVES_table[universalClassName].METADATA.Specs then
print(AddonName.. ": Will now create the ".. universalClassName.. "'s \'Specs\' (Passives) tables.");
for i = 1, ClassNumSpecs do
local specID, specName = GetSpecializationInfo(i);
-- ClassSpecNames2IDs[i] = { specID, specName };
ClassSpecNames2IDs[specName] = specID;
-- print(AddonName.. ": ".. i.. " = ".. specID.. " = ".. specName); -- For reference
if not SN2SID_PASSIVES_table[universalClassName].METADATA.Specs then
SN2SID_PASSIVES_table[universalClassName].METADATA.Specs = {};
SN2SID_PASSIVES_table[universalClassName].METADATA.Specs[specName] = specID; -- Ref.
SN2SID_PASSIVES_table[universalClassName][specName] = {}; -- "[SpellName] = SpellID"
elseif not SN2SID_PASSIVES_table[universalClassName].METADATA.Specs[i] then
SN2SID_PASSIVES_table[universalClassName].METADATA.Specs[specName] = specID; -- Ref.
SN2SID_PASSIVES_table[universalClassName][specName] = {}; -- "[SpellName] = SpellID"
end
end
updateClassSpells = true; -- Do populate the actual list of spells.
end
 
-- Update General (always ATM) and Class SpellNames2SIDs (both Actives and Passives) --
updateClassSpells = true;
-- updateSpellbookSpells_func(SN2SID_table, SN2SID_PASSIVES_table, generalTabName, universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
-- updateSpellbookSpells_func(generalTabName, universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
-- updateSpellbookSpells_func(universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
updateSpellbookSpells_func(ClassNumSpecs, ClassSpecNames2IDs);
-- Pet spells will only be available when a pet is out, so wait for it, i.e. wait for UNIT_PET
-- to fire for "player".
 
 
-- Set up Other Event-Handlers --
---------------------------------
 
function SN2SID_events:PLAYER_TALENT_UPDATE(self)
-- updateGeneralSpells = true; -- unneeded, placeholder for future version
updateClassSpells = true;
-- updateSpellbookSpells_func(SN2SID_table, SN2SID_PASSIVES_table, generalTabName, universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
-- updateSpellbookSpells_func(generalTabName, universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
-- updateSpellbookSpells_func(universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
updateSpellbookSpells_func(ClassNumSpecs, ClassSpecNames2IDs);
end
 
function SN2SID_events:PLAYER_LEVEL_UP(self, ...)
-- UnitLevel("player") doesn't update its result soon enough to have it indicate the *new*
-- char level in response to this event. OTH, this event does provide arguments but,
-- whatever they are, they're NOT the new char leve, for sure. Might be best to just flag
-- for update on Logout. But we'll still do it here, for now.
updateGeneralTabMetadata = true; -- Maybe useful.
updateClassMetadata = true; -- Stuff like talents only become available at level 10.
-- updateClassMetadata_func(SN2SID_table, SN2SID_PASSIVES_table, curLocale, gameBuild, universalClassName, charLevel);
updateClassMetadata_func(curLocale, gameBuild, charLevel);
updateGeneralTabMetadata = true; -- Maybe useful.
updateClassMetadata = true; -- Stuff like talents only become available at level 10.
end
 
-- Update pets' existence and spells when one comes up for "player"
-- NB: Fires after PLAYER_LOGIN if the player already has a pet out. NO LONGER SO as of game
-- build 26365 and later; I only got this event to fire on 'Pet Dismiss' and 'Summon Pet' button
-- clicks. Also, see BUG described bellow!
-- fire on 'Pet Dismiss' and 'Summon Pet' button clicks. Also, see BUG described bellow!
-- function SN2SID_events:UNIT_PET(self, ...)
function SN2SID_events:UNIT_PET(...)
local arg1 = ...;
print(AddonName.. ": UNIT_PET fired with arg1 = ".. tostring(arg1));
if (not arg1) or (arg1 ~= "player") then
return;
end
if not SN2SID_table[universalClassName].Pets then
SN2SID_table[universalClassName].Pets = {};
end
if not SN2SID_PASSIVES_table[universalClassName].Pets then
SN2SID_PASSIVES_table[universalClassName].Pets = {};
end
-- updatePetSpellNames(SN2SID_table, SN2SID_PASSIVES_table, universalClassName);
-- updatePetSpellNames(universalClassName);
updatePetSpellNames();
end
 
-- WoW 8.0.1: PET_SPECIALIZATION_CHANGED doesn't seem to be firing anymore
--[[
-- Switch Hunter pet's specialisation
-- function SN2SID_events:PET_SPECIALIZATION_CHANGED(self, ...)
function SN2SID_events:PET_SPECIALIZATION_CHANGED(...)
local arg1 = ...;
print(AddonName.. ": PET_SPECIALIZATION_CHANGED fired with arg1 = ".. tostring(arg1));
if arg1 and arg1 ~= "player" then
return;
end
if not SN2SID_table[universalClassName].Pets then
SN2SID_table[universalClassName].Pets = {};
end
-- updatePetSpellNames(SN2SID_table, SN2SID_PASSIVES_table, universalClassName);
-- updatePetSpellNames(universalClassName);
updatePetSpellNames();
end
]]--
 
function SN2SID_events:PLAYER_LOGOUT(self)
-- Bring everything up to date
charLevel = UnitLevel("player");
updateGeneralTabMetadata = true;
updateClassMetadata = true;
-- updateGeneralTabMetadata_func(SN2SID_table, SN2SID_PASSIVES_table, curLocale, gameBuild, universalRaceName, generalTabName, charLevel);
-- updateClassMetadata_func(SN2SID_table, SN2SID_PASSIVES_table, curLocale, gameBuild, universalClassName, charLevel);
-- updateSpellbookSpells_func(SN2SID_table, SN2SID_PASSIVES_table, generalTabName, universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
-- updateGeneralTabMetadata_func(curLocale, gameBuild, universalRaceName, generalTabName, charLevel);
-- updateGeneralTabMetadata_func(curLocale, gameBuild, universalRaceName, charLevel);
updateGeneralTabMetadata_func(curLocale, gameBuild, charLevel);
-- updateClassMetadata_func(curLocale, gameBuild, universalClassName, charLevel);
updateClassMetadata_func(curLocale, gameBuild, charLevel);
-- updateSpellbookSpells_func(generalTabName, universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
-- updateSpellbookSpells_func(universalClassName, ClassNumSpecs, ClassSpecNames2IDs);
updateSpellbookSpells_func(ClassNumSpecs, ClassSpecNames2IDs);
-- NB: UNIT_PET fires upon summoning new pets; but NOT upon switching Hunters' Pet-Specs.
if SN2SID_table[universalClassName].Pets or SN2SID_PASSIVES_table[universalClassName].Pets then
-- updatePetSpellNames(SN2SID_table, SN2SID_PASSIVES_table, universalClassName);
-- updatePetSpellNames(universalClassName);
updatePetSpellNames();
end
 
-- "Manually" add spells we cannot (or is not convenient to) get automatically
-- addSpellsPostUpdate(SN2SID_table, SN2SID_PASSIVES_table);
-- REENABLE THIS AFTER TEST:
addSpellsPostUpdate();
 
-- Copy our local tables to the global saved-variables tables --
if AddonEnv.SpellNamesAndIDs then
AddonEnv.SpellNamesAndIDs = SN2SID_table;
else
SpellNamesAndIDs = SN2SID_table;
end
if AddonEnv.SpellNamesAndIDs_PASSIVES then
AddonEnv.SpellNamesAndIDs_PASSIVES = SN2SID_PASSIVES_table;
else
SpellNamesAndIDs_PASSIVES = SN2SID_PASSIVES_table;
end
end
 
-- Unregister the event (handler) in which we are now running
SN2SID_frame:UnregisterEvent("PLAYER_LOGIN");
-- Set the post-PLAYER_LOGIN event-handlers and Register the respective events
SN2SID_frame:SetScript("OnEvent", function(self, event, ...)
SN2SID_events[event](self, ...);
end);
for k, v in pairs(SN2SID_events) do
if k == "UNIT_PET" then
SN2SID_frame:RegisterUnitEvent("UNIT_PET", "player");
else
SN2SID_frame:RegisterEvent(k);
end
-- if SN2SID_frame:IsEventRegistered(k) then
-- print(AddonName.. ": Registered event: ".. tostring(k));
-- end
end
end
 
-- PLAYER_LOGIN event handler; we set up the other events when this one fires --
SN2SID_frame:SetScript("OnEvent", function(self, event)
C_Timer.After(3, lsn2sidpStartup);
end);
populator/tags/LibSpellName2SID-Populator-1.0.14a/LibSpellName2SID-1.0-Populator.toc New file
0,0 → 1,10
## Interface: 80000
## Title: LibSpellName2SID: Populator (DEV)
## Notes: Get all spells from a character and save them to file.
## Author: aallkkaa
## Version: 1.0.14a
## SavedVariables: SpellNamesAndIDs, SpellNamesAndIDs_PASSIVES
## DefaultState: disabled
## X-Category: Development
 
LibSpellName2SID-1.0-Populator.lua
passives/tags/LibSpellName2SID-1.0.14a-Passives/test.lua New file
0,0 → 1,87
local AddonName, AddonEnv = ...;
 
local LIBSN2SIDP = LibStub:GetLibrary("LibSpellName2SIDPassives");
local SID = LIBSN2SIDP.SID;
local LSN = LIBSN2SIDP.LSN;
 
print(AddonName.. ": Starting test!");
 
local Frame = CreateFrame("Frame");
Frame:RegisterEvent("PLAYER_LOGIN"); -- Not enough data from game til this event fires.
-- Frame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
-- Frame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
-- TESTED: Both of these fire Twice on Changing
-- spec. On Login but "ACTIVE_..." fires Once,
-- but "PLAYER_TALENT_..." fires Twice.
Frame:SetScript("OnEvent", function()
C_Timer.After(3, function()
if SID and LSN then
local startTime = GetTime() *1000000;
print(AddonName.. tostring(": SID and LSN found."));
local endTime = GetTime() *1000000;
print("print time with tostring(...) = ".. (endTime - startTime).. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": SID[\"Armor Skills\"] = ".. SID["Armor Skills"]); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Armor Skills\"] = ".. tostring(LSN["Armor Skills"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": SID[\"Made It Up\"] = ".. tostring(SID["Made It Up"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Made It Up\"] = ".. tostring(LSN["Made It Up"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": SID[20585] = ".. tostring(SID[20585])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[20585] = ".. tostring(LSN[20585])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": SID[90265] = ".. tostring(SID[90265]));
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[90265] = ".. tostring(LSN[90265]));
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": SID[\"Sudden Doom\"] = ".. tostring(SID["Sudden Doom"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Sudden Doom\"] = ".. tostring(LSN["Sudden Doom"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": SID[\"Killing Machine\"] = ".. tostring(SID["Killing Machine"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Killing Machine\"] = ".. tostring(LSN["Killing Machine"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
else
print(AddonName.. ": SID and/or LSN not found.");
end
end);
end);
passives/tags/LibSpellName2SID-1.0.14a-Passives/LibSpellName2SID-1.0-Passives/LibSpellName2SID-1.0-Passives.lua New file
0,0 → 1,2111
---------------------
-- LibSpellName2SIDPassives - fork off LibSpellName2SID by aallkkaa
--
-- V.10008 - 10014: 2018 - 2019 WoW-7.3.x and WoW-8.0.1 releases, by aallkkaa [1]
--
-- [1] https://www.wowinterface.com/forums/member.php?u=335646
---------------------
-- API:
-- LibSpellName2SIDPassives.SID["EnglishSpellName"] -- Spell ID of English Spell Name
-- LibSpellName2SIDPassives.LSN["EnglishSpellName"] -- Localized Spell Name
-- LibSpellName2SIDPassives:GetNumSpells() -- Get the number of spells in the database - TEMP. OUT
-- LibSpellName2SIDPassives:Cleanup() -- Clean up the database (remove from RAM) - DEPRECATED
---------------------
 
-- Initialisation --
--------------------
 
AddonName, AddonEnv = ...;
 
-- Library's version values --
local LibSpellName2SIDPassives_MAJOR = "LibSpellName2SIDPassives";
local LibSpellName2SIDPassives_MINOR = 10014;
-- print(LibSpellName2SIDPassives_MAJOR.. "-".. LibSpellName2SIDPassives_MINOR.. ": AddonName = ".. AddonName);
 
-- DataSource --
-- gameBuild = 27178
-- clientLocale = enUS
 
-- Register with LibStub --
assert(LibStub, LibSpellName2SIDPassives_MAJOR.. "-".. LibSpellName2SIDPassives_MINOR.." requires LibStub.");
local LibSN2SIDP;
local oldLibSN2SIDP, oldMinor = LibStub:GetLibrary(LibSpellName2SIDPassives_MAJOR, true);
if oldLibSN2SIDP and (oldMinor >= LibAlkaTest_MINOR) then
return;
else
LibSN2SIDP = (LibStub:NewLibrary(LibSpellName2SIDPassives_MAJOR, LibSpellName2SIDPassives_MINOR));
if oldLibSN2SIDP then
if oldLibSN2SIDP.libFrame then -- Reuse old lib's frame if available
oldLibSN2SIDP.libFrame:UnregisterAllEvents();
LibSN2SIDP.libFrame = oldLibSN2SIDP.libFrame;
end
oldLibSN2SIDP = nil;
end
end
 
 
-- Set the library database contents --
---------------------------------------
 
LibSN2SIDP.owner = AddonName;
LibSN2SIDP.minor = LibSpellName2SIDPassives_MINOR;
 
LibSN2SIDP.DB = {}; -- Clear old version's contents, if applicable
 
LibSN2SIDP.DB = {
["General"] = {
["Others"] = {
["Draenor Pathfinder"] = 191645,
["Apprentice Riding"] = 33388,
["Broken Isles Pathfinder"] = 233368,
["Expert Riding"] = 34090,
["Artisan Riding"] = 34091,
["Journeyman Riding"] = 33391,
["Master Riding"] = 90265,
["Battle for Azeroth Pathfinder"] = 281576,
},
["Racials"] = {
["Draenei"] = {
["Languages"] = 79741,
["Shadow Resistance"] = 59221,
["Gemcutting"] = 28875,
["Heroic Presence"] = 6562,
},
["NightElf"] = {
["Wisp Spirit"] = 20585,
["Touch of Elune"] = 154748,
["Languages"] = 76252,
["Quickness"] = 20582,
["Nature Resistance"] = 20583,
},
["Troll"] = {
["Da Voodoo Shuffle"] = 58943,
["Beast Slaying"] = 20557,
["Languages"] = 79744,
["Regeneration"] = 20555,
},
["Orc"] = {
["Command"] = 21563,
["Hardiness"] = 20573,
["Languages"] = 79743,
},
["Gnome"] = {
["Expansive Mind"] = 20591,
["Languages"] = 79740,
["Arcane Resistance"] = 20592,
["Engineering Specialization"] = 20593,
["Nimble Fingers"] = 92680,
},
["Pandaren"] = {
["Inner Peace"] = 107074,
["Gourmand"] = 107073,
["Languages"] = 131701,
["Bouncy"] = 107076,
["Epicurean"] = 107072,
},
["Dwarf"] = {
["Explorer"] = 92682,
["Might of the Mountain"] = 59224,
["Languages"] = 79739,
["Frost Resistance"] = 20596,
},
["Tauren"] = {
["Endurance"] = 20550,
["Brawn"] = 154743,
["Languages"] = 79746,
["Cultivation"] = 20552,
["Nature Resistance"] = 20551,
},
["BloodElf"] = {
["Arcane Resistance"] = 822,
["Arcane Acuity"] = 154742,
["Languages"] = 79748,
["Arcane Affinity"] = 28877,
},
["VoidElf"] = {
["Entropic Embrace"] = 255669,
["Chill of Night"] = 255668,
["Ethereal Connection"] = 255667,
["Preternatural Calm"] = 255670,
["Languages"] = 262486,
},
["Worgen"] = {
["Aberration"] = 68976,
["Viciousness"] = 68975,
["Languages"] = 79742,
["Flayer"] = 68978,
},
["Human"] = {
["Languages"] = 79738,
["Diplomacy"] = 20599,
["The Human Spirit"] = 20598,
},
["LightforgedDraenei"] = {
["Languages"] = 79741,
["Light's Reckoning"] = 255652,
["Holy Resistance"] = 255651,
["Demonbane"] = 255653,
},
["Goblin"] = {
["Languages"] = 79749,
["Time is Money"] = 69042,
["Best Deals Anywhere"] = 69044,
["Better Living Through Chemistry"] = 69045,
},
["Nightborne"] = {
["Arcane Resistance"] = 255664,
["Ancient History"] = 255663,
["Magical Affinity"] = 255665,
["Languages"] = 262438,
},
["HighmountainTauren"] = {
["Waste Not, Want Not"] = 255656,
["Rugged Tenacity"] = 255659,
["Languages"] = 79746,
["Pride of Ironhorn"] = 255655,
["Mountaineer"] = 255658,
},
["DarkIronDwarf"] = {
["Languages"] = 273105,
["Forged in Flames"] = 265224,
["Dungeon Delver"] = 265223,
["Mass Production"] = 265222,
},
["MagharOrc"] = {
["Open Skies"] = 273216,
["Languages"] = 274743,
["Sympathetic Vigor"] = 273217,
["Savage Blood"] = 273220,
},
["Scourge"] = {
["Languages"] = 79747,
["Shadow Resistance"] = 20579,
["Touch of the Grave"] = 5227,
},
},
["ZoneAbilities"] = {
["Upgrades"] = 170733,
["Swift Recovery"] = 169608,
["Dragoon"] = 169605,
["Trading Pact"] = 170200,
},
["GuildPerks"] = {
["The Quick and the Dead"] = 83950,
["Guild Mail"] = 83951,
["Mount Up"] = 78633,
["Hasty Hearth"] = 83944,
},
},
["DEATHKNIGHT"] = {
["Frost_Talents"] = {
["Avalanche"] = 207142,
["Obliteration"] = 281238,
["Cold Heart"] = 281208,
["Permafrost"] = 207200,
["Frozen Pulse"] = 194909,
["Murderous Efficiency"] = 207061,
["Inexorable Assault"] = 253593,
["Runic Attenuation"] = 207104,
["Icy Talons"] = 194878,
["Gathering Storm"] = 194912,
["Icecap"] = 207126,
["Death's Reach"] = 276079,
},
["Unholy"] = {
["Sudden Doom"] = 49530,
["Mastery: Dreadblade"] = 77515,
["On a Pale Horse"] = 51986,
["Death Strike"] = 278223,
["Runic Corruption"] = 51462,
["Dark Succor"] = 178819,
},
["Blood"] = {
["On a Pale Horse"] = 51986,
["Veteran of the Third War"] = 48263,
["Crimson Scourge"] = 81136,
["Mastery: Blood Shield"] = 77513,
},
["Pets"] = {
["Ghoul"] = {
["Avoidance"] = 62137,
},
},
["Frost"] = {
["Rime"] = 59057,
["Runic Empowerment"] = 81229,
["Killing Machine"] = 51128,
["On a Pale Horse"] = 51986,
["Mastery: Frozen Heart"] = 77514,
["Death Strike"] = 278223,
["Dark Succor"] = 178819,
},
["Blood_Talents"] = {
["Foul Bulwark"] = 206974,
["Heartbreaker"] = 221536,
["Ossuary"] = 219786,
["Rapid Decomposition"] = 194662,
["Hemostasis"] = 273946,
["Tightening Grasp"] = 206970,
["Red Thirst"] = 205723,
["Will of the Necropolis"] = 206967,
["Bloodworms"] = 195679,
["Anti-Magic Barrier"] = 205727,
["Grip of the Dead"] = 273952,
["Voracious"] = 273953,
["Purgatory"] = 114556,
},
["Unholy_PVPTalents"] = {
["Cadaverous Pallor"] = 201995,
["Heartstop Aura"] = 199719,
["Overpowered Rune Weapon"] = 233394,
["Pandemic"] = 199724,
["Adaptation"] = 214027,
["Tundra Stalker"] = 279941,
["Wandering Plague"] = 199725,
["Deathchill"] = 204080,
["Decomposing Aura"] = 199720,
["Delirium"] = 233396,
["Ghoulish Monstrosity"] = 280428,
["Necrotic Aura"] = 199642,
["Relentless"] = 196029,
["Unholy Mutation"] = 201934,
["Frozen Center"] = 204135,
["Crypt Fever"] = 199722,
},
["Unholy_Talents"] = {
["Grip of the Dead"] = 273952,
["Ebon Fever"] = 207269,
["Infected Claws"] = 207272,
["Pestilence"] = 277234,
["Army of the Damned"] = 276837,
["Pestilent Pustules"] = 194917,
["Bursting Sores"] = 207264,
["All Will Serve"] = 194916,
["Death's Reach"] = 276079,
["Spell Eater"] = 207321,
["Harbinger of Doom"] = 276023,
},
["Blood_PVPTalents"] = {
["Cadaverous Pallor"] = 201995,
["Heartstop Aura"] = 199719,
["Overpowered Rune Weapon"] = 233394,
["Pandemic"] = 199724,
["Adaptation"] = 214027,
["Tundra Stalker"] = 279941,
["Wandering Plague"] = 199725,
["Deathchill"] = 204080,
["Decomposing Aura"] = 199720,
["Delirium"] = 233396,
["Ghoulish Monstrosity"] = 280428,
["Necrotic Aura"] = 199642,
["Relentless"] = 196029,
["Unholy Mutation"] = 201934,
["Frozen Center"] = 204135,
["Crypt Fever"] = 199722,
},
["Frost_PVPTalents"] = {
["Cadaverous Pallor"] = 201995,
["Heartstop Aura"] = 199719,
["Overpowered Rune Weapon"] = 233394,
["Pandemic"] = 199724,
["Adaptation"] = 214027,
["Tundra Stalker"] = 279941,
["Wandering Plague"] = 199725,
["Deathchill"] = 204080,
["Decomposing Aura"] = 199720,
["Delirium"] = 233396,
["Ghoulish Monstrosity"] = 280428,
["Necrotic Aura"] = 199642,
["Relentless"] = 196029,
["Unholy Mutation"] = 201934,
["Frozen Center"] = 204135,
["Crypt Fever"] = 199722,
},
["METADATA"] = {
["Specs"] = {
["Unholy"] = 252,
["Frost"] = 251,
["Blood"] = 250,
},
},
},
["DEMONHUNTER"] = {
["Havoc_Talents"] = {
["Fel Mastery"] = 192939,
["Blind Fury"] = 203550,
["Demonic"] = 213410,
["Unleashed Power"] = 206477,
["Momentum"] = 206476,
["Soul Rending"] = 204909,
["First Blood"] = 206416,
["Demonic Appetite"] = 206478,
["Cycle of Hatred"] = 258887,
["Master of the Glaive"] = 203556,
["Trail of Ruin"] = 258881,
["Desperate Instincts"] = 205411,
["Demon Blades"] = 203555,
["Insatiable Hunger"] = 258876,
},
["Vengeance_Talents"] = {
["Last Resort"] = 209258,
["Feed the Demon"] = 218612,
["Void Reaver"] = 268175,
["Gluttony"] = 264004,
["Fallout"] = 227174,
["Feast of Souls"] = 207697,
["Soul Rending"] = 217996,
["Razor Spikes"] = 209400,
["Agonizing Flames"] = 207548,
["Concentrated Sigils"] = 207666,
["Quickened Sigils"] = 209281,
["Burning Alive"] = 207739,
["Flame Crash"] = 227322,
["Charred Flesh"] = 264002,
["Abyssal Strike"] = 207550,
},
["Havoc"] = {
["Chaos Brand"] = 255260,
["Mastery: Demonic Presence"] = 185164,
["Double Jump"] = 196055,
["Shattered Souls"] = 178940,
["Demonic Wards"] = 278386,
},
["Vengeance"] = {
["Demonic Wards"] = 203513,
["Double Jump"] = 196055,
["Shattered Souls"] = 204254,
["Chaos Brand"] = 255260,
["Mastery: Fel Blood"] = 203747,
},
["Vengeance_PVPTalents"] = {
["Sigil Mastery"] = 211489,
["Cleansed by Flame"] = 205625,
["Adaptation"] = 214027,
["Solitude"] = 211509,
["Jagged Spikes"] = 205627,
["Unending Hatred"] = 213480,
["Relentless"] = 196029,
["Detainment"] = 205596,
["Everlasting Hunt"] = 205626,
},
["Havoc_PVPTalents"] = {
["Sigil Mastery"] = 211489,
["Cleansed by Flame"] = 205625,
["Adaptation"] = 214027,
["Solitude"] = 211509,
["Jagged Spikes"] = 205627,
["Unending Hatred"] = 213480,
["Relentless"] = 196029,
["Detainment"] = 205596,
["Everlasting Hunt"] = 205626,
},
["METADATA"] = {
["Specs"] = {
["Havoc"] = 577,
["Vengeance"] = 581,
},
},
},
["DRUID"] = {
["Restoration_PVPTalents"] = {
["Dying Stars"] = 232546,
["Protector of the Grove"] = 209730,
["Protector of the Pack"] = 202043,
["Deep Roots"] = 233755,
["Master Shapeshifter"] = 236144,
["Roaring Speed"] = 236148,
["Toughness"] = 201259,
["Crescent Burn"] = 200567,
["Malorne's Swiftness"] = 236147,
["Charging Bash"] = 228431,
["Celestial Guardian"] = 233754,
["Adaptation"] = 214027,
["Sharpened Claws"] = 202110,
["Celestial Downpour"] = 200726,
["Ironfeather Armor"] = 233752,
["Moon and Stars"] = 233750,
["Moonkin Aura"] = 209740,
["Entangling Claws"] = 202226,
["Prickling Thorns"] = 200549,
["Relentless"] = 196029,
["Raging Frenzy"] = 236153,
["Den Mother"] = 236180,
["Clan Defender"] = 213951,
},
["Feral_Talents"] = {
["Moment of Clarity"] = 236068,
["Jagged Wounds"] = 202032,
["Blood Scent"] = 202022,
["Predator"] = 202021,
["Soul of the Forest"] = 158476,
["Balance Affinity"] = 197488,
["Bloodtalons"] = 155672,
["Guardian Affinity"] = 217615,
["Sabertooth"] = 202031,
["Restoration Affinity"] = 197492,
["Lunar Inspiration"] = 155580,
},
["Feral"] = {
["Travel Form"] = 159456,
["Omen of Clarity"] = 16864,
["Ferocious Bite"] = 231056,
["Tiger's Fury"] = 231055,
["Feline Swiftness"] = 131768,
["Primal Fury"] = 159286,
["Rake"] = 231052,
["Predatory Swiftness"] = 16974,
["Feral Instinct"] = 16949,
["Flight Form"] = 276029,
["Infected Wounds"] = 48484,
["Mastery: Razor Claws"] = 77493,
["Aquatic Form"] = 276012,
["Shred"] = 231057,
["Swipe"] = 231283,
},
["Feral_PVPTalents"] = {
["Dying Stars"] = 232546,
["Protector of the Grove"] = 209730,
["Protector of the Pack"] = 202043,
["Deep Roots"] = 233755,
["Master Shapeshifter"] = 236144,
["Roaring Speed"] = 236148,
["Toughness"] = 201259,
["Crescent Burn"] = 200567,
["Malorne's Swiftness"] = 236147,
["Charging Bash"] = 228431,
["Celestial Guardian"] = 233754,
["Adaptation"] = 214027,
["Sharpened Claws"] = 202110,
["Celestial Downpour"] = 200726,
["Ironfeather Armor"] = 233752,
["Moon and Stars"] = 233750,
["Moonkin Aura"] = 209740,
["Entangling Claws"] = 202226,
["Prickling Thorns"] = 200549,
["Relentless"] = 196029,
["Raging Frenzy"] = 236153,
["Den Mother"] = 236180,
["Clan Defender"] = 213951,
},
["Guardian_Talents"] = {
["Blood Frenzy"] = 203962,
["Restoration Affinity"] = 197492,
["Feral Affinity"] = 202155,
["Soul of the Forest"] = 158477,
["Balance Affinity"] = 197488,
["Rend and Tear"] = 204053,
["Galactic Guardian"] = 203964,
["Guardian of Elune"] = 155578,
["Earthwarden"] = 203974,
["Survival of the Fittest"] = 203965,
["Brambles"] = 203953,
},
["Balance_PVPTalents"] = {
["Dying Stars"] = 232546,
["Protector of the Grove"] = 209730,
["Protector of the Pack"] = 202043,
["Deep Roots"] = 233755,
["Master Shapeshifter"] = 236144,
["Roaring Speed"] = 236148,
["Toughness"] = 201259,
["Crescent Burn"] = 200567,
["Malorne's Swiftness"] = 236147,
["Charging Bash"] = 228431,
["Celestial Guardian"] = 233754,
["Adaptation"] = 214027,
["Sharpened Claws"] = 202110,
["Celestial Downpour"] = 200726,
["Ironfeather Armor"] = 233752,
["Moon and Stars"] = 233750,
["Moonkin Aura"] = 209740,
["Entangling Claws"] = 202226,
["Prickling Thorns"] = 200549,
["Relentless"] = 196029,
["Raging Frenzy"] = 236153,
["Den Mother"] = 236180,
["Clan Defender"] = 213951,
},
["Balance"] = {
["Mastery: Starlight"] = 77492,
["Moonkin Form"] = 231042,
["Eclipse"] = 279619,
["Astral Influence"] = 197524,
["Flight Form"] = 276029,
["Empowerments"] = 279708,
["Starsurge"] = 231021,
["Aquatic Form"] = 276012,
["Sunfire"] = 231050,
["Travel Form"] = 159456,
},
["Guardian"] = {
["Lightning Reflexes"] = 231065,
["Travel Form"] = 159456,
["Flight Form"] = 276029,
["Mastery: Nature's Guardian"] = 155783,
["Ysera's Gift"] = 145108,
["Aquatic Form"] = 276012,
["Ironfur"] = 231070,
["Thick Hide"] = 16931,
["Mangle"] = 231064,
["Bear Form"] = 270100,
["Gore"] = 210706,
["Frenzied Regeneration"] = 273048,
},
["Restoration_Talents"] = {
["Inner Peace"] = 197073,
["Photosynthesis"] = 274902,
["Spring Blossoms"] = 207385,
["Cultivation"] = 200390,
["Feral Affinity"] = 197490,
["Soul of the Forest"] = 158478,
["Abundance"] = 207383,
["Germination"] = 155675,
["Guardian Affinity"] = 197491,
["Balance Affinity"] = 197632,
["Prosperity"] = 200383,
["Stonebark"] = 197061,
},
["Guardian_PVPTalents"] = {
["Dying Stars"] = 232546,
["Protector of the Grove"] = 209730,
["Protector of the Pack"] = 202043,
["Deep Roots"] = 233755,
["Master Shapeshifter"] = 236144,
["Roaring Speed"] = 236148,
["Toughness"] = 201259,
["Crescent Burn"] = 200567,
["Malorne's Swiftness"] = 236147,
["Charging Bash"] = 228431,
["Celestial Guardian"] = 233754,
["Adaptation"] = 214027,
["Sharpened Claws"] = 202110,
["Celestial Downpour"] = 200726,
["Ironfeather Armor"] = 233752,
["Moon and Stars"] = 233750,
["Moonkin Aura"] = 209740,
["Entangling Claws"] = 202226,
["Prickling Thorns"] = 200549,
["Relentless"] = 196029,
["Raging Frenzy"] = 236153,
["Den Mother"] = 236180,
["Clan Defender"] = 213951,
},
["Balance_Talents"] = {
["Starlord"] = 202345,
["Restoration Affinity"] = 197492,
["Nature's Balance"] = 202430,
["Soul of the Forest"] = 114107,
["Shooting Stars"] = 202342,
["Guardian Affinity"] = 197491,
["Twin Moons"] = 279620,
["Stellar Drift"] = 202354,
["Feral Affinity"] = 202157,
},
["Restoration"] = {
["Ysera's Gift"] = 145108,
["Flight Form"] = 276029,
["Omen of Clarity"] = 113043,
["Rejuvenation"] = 231040,
["Aquatic Form"] = 276012,
["Sunfire"] = 231050,
["Mastery: Harmony"] = 77495,
["Travel Form"] = 159456,
},
["METADATA"] = {
["Specs"] = {
["Feral"] = 103,
["Balance"] = 102,
["Guardian"] = 104,
["Restoration"] = 105,
},
},
},
["HUNTER"] = {
["Beast Mastery_Talents"] = {
["Trailblazer"] = 199921,
["Stomp"] = 199530,
["One with the Pack"] = 199528,
["Animal Companion"] = 267116,
["Scent of Blood"] = 193532,
["Aspect of the Beast"] = 191384,
["Killer Instinct"] = 273887,
["Natural Mending"] = 270581,
["Posthaste"] = 109215,
["Venomous Bite"] = 257891,
["Born To Be Wild"] = 266921,
["Thrill of the Hunt"] = 257944,
["Killer Cobra"] = 199532,
},
["Marksmanship_Talents"] = {
["Streamline"] = 260367,
["Master Marksman"] = 260309,
["Careful Aim"] = 260228,
["Volley"] = 260243,
["Lock and Load"] = 194595,
["Natural Mending"] = 270581,
["Calling the Shots"] = 260404,
["Steady Focus"] = 193533,
["Lethal Shots"] = 260393,
["Born To Be Wild"] = 266921,
["Posthaste"] = 109215,
["Trailblazer"] = 199921,
},
["Marksmanship"] = {
["Disengage"] = 231549,
["Trick Shots"] = 257621,
["Lone Wolf"] = 155228,
["Exhilaration"] = 231546,
["Mastery: Sniper Training"] = 193468,
["Precise Shots"] = 260240,
},
["Pets"] = {
["Ferocity"] = {
["Avoidance"] = 65220,
["Predator's Thirst"] = 264663,
},
["Shale Spider"] = {
["Shimmering Shale"] = 279259,
},
["Bear"] = {
["Thick Fur"] = 263934,
},
["Tenacity"] = {
["Avoidance"] = 65220,
["Endurance Training"] = 264662,
},
["Gorilla"] = {
["Silverback"] = 263939,
},
["Cunning"] = {
["Avoidance"] = 65220,
["Pathfinding"] = 264656,
},
["Krolusk"] = {
["Calcified Carapace"] = 279254,
},
},
["Survival_PVPTalents"] = {
["The Beast Within"] = 212668,
["Relentless"] = 196029,
["Hunting Pack"] = 203235,
["Wild Protector"] = 204190,
["Survival Tactics"] = 202746,
["Adaptation"] = 214027,
["Dragonscale Armor"] = 202589,
},
["Marksmanship_PVPTalents"] = {
["The Beast Within"] = 212668,
["Relentless"] = 196029,
["Hunting Pack"] = 203235,
["Wild Protector"] = 204190,
["Survival Tactics"] = 202746,
["Adaptation"] = 214027,
["Dragonscale Armor"] = 202589,
},
["Survival"] = {
["Disengage"] = 231549,
["Harpoon"] = 231550,
["Exhilaration"] = 231546,
["Raptor Strike"] = 262839,
["Kill Command"] = 263186,
["Mastery: Spirit Bond"] = 263135,
},
["Survival_Talents"] = {
["Bloodseeker"] = 260248,
["Tip of the Spear"] = 260285,
["Terms of Engagement"] = 265895,
["Alpha Predator"] = 269737,
["Viper's Venom"] = 268501,
["Posthaste"] = 109215,
["Birds of Prey"] = 260331,
["Natural Mending"] = 270581,
["Hydra's Bite"] = 260241,
["Trailblazer"] = 199921,
["Born To Be Wild"] = 266921,
["Guerrilla Tactics"] = 264332,
["Wildfire Infusion"] = 271014,
},
["Beast Mastery_PVPTalents"] = {
["The Beast Within"] = 212668,
["Relentless"] = 196029,
["Hunting Pack"] = 203235,
["Wild Protector"] = 204190,
["Survival Tactics"] = 202746,
["Adaptation"] = 214027,
["Dragonscale Armor"] = 202589,
},
["Beast Mastery"] = {
["Kindred Spirits"] = 56315,
["Beast Cleave"] = 115939,
["Exotic Beasts"] = 53270,
["Wild Call"] = 185789,
["Mastery: Master of Beasts"] = 76657,
},
["METADATA"] = {
["Specs"] = {
["Marksmanship"] = 254,
["Beast Mastery"] = 253,
["Survival"] = 255,
},
},
},
["MAGE"] = {
["Fire_PVPTalents"] = {
["Torment the Weak"] = 198151,
["Prismatic Cloak"] = 198064,
["Rewind Time"] = 213220,
["Adaptation"] = 214027,
["Concentrated Coolness"] = 198148,
["Kleptomania"] = 198100,
["Dampened Magic"] = 236788,
["Burst of Cold"] = 206431,
["Frostbite"] = 198120,
["Master of Escape"] = 210476,
["Arcane Empowerment"] = 276741,
["Relentless"] = 196029,
["Netherwind Armor"] = 198062,
["Deep Shatter"] = 198123,
["Chilled to the Bone"] = 198126,
},
["Frost_Talents"] = {
["Frigid Winds"] = 235224,
["Chain Reaction"] = 278309,
["Splitting Ice"] = 56377,
["Frozen Touch"] = 205030,
["Lonely Winter"] = 205024,
["Thermal Void"] = 155149,
["Incanter's Flow"] = 1463,
["Glacial Insulation"] = 235297,
["Bone Chilling"] = 205027,
["Ice Ward"] = 205036,
["Freezing Rain"] = 270233,
},
["Pets"] = {
["Water Elemental"] = {
["Avoidance"] = 65220,
},
},
["Arcane_Talents"] = {
["Rule of Threes"] = 264354,
["Mana Shield"] = 235463,
["Chrono Shift"] = 235711,
["Reverberate"] = 281482,
["Time Anomaly"] = 210805,
["Touch of the Magi"] = 210725,
["Overpowered"] = 155147,
["Slipstream"] = 236457,
["Amplification"] = 236628,
["Incanter's Flow"] = 1463,
["Ice Ward"] = 205036,
["Resonance"] = 205028,
},
["Frost"] = {
},
["Frost_PVPTalents"] = {
["Torment the Weak"] = 198151,
["Prismatic Cloak"] = 198064,
["Rewind Time"] = 213220,
["Adaptation"] = 214027,
["Concentrated Coolness"] = 198148,
["Kleptomania"] = 198100,
["Dampened Magic"] = 236788,
["Burst of Cold"] = 206431,
["Frostbite"] = 198120,
["Master of Escape"] = 210476,
["Arcane Empowerment"] = 276741,
["Relentless"] = 196029,
["Netherwind Armor"] = 198062,
["Deep Shatter"] = 198123,
["Chilled to the Bone"] = 198126,
},
["Arcane"] = {
["Evocation"] = 231565,
["Arcane Barrage"] = 231564,
},
["Arcane_PVPTalents"] = {
["Torment the Weak"] = 198151,
["Prismatic Cloak"] = 198064,
["Rewind Time"] = 213220,
["Adaptation"] = 214027,
["Concentrated Coolness"] = 198148,
["Kleptomania"] = 198100,
["Dampened Magic"] = 236788,
["Burst of Cold"] = 206431,
["Frostbite"] = 198120,
["Master of Escape"] = 210476,
["Arcane Empowerment"] = 276741,
["Relentless"] = 196029,
["Netherwind Armor"] = 198062,
["Deep Shatter"] = 198123,
["Chilled to the Bone"] = 198126,
},
["Fire"] = {
["Enhanced Pyrotechnics"] = 157642,
["Critical Mass"] = 231630,
["Cauterize"] = 86949,
["Fire Blast"] = 231567,
},
["Fire_Talents"] = {
["Blazing Soul"] = 235365,
["Incanter's Flow"] = 1463,
["Conflagration"] = 205023,
["Pyromaniac"] = 205020,
["Firestarter"] = 205026,
["Pyroclasm"] = 269650,
["Alexstrasza's Fury"] = 235870,
["Frenetic Speed"] = 236058,
["Flame Patch"] = 205037,
["Kindling"] = 155148,
["Flame On"] = 205029,
["Ice Ward"] = 205036,
["Searing Touch"] = 269644,
},
["METADATA"] = {
["Specs"] = {
["Fire"] = 63,
["Frost"] = 64,
["Arcane"] = 62,
},
},
},
["MONK"] = {
["Windwalker_Talents"] = {
["Celerity"] = 115173,
["Tiger Tail Sweep"] = 264348,
["Ascension"] = 115396,
["Good Karma"] = 280195,
["Eye of the Tiger"] = 196607,
["Spiritual Focus"] = 280197,
["Inner Strength"] = 261767,
["Hit Combo"] = 196740,
},
["Mistweaver_Talents"] = {
["Celerity"] = 115173,
["Focused Thunder"] = 197895,
["Mist Wrap"] = 197900,
["Tiger Tail Sweep"] = 264348,
["Rising Mist"] = 274909,
["Upwelling"] = 274963,
["Lifecycles"] = 197915,
["Spirit of the Crane"] = 210802,
},
["Mistweaver"] = {
["Thunder Focus Tea"] = 231876,
["Vivify"] = 274586,
["Renewing Mist"] = 281231,
["Teachings of the Monastery"] = 116645,
["Mastery: Gust of Mists"] = 117907,
["Enveloping Mist"] = 231605,
["Rising Sun Kick"] = 262840,
["Mystic Touch"] = 8647,
["Essence Font"] = 231633,
},
["Brewmaster"] = {
["Stagger"] = 115069,
["Mastery: Elusive Brawler"] = 117906,
["Brewmaster's Balance"] = 245013,
["Mystic Touch"] = 8647,
["Vivify"] = 231602,
["Gift of the Ox"] = 124502,
["Celestial Fortune"] = 216519,
},
["Windwalker"] = {
["Storm, Earth, and Fire"] = 231627,
["Windwalking"] = 157411,
["Blackout Kick"] = 261917,
["Vivify"] = 231602,
["Mastery: Combo Strikes"] = 115636,
["Rising Sun Kick"] = 262840,
["Afterlife"] = 116092,
["Mystic Touch"] = 8647,
},
["Mistweaver_PVPTalents"] = {
["Control the Mists"] = 233765,
["Adaptation"] = 214027,
["Disabling Reach"] = 201769,
["Heavy-Handed Strikes"] = 232054,
["Ride the Wind"] = 201372,
["Eminence"] = 216255,
["Relentless"] = 196029,
["Fast Feet"] = 201201,
["Tiger Style"] = 206743,
["Yu'lon's Gift"] = 232879,
},
["Windwalker_PVPTalents"] = {
["Control the Mists"] = 233765,
["Adaptation"] = 214027,
["Disabling Reach"] = 201769,
["Heavy-Handed Strikes"] = 232054,
["Ride the Wind"] = 201372,
["Eminence"] = 216255,
["Relentless"] = 196029,
["Fast Feet"] = 201201,
["Tiger Style"] = 206743,
["Yu'lon's Gift"] = 232879,
},
["Brewmaster_Talents"] = {
["Special Delivery"] = 196730,
["Eye of the Tiger"] = 196607,
["Celerity"] = 115173,
["Blackout Combo"] = 196736,
["Spitfire"] = 242580,
["Tiger Tail Sweep"] = 264348,
["Bob and Weave"] = 280515,
["High Tolerance"] = 196737,
["Light Brewing"] = 196721,
},
["Brewmaster_PVPTalents"] = {
["Control the Mists"] = 233765,
["Adaptation"] = 214027,
["Disabling Reach"] = 201769,
["Heavy-Handed Strikes"] = 232054,
["Ride the Wind"] = 201372,
["Eminence"] = 216255,
["Relentless"] = 196029,
["Fast Feet"] = 201201,
["Tiger Style"] = 206743,
["Yu'lon's Gift"] = 232879,
},
["METADATA"] = {
["Specs"] = {
["Mistweaver"] = 270,
["Brewmaster"] = 268,
["Windwalker"] = 269,
},
},
},
["PALADIN"] = {
["Protection"] = {
["Heart of the Crusader"] = 32223,
["Judgment"] = 231657,
["Grand Crusader"] = 85043,
["Mastery: Divine Bulwark"] = 76671,
["Avenger's Shield"] = 231665,
},
["Holy"] = {
["Mastery: Lightbringer"] = 183997,
["Infusion of Light"] = 53576,
["Blessing of Sacrifice"] = 200327,
["Heart of the Crusader"] = 32223,
["Judgment"] = 231644,
["Crusader Strike"] = 231667,
["Beacon of Light"] = 231642,
["Holy Shock"] = 272906,
},
["Protection_PVPTalents"] = {
["Luminescence"] = 199428,
["Holy Ritual"] = 199422,
["Adaptation"] = 214027,
["Jurisdiction"] = 204979,
["Lawbringer"] = 246806,
["Vengeance Aura"] = 210323,
["Unbound Freedom"] = 199325,
["Relentless"] = 196029,
["Seraphim's Blessing"] = 204927,
["Divine Punisher"] = 204914,
["Law and Order"] = 204934,
},
["Holy_Talents"] = {
["Devotion Aura"] = 183425,
["Divine Purpose"] = 197646,
["Judgment of Light"] = 183778,
["Aura of Sacrifice"] = 183416,
["Aura of Mercy"] = 183415,
["Fist of Justice"] = 198054,
["Cavalier"] = 230332,
["Crusader's Might"] = 196926,
["Awakening"] = 248033,
["Unbreakable Spirit"] = 114154,
["Sanctified Wrath"] = 53376,
},
["Holy_PVPTalents"] = {
["Luminescence"] = 199428,
["Holy Ritual"] = 199422,
["Adaptation"] = 214027,
["Jurisdiction"] = 204979,
["Lawbringer"] = 246806,
["Vengeance Aura"] = 210323,
["Unbound Freedom"] = 199325,
["Relentless"] = 196029,
["Seraphim's Blessing"] = 204927,
["Divine Punisher"] = 204914,
["Law and Order"] = 204934,
},
["Retribution_Talents"] = {
["Divine Judgment"] = 271580,
["Fires of Justice"] = 203316,
["Selfless Healer"] = 85804,
["Fist of Justice"] = 234299,
["Righteous Verdict"] = 267610,
["Unbreakable Spirit"] = 114154,
["Divine Purpose"] = 223817,
["Cavalier"] = 230332,
["Blade of Wrath"] = 231832,
["Zeal"] = 269569,
},
["Retribution_PVPTalents"] = {
["Luminescence"] = 199428,
["Holy Ritual"] = 199422,
["Adaptation"] = 214027,
["Jurisdiction"] = 204979,
["Lawbringer"] = 246806,
["Vengeance Aura"] = 210323,
["Unbound Freedom"] = 199325,
["Relentless"] = 196029,
["Seraphim's Blessing"] = 204927,
["Divine Punisher"] = 204914,
["Law and Order"] = 204934,
},
["Protection_Talents"] = {
["Crusader's Judgment"] = 204023,
["Consecrated Ground"] = 204054,
["Retribution Aura"] = 203797,
["Redoubt"] = 280373,
["Judgment of Light"] = 183778,
["Fist of Justice"] = 198054,
["Last Defender"] = 203791,
["Final Stand"] = 204077,
["Unbreakable Spirit"] = 114154,
["Holy Shield"] = 152261,
["Cavalier"] = 230332,
["Righteous Protector"] = 204074,
["First Avenger"] = 203776,
},
["Retribution"] = {
["Mastery: Hand of Light"] = 267316,
["Art of War"] = 267344,
["Retribution"] = 183435,
["Heart of the Crusader"] = 32223,
},
["METADATA"] = {
["Specs"] = {
["Protection"] = 66,
["Holy"] = 65,
["Retribution"] = 70,
},
},
},
["PRIEST"] = {
["Shadow"] = {
["Mastery: Madness"] = 77486,
["Void Bolt"] = 228266,
["Shadowy Apparitions"] = 78203,
["Voidform"] = 228264,
},
["Shadow_PVPTalents"] = {
["Purified Resolve"] = 196439,
["Adaptation"] = 214027,
["Ultimate Radiance"] = 236499,
["Searing Light"] = 215768,
["Strength of Soul"] = 197535,
["Relentless"] = 196029,
["Purification"] = 196162,
["Dome of Light"] = 197590,
["Trinity"] = 214205,
},
["Holy_Talents"] = {
["Enduring Renewal"] = 200153,
["Enlightenment"] = 193155,
["Cosmic Ripple"] = 238136,
["Afterlife"] = 196707,
["Surge of Light"] = 109186,
["Guardian Angel"] = 200209,
["Censure"] = 200199,
["Perseverance"] = 235189,
["Psychic Voice"] = 196704,
["Benediction"] = 193157,
["Light of the Naaru"] = 196985,
["Trail of Light"] = 200128,
["Angel's Mercy"] = 238100,
},
["Holy_PVPTalents"] = {
["Purified Resolve"] = 196439,
["Adaptation"] = 214027,
["Ultimate Radiance"] = 236499,
["Searing Light"] = 215768,
["Strength of Soul"] = 197535,
["Relentless"] = 196029,
["Purification"] = 196162,
["Dome of Light"] = 197590,
["Trinity"] = 214205,
},
["Shadow_Talents"] = {
["Misery"] = 238558,
["Mania"] = 193173,
["Fortress of the Mind"] = 193195,
["Body and Soul"] = 64129,
["Auspicious Spirits"] = 155271,
["Last Word"] = 263716,
["Shadowy Insight"] = 162452,
["Legacy of the Void"] = 193225,
["San'layn"] = 199855,
["Twist of Fate"] = 109142,
["Lingering Insanity"] = 199849,
},
["Discipline"] = {
["Mastery: Grace"] = 271534,
["Focused Will"] = 45243,
["Smite"] = 231682,
["Power of the Dark Side"] = 198068,
["Atonement"] = 81749,
},
["Discipline_PVPTalents"] = {
["Purified Resolve"] = 196439,
["Adaptation"] = 214027,
["Ultimate Radiance"] = 236499,
["Searing Light"] = 215768,
["Strength of Soul"] = 197535,
["Relentless"] = 196029,
["Purification"] = 196162,
["Dome of Light"] = 197590,
["Trinity"] = 214205,
},
["Holy"] = {
["Holy Fire"] = 231687,
["Focused Will"] = 45243,
["Smite"] = 262861,
["Spirit of Redemption"] = 20711,
["Mastery: Echo of Light"] = 77485,
["Holy Words"] = 63733,
},
["Discipline_Talents"] = {
["Lenience"] = 238063,
["Psychic Voice"] = 196704,
["Twist of Fate"] = 265259,
["Castigation"] = 193134,
["Body and Soul"] = 64129,
["Dominant Mind"] = 205367,
["Sins of the Many"] = 280391,
["Contrition"] = 197419,
["Shield Discipline"] = 197045,
["Masochism"] = 193063,
},
["METADATA"] = {
["Specs"] = {
["Discipline"] = 256,
["Shadow"] = 258,
["Holy"] = 257,
},
},
},
["ROGUE"] = {
["Subtlety_PVPTalents"] = {
["System Shock"] = 198145,
["Deadly Brew"] = 197044,
["Adaptation"] = 214027,
["Creeping Venom"] = 198092,
["Flying Daggers"] = 198128,
["Mind-Numbing Poison"] = 197050,
["Relentless"] = 196029,
["Intent to Kill"] = 197007,
["Honor Among Thieves"] = 198032,
["Maneuverability"] = 197000,
},
["Assassination_PVPTalents"] = {
["System Shock"] = 198145,
["Deadly Brew"] = 197044,
["Adaptation"] = 214027,
["Creeping Venom"] = 198092,
["Flying Daggers"] = 198128,
["Mind-Numbing Poison"] = 197050,
["Relentless"] = 196029,
["Intent to Kill"] = 197007,
["Honor Among Thieves"] = 198032,
["Maneuverability"] = 197000,
},
["Assassination"] = {
["Sprint"] = 231691,
["Mastery: Potent Assassin"] = 76803,
["Venomous Wounds"] = 79134,
["Fleet Footed"] = 31209,
["Garrote"] = 231719,
["Seal Fate"] = 14190,
},
["Assassination_Talents"] = {
["Iron Wire"] = 196861,
["Subterfuge"] = 108208,
["Venom Rush"] = 152152,
["Poison Bomb"] = 255544,
["Elusiveness"] = 79008,
["Master Assassin"] = 255989,
["Deeper Stratagem"] = 193531,
["Internal Bleeding"] = 154904,
["Leeching Poison"] = 280716,
["Prey on the Weak"] = 131511,
["Master Poisoner"] = 196864,
["Cheat Death"] = 31230,
["Nightstalker"] = 14062,
["Hidden Blades"] = 270061,
["Elaborate Planning"] = 193640,
["Vigor"] = 14983,
},
["Subtlety"] = {
["Sprint"] = 245751,
["Shadow's Grasp"] = 277950,
["Eviscerate"] = 231716,
["Shuriken Combo"] = 245639,
["Mastery: Executioner"] = 76808,
["Shadowstrike"] = 231718,
["Relentless Strikes"] = 58423,
["Fleet Footed"] = 31209,
["Shadow Techniques"] = 196912,
["Deepening Shadows"] = 185314,
},
["Outlaw_PVPTalents"] = {
["System Shock"] = 198145,
["Deadly Brew"] = 197044,
["Adaptation"] = 214027,
["Creeping Venom"] = 198092,
["Flying Daggers"] = 198128,
["Mind-Numbing Poison"] = 197050,
["Relentless"] = 196029,
["Intent to Kill"] = 197007,
["Honor Among Thieves"] = 198032,
["Maneuverability"] = 197000,
},
["Outlaw_Talents"] = {
["Loaded Dice"] = 256170,
["Cheat Death"] = 31230,
["Deeper Stratagem"] = 193531,
["Quick Draw"] = 196938,
["Retractable Hook"] = 256188,
["Alacrity"] = 193539,
["Hit and Run"] = 196922,
["Blinding Powder"] = 256165,
["Vigor"] = 14983,
["Prey on the Weak"] = 131511,
["Acrobatic Strikes"] = 196924,
["Iron Stomach"] = 193546,
["Dirty Tricks"] = 108216,
["Elusiveness"] = 79008,
["Dancing Steel"] = 272026,
["Weaponmaster"] = 200733,
},
["Outlaw"] = {
["Ruthlessness"] = 14161,
["Mastery: Main Gauche"] = 76806,
["Combat Potency"] = 61329,
["Between the Eyes"] = 235484,
["Sprint"] = 231691,
["Fleet Footed"] = 31209,
["Sinister Strike"] = 279876,
["Restless Blades"] = 79096,
},
["Subtlety_Talents"] = {
["Shadow Focus"] = 108209,
["Cheat Death"] = 31230,
["Soothing Darkness"] = 200759,
["Night Terrors"] = 277953,
["Dark Shadow"] = 245687,
["Enveloping Shadows"] = 238104,
["Shot in the Dark"] = 257505,
["Elusiveness"] = 79008,
["Subterfuge"] = 108208,
["Deeper Stratagem"] = 193531,
["Vigor"] = 14983,
["Prey on the Weak"] = 131511,
["Master of Shadows"] = 196976,
["Nightstalker"] = 14062,
["Alacrity"] = 193539,
["Find Weakness"] = 91023,
["Weaponmaster"] = 193537,
},
["METADATA"] = {
["Specs"] = {
["Outlaw"] = 260,
["Subtlety"] = 261,
["Assassination"] = 259,
},
},
},
["SHAMAN"] = {
["Restoration_PVPTalents"] = {
["Traveling Storms"] = 204403,
["Purifying Waters"] = 204247,
["Static Cling"] = 211062,
["Voodoo Mastery"] = 204268,
["Ride the Lightning"] = 204357,
["Swelling Waves"] = 204264,
["Rippling Waters"] = 204269,
["Adaptation"] = 214027,
["Earthfury"] = 204398,
["Tidebringer"] = 236501,
["Shamanism"] = 193876,
["Calming Waters"] = 221678,
["Electrocute"] = 206642,
["Forked Lightning"] = 204349,
["Relentless"] = 196029,
["Spectral Recovery"] = 204261,
["Elemental Attunement"] = 204385,
["Control of Lava"] = 204393,
},
["Elemental"] = {
["Lava Surge"] = 77756,
["Lava Burst"] = 231721,
["Elemental Fury"] = 60188,
["Mastery: Elemental Overload"] = 280609,
["Chain Lightning"] = 231722,
["Reincarnation"] = 20608,
},
["Enhancement"] = {
["Windfury"] = 33757,
["Reincarnation"] = 20608,
["Healing Surge"] = 190899,
["Feral Spirit"] = 231723,
["Stormbringer"] = 201845,
["Mastery: Enhanced Elements"] = 77223,
["Maelstrom Weapon"] = 187880,
},
["Enhancement_PVPTalents"] = {
["Traveling Storms"] = 204403,
["Purifying Waters"] = 204247,
["Static Cling"] = 211062,
["Voodoo Mastery"] = 204268,
["Ride the Lightning"] = 204357,
["Swelling Waves"] = 204264,
["Rippling Waters"] = 204269,
["Adaptation"] = 214027,
["Earthfury"] = 204398,
["Tidebringer"] = 236501,
["Shamanism"] = 193876,
["Calming Waters"] = 221678,
["Electrocute"] = 206642,
["Forked Lightning"] = 204349,
["Relentless"] = 196029,
["Spectral Recovery"] = 204261,
["Elemental Attunement"] = 204385,
["Control of Lava"] = 204393,
},
["METADATA"] = {
["Specs"] = {
["Enhancement"] = 263,
["Elemental"] = 262,
["Restoration"] = 264,
},
},
["Elemental_PVPTalents"] = {
["Traveling Storms"] = 204403,
["Purifying Waters"] = 204247,
["Static Cling"] = 211062,
["Voodoo Mastery"] = 204268,
["Ride the Lightning"] = 204357,
["Swelling Waves"] = 204264,
["Rippling Waters"] = 204269,
["Adaptation"] = 214027,
["Earthfury"] = 204398,
["Tidebringer"] = 236501,
["Shamanism"] = 193876,
["Calming Waters"] = 221678,
["Electrocute"] = 206642,
["Forked Lightning"] = 204349,
["Relentless"] = 196029,
["Spectral Recovery"] = 204261,
["Elemental Attunement"] = 204385,
["Control of Lava"] = 204393,
},
["Elemental_Talents"] = {
["Exposed Elements"] = 260694,
["Earthen Rage"] = 170374,
["Spirit Wolf"] = 260878,
["Static Charge"] = 265046,
["Echo of the Elements"] = 108283,
["Aftershock"] = 273221,
["Nature's Guardian"] = 30884,
["Unlimited Power"] = 260895,
["Master of the Elements"] = 16166,
["High Voltage"] = 260890,
["Primal Elementalist"] = 117013,
},
["Restoration_Talents"] = {
["High Tide"] = 157154,
["Graceful Spirit"] = 192088,
["Nature's Guardian"] = 30884,
["Torrent"] = 200072,
["Deluge"] = 200076,
["Spirit Wolf"] = 260878,
["Undulation"] = 200071,
["Static Charge"] = 265046,
["Echo of the Elements"] = 108283,
["Flash Flood"] = 280614,
["Ancestral Vigor"] = 207401,
},
["Restoration"] = {
["Lava Surge"] = 77756,
["Lava Burst"] = 231721,
["Resurgence"] = 16196,
["Chain Heal"] = 231780,
["Mastery: Deep Healing"] = 77226,
["Riptide"] = 231725,
["Tidal Waves"] = 231785,
["Reincarnation"] = 20608,
},
["Enhancement_Talents"] = {
["Forceful Winds"] = 262647,
["Hailstorm"] = 210853,
["Elemental Spirits"] = 262624,
["Spirit Wolf"] = 260878,
["Hot Hand"] = 201900,
["Searing Assault"] = 192087,
["Landslide"] = 197992,
["Boulderfist"] = 246035,
["Static Charge"] = 265046,
["Overcharge"] = 210727,
["Nature's Guardian"] = 30884,
["Crashing Storm"] = 192246,
},
},
["WARLOCK"] = {
["Destruction_Talents"] = {
["Eradication"] = 196412,
["Flashover"] = 267115,
["Internal Combustion"] = 266134,
["Reverse Entropy"] = 205148,
["Fire and Brimstone"] = 196408,
["Roaring Blaze"] = 205184,
["Soul Conduit"] = 215941,
["Inferno"] = 270545,
["Darkfury"] = 264874,
["Grimoire of Supremacy"] = 266086,
["Demon Skin"] = 219272,
},
["Affliction"] = {
["Agony"] = 231792,
["Soul Leech"] = 108370,
["Soul Shards"] = 246985,
["Soulstone"] = 231811,
["Unstable Affliction"] = 231791,
["Mastery: Potent Afflictions"] = 77215,
},
["Affliction_Talents"] = {
["Sow the Seeds"] = 196226,
["Absolute Corruption"] = 196103,
["Creeping Death"] = 264000,
["Nightfall"] = 108558,
["Soul Conduit"] = 215941,
["Shadow Embrace"] = 32388,
["Writhe in Agony"] = 196102,
["Darkfury"] = 264874,
["Demon Skin"] = 219272,
},
["Pets"] = {
["Voidlord"] = {
["Avoidance"] = 32233,
["Void Reflexes"] = 117225,
},
["Voidwalker"] = {
["Avoidance"] = 32233,
["Shadow Shield"] = 264993,
},
["Shivarra"] = {
["Avoidance"] = 32233,
},
["Observer"] = {
["Avoidance"] = 32233,
},
["Wrathguard"] = {
["Avoidance"] = 32233,
["Void Reflexes"] = 117225,
},
["Succubus"] = {
["Avoidance"] = 32233,
},
["Imp"] = {
["Avoidance"] = 32233,
},
["Felhunter"] = {
["Avoidance"] = 32233,
},
["Fel Imp"] = {
["Avoidance"] = 32233,
},
["Felguard"] = {
["Avoidance"] = 32233,
["Void Reflexes"] = 117225,
},
},
["Demonology_Talents"] = {
["From the Shadows"] = 267170,
["Sacrificed Souls"] = 267214,
["Demonic Calling"] = 205145,
["Demonic Consumption"] = 267215,
["Soul Conduit"] = 215941,
["Dreadlash"] = 264078,
["Darkfury"] = 264874,
["Inner Demons"] = 267216,
["Demon Skin"] = 219272,
},
["Destruction"] = {
["Mastery: Chaotic Energies"] = 77220,
["Soul Leech"] = 108370,
["Soul Shards"] = 246985,
["Soulstone"] = 231811,
["Conflagrate"] = 231793,
["Backdraft"] = 196406,
},
["Demonology_PVPTalents"] = {
["Pleasure through Pain"] = 212618,
["Master Summoner"] = 212628,
["Relentless"] = 196029,
["Adaptation"] = 214027,
["Essence Drain"] = 221711,
},
["Demonology"] = {
["Demonic Core"] = 267102,
["Soul Leech"] = 108370,
["Soul Shards"] = 246985,
["Mastery: Master Demonologist"] = 77219,
["Soul Link"] = 108415,
},
["Destruction_PVPTalents"] = {
["Pleasure through Pain"] = 212618,
["Master Summoner"] = 212628,
["Relentless"] = 196029,
["Adaptation"] = 214027,
["Essence Drain"] = 221711,
},
["Affliction_PVPTalents"] = {
["Pleasure through Pain"] = 212618,
["Master Summoner"] = 212628,
["Relentless"] = 196029,
["Adaptation"] = 214027,
["Essence Drain"] = 221711,
},
["METADATA"] = {
["Specs"] = {
["Demonology"] = 266,
["Affliction"] = 265,
["Destruction"] = 267,
},
},
},
["WARRIOR"] = {
["Protection"] = {
["Shield Slam"] = 231834,
["Mastery: Critical Block"] = 76857,
["Shield Block"] = 231847,
["Deep Wounds"] = 115768,
["Vanguard"] = 71,
},
["Arms_Talents"] = {
["Bounding Stride"] = 202163,
["Double Time"] = 103827,
["Fervor of Battle"] = 202316,
["Collateral Damage"] = 268243,
["Sudden Death"] = 29725,
["Second Wind"] = 29838,
["Massacre"] = 281001,
["War Machine"] = 262231,
["Dreadnaught"] = 262150,
["Anger Management"] = 152278,
["In For The Kill"] = 248621,
},
["Fury"] = {
["Mastery: Unshackled Fury"] = 76856,
["Titan's Grip"] = 46917,
["Enrage"] = 184361,
},
["Fury_Talents"] = {
["Furious Charge"] = 202224,
["Endless Rage"] = 202296,
["Warpaint"] = 208154,
["Bounding Stride"] = 202163,
["Inner Rage"] = 215573,
["Double Time"] = 103827,
["Meat Cleaver"] = 280392,
["Massacre"] = 206315,
["Carnage"] = 202922,
["Reckless Abandon"] = 202751,
["Sudden Death"] = 280721,
["War Machine"] = 262231,
["Fresh Meat"] = 215568,
["Anger Management"] = 152278,
["Frothing Berserker"] = 215571,
},
["Protection_PVPTalents"] = {
["Slaughterhouse"] = 280747,
["Adaptation"] = 214027,
["Enduring Rage"] = 198877,
["Death Sentence"] = 198500,
["Battle Trance"] = 213857,
["Thirst for Battle"] = 199202,
["Master and Commander"] = 235941,
["Relentless"] = 196029,
["Barbarian"] = 280745,
},
["Fury_PVPTalents"] = {
["Slaughterhouse"] = 280747,
["Adaptation"] = 214027,
["Enduring Rage"] = 198877,
["Death Sentence"] = 198500,
["Battle Trance"] = 213857,
["Thirst for Battle"] = 199202,
["Master and Commander"] = 235941,
["Relentless"] = 196029,
["Barbarian"] = 280745,
},
["Arms_PVPTalents"] = {
["Slaughterhouse"] = 280747,
["Adaptation"] = 214027,
["Enduring Rage"] = 198877,
["Death Sentence"] = 198500,
["Battle Trance"] = 213857,
["Thirst for Battle"] = 199202,
["Master and Commander"] = 235941,
["Relentless"] = 196029,
["Barbarian"] = 280745,
},
["Arms"] = {
["Execute"] = 231830,
["Mastery: Deep Wounds"] = 262111,
["Seasoned Soldier"] = 279423,
["Tactician"] = 184783,
},
["Protection_Talents"] = {
["Vengeance"] = 202572,
["Menace"] = 275338,
["Rumbling Earth"] = 275339,
["Bolster"] = 280001,
["Devastator"] = 236279,
["Booming Voice"] = 202743,
["Safeguard"] = 223657,
["Punish"] = 275334,
["Bounding Stride"] = 202163,
["Heavy Repercussions"] = 203177,
["Unstoppable Force"] = 275336,
["Indomitable"] = 202095,
["Crackling Thunder"] = 203201,
["Into the Fray"] = 202603,
["Never Surrender"] = 202561,
["Anger Management"] = 152278,
["Best Served Cold"] = 202560,
},
["METADATA"] = {
["Specs"] = {
["Fury"] = 72,
["Protection"] = 73,
["Arms"] = 71,
},
},
},
};
 
 
-- Helper functions: Default lookup priorities, etc --
------------------------------------------------------
 
LibSN2SIDP.libLocal = {};
LibSN2SIDP.libLocal.playerUniversalClassName = ""; -- Player only, gathered upon PLAYER_LOGIN
LibSN2SIDP.libLocal.playerUniversalRaceName = ""; -- Player only, gathered upon PLAYER_LOGIN
LibSN2SIDP.libLocal.petFamily = "";
 
-- Currently no need for this functionality here, as it is only applicable to some ACTIVE spells
--[[
LibSN2SIDP.libLocal.FactionSpells = {};
LibSN2SIDP.SetFaction = function(faction)
end
LibSN2SIDP.libLocal.SetDefaultFaction = function()
end
]]--
 
LibSN2SIDP.libLocal.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 LibSN2SIDP.libLocal.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
 
LibSN2SIDP.libLocal.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 LibSN2SIDP.libLocal.GetEnglishSpecialisationName(activeSpecID, LibSN2SIDP.libLocal.playerUniversalClassName), activeSpecID;
else
return nil, nil, nil; -- Player does not have an active specialisation
end
end
 
LibSN2SIDP.libLocal.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. Active spec PvP Talents' spells;
-- 1.4. Flyouts (if there are spells for);
-- 1.5. Pets (if there are spells for);
-- 1.5.1. Current pet specialization (if there is one) spells; NOT properly working, pet family
-- 1.5.2. Current pet fmaily (if there is one) spells; gets bumped up above pet specicalization
-- 1.6. Other specs' baseline spells;
-- 1.7. Other specs' Talents' spells;
-- 1.8. Other specs' PvP Talents' spells;
-- 2nd: GeneralTab;
-- 3rd: Other classes:
-- 3.1. Each spec baseline spells;
-- 3.2. Each spec Talents' spells;
-- 3.3. Each spec PvP Talents' spells;
-- 3.4. Flyouts (if there are spells for);
-- 3.5. Pets (if there are spells for).
 
LibSN2SIDP.libLocal.setCurrentPetFirstInLookupOrder = function()
local classKey = LibSN2SIDP.libLocal.playerUniversalClassName;
if LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets then
wipe(LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets);
else
local index = (LibSN2SIDP.DB[classKey].Flyouts and 5) or 4;
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], index, "Pets");
LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets = {};
end
local petSpecName;
if classKey == "HUNTER" then
local petSpecIndex = (GetSpecialization(false, true));
petSpecName = (petSpecIndex == 1 and "Ferocity") or (petSpecIndex == 2 and
"Tenacity") or (petSpecIndex == 3 and "Cunning") or nil;
-- print(tostring(petSpecIndex).. " : ".. tostring(petSpecName));
end
local petKey = (next(LibSN2SIDP.DB[classKey].Pets, nil));
while petKey do
if petSpecName and petKey == petSpecName then
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets, 1, petKey);
elseif petFamily and petKey == petFamily then
local index = (petSpecName and LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets[petSpecName] and 2) or 1;
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets, index, petKey);
else
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets, petKey);
end
petKey = (next(LibSN2SIDP.DB[classKey].Pets, petKey));
end
end
 
LibSN2SIDP.libLocal.SetLookupOrder = function()
-- LibSN2SIDP.libLocal.LookupOrder_table = {}; -- Reset the table
wipe(LibSN2SIDP.libLocal.LookupOrder_table); -- Reset the table
local classOrderIndex = 1;
local classKey = (next(LibSN2SIDP.DB, nil));
-- print(tostring(classKey));
while classKey do
if classKey == LibSN2SIDP.libLocal.playerUniversalClassName then -- Current player class
tinsert(LibSN2SIDP.libLocal.LookupOrder_table, 1, classKey);
LibSN2SIDP.libLocal.LookupOrder_table[classKey] = {};
-- print(tostring(LibSN2SIDP.libLocal.LookupOrder_table[1]));
-- Order specs et al
local playerActiveEnglishSpecName = (LibSN2SIDP.libLocal.GetActiveEnglishSpecialisationName());
-- print("Active SpecName = ".. tostring(playerActiveEnglishSpecName));
local specKey = (next(LibSN2SIDP.DB[classKey].METADATA.Specs, nil));
while specKey do
if specKey == playerActiveEnglishSpecName then
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], 1, specKey);
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], 2, specKey.."_Talents");
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], 3, specKey.."_PVPTalents");
-- print(tostring(LibSN2SIDP.libLocal.LookupOrder_table[classKey][1]).. " *");
-- elseif LibSN2SIDP.DB[classKey].METADATA.Specs[specKey] then
else
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], specKey);
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], specKey.."_Talents");
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], specKey.."_PVPTalents");
end
specKey = (next(LibSN2SIDP.DB[classKey].METADATA.Specs, specKey));
end
if LibSN2SIDP.DB[classKey].Flyouts then
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], 4, "Flyouts");
LibSN2SIDP.libLocal.LookupOrder_table[classKey].Flyouts = {};
local flyoutButtonKey = (next(LibSN2SIDP.libLocal.LibSN2SIDP.DB[classKey].Flyouts, nil));
while flyoutButtonKey do
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey].Flyouts, flyoutButtonKey);
flyoutButtonKey = (next(LibSN2SIDP.libLocal.LibSN2SIDP.DB[classKey].Flyouts, flyoutButtonKey));
end
end
if LibSN2SIDP.DB[classKey].Pets then
LibSN2SIDP.libLocal.setCurrentPetFirstInLookupOrder();
end
elseif classKey ~= "General" then -- Other classes
tinsert(LibSN2SIDP.libLocal.LookupOrder_table, classKey);
-- print(tostring(LibSN2SIDP.libLocal.LookupOrder_table[classOrderIndex]));
LibSN2SIDP.libLocal.LookupOrder_table[classKey] = {};
local specKey = (next(LibSN2SIDP.DB[classKey].METADATA.Specs, nil));
while specKey do
-- local numSpecSubTables = 3; -- Unless we also have Flyouts, making it 4 or more
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], specKey);
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], specKey.."_Talents");
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], specKey.."_PVPTalents");
specKey = (next(LibSN2SIDP.DB[classKey].METADATA.Specs, specKey));
end
if LibSN2SIDP.DB[classKey].Flyouts then
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], "Flyouts");
LibSN2SIDP.libLocal.LookupOrder_table[classKey].Flyouts = {};
local flyoutButtonKey = (next(LibSN2SIDP.DB[classKey].Flyouts, nil));
while flyoutButtonKey do
-- print(AddonName.. ": ".. tostring(flyoutButtonKey));
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey].Flyouts, flyoutButtonKey);
flyoutButtonKey = (next(LibSN2SIDP.DB[classKey].Flyouts, flyoutButtonKey));
end
end
if LibSN2SIDP.DB[classKey].Pets then
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey], "Pets");
LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets = {};
local petKey = (next(LibSN2SIDP.DB[classKey].Pets, nil));
while petKey do
tinsert(LibSN2SIDP.libLocal.LookupOrder_table[classKey].Pets, petKey);
petKey = (next(LibSN2SIDP.DB[classKey].Pets, petKey));
end
end
end
classKey = (next(LibSN2SIDP.DB, classKey));
classOrderIndex = classOrderIndex + 1;
end
tinsert(LibSN2SIDP.libLocal.LookupOrder_table, 2, "General");
-- tinsert(LibSN2SIDP.libLocal.LookupOrder_table, "General");
LibSN2SIDP.libLocal.LookupOrder_table["General"] = {};
local categoryKey = (next(LibSN2SIDP.DB.General, nil));
while categoryKey do
if categoryKey == "Racials" then
tinsert(LibSN2SIDP.libLocal.LookupOrder_table.General, "Racials");
LibSN2SIDP.libLocal.LookupOrder_table.General.Racials = {};
local racialKey = (next(LibSN2SIDP.DB.General.Racials, nil));
while racialKey do
if racialKey == LibSN2SIDP.libLocal.playerUniversalRaceName then
tinsert(LibSN2SIDP.libLocal.LookupOrder_table.General.Racials, 1, racialKey);
else
tinsert(LibSN2SIDP.libLocal.LookupOrder_table.General.Racials, racialKey);
end
racialKey = (next(LibSN2SIDP.DB.General.Racials, racialKey));
end
-- elseif categoryKey ~= "METADATA" then -- Currentlu not on the database
else
tinsert(LibSN2SIDP.libLocal.LookupOrder_table.General, categoryKey);
end
categoryKey = (next(LibSN2SIDP.DB.General, categoryKey));
end
end
 
-- Get Player's character data when it's available
if not LibSN2SIDP.libFrame then
LibSN2SIDP.libFrame = CreateFrame("Frame");
end
LibSN2SIDP.libFrame:RegisterEvent("PLAYER_LOGIN");
LibSN2SIDP.libLocal.lookupOrderTableInitialized = false;
LibSN2SIDP.libFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
LibSN2SIDP.libFrame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
LibSN2SIDP.libFrame:RegisterUnitEvent("UNIT_PET", "player"); -- Fired when a unit's pet changes.
LibSN2SIDP.libFrame:RegisterEvent("PET_SPECIALIZATION_CHANGED"); -- Fired upon pet's specialisation changes.
LibSN2SIDP.libFrame:SetScript("OnEvent", function(self, event)
if event == "PLAYER_LOGIN" or event == "PLAYER_ENTERING_WORLD" then
local stubVal;
stubVal, LibSN2SIDP.libLocal.playerUniversalClassName = UnitClass("player");
stubVal, LibSN2SIDP.libLocal.playerUniversalRaceName = UnitRace("player");
if UnitExists("pet") then -- Get current Pet data to build the corresponding lookup table
LibSN2SIDP.libLocal.petFamily = UnitCreatureFamily("pet");
end
LibSN2SIDP.libLocal.SetLookupOrder();
LibSN2SIDP.libLocal.lookupOrderTableInitialized = true;
elseif LibSN2SIDP.libLocal.lookupOrderTableInitialized then
if event == "UNIT_PET" or event == "PET_SPECIALIZATION_CHANGED" then
if not LibSN2SIDP.libLocal.playerUniversalClassName or not LibSN2SIDP.libLocal.LookupOrder_table[playerUniversalClassName] then
return; -- Build lookup table for Pet only after we built the lookup table for Class
end
LibSN2SIDP.libLocal.petFamily = UnitCreatureFamily("pet");
if not LibSN2SIDP.libLocal.petFamily then -- UNIT_PET fires several times when a pet
return; -- is lost and when a new one is called; we'll get the new pet
end -- info eventually, but we'll wait til it's up.
LibSN2SIDP.libLocal.setCurrentPetFirstInLookupOrder();
else
LibSN2SIDP.libLocal.SetLookupOrder();
end
end
-- for i = 1, #LibSN2SIDP.libLocal.LookupOrder_table do
-- local classKey = LibSN2SIDP.libLocal.LookupOrder_table[i];
-- print(AddonName.. ": ".. i.. ". ".. tostring(classKey));
-- for ii = 1, #(LibSN2SIDP.libLocal.LookupOrder_table[classKey]) do
-- local specKey = LibSN2SIDP.libLocal.LookupOrder_table[classKey][ii];
-- print(AddonName.. ": ".. i.. ".".. ii.. ". ".. tostring(specKey));
-- if type(LibSN2SIDP.libLocal.LookupOrder_table[classKey][specKey]) == "table" then
-- for iii = 1, #(LibSN2SIDP.libLocal.LookupOrder_table[classKey][specKey]) do
-- local subTableKey = LibSN2SIDP.libLocal.LookupOrder_table[classKey][specKey][iii];
-- print(AddonName.. ": ".. i.. ".".. ii.. ".".. iii.. ". ".. tostring(subTableKey));
-- end
-- end
-- 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, #LibSN2SIDP.libLocal.LookupOrder_table do
local classKey = LibSN2SIDP.libLocal.LookupOrder_table[classIndex];
-- print(AddonName.. ": ".. tostring(classKey));
for specIndex = 1, #(LibSN2SIDP.libLocal.LookupOrder_table[classKey]) do
local specKey = LibSN2SIDP.libLocal.LookupOrder_table[classKey][specIndex];
local spID = LibSN2SIDP.DB[classKey][specKey][engSpellName] or nil;
if spID then
return spID; -- FOUND IT!
end
-- if specKey == "Flyouts" or specKey == "Pets" then
if LibSN2SIDP.libLocal.LookupOrder_table[classKey][specKey] ~= nil and type(LibSN2SIDP.libLocal.LookupOrder_table[classKey][specKey]) == "table" then
local subTableKey = (next(LibSN2SIDP.DB[classKey][specKey], nil));
while subTableKey do
-- print(tostring(classKey).. " ".. tostring(specKey).. " ".. tostring(subTableKey));
local spID = LibSN2SIDP.DB[classKey][specKey][subTableKey][engSpellName] or nil;
if spID then
return spID; -- FOUND IT!
end
subTableKey = (next(LibSN2SIDP.DB[classKey][specKey], subTableKey));
end
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);
return spID;
elseif (paramType == "number") then
local locSpellName = (GetSpellInfo(engSpellName));
-- print(tostring(locSpellName));
if locSpellName then
return engSpellName;
else
return nil;
end
else
-- TODO: error() ?
return nil;
end
end
}
);
-- For backwards compatibility (LibSpellName2SIDPassives_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, #LibSN2SIDP.libLocal.LookupOrder_table do
local classKey = LibSN2SIDP.libLocal.LookupOrder_table[classIndex];
-- print(AddonName.. ": ".. tostring(classKey));
for specIndex = 1, #(LibSN2SIDP.libLocal.LookupOrder_table[classKey]) do
local specKey = LibSN2SIDP.libLocal.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; -- FOUND IT!
end
 
-- if specKey == "Flyouts" or specKey == "Pets" then
if LibSN2SIDP.libLocal.LookupOrder_table[classKey][specKey] ~= nil and type(LibSN2SIDP.libLocal.LookupOrder_table[classKey][specKey]) == "table" then
local subTableKey = (next(LibSN2SIDP.DB[classKey][specKey], nil));
while subTableKey do
-- print(tostring(classKey).. " ".. tostring(specKey).. " ".. tostring(subTableKey));
local spID = LibSN2SIDP.DB[classKey][specKey][subTableKey][engSpellName] or nil;
if spID then
local locSpellName = (GetSpellInfo(spID)); -- Localised spell name
return locSpellName; -- FOUND IT!
end
subTableKey = (next(LibSN2SIDP.DB[classKey][specKey], subTableKey));
end
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);
return locSpellName;
elseif paramType == "number" then
local locSpellName = (GetSpellInfo(engSpellName));
-- print(locSpellName);
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 ~= "LibSpellName2SIDPassives-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.");
passives/tags/LibSpellName2SID-1.0.14a-Passives/LibSpellName2SID-1.0-Passives.toc New file
0,0 → 1,16
## Interface: 80000
## Title: Lib: SpellName2SID-1.0-Passives
## Notes: Table of English Spell Names and corresponding Spell IDs|nPassive spells database variant
## Version: 1.0.14a
## LoadOnDemand: 1
## Author: aallkkaa
## X-Original-Author: twobits
## X-Credits: benots4
## X-Category: Library
## X-WoWI-ID: 24583
 
LibStub\LibStub.lua
 
LibSpellName2SID-1.0-Passives\LibSpellName2SID-1.0-Passives.lua
 
#test.lua
\ No newline at end of file
passives/tags/LibSpellName2SID-1.0.14a-Passives/LibStub/LibStub.lua New file
0,0 → 1,51
-- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info
-- LibStub is hereby placed in the Public Domain
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]
 
-- Check to see is this version of the stub is obsolete
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
 
-- LibStub:NewLibrary(major, minor)
-- major (string) - the major version of the library
-- minor (string or number ) - the minor version of the library
--
-- returns nil if a newer or same version of the lib is already present
-- returns empty library object or old library object if upgrade is needed
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
 
local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end
 
-- LibStub:GetLibrary(major, [silent])
-- major (string) - the major version of the library
-- silent (boolean) - if true, library is optional, silently return nil if its not found
--
-- throws an error if the library can not be found (except silent is set)
-- returns the library object if found
function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
end
return self.libs[major], self.minors[major]
end
 
-- LibStub:IterateLibraries()
--
-- Returns an iterator for the currently registered libraries
function LibStub:IterateLibraries()
return pairs(self.libs)
end
 
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end
passives/tags/LibSpellName2SID-1.0.14a-Passives/LibStub/LibStub.toc New file
0,0 → 1,13
## Interface: 70000
## Title: Lib: LibStub
## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
## X-Website: http://www.wowace.com/addons/libstub/
## X-Category: Library
## X-License: Public Domain
## X-Curse-Packaged-Version: 1.0.2-70000
## X-Curse-Project-Name: LibStub
## X-Curse-Project-ID: libstub
## X-Curse-Repository-ID: wow/libstub/mainline
 
LibStub.lua
tags/LibSpellName2SID-1.0.14a/LibStub/LibStub.toc New file
0,0 → 1,13
## Interface: 70000
## Title: Lib: LibStub
## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
## X-Website: http://www.wowace.com/addons/libstub/
## X-Category: Library
## X-License: Public Domain
## X-Curse-Packaged-Version: 1.0.2-70000
## X-Curse-Project-Name: LibStub
## X-Curse-Project-ID: libstub
## X-Curse-Repository-ID: wow/libstub/mainline
 
LibStub.lua
tags/LibSpellName2SID-1.0.14a/LibStub/LibStub.lua New file
0,0 → 1,51
-- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info
-- LibStub is hereby placed in the Public Domain
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]
 
-- Check to see is this version of the stub is obsolete
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
 
-- LibStub:NewLibrary(major, minor)
-- major (string) - the major version of the library
-- minor (string or number ) - the minor version of the library
--
-- returns nil if a newer or same version of the lib is already present
-- returns empty library object or old library object if upgrade is needed
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
 
local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end
 
-- LibStub:GetLibrary(major, [silent])
-- major (string) - the major version of the library
-- silent (boolean) - if true, library is optional, silently return nil if its not found
--
-- throws an error if the library can not be found (except silent is set)
-- returns the library object if found
function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
end
return self.libs[major], self.minors[major]
end
 
-- LibStub:IterateLibraries()
--
-- Returns an iterator for the currently registered libraries
function LibStub:IterateLibraries()
return pairs(self.libs)
end
 
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end
tags/LibSpellName2SID-1.0.14a/LibSpellName2SID-1.0/LibSpellName2SID-1.0.lua New file
0,0 → 1,2826
---------------------
-- LibspellName2SID (deprecated) / LibSpellName2SID
-- 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 - 10014: 2017-2019 WoW 7.3.x to 8.0.1 versions by aallkkaa [4]
--
-- [1] https://www.wowinterface.com/forums/member.php?userid=139157
-- https://www.curseforge.com/members/twobits
-- [2] https://www.curseforge.com/wow/addons/readyspells (Twobits' 3.x version:
-- 2009)
-- [3] https://www.wowinterface.com/forums/member.php?action=getinfo&userid=201937
-- [4] https://www.wowinterface.com/forums/member.php?u=335646
---------------------
-- API:
-- LibSpellName2SID.ID["EnglishSpellName"] -- Spell ID of English Spell Name
-- LibSpellName2SID.LSN["EnglishSpellName"] -- Localized Spell Name
-- LibSpellName2SID.SetFaction(faction) -- Set the faction to look up spells for (when applicable)
-- LibSpellName2SID:GetNumSpells() -- Get the number of spells in the database - TEMPORARILY OUT
-- LibSpellName2SID:Cleanup() -- Clean up the database (remove from RAM) - DEPRECATED
---------------------
 
-- Initialization --
--------------------
 
AddonName, AddonEnv = ...;
 
-- Library's version values --
local LibSpellName2SID_MAJOR = "LibSpellName2SID";
local LibSpellName2SID_MINOR = 10014;
-- print(LibSpellName2SID_MAJOR.. "-".. LibSpellName2SID_MINOR.. ": AddonName = ".. AddonName);
 
-- DataSource --
-- gameBuild = 28153 (standard races +2 allied) and 27178 (4/6 allied races)
-- clientLocale = enUS
 
-- Register with LibStub --
assert(LibStub, LibSpellName2SID_MAJOR.. "-".. LibSpellName2SID_MINOR.." requires LibStub.");
local LibSN2SID;
local oldLibSN2SID, oldMinor = LibStub:GetLibrary(LibSpellName2SID_MAJOR, true);
if oldLibSN2SID and (oldMinor >= LibAlkaTest_MINOR) then
return;
else
LibSN2SID = (LibStub:NewLibrary(LibSpellName2SID_MAJOR, LibSpellName2SID_MINOR));
if oldLibSN2SID then
if oldLibSN2SID.libFrame then -- Reuse old lib's frame if available
oldLibSN2SID.libFrame:UnregisterAllEvents();
LibSN2SID.libFrame = oldLibSN2SID.libFrame;
end
oldLibSN2SID = nil;
end
end
 
 
-- Set the library database contents --
---------------------------------------
 
LibSN2SID.owner = AddonName;
LibSN2SID.minor = LibSpellName2SID_MINOR;
 
if LibSN2SID.DB then -- Clear old version's contents, if applicable
wipe(LibSN2SID.DB);
end
 
LibSN2SID.DB = {
["General"] = {
["Others"] = {
["Shoot"] = 5019,
["Revive Battle Pets"] = 125439,
["Auto Shot"] = 75,
["Honorable Medallion"] = 195710,
["Auto Attack"] = 6603,
},
["Racials"] = {
["Draenei"] = {
["Gift of the Naaru"] = 59548,
},
["NightElf"] = {
["Shadowmeld"] = 58984,
},
["Troll"] = {
["Berserking"] = 26297,
},
["Orc"] = {
["Blood Fury"] = 20572,
},
["Gnome"] = {
["Escape Artist"] = 20589,
},
["Pandaren"] = {
["Quaking Palm"] = 107079,
},
["Dwarf"] = {
["Stoneform"] = 20594,
},
["Tauren"] = {
["War Stomp"] = 20549,
},
["BloodElf"] = {
["Arcane Torrent"] = 129597,
},
["VoidElf"] = {
["Spatial Rift"] = 256948,
},
["Worgen"] = {
["Running Wild"] = 87840,
["Darkflight"] = 68992,
["Two Forms"] = 68996,
},
["Human"] = {
["Every Man for Himself"] = 59752,
},
["LightforgedDraenei"] = {
["Forge of Light"] = 259930,
["Light's Judgment"] = 255647,
},
["Goblin"] = {
["Rocket Barrage"] = 69041,
["Rocket Jump"] = 69070,
["Pack Hobgoblin"] = 69046,
},
["Nightborne"] = {
["Arcane Pulse"] = 260364,
["Cantrips"] = 255661,
},
["HighmountainTauren"] = {
["Bull Rush"] = 255654,
},
["DarkIronDwarf"] = {
["Fireblood"] = 265221,
["Mole Machine"] = 265225,
},
["MagharOrc"] = {
["Ancestral Call"] = 274738,
},
["Scourge"] = {
["Will of the Forsaken"] = 7744,
["Cannibalize"] = 20577,
},
},
["ZoneAbilities"] = {
["Telaari Talbuk"] = 165803,
["Summon Mechashredder 5000"] = 164050,
["Home Away from Home"] = 168487,
["Call to Arms"] = 161676,
["Garrison Ability"] = 161691,
["Guardian Orb"] = 161767,
["Vindicaar Matrix Crystal"] = 251463,
["Smuggling Run!"] = 170108,
["Summon Lightforged Warframe"] = 250436,
["Champion's Honor"] = 164221,
["Fel Heart Bond"] = 248011,
["Light's Judgment"] = 247427,
["Logging"] = 167895,
["Artillery Strike"] = 162075,
["Shroud of Arcane Echoes"] = 248779,
["Frostwolf War Wolf"] = 164222,
["Telaari Siege Engine"] = 160240,
},
["GuildPerks"] = {
["Mobile Banking"] = 83958,
},
},
["DEATHKNIGHT"] = {
["Frost_Talents"] = {
["Wraith Walk"] = 212552,
["Blinding Sleet"] = 207167,
["Frostscythe"] = 207230,
["Death Pact"] = 48743,
["Horn of Winter"] = 57330,
["Asphyxiate"] = 108194,
["Breath of Sindragosa"] = 152279,
["Frostwyrm's Fury"] = 279302,
["Glacial Advance"] = 194913,
},
["Unholy"] = {
["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,
["Death Grip"] = 49576,
["Anti-Magic Shell"] = 48707,
["Death's Advance"] = 48265,
["Icebound Fortitude"] = 48792,
["Path of Frost"] = 3714,
["Control Undead"] = 111673,
["Outbreak"] = 77575,
["Raise Dead"] = 46584,
["Apocalypse"] = 275699,
},
["Blood"] = {
["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,
["Dark Command"] = 56222,
["Blood Boil"] = 50842,
["Death's Caress"] = 195292,
["Death Grip"] = 49576,
["Mind Freeze"] = 47528,
["Path of Frost"] = 3714,
["Asphyxiate"] = 221562,
["Vampiric Blood"] = 55233,
["Anti-Magic Shell"] = 48707,
["Death's Advance"] = 48265,
},
["Pets"] = {
["Ghoul"] = {
["Monstrous Blow"] = 91797,
["Leap"] = 47482,
["Shambling Rush"] = 91802,
["Putrid Bulwark"] = 91837,
["Gnaw"] = 47481,
["Claw"] = 47468,
["Huddle"] = 47484,
["Sweeping Claws"] = 91778,
},
},
["Frost"] = {
["Pillar of Frost"] = 51271,
["Control Undead"] = 111673,
["Runeforging"] = 53428,
["Chains of Ice"] = 45524,
["Death Strike"] = 49998,
["Raise Ally"] = 61999,
["Howling Blast"] = 49184,
["Dark Command"] = 56222,
["Death Gate"] = 50977,
["Remorseless Winter"] = 196770,
["Death Grip"] = 49576,
["Anti-Magic Shell"] = 48707,
["Frost Strike"] = 49143,
["Empower Rune Weapon"] = 47568,
["Path of Frost"] = 3714,
["Icebound Fortitude"] = 48792,
["Mind Freeze"] = 47528,
["Obliterate"] = 49020,
["Death's Advance"] = 48265,
},
["Blood_Talents"] = {
["Tombstone"] = 219809,
["Wraith Walk"] = 212552,
["Rune Tap"] = 194679,
["Blooddrinker"] = 206931,
["Bonestorm"] = 194844,
["Rune Strike"] = 210764,
["Consumption"] = 274156,
["Mark of Blood"] = 206940,
},
["Unholy_PVPTalents"] = {
["Chill Streak"] = 204160,
["Necrotic Strike"] = 223829,
["Gladiator's Medallion"] = 208683,
["Anti-Magic Zone"] = 51052,
["Reanimation"] = 210128,
["Dark Simulacrum"] = 77606,
},
["Unholy_Talents"] = {
["Summon Gargoyle"] = 49206,
["Wraith Walk"] = 212552,
["Clawing Shadows"] = 207311,
["Epidemic"] = 207317,
["Death Pact"] = 48743,
["Unholy Blight"] = 115989,
["Asphyxiate"] = 108194,
["Defile"] = 152280,
["Soul Reaper"] = 130736,
["Unholy Frenzy"] = 207289,
},
["Blood_PVPTalents"] = {
["Chill Streak"] = 204160,
["Necrotic Strike"] = 223829,
["Gladiator's Medallion"] = 208683,
["Anti-Magic Zone"] = 51052,
["Reanimation"] = 210128,
["Dark Simulacrum"] = 77606,
},
["Frost_PVPTalents"] = {
["Chill Streak"] = 204160,
["Necrotic Strike"] = 223829,
["Gladiator's Medallion"] = 208683,
["Anti-Magic Zone"] = 51052,
["Reanimation"] = 210128,
["Dark Simulacrum"] = 77606,
},
["METADATA"] = {
["Specs"] = {
["Unholy"] = 252,
["Frost"] = 251,
["Blood"] = 250,
},
},
},
["DEMONHUNTER"] = {
["Havoc_Talents"] = {
["Nemesis"] = 206491,
["Dark Slash"] = 258860,
["Netherwalk"] = 196555,
["Fel Eruption"] = 211881,
["Felblade"] = 232893,
["Fel Barrage"] = 258925,
["Immolation Aura"] = 258920,
},
["Vengeance_Talents"] = {
["Fracture"] = 263642,
["Sigil of Chains"] = 202138,
["Fel Devastation"] = 212084,
["Felblade"] = 232893,
["Soul Barrier"] = 263648,
["Spirit Bomb"] = 247454,
},
["Havoc"] = {
["Blur"] = 198589,
["Chaos Nova"] = 179057,
["Torment"] = 281854,
["Metamorphosis"] = 191427,
["Demon's Bite"] = 162243,
["Darkness"] = 196718,
["Eye Beam"] = 198013,
["Chaos Strike"] = 162794,
["Spectral Sight"] = 188501,
["Fel Rush"] = 195072,
["Disrupt"] = 183752,
["Consume Magic"] = 278326,
["Glide"] = 131347,
["Throw Glaive"] = 185123,
["Vengeful Retreat"] = 198793,
["Blade Dance"] = 188499,
["Imprison"] = 217832,
},
["Vengeance"] = {
["Soul Cleave"] = 162794,
["Torment"] = 198589,
["Fiery Brand"] = 179057,
["Metamorphosis"] = 191427,
["Shear"] = 203782,
["Imprison"] = 217832,
["Demon Spikes"] = 198793,
["Spectral Sight"] = 188501,
["Sigil of Misery"] = 207684,
["Disrupt"] = 183752,
["Consume Magic"] = 278326,
["Glide"] = 131347,
["Throw Glaive"] = 185123,
["Sigil of Flame"] = 188499,
["Infernal Strike"] = 195072,
["Sigil of Silence"] = 202137,
["Immolation Aura"] = 198013,
},
["Vengeance_PVPTalents"] = {
["Tormentor"] = 207029,
["Gladiator's Medallion"] = 208683,
["Illidan's Grasp"] = 205630,
["Demonic Trample"] = 205629,
["Reverse Magic"] = 205604,
},
["Havoc_PVPTalents"] = {
["Tormentor"] = 207029,
["Gladiator's Medallion"] = 208683,
["Illidan's Grasp"] = 205630,
["Demonic Trample"] = 205629,
["Reverse Magic"] = 205604,
},
["METADATA"] = {
["Specs"] = {
["Havoc"] = 577,
["Vengeance"] = 581,
},
},
},
["DRUID"] = {
["Restoration_PVPTalents"] = {
["Thorns"] = 236696,
["Faerie Swarm"] = 209749,
["Gladiator's Medallion"] = 208683,
["Demoralizing Roar"] = 201664,
["Alpha Challenge"] = 207017,
["Overrun"] = 202246,
["Cyclone"] = 209753,
},
["Feral_Talents"] = {
["Mass Entanglement"] = 102359,
["Brutal Slash"] = 202028,
["Savage Roar"] = 52610,
["Typhoon"] = 132469,
["Feral Frenzy"] = 274837,
["Mighty Bash"] = 5211,
["Wild Charge"] = 102401,
["Renewal"] = 108238,
["Tiger Dash"] = 252216,
["Incarnation: King of the Jungle"] = 102543,
},
["Feral"] = {
["Stampeding Roar"] = 106898,
["Skull Bash"] = 106839,
["Entangling Roots"] = 339,
["Mangle"] = 33917,
["Dreamwalk"] = 193753,
["Hibernate"] = 2637,
["Shred"] = 5221,
["Tiger's Fury"] = 5217,
["Remove Corruption"] = 2782,
["Rebirth"] = 20484,
["Treant Form"] = 114282,
["Thrash"] = 106832,
["Travel Form"] = 783,
["Prowl"] = 5215,
["Regrowth"] = 8936,
["Ferocious Bite"] = 22568,
["Growl"] = 6795,
["Revive"] = 50769,
["Swipe"] = 213764,
["Charm Woodland Creature"] = 127757,
["Rake"] = 1822,
["Rip"] = 1079,
["Cat Form"] = 768,
["Soothe"] = 2908,
["Berserk"] = 106951,
["Stag Form"] = 210053,
["Dash"] = 1850,
["Teleport: Moonglade"] = 18960,
["Track Beasts"] = 210065,
["Moonfire"] = 8921,
["Survival Instincts"] = 61336,
["Bear Form"] = 5487,
["Flap"] = 164862,
["Maim"] = 22570,
},
["Feral_PVPTalents"] = {
["Thorns"] = 236696,
["Faerie Swarm"] = 209749,
["Gladiator's Medallion"] = 208683,
["Demoralizing Roar"] = 201664,
["Alpha Challenge"] = 207017,
["Overrun"] = 202246,
["Cyclone"] = 209753,
},
["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,
["Tiger Dash"] = 252216,
["Wild Charge"] = 102401,
},
["Balance_PVPTalents"] = {
["Thorns"] = 236696,
["Faerie Swarm"] = 209749,
["Gladiator's Medallion"] = 208683,
["Demoralizing Roar"] = 201664,
["Alpha Challenge"] = 207017,
["Overrun"] = 202246,
["Cyclone"] = 209753,
},
["Balance"] = {
["Solar Wrath"] = 190984,
["Entangling Roots"] = 339,
["Mangle"] = 33917,
["Dreamwalk"] = 193753,
["Hibernate"] = 2637,
["Shred"] = 5221,
["Remove Corruption"] = 2782,
["Rebirth"] = 20484,
["Treant Form"] = 114282,
["Travel Form"] = 783,
["Prowl"] = 5215,
["Regrowth"] = 8936,
["Celestial Alignment"] = 194223,
["Charm Woodland Creature"] = 127757,
["Sunfire"] = 93402,
["Revive"] = 50769,
["Innervate"] = 29166,
["Track Beasts"] = 210065,
["Moonkin Form"] = 24858,
["Growl"] = 6795,
["Flap"] = 164862,
["Starfall"] = 191034,
["Soothe"] = 2908,
["Cat Form"] = 768,
["Barkskin"] = 22812,
["Stag Form"] = 210053,
["Teleport: Moonglade"] = 18960,
["Starsurge"] = 78674,
["Moonfire"] = 8921,
["Dash"] = 1850,
["Bear Form"] = 5487,
["Solar Beam"] = 78675,
["Lunar Strike"] = 194153,
},
["Guardian"] = {
["Swiftmend"] = 18562,
["Stampeding Roar"] = 106898,
["Skull Bash"] = 106839,
["Entangling Roots"] = 339,
["Mangle"] = 33917,
["Dreamwalk"] = 193753,
["Incapacitating Roar"] = 99,
["Shred"] = 5221,
["Remove Corruption"] = 2782,
["Rebirth"] = 20484,
["Ironfur"] = 192081,
["Thrash"] = 106832,
["Travel Form"] = 783,
["Prowl"] = 5215,
["Regrowth"] = 8936,
["Wild Growth"] = 48438,
["Growl"] = 6795,
["Maul"] = 6807,
["Revive"] = 50769,
["Swipe"] = 213764,
["Charm Woodland Creature"] = 127757,
["Treant Form"] = 114282,
["Bear Form"] = 5487,
["Dash"] = 1850,
["Hibernate"] = 2637,
["Soothe"] = 2908,
["Moonfire"] = 8921,
["Barkskin"] = 22812,
["Stag Form"] = 210053,
["Teleport: Moonglade"] = 18960,
["Frenzied Regeneration"] = 22842,
["Cat Form"] = 768,
["Survival Instincts"] = 61336,
["Rejuvenation"] = 774,
["Flap"] = 164862,
["Track Beasts"] = 210065,
},
["Restoration_Talents"] = {
["Mass Entanglement"] = 102359,
["Flourish"] = 197721,
["Typhoon"] = 132469,
["Mighty Bash"] = 5211,
["Wild Charge"] = 102401,
["Renewal"] = 108238,
["Incarnation: Tree of Life"] = 33891,
["Cenarion Ward"] = 102351,
["Tiger Dash"] = 252216,
},
["Guardian_PVPTalents"] = {
["Thorns"] = 236696,
["Faerie Swarm"] = 209749,
["Gladiator's Medallion"] = 208683,
["Demoralizing Roar"] = 201664,
["Alpha Challenge"] = 207017,
["Overrun"] = 202246,
["Cyclone"] = 209753,
},
["Balance_Talents"] = {
["Force of Nature"] = 205636,
["New Moon"] = 274281,
["Stellar Flare"] = 202347,
["Renewal"] = 108238,
["Typhoon"] = 132469,
["Warrior of Elune"] = 202425,
["Mighty Bash"] = 5211,
["Wild Charge"] = 102401,
["Tiger Dash"] = 252216,
["Fury of Elune"] = 202770,
["Incarnation: Chosen of Elune"] = 102560,
["Mass Entanglement"] = 102359,
},
["Restoration"] = {
["Swiftmend"] = 18562,
["Solar Wrath"] = 5176,
["Revitalize"] = 212040,
["Nature's Cure"] = 88423,
["Mangle"] = 33917,
["Efflorescence"] = 145205,
["Dreamwalk"] = 193753,
["Hibernate"] = 2637,
["Shred"] = 5221,
["Rebirth"] = 20484,
["Treant Form"] = 114282,
["Travel Form"] = 783,
["Prowl"] = 5215,
["Tranquility"] = 740,
["Wild Growth"] = 48438,
["Growl"] = 6795,
["Charm Woodland Creature"] = 127757,
["Ursol's Vortex"] = 102793,
["Revive"] = 50769,
["Regrowth"] = 8936,
["Innervate"] = 29166,
["Ironbark"] = 102342,
["Flap"] = 164862,
["Moonfire"] = 8921,
["Stag Form"] = 210053,
["Soothe"] = 2908,
["Cat Form"] = 768,
["Barkskin"] = 22812,
["Entangling Roots"] = 339,
["Teleport: Moonglade"] = 18960,
["Track Beasts"] = 210065,
["Sunfire"] = 93402,
["Dash"] = 1850,
["Bear Form"] = 5487,
["Rejuvenation"] = 774,
["Lifebloom"] = 33763,
},
["METADATA"] = {
["Specs"] = {
["Feral"] = 103,
["Balance"] = 102,
["Guardian"] = 104,
["Restoration"] = 105,
},
},
},
["HUNTER"] = {
["Beast Mastery_Talents"] = {
["Spitting Cobra"] = 194407,
["Barrage"] = 120360,
["A Murder of Crows"] = 131894,
["Camouflage"] = 199483,
["Binding Shot"] = 109248,
["Stampede"] = 201430,
["Chimaera Shot"] = 53209,
["Dire Beast"] = 120679,
},
["Marksmanship_Talents"] = {
["Piercing Shot"] = 198670,
["Camouflage"] = 199483,
["Serpent Sting"] = 271788,
["Explosive Shot"] = 212431,
["Double Tap"] = 260402,
["Hunter's Mark"] = 257284,
["Binding Shot"] = 109248,
["A Murder of Crows"] = 131894,
["Barrage"] = 120360,
},
["Marksmanship"] = {
["Pet Utility"] = 103,
["Flare"] = 1543,
["Rapid Fire"] = 257044,
["Command Pet"] = 272651,
["Feign Death"] = 5384,
["Arcane Shot"] = 185358,
["Aimed Shot"] = 19434,
["Tar Trap"] = 187698,
["Multi-Shot"] = 257620,
["Aspect of the Turtle"] = 186265,
["Disengage"] = 781,
["Trueshot"] = 193526,
["Counter Shot"] = 147362,
["Misdirection"] = 34477,
["Steady Shot"] = 56641,
["Eagle Eye"] = 6197,
["Exhilaration"] = 109304,
["Freezing Trap"] = 187650,
["Call Pet"] = 9,
["Concussive Shot"] = 5116,
["Bursting Shot"] = 186387,
["Aspect of the Cheetah"] = 186257,
},
["Flyouts"] = {
["Pet Utility"] = {
["Beast Lore"] = 1462,
["Feed Pet"] = 6991,
["Tame Beast"] = 1515,
["Revive Pet"] = 982,
["Dismiss Pet"] = 2641,
},
["Call Pet"] = {
["Call Pet 3"] = 83243,
["Call Pet 4"] = 83244,
["Call Pet 5"] = 83245,
["Call Pet 2"] = 83242,
["Call Pet 1"] = 883,
},
},
["Pets"] = {
["Ferocity"] = {
["Bite"] = 17253,
["Primal Rage"] = 264667,
["Smack"] = 49966,
["Dash"] = 61684,
["Claw"] = 16827,
["Growl"] = 2649,
},
["Mechanical"] = {
["Defense Matrix"] = 263868,
},
["Worm"] = {
["Acid Spit"] = 263446,
["Burrow Attack"] = 93433,
},
["Stag"] = {
["Nature's Grace"] = 264266,
},
["Feathermane"] = {
["Feather Flurry"] = 263916,
["Updraft"] = 160007,
},
["Quilen"] = {
["Stone Armor"] = 160049,
["Eternal Guardian"] = 267922,
},
["Basilisk"] = {
["Petrifying Gaze"] = 263841,
},
["Silithid"] = {
["Tendon Rip"] = 160065,
["Dune Strider"] = 280151,
},
["Lizard"] = {
["Grievous Bite"] = 279362,
},
["Water Strider"] = {
["Surface Trot"] = 126311,
["Soothing Water"] = 264262,
},
["Ravager"] = {
["Ravage"] = 263857,
},
["Scorpid"] = {
["Deadly Sting"] = 160060,
},
["Scalehide"] = {
["Scale Shield"] = 263865,
},
["Oxen"] = {
["Niuzao's Fortitude"] = 264023,
},
["Hydra"] = {
["Acid Bite"] = 263863,
},
["Bear"] = {
["Rest"] = 94019,
},
["Beetle"] = {
["Harden Carapace"] = 90339,
},
["Chimaera"] = {
["Froststorm Breath"] = 92380,
["Frost Breath"] = 54644,
},
["Clefthoof"] = {
["Blood of the Rhino"] = 280069,
["Thick Hide"] = 160057,
},
["Tenacity"] = {
["Bite"] = 17253,
["Smack"] = 49966,
["Dash"] = 61684,
["Claw"] = 16827,
["Survival of the Fittest"] = 264735,
["Growl"] = 2649,
},
["Dog"] = {
["Lock Jaw"] = 263423,
},
["Wasp"] = {
["Toxic Sting"] = 263858,
},
["Pterrordax"] = {
["Updraft"] = 160007,
["Ancient Hide"] = 279399,
},
["Warp Stalker"] = {
["Warp Time"] = 35346,
},
["Hyena"] = {
["Infected Bite"] = 263853,
},
["Dragonhawk"] = {
["Dragon's Guile"] = 263887,
},
["Devilsaur"] = {
["Feast"] = 159953,
["Monstrous Bite"] = 54680,
},
["Turtle"] = {
["Shell Shield"] = 26064,
},
["Fox"] = {
["Play"] = 90347,
["Agile Reflexes"] = 160011,
},
["Monkey"] = {
["Primal Agility"] = 160044,
},
["Gorilla"] = {
["Silverback"] = 263939,
},
["Sporebat"] = {
["Spore Cloud"] = 264056,
},
["Bird of Prey"] = {
["Trick"] = 94022,
["Talon Rend"] = 263852,
},
["Moth"] = {
["Serenity Dust"] = 264055,
},
["Serpent"] = {
["Serpent's Swiftness"] = 263904,
},
["Cat"] = {
["Catlike Reflexes"] = 263892,
["Prowl"] = 24450,
},
["Bat"] = {
["Sonic Blast"] = 264263,
},
["Carrion Bird"] = {
["Bloody Screech"] = 24423,
},
["Wolf"] = {
["Furious Bite"] = 263840,
},
["Toad"] = {
["Swarm of Flies"] = 279336,
},
["Krolusk"] = {
["Bulwark"] = 279410,
},
["Tallstrider"] = {
["Dust Cloud"] = 50285,
},
["Shale Spider"] = {
["Solid Shell"] = 160063,
},
["Spider"] = {
["Web Spray"] = 160067,
},
["Crab"] = {
["Pin"] = 50245,
},
["Nether Ray"] = {
["Nether Shock"] = 264264,
},
["Riverbeast"] = {
["Gruesome Bite"] = 160018,
},
["Core Hound"] = {
["Molten Hide"] = 159788,
["Obsidian Skin"] = 263867,
},
["Crane"] = {
["Chi-Ji's Tranquility"] = 264028,
["Trick"] = 126259,
},
["Boar"] = {
["Bristle"] = 263869,
},
["Rodent"] = {
["Gnaw"] = 263856,
["Rest"] = 126364,
},
["Wind Serpent"] = {
["Winged Agility"] = 264360,
},
["Direhorn"] = {
["Gore"] = 263861,
},
["Crocolisk"] = {
["Ankle Crack"] = 50433,
},
["Raptor"] = {
["Savage Rend"] = 263854,
},
["Spirit Beast"] = {
["Spirit Walk"] = 90328,
["Spirit Shock"] = 264265,
["Spirit Mend"] = 90361,
},
["Cunning"] = {
["Bite"] = 17253,
["Smack"] = 49966,
["Dash"] = 61684,
["Claw"] = 16827,
["Master's Call"] = 53271,
["Growl"] = 2649,
},
},
["Survival_PVPTalents"] = {
["Spider Sting"] = 202914,
["Dire Beast: Basilisk"] = 205691,
["Hi-Explosive Trap"] = 236776,
["Viper Sting"] = 202797,
["Scorpid Sting"] = 202900,
["Gladiator's Medallion"] = 208683,
["Dire Beast: Hawk"] = 208652,
["Interlope"] = 248518,
["Roar of Sacrifice"] = 53480,
},
["Marksmanship_PVPTalents"] = {
["Spider Sting"] = 202914,
["Dire Beast: Basilisk"] = 205691,
["Hi-Explosive Trap"] = 236776,
["Viper Sting"] = 202797,
["Scorpid Sting"] = 202900,
["Gladiator's Medallion"] = 208683,
["Dire Beast: Hawk"] = 208652,
["Interlope"] = 248518,
["Roar of Sacrifice"] = 53480,
},
["Survival"] = {
["Harpoon"] = 190925,
["Flare"] = 1543,
["Command Pet"] = 272651,
["Kill Command"] = 259489,
["Feign Death"] = 5384,
["Misdirection"] = 34477,
["Muzzle"] = 187707,
["Tar Trap"] = 187698,
["Aspect of the Turtle"] = 186265,
["Disengage"] = 781,
["Raptor Strike"] = 186270,
["Wildfire Bomb"] = 259495,
["Wing Clip"] = 195645,
["Serpent Sting"] = 259491,
["Pet Utility"] = 103,
["Coordinated Assault"] = 266779,
["Carve"] = 187708,
["Aspect of the Cheetah"] = 186257,
["Exhilaration"] = 109304,
["Call Pet"] = 9,
["Eagle Eye"] = 6197,
["Intimidation"] = 19577,
["Freezing Trap"] = 187650,
["Aspect of the Eagle"] = 186289,
},
["Survival_Talents"] = {
["Chakrams"] = 259391,
["Flanking Strike"] = 269751,
["Steel Trap"] = 162488,
["A Murder of Crows"] = 131894,
["Butchery"] = 212436,
["Mongoose Bite"] = 259387,
["Camouflage"] = 199483,
["Binding Shot"] = 109248,
},
["Beast Mastery_PVPTalents"] = {
["Spider Sting"] = 202914,
["Dire Beast: Basilisk"] = 205691,
["Hi-Explosive Trap"] = 236776,
["Viper Sting"] = 202797,
["Scorpid Sting"] = 202900,
["Gladiator's Medallion"] = 208683,
["Dire Beast: Hawk"] = 208652,
["Interlope"] = 248518,
["Roar of Sacrifice"] = 53480,
},
["Beast Mastery"] = {
["Pet Utility"] = 103,
["Cobra Shot"] = 193455,
["Kill Command"] = 34026,
["Feign Death"] = 5384,
["Misdirection"] = 34477,
["Tar Trap"] = 187698,
["Multi-Shot"] = 2643,
["Aspect of the Turtle"] = 186265,
["Disengage"] = 781,
["Barbed Shot"] = 217200,
["Master's Call"] = 272651,
["Freezing Trap"] = 187650,
["Counter Shot"] = 147362,
["Primal Rage"] = 272651,
["Flare"] = 1543,
["Intimidation"] = 19577,
["Aspect of the Wild"] = 193530,
["Eagle Eye"] = 6197,
["Exhilaration"] = 109304,
["Aspect of the Cheetah"] = 186257,
["Call Pet"] = 9,
["Concussive Shot"] = 5116,
["Survival of the Fittest"] = 272651,
["Bestial Wrath"] = 19574,
},
["METADATA"] = {
["Specs"] = {
["Marksmanship"] = 254,
["Beast Mastery"] = 253,
["Survival"] = 255,
},
},
},
["MAGE"] = {
["Fire_PVPTalents"] = {
["Ice Form"] = 198144,
["Gladiator's Medallion"] = 208683,
["Temporal Shield"] = 198111,
["Mass Invisibility"] = 198158,
},
["Frost_Talents"] = {
["Ice Nova"] = 157997,
["Ebonbolt"] = 257537,
["Glacial Spike"] = 199786,
["Mirror Image"] = 55342,
["Rune of Power"] = 116011,
["Ring of Frost"] = 113724,
["Ice Floes"] = 108839,
["Shimmer"] = 212653,
["Comet Storm"] = 153595,
["Ray of Frost"] = 205021,
},
["Pets"] = {
["Water Elemental"] = {
["Waterbolt"] = 31707,
["Freeze"] = 33395,
},
},
["Flyouts"] = {
["Portal"] = {
["Portal: Exodar"] = 32266,
["Portal: Stonard"] = 49361,
["Portal: Undercity"] = 11418,
["Portal: Vale of Eternal Blossoms(Horde)"] = 132626,
["Portal: Vale of Eternal Blossoms(Alliance)"] = 132620,
["Ancient Portal: Dalaran"] = 120146,
["Portal: Stormwind"] = 10059,
["Portal: Warspear"] = 176244,
["Portal: Theramore"] = 49360,
["Portal: Thunder Bluff"] = 11420,
["Portal: Darnassus"] = 11419,
["Portal: Ironforge"] = 11416,
["Portal: Dalaran - Northrend"] = 53142,
["Portal: Orgrimmar"] = 11417,
["Portal: Shattrath(Horde)"] = 35717,
["Portal: Dazar'alor"] = 281402,
["Portal: Dalaran - Broken Isles"] = 224871,
["Portal: Stormshield"] = 176246,
["Portal: Shattrath(Alliance)"] = 33691,
["Portal: Tol Barad(Horde)"] = 88346,
["Portal: Boralus"] = 281400,
["Portal: Tol Barad(Alliance)"] = 88345,
["Portal: Silvermoon"] = 32267,
},
["Polymorph Variants"] = {
["Polymorph(Peacock)"] = 161372,
["Polymorph(Rabbit)"] = 61721,
["Polymorph(Monkey)"] = 161354,
["Polymorph(Bumblebee)"] = 277792,
["Polymorph(Porcupine)"] = 126819,
["Polymorph(Black Cat)"] = 61305,
["Polymorph(Turtle)"] = 28271,
["Polymorph(Turkey)"] = 61780,
["Polymorph(Polar Bear Cub)"] = 161353,
["Polymorph(Penguin)"] = 161355,
["Polymorph(Serpent)"] = 61025,
["Polymorph(Pig)"] = 28272,
["Polymorph(Direhorn)"] = 277787,
},
["Teleport"] = {
["Teleport: Dalaran - Northrend"] = 53140,
["Teleport: Vale of Eternal Blossoms(Horde)"] = 132627,
["Teleport: Stonard"] = 49358,
["Teleport: Stormshield"] = 176248,
["Teleport: Darnassus"] = 3565,
["Teleport: Vale of Eternal Blossoms(Alliance)"] = 132621,
["Teleport: Dalaran - Broken Isles"] = 224869,
["Teleport: Boralus"] = 281403,
["Teleport: Stormwind"] = 3561,
["Teleport: Hall of the Guardian"] = 193759,
["Teleport: Shattrath(Horde)"] = 35715,
["Teleport: Dazar'alor"] = 281404,
["Teleport: Tol Barad(Horde)"] = 88344,
["Teleport: Shattrath(Alliance)"] = 33690,
["Teleport: Tol Barad(Alliance)"] = 88342,
["Teleport: Orgrimmar"] = 3567,
["Teleport: Exodar"] = 32271,
["Teleport: Warspear"] = 176242,
["Teleport: Silvermoon"] = 32272,
["Teleport: Theramore"] = 49359,
["Teleport: Undercity"] = 3563,
["Ancient Teleport: Dalaran"] = 120145,
["Teleport: Ironforge"] = 3562,
["Teleport: Thunder Bluff"] = 3566,
},
},
["Arcane_Talents"] = {
["Mirror Image"] = 55342,
["Rune of Power"] = 116011,
["Nether Tempest"] = 114923,
["Charged Up"] = 205032,
["Ring of Frost"] = 113724,
["Arcane Orb"] = 153626,
["Shimmer"] = 212653,
["Arcane Familiar"] = 205022,
["Supernova"] = 157980,
},
["Frost"] = {
["Arcane Intellect"] = 1459,
["Blizzard"] = 190356,
["Frostbolt"] = 116,
["Frozen Orb"] = 84714,
["Polymorph"] = 118,
["Cold Snap"] = 235219,
["Ice Lance"] = 108853,
["Ice Barrier"] = 11426,
["Portal"] = 11,
["Teleport"] = 8,
["Summon Water Elemental"] = 31687,
["Icy Veins"] = 12472,
["Conjure Refreshment"] = 190336,
["Blink"] = 1953,
["Ice Block"] = 45438,
["Counterspell"] = 2139,
["Frost Nova"] = 122,
["Flurry"] = 44614,
["Cone of Cold"] = 120,
["Invisibility"] = 66,
},
["Frost_PVPTalents"] = {
["Ice Form"] = 198144,
["Gladiator's Medallion"] = 208683,
["Temporal Shield"] = 198111,
["Mass Invisibility"] = 198158,
},
["Arcane"] = {
["Arcane Blast"] = 30451,
["Arcane Power"] = 12042,
["Arcane Explosion"] = 1449,
["Polymorph"] = 118,
["Conjure Refreshment"] = 190336,
["Portal"] = 11,
["Teleport"] = 8,
["Arcane Missiles"] = 5143,
["Arcane Intellect"] = 1459,
["Ice Block"] = 45438,
["Blink"] = 1953,
["Greater Invisibility"] = 110959,
["Evocation"] = 12051,
["Frost Nova"] = 122,
["Arcane Barrage"] = 44425,
["Counterspell"] = 2139,
["Displacement"] = 195676,
},
["Arcane_PVPTalents"] = {
["Ice Form"] = 198144,
["Gladiator's Medallion"] = 208683,
["Temporal Shield"] = 198111,
["Mass Invisibility"] = 198158,
},
["Fire"] = {
["Fireball"] = 133,
["Dragon's Breath"] = 31661,
["Fire Blast"] = 108853,
["Polymorph"] = 118,
["Pyroblast"] = 11366,
["Scorch"] = 2948,
["Flamestrike"] = 2120,
["Conjure Refreshment"] = 190336,
["Portal"] = 11,
["Teleport"] = 8,
["Combustion"] = 190319,
["Blink"] = 1953,
["Blazing Barrier"] = 235313,
["Counterspell"] = 2139,
["Frost Nova"] = 122,
["Ice Block"] = 45438,
["Arcane Intellect"] = 1459,
["Invisibility"] = 66,
},
["Fire_Talents"] = {
["Phoenix Flames"] = 257541,
["Shimmer"] = 212653,
["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"] = {
["Windwalker_Talents"] = {
["Chi Burst"] = 123986,
["Rushing Jade Wind"] = 261715,
["Fist of the White Tiger"] = 261947,
["Energizing Elixir"] = 115288,
["Ring of Peace"] = 116844,
["Chi Torpedo"] = 115008,
["Chi Wave"] = 115098,
["Diffuse Magic"] = 122783,
["Dampen Harm"] = 122278,
["Tiger's Lust"] = 116841,
["Invoke Xuen, the White Tiger"] = 123904,
["Whirling Dragon Punch"] = 152175,
["Serenity"] = 152173,
},
["Mistweaver_Talents"] = {
["Chi Burst"] = 123986,
["Diffuse Magic"] = 122783,
["Invoke Chi-Ji, the Red Crane"] = 198664,
["Song of Chi-Ji"] = 198898,
["Ring of Peace"] = 116844,
["Chi Torpedo"] = 115008,
["Refreshing Jade Wind"] = 196725,
["Mana Tea"] = 197908,
["Summon Jade Serpent Statue"] = 115313,
["Tiger's Lust"] = 116841,
["Healing Elixir"] = 122281,
["Dampen Harm"] = 122278,
["Chi Wave"] = 115098,
},
["Mistweaver"] = {
["Life Cocoon"] = 116849,
["Thunder Focus Tea"] = 116680,
["Resuscitate"] = 115178,
["Vivify"] = 116670,
["Renewing Mist"] = 115151,
["Leg Sweep"] = 119381,
["Detox"] = 115450,
["Roll"] = 109132,
["Soothing Mist"] = 115175,
["Transcendence"] = 101643,
["Revival"] = 115310,
["Zen Pilgrimage"] = 126892,
["Spinning Crane Kick"] = 101546,
["Rising Sun Kick"] = 107428,
["Crackling Jade Lightning"] = 117952,
["Provoke"] = 115546,
["Paralysis"] = 115078,
["Tiger Palm"] = 100780,
["Blackout Kick"] = 100784,
["Enveloping Mist"] = 124682,
["Transcendence: Transfer"] = 119996,
["Reawaken"] = 212051,
["Fortifying Brew"] = 243435,
["Essence Font"] = 191837,
},
["Brewmaster"] = {
["Resuscitate"] = 115178,
["Blackout Strike"] = 205523,
["Breath of Fire"] = 115181,
["Vivify"] = 116670,
["Expel Harm"] = 115072,
["Detox"] = 218164,
["Roll"] = 109132,
["Spear Hand Strike"] = 116705,
["Zen Meditation"] = 115176,
["Transcendence"] = 101643,
["Tiger Palm"] = 100780,
["Fortifying Brew"] = 115203,
["Zen Pilgrimage"] = 126892,
["Paralysis"] = 115078,
["Crackling Jade Lightning"] = 117952,
["Purifying Brew"] = 119582,
["Provoke"] = 115546,
["Transcendence: Transfer"] = 119996,
["Keg Smash"] = 121253,
["Leg Sweep"] = 119381,
["Ironskin Brew"] = 115308,
},
["Windwalker"] = {
["Fists of Fury"] = 113656,
["Resuscitate"] = 115178,
["Vivify"] = 116670,
["Touch of Death"] = 115080,
["Leg Sweep"] = 119381,
["Detox"] = 218164,
["Roll"] = 109132,
["Touch of Karma"] = 122470,
["Spear Hand Strike"] = 116705,
["Storm, Earth, and Fire"] = 137639,
["Zen Pilgrimage"] = 126892,
["Transcendence"] = 101643,
["Flying Serpent Kick"] = 101545,
["Tiger Palm"] = 100780,
["Crackling Jade Lightning"] = 117952,
["Transcendence: Transfer"] = 119996,
["Blackout Kick"] = 100784,
["Provoke"] = 115546,
["Paralysis"] = 115078,
["Rising Sun Kick"] = 107428,
["Spinning Crane Kick"] = 101546,
["Disable"] = 116095,
},
["Mistweaver_PVPTalents"] = {
["Gladiator's Medallion"] = 208683,
["Fortifying Brew"] = 201318,
["Tigereye Brew"] = 247483,
["Grapple Weapon"] = 233759,
},
["Windwalker_PVPTalents"] = {
["Gladiator's Medallion"] = 208683,
["Fortifying Brew"] = 201318,
["Tigereye Brew"] = 247483,
["Grapple Weapon"] = 233759,
},
["Brewmaster_Talents"] = {
["Chi Burst"] = 123986,
["Summon Black Ox Statue"] = 115315,
["Black Ox Brew"] = 115399,
["Ring of Peace"] = 116844,
["Chi Torpedo"] = 115008,
["Chi Wave"] = 115098,
["Dampen Harm"] = 122278,
["Invoke Niuzao, the Black Ox"] = 132578,
["Tiger's Lust"] = 116841,
["Healing Elixir"] = 122281,
["Guard"] = 115295,
["Rushing Jade Wind"] = 116847,
},
["Brewmaster_PVPTalents"] = {
["Gladiator's Medallion"] = 208683,
["Fortifying Brew"] = 201318,
["Tigereye Brew"] = 247483,
["Grapple Weapon"] = 233759,
},
["METADATA"] = {
["Specs"] = {
["Mistweaver"] = 270,
["Brewmaster"] = 268,
["Windwalker"] = 269,
},
},
},
["PALADIN"] = {
["Protection"] = {
["Divine Shield"] = 642,
["Guardian of Ancient Kings"] = 86659,
["Judgment"] = 275779,
["Light of the Protector"] = 184092,
["Hand of Reckoning"] = 62124,
["Hammer of Justice"] = 853,
["Consecration"] = 26573,
["Avenging Wrath"] = 31884,
["Blessing of Sacrifice"] = 6940,
["Rebuke"] = 96231,
["Blessing of Freedom"] = 1044,
["Blessing of Protection"] = 1022,
["Lay on Hands"] = 633,
["Shield of the Righteous"] = 53600,
["Redemption"] = 7328,
["Cleanse Toxins"] = 213644,
["Hammer of the Righteous"] = 53595,
["Flash of Light"] = 19750,
["Avenger's Shield"] = 31935,
["Ardent Defender"] = 31850,
["Divine Steed"] = 190784,
},
["Holy"] = {
["Divine Shield"] = 642,
["Holy Light"] = 82326,
["Cleanse"] = 4987,
["Judgment"] = 275773,
["Redemption"] = 7328,
["Holy Shock"] = 20473,
["Hand of Reckoning"] = 62124,
["Hammer of Justice"] = 853,
["Consecration"] = 26573,
["Beacon of Light"] = 53563,
["Divine Protection"] = 498,
["Blessing of Protection"] = 1022,
["Avenging Wrath"] = 31884,
["Light of the Martyr"] = 183998,
["Lay on Hands"] = 633,
["Blessing of Freedom"] = 1044,
["Light of Dawn"] = 85222,
["Blessing of Sacrifice"] = 6940,
["Aura Mastery"] = 31821,
["Flash of Light"] = 19750,
["Crusader Strike"] = 35395,
["Absolution"] = 212056,
["Divine Steed"] = 190784,
},
["Protection_PVPTalents"] = {
["Cleansing Light"] = 236186,
["Hammer of Reckoning"] = 247675,
["Blessing of Sanctuary"] = 210256,
["Gladiator's Medallion"] = 208683,
},
["Holy_Talents"] = {
["Holy Avenger"] = 105809,
["Blinding Light"] = 115750,
["Beacon of Faith"] = 156910,
["Bestow Faith"] = 223306,
["Light's Hammer"] = 114158,
["Rule of Law"] = 214202,
["Beacon of Virtue"] = 200025,
["Avenging Crusader"] = 216331,
["Holy Prism"] = 114165,
["Repentance"] = 20066,
},
["Holy_PVPTalents"] = {
["Cleansing Light"] = 236186,
["Hammer of Reckoning"] = 247675,
["Blessing of Sanctuary"] = 210256,
["Gladiator's Medallion"] = 208683,
},
["Retribution_Talents"] = {
["Word of Glory"] = 210191,
["Blinding Light"] = 115750,
["Hammer of Wrath"] = 24275,
["Justicar's Vengeance"] = 215661,
["Wake of Ashes"] = 255937,
["Inquisition"] = 84963,
["Crusade"] = 231895,
["Execution Sentence"] = 267798,
["Eye for an Eye"] = 205191,
["Consecration"] = 205228,
["Repentance"] = 20066,
},
["Retribution_PVPTalents"] = {
["Cleansing Light"] = 236186,
["Hammer of Reckoning"] = 247675,
["Blessing of Sanctuary"] = 210256,
["Gladiator's Medallion"] = 208683,
},
["Protection_Talents"] = {
["Bastion of Light"] = 204035,
["Blessing of Spellwarding"] = 204018,
["Blinding Light"] = 115750,
["Blessed Hammer"] = 204019,
["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,
["Greater Blessing of Kings"] = 203538,
["Hand of Hindrance"] = 183218,
["Blade of Justice"] = 184575,
["Lay on Hands"] = 633,
["Blessing of Freedom"] = 1044,
["Blessing of Protection"] = 1022,
["Templar's Verdict"] = 85256,
["Cleanse Toxins"] = 213644,
["Flash of Light"] = 19750,
["Crusader Strike"] = 35395,
["Greater Blessing of Wisdom"] = 203539,
["Divine Steed"] = 190784,
},
["METADATA"] = {
["Specs"] = {
["Protection"] = 66,
["Holy"] = 65,
["Retribution"] = 70,
},
},
},
["PRIEST"] = {
["Shadow"] = {
["Purify Disease"] = 213634,
["Resurrection"] = 2006,
["Shackle Undead"] = 9484,
["Shadow Word: Pain"] = 589,
["Fade"] = 586,
["Mind Vision"] = 2096,
["Shadowform"] = 232698,
["Silence"] = 15487,
["Dispersion"] = 47585,
["Mind Sear"] = 48045,
["Mass Dispel"] = 32375,
["Levitate"] = 1706,
["Void Eruption"] = 228260,
["Shadowfiend"] = 34433,
["Mind Flay"] = 15407,
["Leap of Faith"] = 73325,
["Dispel Magic"] = 528,
["Psychic Scream"] = 8122,
["Mind Control"] = 605,
["Power Word: Shield"] = 17,
["Vampiric Embrace"] = 15286,
["Power Word: Fortitude"] = 21562,
["Vampiric Touch"] = 34914,
["Shadow Mend"] = 186263,
["Mind Blast"] = 8092,
},
["Shadow_PVPTalents"] = {
["Dark Archangel"] = 197871,
["Premonition"] = 209780,
["Archangel"] = 197862,
["Gladiator's Medallion"] = 208683,
},
["Holy_Talents"] = {
["Circle of Healing"] = 204883,
["Divine Star"] = 110744,
["Holy Word: Salvation"] = 265202,
["Apotheosis"] = 200183,
["Halo"] = 120517,
["Shining Force"] = 204263,
["Binding Heal"] = 32546,
["Angelic Feather"] = 121536,
},
["Holy_PVPTalents"] = {
["Dark Archangel"] = 197871,
["Premonition"] = 209780,
["Archangel"] = 197862,
["Gladiator's Medallion"] = 208683,
},
["Shadow_Talents"] = {
["Mindbender"] = 200174,
["Dark Void"] = 263346,
["Void Torrent"] = 263165,
["Shadow Word: Death"] = 32379,
["Shadow Crash"] = 205385,
["Dark Ascension"] = 280711,
["Psychic Horror"] = 64044,
["Shadow Word: Void"] = 205351,
["Surrender to Madness"] = 193223,
["Mind Bomb"] = 205369,
},
["Discipline"] = {
["Power Word: Radiance"] = 194509,
["Resurrection"] = 2006,
["Shackle Undead"] = 9484,
["Rapture"] = 47536,
["Holy Nova"] = 132157,
["Fade"] = 586,
["Mind Vision"] = 2096,
["Mass Dispel"] = 32375,
["Power Word: Barrier"] = 62618,
["Pain Suppression"] = 33206,
["Desperate Prayer"] = 19236,
["Purify"] = 527,
["Levitate"] = 1706,
["Flash Heal"] = 2061,
["Dispel Magic"] = 528,
["Shadow Mend"] = 2061,
["Leap of Faith"] = 73325,
["Mass Resurrection"] = 212036,
["Psychic Scream"] = 8122,
["Mind Control"] = 605,
["Power Word: Shield"] = 17,
["Smite"] = 585,
["Shadowfiend"] = 34433,
["Penance"] = 47540,
["Power Word: Fortitude"] = 21562,
["Shadow Word: Pain"] = 589,
},
["Discipline_PVPTalents"] = {
["Dark Archangel"] = 197871,
["Premonition"] = 209780,
["Archangel"] = 197862,
["Gladiator's Medallion"] = 208683,
},
["Holy"] = {
["Renew"] = 139,
["Resurrection"] = 2006,
["Shackle Undead"] = 9484,
["Holy Nova"] = 132157,
["Symbol of Hope"] = 64901,
["Fade"] = 586,
["Mind Vision"] = 2096,
["Mass Dispel"] = 32375,
["Prayer of Mending"] = 33076,
["Holy Word: Serenity"] = 2050,
["Heal"] = 2060,
["Mind Control"] = 605,
["Desperate Prayer"] = 19236,
["Holy Fire"] = 14914,
["Purify"] = 527,
["Flash Heal"] = 2061,
["Dispel Magic"] = 528,
["Guardian Spirit"] = 47788,
["Divine Hymn"] = 64843,
["Holy Word: Sanctify"] = 34861,
["Psychic Scream"] = 8122,
["Leap of Faith"] = 73325,
["Mass Resurrection"] = 212036,
["Smite"] = 585,
["Power Word: Fortitude"] = 21562,
["Holy Word: Chastise"] = 88625,
["Levitate"] = 1706,
["Prayer of Healing"] = 596,
},
["Discipline_Talents"] = {
["Evangelism"] = 246287,
["Schism"] = 214621,
["Mindbender"] = 123040,
["Halo"] = 120517,
["Shadow Covenant"] = 204065,
["Angelic Feather"] = 121536,
["Power Word: Solace"] = 129250,
["Divine Star"] = 110744,
["Shining Force"] = 204263,
["Luminous Barrier"] = 271466,
["Purge the Wicked"] = 204197,
},
["METADATA"] = {
["Specs"] = {
["Discipline"] = 256,
["Shadow"] = 258,
["Holy"] = 257,
},
},
},
["ROGUE"] = {
["Subtlety_PVPTalents"] = {
["Death from Above"] = 269513,
["Neurotoxin"] = 206328,
["Gladiator's Medallion"] = 208683,
["Shiv"] = 248744,
["Smoke Bomb"] = 212182,
},
["Assassination_PVPTalents"] = {
["Death from Above"] = 269513,
["Neurotoxin"] = 206328,
["Gladiator's Medallion"] = 208683,
["Shiv"] = 248744,
["Smoke Bomb"] = 212182,
},
["Assassination"] = {
["Sprint"] = 2983,
["Evasion"] = 5277,
["Garrote"] = 703,
["Cloak of Shadows"] = 31224,
["Envenom"] = 196819,
["Eviscerate"] = 196819,
["Crimson Vial"] = 185311,
["Shadowstep"] = 36554,
["Rupture"] = 1943,
["Tricks of the Trade"] = 57934,
["Wound Poison"] = 8679,
["Feint"] = 1966,
["Fan of Knives"] = 51723,
["Vendetta"] = 79140,
["Poisoned Knife"] = 185565,
["Pick Pocket"] = 921,
["Blind"] = 2094,
["Mutilate"] = 1752,
["Pick Lock"] = 1804,
["Shroud of Concealment"] = 114018,
["Sinister Strike"] = 1752,
["Distract"] = 1725,
["Crippling Poison"] = 3408,
["Kidney Shot"] = 408,
["Sap"] = 6770,
["Stealth"] = 1784,
["Kick"] = 1766,
["Poisons"] = 66,
["Cheap Shot"] = 1833,
["Vanish"] = 1856,
},
["Assassination_Talents"] = {
["Crimson Tempest"] = 121411,
["Blindside"] = 111240,
["Toxic Blade"] = 245388,
["Exsanguinate"] = 200806,
["Marked for Death"] = 137619,
},
["Subtlety"] = {
["Sprint"] = 2983,
["Evasion"] = 5277,
["Backstab"] = 53,
["Symbols of Death"] = 212283,
["Eviscerate"] = 196819,
["Shadowstep"] = 36554,
["Shadow Blades"] = 121471,
["Shadowstrike"] = 185438,
["Cloak of Shadows"] = 31224,
["Stealth"] = 1784,
["Poisons"] = 66,
["Feint"] = 1966,
["Kidney Shot"] = 408,
["Pick Pocket"] = 921,
["Blind"] = 2094,
["Sap"] = 6770,
["Pick Lock"] = 1804,
["Shadow Dance"] = 185313,
["Shroud of Concealment"] = 114018,
["Distract"] = 1725,
["Vanish"] = 1856,
["Shuriken Storm"] = 197835,
["Nightblade"] = 195452,
["Shuriken Toss"] = 114014,
["Kick"] = 1766,
["Tricks of the Trade"] = 57934,
["Cheap Shot"] = 1833,
["Crimson Vial"] = 185311,
},
["Flyouts"] = {
["Poisons"] = {
["Leeching Poison"] = 108211,
["Crippling Poison"] = 3408,
["Deadly Poison"] = 2823,
["Wound Poison"] = 8679,
["Agonizing Poison"] = 200802,
},
},
["Outlaw_PVPTalents"] = {
["Death from Above"] = 269513,
["Neurotoxin"] = 206328,
["Gladiator's Medallion"] = 208683,
["Shiv"] = 248744,
["Smoke Bomb"] = 212182,
},
["Outlaw_Talents"] = {
["Slice and Dice"] = 5171,
["Ghostly Strike"] = 196937,
["Blade Rush"] = 271877,
["Marked for Death"] = 137619,
["Killing Spree"] = 51690,
},
["Outlaw"] = {
["Sprint"] = 2983,
["Vanish"] = 1856,
["Riposte"] = 199754,
["Pistol Shot"] = 185763,
["Crimson Vial"] = 185311,
["Cloak of Shadows"] = 31224,
["Between the Eyes"] = 199804,
["Dispatch"] = 2098,
["Grappling Hook"] = 195457,
["Stealth"] = 1784,
["Poisons"] = 66,
["Feint"] = 1966,
["Ambush"] = 8676,
["Blind"] = 2094,
["Shroud of Concealment"] = 114018,
["Pick Lock"] = 1804,
["Roll the Bones"] = 193316,
["Sinister Strike"] = 193315,
["Distract"] = 1725,
["Adrenaline Rush"] = 13750,
["Gouge"] = 1776,
["Sap"] = 6770,
["Pick Pocket"] = 921,
["Kick"] = 1766,
["Tricks of the Trade"] = 57934,
["Cheap Shot"] = 1833,
["Blade Flurry"] = 13877,
},
["Subtlety_Talents"] = {
["Secret Technique"] = 280719,
["Marked for Death"] = 137619,
["Gloomblade"] = 200758,
["Shuriken Tornado"] = 277925,
},
["METADATA"] = {
["Specs"] = {
["Outlaw"] = 260,
["Subtlety"] = 261,
["Assassination"] = 259,
},
},
},
["SHAMAN"] = {
["Restoration_PVPTalents"] = {
["Counterstrike Totem"] = 204331,
["Thundercharge"] = 204366,
["Lightning Lasso"] = 204437,
["Spirit Link"] = 204293,
["Ethereal Form"] = 210918,
["Skyfury Totem"] = 204330,
["Gladiator's Medallion"] = 208683,
["Grounding Totem"] = 204336,
},
["Elemental"] = {
["Astral Shift"] = 108271,
["Healing Surge"] = 8004,
["Ghost Wolf"] = 2645,
["Flame Shock"] = 188389,
["Fire Elemental"] = 198067,
["Earthquake"] = 61882,
["Earth Elemental"] = 198103,
["Ancestral Spirit"] = 2008,
["Water Walking"] = 546,
["Tremor Totem"] = 8143,
["Earthbind Totem"] = 2484,
["Hex"] = 51514,
["Thunderstorm"] = 51490,
["Purge"] = 370,
["Lightning Bolt"] = 188196,
["Hex Variants"] = 106,
["Frost Shock"] = 196840,
["Cleanse Spirit"] = 51886,
["Bloodlust"] = 2825,
["Lava Burst"] = 51505,
["Heroism"] = 32182,
["Wind Shear"] = 57994,
["Astral Recall"] = 556,
["Capacitor Totem"] = 192058,
["Far Sight"] = 6196,
["Chain Lightning"] = 188443,
["Earth Shock"] = 8042,
},
["METADATA"] = {
["Specs"] = {
["Enhancement"] = 263,
["Elemental"] = 262,
["Restoration"] = 264,
},
},
["Flyouts"] = {
["Hex Variants"] = {
["Hex(Wicker Mongrel)"] = 277784,
["Hex(Skeletal Hatchling)"] = 269352,
["Hex(Zandalari Tendonripper)"] = 277778,
["Hex(Spider)"] = 211004,
["Hex(Compy)"] = 210873,
["Hex(Cockroach)"] = 211015,
["Hex(Snake)"] = 211010,
},
},
["Pets"] = {
["Storm Elemental"] = {
["Call Lightning"] = 157348,
["Eye of the Storm"] = 157375,
["Wind Gust"] = 157331,
},
["Earth Elemental"] = {
["Pulverize"] = 118345,
["Angered Earth"] = 36213,
["Harden Skin"] = 118337,
},
["Fire Elemental"] = {
["Immolate"] = 118297,
["Meteor"] = 117588,
["Fire Blast"] = 57984,
},
},
["Enhancement_PVPTalents"] = {
["Counterstrike Totem"] = 204331,
["Thundercharge"] = 204366,
["Lightning Lasso"] = 204437,
["Spirit Link"] = 204293,
["Ethereal Form"] = 210918,
["Skyfury Totem"] = 204330,
["Gladiator's Medallion"] = 208683,
["Grounding Totem"] = 204336,
},
["Restoration_Talents"] = {
["Earthen Wall Totem"] = 198838,
["Wind Rush Totem"] = 192077,
["Ancestral Protection Totem"] = 207399,
["Earth Shield"] = 974,
["Unleash Life"] = 73685,
["Wellspring"] = 197995,
["Cloudburst Totem"] = 157153,
["Ascendance"] = 114052,
["Downpour"] = 207778,
["Earthgrab Totem"] = 51485,
},
["Elemental_PVPTalents"] = {
["Counterstrike Totem"] = 204331,
["Thundercharge"] = 204366,
["Lightning Lasso"] = 204437,
["Spirit Link"] = 204293,
["Ethereal Form"] = 210918,
["Skyfury Totem"] = 204330,
["Gladiator's Medallion"] = 208683,
["Grounding Totem"] = 204336,
},
["Elemental_Talents"] = {
["Liquid Magma Totem"] = 192222,
["Totem Mastery"] = 210643,
["Icefury"] = 210714,
["Wind Rush Totem"] = 192077,
["Earth Shield"] = 974,
["Storm Elemental"] = 192249,
["Stormkeeper"] = 191634,
["Elemental Blast"] = 117014,
["Ancestral Guidance"] = 108281,
["Ascendance"] = 114050,
},
["Enhancement"] = {
["Astral Shift"] = 108271,
["Healing Surge"] = 188070,
["Crash Lightning"] = 187874,
["Lava Lash"] = 60103,
["Ghost Wolf"] = 2645,
["Flametongue"] = 193796,
["Earth Elemental"] = 198103,
["Ancestral Spirit"] = 2008,
["Water Walking"] = 546,
["Capacitor Totem"] = 192058,
["Earthbind Totem"] = 2484,
["Hex"] = 51514,
["Tremor Totem"] = 8143,
["Stormstrike"] = 17364,
["Far Sight"] = 6196,
["Hex Variants"] = 106,
["Rockbiter"] = 193786,
["Cleanse Spirit"] = 51886,
["Bloodlust"] = 2825,
["Purge"] = 370,
["Lightning Bolt"] = 187837,
["Wind Shear"] = 57994,
["Astral Recall"] = 556,
["Feral Spirit"] = 51533,
["Spirit Walk"] = 58875,
["Frostbrand"] = 196834,
["Heroism"] = 32182,
},
["Restoration"] = {
["Astral Shift"] = 108271,
["Healing Surge"] = 8004,
["Healing Wave"] = 77472,
["Healing Tide Totem"] = 108280,
["Ghost Wolf"] = 2645,
["Ancestral Vision"] = 212048,
["Flame Shock"] = 188838,
["Spiritwalker's Grace"] = 79206,
["Capacitor Totem"] = 192058,
["Spirit Link Totem"] = 98008,
["Purify Spirit"] = 77130,
["Ancestral Spirit"] = 2008,
["Water Walking"] = 546,
["Chain Heal"] = 1064,
["Earthbind Totem"] = 2484,
["Hex"] = 51514,
["Purge"] = 370,
["Lava Burst"] = 51505,
["Earth Elemental"] = 198103,
["Hex Variants"] = 106,
["Healing Rain"] = 73920,
["Lightning Bolt"] = 403,
["Bloodlust"] = 2825,
["Riptide"] = 61295,
["Far Sight"] = 6196,
["Wind Shear"] = 57994,
["Astral Recall"] = 556,
["Heroism"] = 32182,
["Healing Stream Totem"] = 5394,
["Chain Lightning"] = 421,
["Tremor Totem"] = 8143,
},
["Enhancement_Talents"] = {
["Fury of Air"] = 197211,
["Wind Rush Totem"] = 192077,
["Earth Shield"] = 974,
["Lightning Shield"] = 192106,
["Totem Mastery"] = 262395,
["Sundering"] = 197214,
["Ascendance"] = 114051,
["Feral Lunge"] = 196884,
["Earthen Spike"] = 188089,
},
},
["WARLOCK"] = {
["Affliction_Talents"] = {
["Grimoire of Sacrifice"] = 108503,
["Siphon Life"] = 63106,
["Mortal Coil"] = 6789,
["Demonic Circle"] = 268358,
["Drain Soul"] = 198590,
["Phantom Singularity"] = 205179,
["Dark Soul: Misery"] = 113860,
["Dark Pact"] = 108416,
["Vile Taint"] = 278350,
["Burning Rush"] = 111400,
["Deathbolt"] = 264106,
["Haunt"] = 48181,
},
["Destruction_Talents"] = {
["Grimoire of Sacrifice"] = 108503,
["Dark Pact"] = 108416,
["Mortal Coil"] = 6789,
["Demonic Circle"] = 268358,
["Channel Demonfire"] = 196447,
["Shadowburn"] = 17877,
["Cataclysm"] = 152108,
["Soul Fire"] = 6353,
["Burning Rush"] = 111400,
["Dark Soul: Instability"] = 113858,
},
["Affliction"] = {
["Corruption"] = 172,
["Shadowfury"] = 30283,
["Soulstone"] = 20707,
["Command Demon"] = 119898,
["Create Soulwell"] = 29893,
["Agony"] = 980,
["Ritual of Summoning"] = 698,
["Health Funnel"] = 755,
["Eye of Kilrogg"] = 126,
["Fear"] = 5782,
["Demonic Gateway"] = 111771,
["Drain Life"] = 234153,
["Enslave Demon"] = 1098,
["Seed of Corruption"] = 27243,
["Banish"] = 710,
["Create Healthstone"] = 6201,
["Shadow Bolt"] = 232670,
["Unending Breath"] = 5697,
["Summon Darkglare"] = 205180,
["Summon Demon"] = 10,
["Unending Resolve"] = 104773,
["Unstable Affliction"] = 30108,
},
["Flyouts"] = {
["Summon Demon"] = {
["Summon Imp"] = 688,
["Summon Wrathguard"] = 112870,
["Summon Voidlord"] = 112867,
["Summon Felhunter"] = 691,
["Summon Voidwalker"] = 697,
["Summon Succubus"] = 712,
["Summon Shivarra"] = 112868,
["Summon Observer"] = 112869,
["Summon Felguard"] = 30146,
["Summon Fel Imp"] = 112866,
},
},
["Pets"] = {
["Voidlord"] = {
["Suffering"] = 119907,
["Consuming Shadows"] = 3716,
["Void Shield"] = 115236,
["Threatening Presence"] = 112042,
["Shadow Bulwark"] = 17767,
},
["Voidwalker"] = {
["Suffering"] = 17735,
["Consuming Shadows"] = 3716,
["Threatening Presence"] = 112042,
["Shadow Bulwark"] = 119907,
},
["Shivarra"] = {
["Lesser Invisibility"] = 7870,
["Mesmerize"] = 115268,
["Bladedance"] = 115748,
["Fellash"] = 115770,
},
["Observer"] = {
["Optical Blast"] = 115781,
["Devour Magic"] = 19505,
["Tongue Lash"] = 115778,
},
["Wrathguard"] = {
["Mortal Cleave"] = 115625,
["Threatening Presence"] = 134477,
["Wrathstorm"] = 115831,
["Axe Toss"] = 89766,
["Pursuit"] = 30151,
},
["Succubus"] = {
["Seduction"] = 119909,
["Lesser Invisibility"] = 7870,
["Lash of Pain"] = 7814,
["Whiplash"] = 6360,
},
["Felguard"] = {
["Threatening Presence"] = 134477,
["Felstorm"] = 89751,
["Axe Toss"] = 119914,
["Pursuit"] = 30151,
["Legion Strike"] = 30213,
},
["Felhunter"] = {
["Shadow Bite"] = 54049,
["Spell Lock"] = 119910,
["Devour Magic"] = 19505,
},
["Fel Imp"] = {
["Flee"] = 89792,
["Cauterize Master"] = 119905,
["Sear Magic"] = 115276,
["Felbolt"] = 115746,
},
["Imp"] = {
["Blood Pact"] = 6307,
["Flee"] = 89792,
["Singe Magic"] = 119905,
["Firebolt"] = 3110,
},
},
["Affliction_PVPTalents"] = {
["Call Felhunter"] = 212619,
["Singe Magic"] = 212623,
["Casting Circle"] = 221703,
["Curse of Tongues"] = 199890,
["Call Fel Lord"] = 212459,
["Nether Ward"] = 212295,
["Curse of Weakness"] = 199892,
["Gladiator's Medallion"] = 208683,
["Curse of Fragility"] = 199954,
["Call Observer"] = 201996,
},
["Destruction"] = {
["Shadowfury"] = 30283,
["Soulstone"] = 20707,
["Command Demon"] = 119898,
["Create Soulwell"] = 29893,
["Conflagrate"] = 17962,
["Ritual of Summoning"] = 698,
["Health Funnel"] = 755,
["Eye of Kilrogg"] = 126,
["Fear"] = 5782,
["Demonic Gateway"] = 111771,
["Unending Resolve"] = 104773,
["Incinerate"] = 29722,
["Drain Life"] = 234153,
["Enslave Demon"] = 1098,
["Banish"] = 710,
["Summon Infernal"] = 1122,
["Chaos Bolt"] = 116858,
["Havoc"] = 80240,
["Create Healthstone"] = 6201,
["Immolate"] = 348,
["Summon Demon"] = 10,
["Unending Breath"] = 5697,
["Rain of Fire"] = 5740,
},
["Demonology_PVPTalents"] = {
["Call Felhunter"] = 212619,
["Singe Magic"] = 212623,
["Casting Circle"] = 221703,
["Curse of Tongues"] = 199890,
["Call Fel Lord"] = 212459,
["Nether Ward"] = 212295,
["Curse of Weakness"] = 199892,
["Gladiator's Medallion"] = 208683,
["Curse of Fragility"] = 199954,
["Call Observer"] = 201996,
},
["Demonology"] = {
["Call Dreadstalkers"] = 104316,
["Singe Magic"] = 119898,
["Soulstone"] = 20707,
["Implosion"] = 196277,
["Create Soulwell"] = 29893,
["Summon Demonic Tyrant"] = 265187,
["Ritual of Summoning"] = 698,
["Health Funnel"] = 755,
["Eye of Kilrogg"] = 126,
["Shadow Bulwark"] = 119898,
["Demonbolt"] = 264178,
["Axe Toss"] = 119898,
["Demonic Gateway"] = 111771,
["Shadow Bolt"] = 686,
["Hand of Gul'dan"] = 105174,
["Drain Life"] = 234153,
["Enslave Demon"] = 1098,
["Seduction"] = 119898,
["Unending Resolve"] = 104773,
["Create Healthstone"] = 6201,
["Unending Breath"] = 5697,
["Shadowfury"] = 30283,
["Banish"] = 710,
["Summon Demon"] = 10,
["Spell Lock"] = 119898,
["Fear"] = 5782,
},
["Demonology_Talents"] = {
["Dark Pact"] = 108416,
["Demonic Strength"] = 267171,
["Demonic Circle"] = 268358,
["Soul Strike"] = 264057,
["Summon Vilefiend"] = 264119,
["Grimoire: Felguard"] = 111898,
["Doom"] = 265412,
["Nether Portal"] = 267217,
["Power Siphon"] = 264130,
["Mortal Coil"] = 6789,
["Burning Rush"] = 111400,
["Bilescourge Bombers"] = 267211,
},
["Destruction_PVPTalents"] = {
["Call Felhunter"] = 212619,
["Singe Magic"] = 212623,
["Casting Circle"] = 221703,
["Curse of Tongues"] = 199890,
["Call Fel Lord"] = 212459,
["Nether Ward"] = 212295,
["Curse of Weakness"] = 199892,
["Gladiator's Medallion"] = 208683,
["Curse of Fragility"] = 199954,
["Call Observer"] = 201996,
},
["METADATA"] = {
["Specs"] = {
["Demonology"] = 266,
["Affliction"] = 265,
["Destruction"] = 267,
},
},
},
["WARRIOR"] = {
["Protection"] = {
["Shield Slam"] = 23922,
["Intimidating Shout"] = 5246,
["Avatar"] = 107574,
["Berserker Rage"] = 18499,
["Shield Block"] = 2565,
["Thunder Clap"] = 6343,
["Shockwave"] = 46968,
["Victory Rush"] = 34428,
["Shield Wall"] = 871,
["Rallying Cry"] = 97462,
["Demoralizing Shout"] = 1160,
["Ignore Pain"] = 190456,
["Spell Reflection"] = 23920,
["Intercept"] = 198304,
["Last Stand"] = 12975,
["Battle Shout"] = 6673,
["Revenge"] = 6572,
["Pummel"] = 6552,
["Heroic Leap"] = 6544,
["Devastate"] = 20243,
["Heroic Throw"] = 57755,
["Taunt"] = 355,
},
["Arms_Talents"] = {
["Warbreaker"] = 262161,
["Rend"] = 772,
["Skullsplitter"] = 260643,
["Defensive Stance"] = 197690,
["Deadly Calm"] = 262228,
["Impending Victory"] = 202168,
["Avatar"] = 107574,
["Ravager"] = 152277,
["Cleave"] = 845,
["Storm Bolt"] = 107570,
},
["Fury"] = {
["Taunt"] = 355,
["Intimidating Shout"] = 5246,
["Execute"] = 5308,
["Whirlwind"] = 190411,
["Rampage"] = 184367,
["Piercing Howl"] = 12323,
["Bloodthirst"] = 23881,
["Raging Blow"] = 85288,
["Recklessness"] = 1719,
["Rallying Cry"] = 97462,
["Berserker Rage"] = 18499,
["Charge"] = 100,
["Enraged Regeneration"] = 184364,
["Pummel"] = 6552,
["Heroic Leap"] = 6544,
["Victory Rush"] = 34428,
["Heroic Throw"] = 57755,
["Battle Shout"] = 6673,
},
["Fury_Talents"] = {
["Impending Victory"] = 202168,
["Storm Bolt"] = 107570,
["Bladestorm"] = 46924,
["Dragon Roar"] = 118000,
["Siegebreaker"] = 280772,
["Furious Slash"] = 100130,
},
["Protection_PVPTalents"] = {
["Death Wish"] = 199261,
["Disarm"] = 236077,
["Spell Reflection"] = 216890,
["Gladiator's Medallion"] = 208683,
},
["Fury_PVPTalents"] = {
["Death Wish"] = 199261,
["Disarm"] = 236077,
["Spell Reflection"] = 216890,
["Gladiator's Medallion"] = 208683,
},
["Arms_PVPTalents"] = {
["Death Wish"] = 199261,
["Disarm"] = 236077,
["Spell Reflection"] = 216890,
["Gladiator's Medallion"] = 208683,
},
["Arms"] = {
["Battle Shout"] = 6673,
["Intimidating Shout"] = 5246,
["Execute"] = 163201,
["Whirlwind"] = 1680,
["Mortal Strike"] = 12294,
["Berserker Rage"] = 18499,
["Overpower"] = 7384,
["Hamstring"] = 1715,
["Taunt"] = 355,
["Rallying Cry"] = 97462,
["Colossus Smash"] = 167105,
["Charge"] = 100,
["Victory Rush"] = 34428,
["Heroic Leap"] = 6544,
["Slam"] = 1464,
["Pummel"] = 6552,
["Bladestorm"] = 227847,
["Die by the Sword"] = 118038,
["Heroic Throw"] = 57755,
["Sweeping Strikes"] = 260708,
},
["Protection_Talents"] = {
["Ravager"] = 228920,
["Dragon Roar"] = 118000,
["Impending Victory"] = 202168,
["Storm Bolt"] = 107570,
},
["METADATA"] = {
["Specs"] = {
["Fury"] = 72,
["Protection"] = 73,
["Arms"] = 71,
},
},
},
};
 
 
-- Helper functions: Default lookup priorities, etc --
------------------------------------------------------
 
LibSN2SID.libLocal = {};
LibSN2SID.libLocal.playerUniversalClassName = ""; -- Player only, gathered upon PLAYER_LOGIN
LibSN2SID.libLocal.playerUniversalRaceName = ""; -- Player only, gathered upon PLAYER_LOGIN
LibSN2SID.libLocal.petFamily = "";
 
LibSN2SID.libLocal.FactionSpells = {
currrentFaction = "",
["Alliance"] = {
["MAGE"] = {
["Flyouts"] = {
["Portal"] = {
["Portal: Vale of Eternal Blossoms"] = 132620,
["Portal: Shattrath"] = 33691,
["Portal: Tol Barad"] = 88345,
},
["Teleport"] = {
["Teleport: Vale of Eternal Blossoms"] = 132621,
["Teleport: Shattrath"] = 33690,
["Teleport: Tol Barad"] = 88342,
},
},
},
},
["Horde"] = {
["MAGE"] = {
["Flyouts"] = {
["Portal"] = {
["Portal: Vale of Eternal Blossoms"] = 132626,
["Portal: Shattrath"] = 35717,
["Portal: Tol Barad"] = 88346,
},
["Teleport"] = {
["Teleport: Vale of Eternal Blossoms"] = 132627,
["Teleport: Shattrath"] = 35715,
["Teleport: Tol Barad"] = 88344,
},
},
},
},
};
LibSN2SID.SetFaction = function(faction) -- TODO: Move to section "API" bellow !
-- print(AddonName.. ": 2. Player faction = ".. tostring(faction));
if faction ~= "Alliance" and faction ~= "Horde" then
return;
end
-- print(AddonName.. ": 2. Player currrentFaction = ".. tostring(LibSN2SID.libLocal.FactionSpells.currrentFaction));
if faction and (faction ~= LibSN2SID.libLocal.FactionSpells.currrentFaction) then
-- print(AddonName.. ": 3. Player faction was = ".. tostring(LibSN2SID.libLocal.FactionSpells.currrentFaction));
LibSN2SID.libLocal.FactionSpells.currrentFaction = faction;
local factionSpells_table = LibSN2SID.libLocal.FactionSpells[faction] or "Alliance";
-- for classIndex = 1, #(factionSpells_table) do
-- local classKey = factionSpells_table[classIndex];
local classIndex = 1;
local classKey = (next(factionSpells_table, nil));
while classKey do
-- print(AddonName.. ": ".. classIndex.. ": ".. classKey);
-- print(AddonName.. ": type of factionSpells_table[classKey] = ".. tostring(type(factionSpells_table[classKey])));
local specIndex = 1;
local specKey = (next(factionSpells_table[classKey], nil));
while specKey do
-- print(AddonName.. ": ".. classIndex.. ".".. specIndex.. ": ".. tostring(specKey));
local contentIndex = 1;
local contentKey = (next(factionSpells_table[classKey][specKey], nil));
while contentKey do
-- print(AddonName.. ": ".. classIndex.. ".".. specIndex.. ".".. contentIndex.. ": ".. contentKey);
if type(factionSpells_table[classKey][specKey][contentKey]) == "table" then -- "Flyouts"->Button or "Pets"->Pet
local spellIndex = 1;
local spellKey = (next(factionSpells_table[classKey][specKey][contentKey], nil));
while spellKey do
-- print(AddonName.. ": ".. classIndex.. ".".. specIndex.. ".".. contentIndex.. ".".. spellIndex.. ": ".. spellKey);
LibSN2SID.DB[classKey][specKey][contentKey][spellKey] = factionSpells_table[classKey][specKey][contentKey][spellKey];
-- print(AddonName.. ": LibSN2SID.DB\[".. classKey.. "\]\[".. specKey.. "\]\[".. contentKey.. "\]\["..
-- spellKey.. "\] = ".. tostring(LibSN2SID.DB[classKey][specKey][contentKey][spellKey]));
spellKey = (next(factionSpells_table[classKey][specKey][contentKey], spellKey));
spellIndex = spellIndex + 1;
end
else
LibSN2SID.DB[classKey][specKey][contentKey] = factionSpells_table[classKey][specKey][contentKey];
end
contentKey = (next(factionSpells_table[classKey][specKey], contentKey));
contentIndex = contentIndex + 1;
end
specKey = (next(factionSpells_table[classKey], specKey));
specIndex = specIndex + 1;
end
classKey = (next(factionSpells_table, classKey));
classIndex = classIndex + 1;
end
end
end
LibSN2SID.libLocal.SetDefaultFaction = function()
-- local englishFaction, _ = UnitFactionGroup("player");
-- print(AddonName.. ": 1. Player faction = ".. tostring(englishFaction));
-- LibSN2SID.SetFaction(englishFaction);
LibSN2SID.SetFaction((UnitFactionGroup("player")));
end
 
LibSN2SID.libLocal.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 LibSN2SID.libLocal.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
 
LibSN2SID.libLocal.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 LibSN2SID.libLocal.GetEnglishSpecialisationName(activeSpecID, LibSN2SID.libLocal.playerUniversalClassName), activeSpecID;
else
return nil, nil, nil; -- Player does not have an active specialisation
end
end
 
LibSN2SID.libLocal.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. Active spec PvP Talents' spells;
-- 1.4. Flyouts (if there are spells for);
-- 1.5. Pets (if there are spells for);
-- 1.5.1. Current pet specialization (if there is one) spells; NOT properly working, pet family
-- 1.5.2. Current pet fmaily (if there is one) spells; gets bumped up above pet specicalization
-- 1.6. Other specs' baseline spells;
-- 1.7. Other specs' Talents' spells;
-- 1.8. Other specs' PvP Talents' spells;
-- 2nd: GeneralTab;
-- 3rd: Other classes:
-- 3.1. Each spec baseline spells;
-- 3.2. Each spec Talents' spells;
-- 3.3. Each spec PvP Talents' spells;
-- 3.4. Flyouts (if there are spells for);
-- 3.5. Pets (if there are spells for).
 
LibSN2SID.libLocal.setCurrentPetFirstInLookupOrder = function()
local classKey = LibSN2SID.libLocal.playerUniversalClassName;
if LibSN2SID.libLocal.LookupOrder_table[classKey].Pets then
wipe(LibSN2SID.libLocal.LookupOrder_table[classKey].Pets);
else
local index = (LibSN2SID.DB[classKey].Flyouts and 5) or 4;
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], index, "Pets");
LibSN2SID.libLocal.LookupOrder_table[classKey].Pets = {};
end
local petSpecName;
if classKey == "HUNTER" then
local petSpecIndex = (GetSpecialization(false, true));
petSpecName = (petSpecIndex == 1 and "Ferocity") or (petSpecIndex == 2 and
"Tenacity") or (petSpecIndex == 3 and "Cunning") or nil;
-- print(tostring(petSpecIndex).. " : ".. tostring(petSpecName));
end
local petKey = (next(LibSN2SID.DB[classKey].Pets, nil));
while petKey do
if petSpecName and petKey == petSpecName then
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey].Pets, 1, petKey);
elseif LibSN2SID.libLocal.petFamily and petKey == LibSN2SID.libLocal.petFamily then
local index = (petSpecName and LibSN2SID.libLocal.LookupOrder_table[classKey].Pets[petSpecName] and 2) or 1;
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey].Pets, index, petKey);
else
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey].Pets, petKey);
end
petKey = (next(LibSN2SID.DB[classKey].Pets, petKey));
end
end
 
LibSN2SID.libLocal.SetLookupOrder = function()
-- LibSN2SID.libLocal.LookupOrder_table = {}; -- Reset the table
wipe(LibSN2SID.libLocal.LookupOrder_table); -- Reset the table
local classOrderIndex = 1;
local classKey = (next(LibSN2SID.DB, nil));
-- print(tostring(classKey));
while classKey do
if classKey == LibSN2SID.libLocal.playerUniversalClassName then -- Current player class
tinsert(LibSN2SID.libLocal.LookupOrder_table, 1, classKey);
LibSN2SID.libLocal.LookupOrder_table[classKey] = {};
-- print(tostring(LibSN2SID.libLocal.LookupOrder_table[1]));
-- Order specs et al
local playerActiveEnglishSpecName = (LibSN2SID.libLocal.GetActiveEnglishSpecialisationName());
-- print("Active SpecName = ".. tostring(playerActiveEnglishSpecName));
local specKey = (next(LibSN2SID.DB[classKey].METADATA.Specs, nil));
while specKey do
if specKey == playerActiveEnglishSpecName then
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], 1, specKey);
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], 2, specKey.."_Talents");
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], 3, specKey.."_PVPTalents");
-- print(tostring(LibSN2SID.libLocal.LookupOrder_table[classKey][1]).. " *");
-- elseif LibSN2SID.DB[classKey].METADATA.Specs[specKey] then
else
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], specKey);
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], specKey.."_Talents");
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], specKey.."_PVPTalents");
end
specKey = (next(LibSN2SID.DB[classKey].METADATA.Specs, specKey));
end
if LibSN2SID.DB[classKey].Flyouts then
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], 4, "Flyouts");
LibSN2SID.libLocal.LookupOrder_table[classKey].Flyouts = {};
local flyoutButtonKey = (next(LibSN2SID.DB[classKey].Flyouts, nil));
while flyoutButtonKey do
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey].Flyouts, flyoutButtonKey);
flyoutButtonKey = (next(LibSN2SID.DB[classKey].Flyouts, flyoutButtonKey));
end
end
if LibSN2SID.DB[classKey].Pets then
LibSN2SID.libLocal.setCurrentPetFirstInLookupOrder();
end
elseif classKey ~= "General" then -- Other classes
tinsert(LibSN2SID.libLocal.LookupOrder_table, classKey);
-- print(tostring(LibSN2SID.libLocal.LookupOrder_table[classOrderIndex]));
LibSN2SID.libLocal.LookupOrder_table[classKey] = {};
local specKey = (next(LibSN2SID.DB[classKey].METADATA.Specs, nil));
while specKey do
-- local numSpecSubTables = 3; -- Unless we also have Flyouts, making it 4 or more
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], specKey);
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], specKey.."_Talents");
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], specKey.."_PVPTalents");
specKey = (next(LibSN2SID.DB[classKey].METADATA.Specs, specKey));
end
if LibSN2SID.DB[classKey].Flyouts then
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], "Flyouts");
LibSN2SID.libLocal.LookupOrder_table[classKey].Flyouts = {};
local flyoutButtonKey = (next(LibSN2SID.DB[classKey].Flyouts, nil));
while flyoutButtonKey do
-- print(AddonName.. ": ".. tostring(flyoutButtonKey));
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey].Flyouts, flyoutButtonKey);
flyoutButtonKey = (next(LibSN2SID.DB[classKey].Flyouts, flyoutButtonKey));
end
end
if LibSN2SID.DB[classKey].Pets then
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey], "Pets");
LibSN2SID.libLocal.LookupOrder_table[classKey].Pets = {};
local petKey = (next(LibSN2SID.DB[classKey].Pets, nil));
while petKey do
tinsert(LibSN2SID.libLocal.LookupOrder_table[classKey].Pets, petKey);
petKey = (next(LibSN2SID.DB[classKey].Pets, petKey));
end
end
end
classKey = (next(LibSN2SID.DB, classKey));
classOrderIndex = classOrderIndex + 1;
end
tinsert(LibSN2SID.libLocal.LookupOrder_table, 2, "General");
-- tinsert(LibSN2SID.libLocal.LookupOrder_table, "General");
LibSN2SID.libLocal.LookupOrder_table["General"] = {};
local categoryKey = (next(LibSN2SID.DB.General, nil));
while categoryKey do
if categoryKey == "Racials" then
tinsert(LibSN2SID.libLocal.LookupOrder_table.General, "Racials");
LibSN2SID.libLocal.LookupOrder_table.General.Racials = {};
local racialKey = (next(LibSN2SID.DB.General.Racials, nil));
while racialKey do
if racialKey == LibSN2SID.libLocal.playerUniversalRaceName then
tinsert(LibSN2SID.libLocal.LookupOrder_table.General.Racials, 1, racialKey);
else
tinsert(LibSN2SID.libLocal.LookupOrder_table.General.Racials, racialKey);
end
racialKey = (next(LibSN2SID.DB.General.Racials, racialKey));
end
-- elseif categoryKey ~= "METADATA" then -- Currentlu not in the database
else
tinsert(LibSN2SID.libLocal.LookupOrder_table.General, categoryKey);
end
categoryKey = (next(LibSN2SID.DB.General, categoryKey));
end
end
 
-- Get Player's character data when it's available
if not LibSN2SID.libFrame then
LibSN2SID.libFrame = CreateFrame("Frame");
end
LibSN2SID.libFrame:RegisterEvent("PLAYER_LOGIN");
LibSN2SID.libLocal.lookupOrderTableInitialized = false;
LibSN2SID.libFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
LibSN2SID.libFrame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
LibSN2SID.libFrame:RegisterUnitEvent("UNIT_PET", "player"); -- Fired when a unit's pet changes.
LibSN2SID.libFrame:RegisterEvent("PET_SPECIALIZATION_CHANGED"); -- Fired upon pet's specialisation changes.
LibSN2SID.libFrame:SetScript("OnEvent", function(self, event)
if event == "PLAYER_LOGIN" or event == "PLAYER_ENTERING_WORLD" then
local stubVal;
stubVal, LibSN2SID.libLocal.playerUniversalClassName = UnitClass("player");
stubVal, LibSN2SID.libLocal.playerUniversalRaceName = UnitRace("player");
LibSN2SID.libLocal.SetDefaultFaction();
if UnitExists("pet") then -- Get current Pet data to build the corresponding lookup table
LibSN2SID.libLocal.petFamily = UnitCreatureFamily("pet");
end
LibSN2SID.libLocal.SetLookupOrder();
LibSN2SID.libLocal.lookupOrderTableInitialized = true;
elseif LibSN2SID.libLocal.lookupOrderTableInitialized then
if event == "UNIT_PET" or event == "PET_SPECIALIZATION_CHANGED" then
if not LibSN2SID.libLocal.playerUniversalClassName or not LibSN2SID.libLocal.LookupOrder_table[LibSN2SID.libLocal.playerUniversalClassName] then
return; -- Build lookup table for Pet only after we built the lookup table for Class
end
LibSN2SID.libLocal.petFamily = UnitCreatureFamily("pet");
if not LibSN2SID.libLocal.petFamily then -- UNIT_PET fires several times when a pet
return; -- is lost and when a new one is called; we'll get the new pet
end -- info eventually, but we'll wait til it's up.
LibSN2SID.libLocal.setCurrentPetFirstInLookupOrder();
else
LibSN2SID.libLocal.SetLookupOrder();
end
end
-- for i = 1, #LibSN2SID.libLocal.LookupOrder_table do
-- local classKey = LibSN2SID.libLocal.LookupOrder_table[i];
-- print(AddonName.. ": ".. i.. ". ".. tostring(classKey));
-- for ii = 1, #(LibSN2SID.libLocal.LookupOrder_table[classKey]) do
-- local specKey = LibSN2SID.libLocal.LookupOrder_table[classKey][ii];
-- print(AddonName.. ": ".. i.. ".".. ii.. ". ".. tostring(specKey));
-- if type(LibSN2SID.libLocal.LookupOrder_table[classKey][specKey]) == "table" then
-- for iii = 1, #(LibSN2SID.libLocal.LookupOrder_table[classKey][specKey]) do
-- local subTableKey = LibSN2SID.libLocal.LookupOrder_table[classKey][specKey][iii];
-- print(AddonName.. ": ".. i.. ".".. ii.. ".".. iii.. ". ".. tostring(subTableKey));
-- end
-- end
-- end
-- end
end);
 
 
-- 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") then
for classIndex = 1, #LibSN2SID.libLocal.LookupOrder_table do
local classKey = LibSN2SID.libLocal.LookupOrder_table[classIndex];
-- print(AddonName.. ": ".. tostring(classKey));
for specIndex = 1, #(LibSN2SID.libLocal.LookupOrder_table[classKey]) do
local specKey = LibSN2SID.libLocal.LookupOrder_table[classKey][specIndex];
local spID = LibSN2SID.DB[classKey][specKey][engSpellName] or nil;
if spID then
return spID; -- FOUND IT!
end
-- if specKey == "Flyouts" or specKey == "Pets" then
if LibSN2SID.libLocal.LookupOrder_table[classKey][specKey] ~= nil and type(LibSN2SID.libLocal.LookupOrder_table[classKey][specKey]) == "table" then
local subTableKey = (next(LibSN2SID.DB[classKey][specKey], nil));
while subTableKey do
-- print(tostring(classKey).. " ".. tostring(specKey).. " ".. tostring(subTableKey));
local spID = LibSN2SID.DB[classKey][specKey][subTableKey][engSpellName] or nil;
if spID then
return spID; -- FOUND IT!
end
subTableKey = (next(LibSN2SID.DB[classKey][specKey], subTableKey));
end
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);
return spID;
elseif (paramType == "number") then
local locSpellName = (GetSpellInfo(engSpellName));
-- print(tostring(locSpellName));
if locSpellName then
return engSpellName;
else
return nil;
end
else
-- TODO: error() ?
return nil;
end
end
}
);
-- For backwards compatibility (LibSpellName2SID_MINOR < 10008)
LibSN2SID.ID = LibSN2SID.SID;
 
-- 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);
if paramType == "string" then
for classIndex = 1, #LibSN2SID.libLocal.LookupOrder_table do
local classKey = LibSN2SID.libLocal.LookupOrder_table[classIndex];
-- print(AddonName.. ": ".. tostring(classKey));
for specIndex = 1, #(LibSN2SID.libLocal.LookupOrder_table[classKey]) do
local specKey = LibSN2SID.libLocal.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
 
-- if specKey == "Flyouts" or specKey == "Pets" then
if LibSN2SID.libLocal.LookupOrder_table[classKey][specKey] ~= nil and type(LibSN2SID.libLocal.LookupOrder_table[classKey][specKey]) == "table" then
local subTableKey = (next(LibSN2SID.DB[classKey][specKey], nil));
while subTableKey do
-- print(tostring(classKey).. " ".. tostring(specKey).. " ".. tostring(subTableKey));
local spID = LibSN2SID.DB[classKey][specKey][subTableKey][engSpellName] or nil;
if spID then
local locSpellName = (GetSpellInfo(spID)); -- Localised spell name
return locSpellName; -- FOUND IT!
end
subTableKey = (next(LibSN2SID.DB[classKey][specKey], subTableKey));
end
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);
return locSpellName;
elseif paramType == "number" then
local locSpellName = (GetSpellInfo(engSpellName));
-- print(locSpellName);
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 LibSN2SID:GetNumSpells()
-- error("This function is not implemented in the current versions of ".. LibSpellName2SID_MAJOR.. ": ".. LibAlkaTest_MINOR);
-- 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
-- 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 LibSN2SID:Cleanup()
-- error("This function is not implemented and will be removed in a future versions of ".. LibSpellName2SID_MAJOR);
--[[
-- 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.DB = {};
-- print(AddonName.. ": LibSN2SID.DB NOW has ".. LibSN2SID.GetNumSpells().. " keys.");
return true;
else
-- print(AddonName.. ": LibSN2SID.DB STILL has ".. LibSN2SID.GetNumSpells().. " keys.");
-- TODO: error();
return false;
end
]]--
end
 
 
------------------------------------------
-- print(AddonName.. ": LibSN2SID.DB has ".. LibSN2SID.GetNumSpells().. " keys.");
tags/LibSpellName2SID-1.0.14a/LibSpellName2SID-1.0.toc New file
0,0 → 1,18
## Interface: 80000
## Title: Lib: SpellName2SID-1.0
## Notes: Table of English Spell Names and corresponding Spell IDs
## Version: 1.0.14a
## LoadOnDemand: 1
## Author: aallkkaa
## X-Original-Author: twobits
## X-Credits: benots4
## X-Category: Library
## X-WoWI-ID: 24509
 
LibStub\LibStub.lua
 
LibSpellName2SID-1.0\LibSpellName2SID-1.0.lua
 
#test1.lua
#test2.lua
#test3.lua
tags/LibSpellName2SID-1.0.14a/test.lua New file
0,0 → 1,123
local AddonName, AddonEnv = ...;
 
local LIBSN2SID = LibStub:GetLibrary("LibSpellName2SID");
local SID = LIBSN2SID.SID;
local LSN = LIBSN2SID.LSN;
 
print(AddonName.. ": Starting test!");
 
local Frame = CreateFrame("Frame");
Frame:RegisterEvent("PLAYER_LOGIN"); -- Not enough data from game til this event fires.
-- Frame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
-- Frame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
-- TESTED: Both of these fire Twice on Changing
-- spec. On Login but "ACTIVE_..." fires Once,
-- but "PLAYER_TALENT_..." fires Twice.
-- Frame:RegisterEvent("PLAYER_ENTERING_WORLD");
 
Frame:SetScript("OnEvent", function()
C_Timer.After(3, function()
if SID and LSN then
local startTime = GetTime();
print(AddonName.. tostring(": SID and LSN found."));
local endTime = GetTime();
print("print time with tostring(...) = ".. (endTime - startTime).. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Auto Attack\"] = ".. tostring(SID["Auto Attack"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[\"Auto Attack\"] = ".. tostring(LSN["Auto Attack"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Made It Up\"] = ".. tostring(SID["Made It Up"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[\"Made It Up\"] = ".. tostring(LSN["Made It Up"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[210873] = ".. tostring(SID[210873])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[210873] = ".. tostring(LSN[210873])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[6603] = ".. tostring(SID[6603]));
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[6603] = ".. tostring(LSN[6603]));
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Lightning Bolt\"] = ".. tostring(SID["Lightning Bolt"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[\"Lightning Bolt\"] = ".. tostring(LSN["Lightning Bolt"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Taunt\"] = ".. tostring(SID["Taunt"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[\"Taunt\"] = ".. tostring(LSN["Taunt"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Hex\"] = ".. tostring(SID["Hex"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime();
print(AddonName.. ": SID[\"Hex(Spider)\"] = ".. tostring(SID["Hex(Spider)"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime();
print(AddonName.. ": SID[\"Web Spray\"] = ".. tostring(SID["Web Spray"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime();
print(AddonName.. ": SID[\"Gift of the Naaru\"] = ".. tostring(SID["Gift of the Naaru"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Hex\"] = ".. tostring(LSN["Hex"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Hex(Spider)\"] = ".. tostring(LSN["Hex(Spider)"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Web Spray\"] = ".. tostring(LSN["Web Spray"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime();
print(AddonName.. ": LSN[\"Gift of the Naaru\"] = ".. tostring(LSN["Gift of the Naaru"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
else
print(AddonName.. ": SID and/or LSN not found.");
end
end);
end);
tags/LibSpellName2SID-1.0.14a/test1.lua New file
0,0 → 1,93
---------------------------
-- LibSpellName2SID - test1
-- Test some base spells
---------------------------
 
local AddonName, AddonEnv = ...;
 
local LIBSN2SID = LibStub:GetLibrary("LibSpellName2SID");
local SID = LIBSN2SID.SID;
local LSN = LIBSN2SID.LSN;
 
local Frame = CreateFrame("Frame");
Frame:RegisterEvent("PLAYER_LOGIN"); -- Not enough data from game til this event fires.
-- Frame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
-- Frame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
-- TESTED: Both of these fire Twice on Changing
-- spec. On Login but "ACTIVE_..." fires Once,
-- but "PLAYER_TALENT_..." fires Twice.
-- Frame:RegisterEvent("PLAYER_ENTERING_WORLD");
 
Frame:SetScript("OnEvent", function()
C_Timer.After(3, function()
print(AddonName.. ": Starting test1 - some base spells.");
if SID and LSN then
local startTime = GetTime();
print(AddonName.. tostring(": SID and LSN found."));
local endTime = GetTime();
print("print time with tostring(...) = ".. (endTime - startTime).. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Auto Attack\"] = ".. tostring(SID["Auto Attack"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[\"Auto Attack\"] = ".. tostring(LSN["Auto Attack"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Made It Up\"] = ".. tostring(SID["Made It Up"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[\"Made It Up\"] = ".. tostring(LSN["Made It Up"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[210873] = ".. tostring(SID[210873])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[210873] = ".. tostring(LSN[210873])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[6603] = ".. tostring(SID[6603]));
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[6603] = ".. tostring(LSN[6603]));
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Lightning Bolt\"] = ".. tostring(SID["Lightning Bolt"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[\"Lightning Bolt\"] = ".. tostring(LSN["Lightning Bolt"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": SID[\"Taunt\"] = ".. tostring(SID["Taunt"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime();
print(AddonName.. ": LSN[\"Taunt\"] = ".. tostring(LSN["Taunt"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
else
print(AddonName.. ": SID and/or LSN not found.");
end
end);
end);
tags/LibSpellName2SID-1.0.14a/test2.lua New file
0,0 → 1,62
------------------------------------------
-- LibSpellName2SID - test2
-- Test "Flyouts" and "Pets" and "Racials"
------------------------------------------
 
local AddonName, AddonEnv = ...;
 
local LIBSN2SID = LibStub:GetLibrary("LibSpellName2SID");
local SID = LIBSN2SID.SID;
local LSN = LIBSN2SID.LSN;
 
local Frame = CreateFrame("Frame");
Frame:RegisterEvent("PLAYER_LOGIN"); -- Not enough data from game til this event fires.
-- Frame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
-- Frame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
-- TESTED: Both of these fire Twice on Changing
-- spec. On Login but "ACTIVE_..." fires Once,
-- but "PLAYER_TALENT_..." fires Twice.
-- Frame:RegisterEvent("PLAYER_ENTERING_WORLD");
 
Frame:SetScript("OnEvent", function()
C_Timer.After(3, function()
print(AddonName.. ": Starting test2 - \"Flyouts\", \"Pets\" and \"Racials\".");
if SID and LSN then
startTime = GetTime();
print(AddonName.. ": SID[\"Hex\"] = ".. tostring(SID["Hex"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime();
print(AddonName.. ": SID[\"Hex(Spider)\"] = ".. tostring(SID["Hex(Spider)"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime();
print(AddonName.. ": SID[\"Web Spray\"] = ".. tostring(SID["Web Spray"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime();
print(AddonName.. ": SID[\"Gift of the Naaru\"] = ".. tostring(SID["Gift of the Naaru"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
 
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Hex\"] = ".. tostring(LSN["Hex"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Hex(Spider)\"] = ".. tostring(LSN["Hex(Spider)"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime() *1000000;
print(AddonName.. ": LSN[\"Web Spray\"] = ".. tostring(LSN["Web Spray"])); --
endTime = GetTime() *1000000;
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
startTime = GetTime();
print(AddonName.. ": LSN[\"Gift of the Naaru\"] = ".. tostring(LSN["Gift of the Naaru"])); --
endTime = GetTime();
print(AddonName.. "... in ".. endTime - startTime.. "ns.");
else
print(AddonName.. ": SID and/or LSN not found.");
end
end);
end);
\ No newline at end of file
tags/LibSpellName2SID-1.0.14a/test3.lua New file
0,0 → 1,50
--------------------------------------------------------
-- LibSpellName2SID - test3
-- Test Alliance/Horde spells (same name, different IDs)
--------------------------------------------------------
 
local AddonName, AddonEnv = ...;
 
local LIBSN2SID = LibStub:GetLibrary("LibSpellName2SID");
local SID = LIBSN2SID.SID;
local LSN = LIBSN2SID.LSN;
 
local Frame = CreateFrame("Frame");
Frame:RegisterEvent("PLAYER_LOGIN"); -- Not enough data from game til this event fires.
-- Frame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow
-- Frame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec.
-- TESTED: Both of these fire Twice on Changing
-- spec. On Login but "ACTIVE_..." fires Once,
-- but "PLAYER_TALENT_..." fires Twice.
-- Frame:RegisterEvent("PLAYER_ENTERING_WORLD");
 
Frame:SetScript("OnEvent", function()
C_Timer.After(3, function()
print(AddonName.. ": Starting test3 - Alliance/Horde spells (same name, different IDs).");
if SID and LSN then
print(AddonName.. ": LSN[\"Portal: Tol Barad(Alliance)\"] = ".. tostring(LSN["Portal: Tol Barad(Alliance)"])); --
print(AddonName.. ": LSN[\"Portal: Tol Barad(Horde)\"] = ".. tostring(LSN["Portal: Tol Barad(Horde)"])); --
print(AddonName.. ": LSN[\"Portal: Tol Barad\"] = ".. tostring(LSN["Portal: Tol Barad"])); --
print(AddonName.. ": SID[\"Portal: Tol Barad(Alliance)\"] = ".. tostring(SID["Portal: Tol Barad(Alliance)"])); --
print(AddonName.. ": SID[\"Portal: Tol Barad(Horde)\"] = ".. tostring(SID["Portal: Tol Barad(Horde)"])); --
print(AddonName.. ": SID[\"Portal: Tol Barad\"] = ".. tostring(SID["Portal: Tol Barad"])); --
 
print(AddonName.. ": Will now set faction to Alliance.");
LIBSN2SID.SetFaction("Alliance");
print(AddonName.. ": LSN[\"Portal: Tol Barad\"] = ".. tostring(LSN["Portal: Tol Barad"]));
print(AddonName.. ": SID[\"Portal: Tol Barad\"] = ".. tostring(SID["Portal: Tol Barad"]));
 
print(AddonName.. ": Will now set faction to Horde.");
LIBSN2SID.SetFaction("Horde");
print(AddonName.. ": LSN[\"Portal: Tol Barad\"] = ".. tostring(LSN["Portal: Tol Barad"]));
print(AddonName.. ": SID[\"Portal: Tol Barad\"] = ".. tostring(SID["Portal: Tol Barad"]));
 
print(AddonName.. ": Will now set faction back to player\'s.");
LIBSN2SID.SetFaction((UnitFactionGroup("player")));
print(AddonName.. ": LSN[\"Portal: Tol Barad\"] = ".. tostring(LSN["Portal: Tol Barad"]));
print(AddonName.. ": SID[\"Portal: Tol Barad\"] = ".. tostring(SID["Portal: Tol Barad"]));
else
print(AddonName.. ": SID and/or LSN not found.");
end
end);
end);
\ No newline at end of file