# HG changeset patch # User tercio # Date 1400303830 10800 # Node ID ce416064d8a1ea12377c020a65c075d910a048e9 first commit diff -r 000000000000 -r ce416064d8a1 Details_ClassSpellList.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Details_ClassSpellList.lua Sat May 17 02:17:10 2014 -0300 @@ -0,0 +1,831 @@ + +-- this list has been copied from Details! addon with the author authorization. +-- it holds all spells from all classes and help try guessing what is the class of random character. + + PVPScan.ClassSpellList = { + + --death knight + + [108194] = "DEATHKNIGHT", -- Asphyxiate + [50977] = "DEATHKNIGHT", -- Death Gate + [108199] = "DEATHKNIGHT", -- Gorefiend's Grasp + [108201] = "DEATHKNIGHT", -- Desecrated Ground + [48265] = "DEATHKNIGHT", -- Unholy Presence + [77606] = "DEATHKNIGHT", -- Dark Simulacrum + [61999] = "DEATHKNIGHT", -- Raise Ally + [108196] = "DEATHKNIGHT", --Death Siphon + [47541] = "DEATHKNIGHT", -- Death Coil + [48721] = "DEATHKNIGHT", -- Blood Boil + [42650] = "DEATHKNIGHT", -- Army of the Dead + [130736] = "DEATHKNIGHT", -- Soul Reaper + [45524] = "DEATHKNIGHT", -- Chains of Ice + [57330] = "DEATHKNIGHT", -- Horn of Winter + [45462] = "DEATHKNIGHT", -- Plague Strike + [85948] = "DEATHKNIGHT", -- Festering Strike + [56815] = "DEATHKNIGHT", -- Rune Strike + [63560] = "DEATHKNIGHT", -- Dark Transformation + [108200] = "DEATHKNIGHT", -- Remorseless Winter + [49222] = "DEATHKNIGHT", -- Bone Shield + [45477] = "DEATHKNIGHT", -- Icy Touch + [43265] = "DEATHKNIGHT", -- Death and Decay + [77575] = "DEATHKNIGHT", -- Outbreak + [51271] = "DEATHKNIGHT", -- Pillar of Frost + [115989] = "DEATHKNIGHT", -- Unholy Blight + [48792] = "DEATHKNIGHT", -- Icebound Fortitude + [55050] = "DEATHKNIGHT", -- Heart Strike + [55233] = "DEATHKNIGHT", -- Vampiric Blood + [49576] = "DEATHKNIGHT", -- Death Grip + [119975] = "DEATHKNIGHT", -- Conversion + [56222] = "DEATHKNIGHT", -- Dark Command + [114866] = "DEATHKNIGHT", -- Soul Reaper + [73975] = "DEATHKNIGHT", -- Necrotic Strike + [45529] = "DEATHKNIGHT", -- Blood Tap + [130735] = "DEATHKNIGHT", -- Soul Reaper + [50842] = "DEATHKNIGHT", -- Pestilence + [48743] = "DEATHKNIGHT", -- Death Pact + [47528] = "DEATHKNIGHT", -- Mind Freeze + [123693] = "DEATHKNIGHT", -- Plague Leech + [3714] = "DEATHKNIGHT", -- Path of Frost + [48263] = "DEATHKNIGHT", -- Blood Presence + [49039] = "DEATHKNIGHT", -- Lichborne + [49028] = "DEATHKNIGHT", -- Dancing Rune Weapon + [47568] = "DEATHKNIGHT", -- Empower Rune Weapon + [96268] = "DEATHKNIGHT", -- Death's Advance + [49016] = "DEATHKNIGHT", -- Unholy Frenzy + [49206] = "DEATHKNIGHT", -- Summon Gargoyle + [48266] = "DEATHKNIGHT", -- Frost Presence + [45902] = "DEATHKNIGHT", -- Blood Strike + [77535] = "DEATHKNIGHT", --Blood Shield (heal) + [45470] = "DEATHKNIGHT", --Death Strike (heal) + [53365] = "DEATHKNIGHT", --Unholy Strength (heal) + [48707] = "DEATHKNIGHT", -- Anti-Magic Shell (heal) + [48982] = "DEATHKNIGHT", --rune tap + [49020] = "DEATHKNIGHT", --obliterate + [49143] = "DEATHKNIGHT", --frost strike + [55095] = "DEATHKNIGHT", --frost fever + [55078] = "DEATHKNIGHT", --blood plague + [49184] = "DEATHKNIGHT", --howling blast + [49998] = "DEATHKNIGHT", --death strike + [55090] = "DEATHKNIGHT",--scourge strike + [47632] = "DEATHKNIGHT",--death coil + + --druid + + [80965] = "DRUID", -- Skull Bash + [16689] = "DRUID", -- Nature's Grasp + [102417] = "DRUID", -- Wild Charge + [5229] = "DRUID", -- Enrage + [78675] = "DRUID", -- Solar Beam + [102351] = "DRUID", -- Cenarion Ward + [9005] = "DRUID", -- Pounce + [114282] = "DRUID", -- Treant Form + [5215] = "DRUID", -- Prowl + [52610] = "DRUID", -- Savage Roar + [22570] = "DRUID", -- Maim + [102401] = "DRUID", -- Wild Charge + [33831] = "DRUID", -- Force of Nature + [102355] = "DRUID", -- Faerie Swarm + [102706] = "DRUID", -- Force of Nature + [16914] = "DRUID", -- Hurricane + [2908] = "DRUID", -- Soothe + [62078] = "DRUID", -- Swipe + [102793] = "DRUID", -- Ursol's Vortex + [106996] = "DRUID", -- Astral Storm + [6785] = "DRUID", -- Ravage + [106898] = "DRUID", -- Stampeding Roar + [33891] = "DRUID", -- Incarnation: Tree of Life + [102359] = "DRUID", -- Mass Entanglement + [108293] = "DRUID", -- Heart of the Wild + [5211] = "DRUID", -- Mighty Bash + [102795] = "DRUID", -- Bear Hug + [108291] = "DRUID", -- Heart of the Wild + [18562] = "DRUID", --Swiftmend + [106922] = "DRUID", -- Might of Ursoc + [132158] = "DRUID", -- Nature's Swiftness + [33763] = "DRUID", -- Lifebloom + [1126] = "DRUID", -- Mark of the Wild + [6807] = "DRUID", -- Maul + [33745] = "DRUID", -- Lacerate + [145205] = "DRUID", -- Wild Mushroom + [77761] = "DRUID", -- Stampeding Roar + [102791] = "DRUID", -- Wild Mushroom: Bloom + [16953] = "DRUID", -- Primal Fury + [102693] = "DRUID", -- Force of Nature + [145518] = "DRUID", -- Genesis + [22812] = "DRUID", -- Barkskin + [770] = "DRUID", -- Faerie Fire + [106951] = "DRUID", -- Berserk + [124974] = "DRUID", -- Nature's Vigil + [105697] = "DRUID", -- Virmen's Bite + [5225] = "DRUID", -- Track Humanoids + [102280] = "DRUID", -- Displacer Beast + [102543] = "DRUID", -- Incarnation: King of the Jungle + [1850] = "DRUID", -- Dash + [77764] = "DRUID", -- Stampeding Roar + [22568] = "DRUID", -- Ferocious Bite + [779] = "DRUID", -- Swipe + [147349] = "DRUID", -- Wild Mushroom + [77758] = "DRUID", -- Thrash + [108294] = "DRUID", -- Heart of the Wild + [106830] = "DRUID", -- Thrash + [108292] = "DRUID", -- Heart of the Wild + [768] = "DRUID", -- Cat Form + [127538] = "DRUID", -- Savage Roar + [61336] = "DRUID", -- Survival Instincts + [114236] = "DRUID", -- Shred! + [146323] = "DRUID", -- Inward Contemplation + [22842] = "DRUID", -- Frenzied Regeneration + [108238] = "DRUID", -- Renewal + [16979] = "DRUID", -- Wild Charge + [50334] = "DRUID", -- Berserk + [102558] = "DRUID", -- Incarnation: Son of Ursoc + [6795] = "DRUID", -- Growl + [48505] = "DRUID", -- Starfall + [78674] = "DRUID", -- Starsurge + [102560] = "DRUID", -- Incarnation: Chosen of Elune + [112071] = "DRUID", -- Celestial Alignment + [61391] = "DRUID", -- Typhoon + [24858] = "DRUID", -- Moonkin Form + [136086] = "DRUID", -- Archer's Grace + [127663] = "DRUID", -- Astral Communion + [49376] = "DRUID", -- Wild Charge + [62606] = "DRUID", -- Savage Defense + [80964] = "DRUID", -- Skull Bash + [1822] = "DRUID", --rake + [1079] = "DRUID", --rip + [5221] = "DRUID", --shred + [33876] = "DRUID", --mangle + [33878] = "DRUID", --mangle (energy) + [102545] = "DRUID", --ravage! + [33878] = "DRUID", --mangle (energy gain) + [17057] = "DRUID", --bear form (energy gain) + [16959] = "DRUID", --primal fury (energy gain) + [5217] = "DRUID", --tiger's fury (energy gain) + [68285] = "DRUID", --leader of the pack (mana) + [5176] = "DRUID", --wrath + [93402] = "DRUID", --sunfire + [2912] = "DRUID", --starfire + [8921] = "DRUID", --moonfire + [81070] = "DRUID", --eclipse + [29166] = "DRUID", --innervate + [774] = "DRUID", --rejuvenation + [44203] = "DRUID", --tranquility + [48438] = "DRUID", --wild growth + [81269] = "DRUID", --shiftmend + [102792] = "DRUID", --wind moshroom: bloom + [5185] = "DRUID", --healing touch + [8936] = "DRUID", --regrowth + [33778] = "DRUID", --lifebloom + [48503] = "DRUID", --living seed + [50464] = "DRUID", --nourish + + --hunter + [19503] = "HUNTER",-- Scatter Shot HUNTER + [83245] = "HUNTER",-- Call Pet 5 HUNTER + [51753] = "HUNTER",-- Camouflage HUNTER + [13165] = "HUNTER",-- Aspect of the Hawk HUNTER + [109259] = "HUNTER",-- Powershot HUNTER + [53271] = "HUNTER",-- Master's Call HUNTER + [20736] = "HUNTER",-- Distracting Shot HUNTER + [1543] = "HUNTER",-- Flare HUNTER + [3674] = "HUNTER",-- Black Arrow + [117050] = "HUNTER",-- Glaive Toss + [1978] = "HUNTER",-- Serpent Sting + [781] = "HUNTER",-- Disengage + [34026] = "HUNTER",-- Kill Command + [82948] = "HUNTER",-- Snake Trap + [2643] = "HUNTER",-- Multi-Shot + [109248] = "HUNTER",-- Binding Shot + [149365] = "HUNTER",-- Dire Beast + [120679] = "HUNTER",-- Dire Beast + [82726] = "HUNTER",-- Fervor + [3045] = "HUNTER",-- Rapid Fire + [883] = "HUNTER",-- Call Pet 1 + [19574] = "HUNTER",-- Bestial Wrath + [148467] = "HUNTER",-- Deterrence + [109304] = "HUNTER",-- Exhilaration + [82939] = "HUNTER",-- Explosive Trap + [19386] = "HUNTER",-- Wyvern Sting + [131894] = "HUNTER",-- A Murder of Crows + [13159] = "HUNTER",-- Aspect of the Pack + [109260] = "HUNTER",-- Aspect of the Iron Hawk + [121818] = "HUNTER",-- Stampede + [19434] = "HUNTER",-- Aimed Shot + [82941] = "HUNTER",-- Ice Trap + [83242] = "HUNTER",-- Call Pet 2 + [120697] = "HUNTER",-- Lynx Rush + [56641] = "HUNTER",-- Steady Shot + [82692] = "HUNTER",-- Focus Fire + [34490] = "HUNTER",-- Silencing Shot + [53209] = "HUNTER",-- Chimera Shot + [82928] = "HUNTER",-- Aimed Shot! + [83243] = "HUNTER",-- Call Pet 3 + [5116] = "HUNTER",-- Concussive Shot + [1130] = "HUNTER",--'s Mark + [34477] = "HUNTER",-- Misdirection + [19263] = "HUNTER",-- Deterrence + [147362] = "HUNTER",-- Counter Shot + [19801] = "HUNTER",-- Tranquilizing Shot + [82654] = "HUNTER",-- Widow Venom + [2641] = "HUNTER",-- Dismiss Pet + [83244] = "HUNTER",-- Call Pet 4 + [5118] = "HUNTER",-- Aspect of the Cheetah + [120360] = "HUNTER",-- Barrage + [19577] = "HUNTER",-- Intimidation + [131900] = "HUNTER",--a murder of crows + [118253] = "HUNTER",--serpent sting + [77767] = "HUNTER",--cobra shot + [3044] = "HUNTER",--arcane shot + [53301] = "HUNTER",--explosive shot + [120361] = "HUNTER",--barrage + [53351] = "HUNTER",--kill shot + + --mage + [108839] = "MAGE",-- Ice Floes + [7302] = "MAGE",-- Frost Armor + [31661] = "MAGE",-- Dragon's Breath + [53140] = "MAGE",-- Teleport: Dalaran + [11417] = "MAGE",-- Portal: Orgrimmar + [42955] = "MAGE",-- Conjure Refreshment + [44457] = "MAGE",-- Living Bomb + [1953] = "MAGE",-- Blink + [108843] = "MAGE",-- Blazing Speed + [131078] = "MAGE",-- Icy Veins + [12043] = "MAGE",-- Presence of Mind + [108978] = "MAGE",-- Alter Time + [55342] = "MAGE",-- Mirror Image + [84714] = "MAGE",-- Frozen Orb + [45438] = "MAGE",-- Ice Block + [115610] = "MAGE",-- Temporal Shield + [110960] = "MAGE",-- Greater Invisibility + [110959] = "MAGE",-- Greater Invisibility + [11129] = "MAGE",-- Combustion + [11958] = "MAGE",-- Cold Snap + [61316] = "MAGE",-- Dalaran Brilliance + [112948] = "MAGE",-- Frost Bomb + [2139] = "MAGE",-- Counterspell + [80353] = "MAGE",-- Time Warp + [2136] = "MAGE",-- Fire Blast + [7268] = "MAGE",-- Arcane Missiles + [111264] = "MAGE",-- Ice Ward + [114923] = "MAGE",-- Nether Tempest + [2120] = "MAGE",-- Flamestrike + [44425] = "MAGE",-- Arcane Barrage + [12042] = "MAGE",-- Arcane Power + [1459] = "MAGE",-- Arcane Brilliance + [127140] = "MAGE",-- Alter Time + [116011] = "MAGE",-- Rune of Power + [116014] = "MAGE",-- Rune of Power + [132627] = "MAGE",-- Teleport: Vale of Eternal Blossoms + [31687] = "MAGE",-- Summon Water Elemental + [3567] = "MAGE",-- Teleport: Orgrimmar + [30449] = "MAGE",-- Spellsteal + [44572] = "MAGE",-- Deep Freeze + [113724] = "MAGE",-- Ring of Frost + [132626] = "MAGE",-- Portal: Vale of Eternal Blossoms + [12472] = "MAGE",-- Icy Veins + [116] = "MAGE",--frost bolt + [30455] = "MAGE",--ice lance + [84721] = "MAGE",--frozen orb + [1449] = "MAGE",--arcane explosion + [113092] = "MAGE",--frost bomb + [115757] = "MAGE",--frost nova + [44614] = "MAGE",--forstfire bolt + [42208] = "MAGE",--blizzard + [11426] = "MAGE",--Ice Barrier (heal) + [11366] = "MAGE",--pyroblast + [133] = "MAGE",--fireball + [108853] = "MAGE",--infernoblast + [2948] = "MAGE",--scorch + [30451] = "MAGE",--arcane blase + [12051] = "MAGE",--evocation + + --monk + + [115176] = "MONK", -- Zen Meditation cooldown + [115203] = "MONK", -- Fortifying Brew + [115213] = "MONK", -- Avert Harm + + [124081] = "MONK", -- Zen Sphere + [125355] = "MONK", -- Healing Sphere + [122278] = "MONK", -- Dampen Harm + [115450] = "MONK", -- Detox + + [121827] = "MONK", -- Roll + [115315] = "MONK", -- Summon Black Ox Statue + [115399] = "MONK", -- Chi Brew + [101643] = "MONK", -- Transcendence + [115546] = "MONK", -- Provoke + [115294] = "MONK", -- Mana Tea + [116680] = "MONK", -- Thunder Focus Tea + [115070] = "MONK", -- Stance of the Wise Serpent + [115069] = "MONK", -- Stance of the Sturdy Ox + + [119381] = "MONK", -- Leg Sweep + [115695] = "MONK", -- Jab + [137639] = "MONK", -- Storm, Earth, and Fire + [115073] = "MONK", -- Spinning Fire Blossom + [115008] = "MONK", -- Chi Torpedo + [121828] = "MONK", -- --Chi Torpedo + [115180] = "MONK", -- Dizzying Haze + [123986] = "MONK", -- Chi Burst + [130654] = "MONK", -- Chi Burst + [148135] = "MONK", -- Chi Burst + [119392] = "MONK", -- Charging Ox Wave + [116095] = "MONK", -- Disable + [115687] = "MONK", -- Jab + [117993] = "MONK", -- Chi Torpedo + [100780] = "MONK", -- Jab + [116740] = "MONK", -- Tigereye Brew + [124682] = "MONK", -- Enveloping Mist + [101545] = "MONK", -- Flying Serpent Kick + [109132] = "MONK", -- Roll + [122470] = "MONK", -- Touch of Karma + [117418] = "MONK", -- Fists of Fury + [113656] = "MONK", -- Fists of Fury + [115698] = "MONK", -- Jab + [115460] = "MONK", -- Healing Sphere + [115098] = "MONK", -- Chi Wave + [115464] = "MONK", -- Healing Sphere + [115151] = "MONK", -- Renewing Mist + [117952] = "MONK", -- Crackling Jade Lightning + [122783] = "MONK", -- Diffuse Magic + [115078] = "MONK", -- Paralysis + [116705] = "MONK", -- Spear Hand Strike + [123904] = "MONK", -- Invoke Xuen, the White Tiger + [116709] = "MONK", -- Spear Hand Strike + [147489] = "MONK", -- Expel Harm + [101546] = "MONK", -- Spinning Crane Kick + [115313] = "MONK", -- Summon Jade Serpent Statue + [135920] = "MONK", -- Gift of the Serpent + [116841] = "MONK", -- Tiger's Lust + [116694] = "MONK", -- Surging Mist + [116847] = "MONK", -- Rushing Jade Wind + [108557] = "MONK", -- Jab + [115181] = "MONK", -- Breath of Fire + [121253] = "MONK", -- Keg Smash + [124506] = "MONK", -- Gift of the Ox + [124503] = "MONK", -- Gift of the Ox + [115288] = "MONK", -- Energizing Brew + [115308] = "MONK", -- Elusive Brew + [116781] = "MONK", -- Legacy of the White Tiger + [115921] = "MONK", -- Legacy of the Emperor + [115693] = "MONK", -- Jab + [124507] = "MONK", -- Gift of the Ox + [119582] = "MONK", -- Purifying Brew + [115080] = "MONK", -- Touch of Death + [135914] = "MONK", -- Healing Sphere + [126892] = "MONK", -- Zen Pilgrimage + [116849] = "MONK", -- Life Cocoon + [116844] = "MONK", -- Ring of Peace + [107428] = "MONK", --rising sun kick + [100784] = "MONK", --blackout kick + [132467] = "MONK", --Chi wave + [107270] = "MONK", --spinning crane kick + [100787] = "MONK", --tiger palm + [123761] = "MONK", --mana tea + [119611] = "MONK", --renewing mist + [115310] = "MONK", --revival + [116670] = "MONK", --uplift + [115175] = "MONK", --soothing mist + [124041] = "MONK", --gift of the serpent + [124040] = "MONK", -- shi torpedo + [132120] = "MONK", -- enveloping mist + [132463] = "MONK", -- shi wave + [117895] = "MONK", --eminence (statue) + [115295] = "MONK", --guard + [115072] = "MONK", --expel harm + + --paladin + + [31850] = "PALADIN", -- Ardent Defender + [31842] = "PALADIN", -- Divine Favor + [1044] = "PALADIN", -- Hand of Freedom + [114039] = "PALADIN", -- Hand of Purity + [4987] = "PALADIN", -- Cleanse + [136494] = "PALADIN", -- Word of Glory + [54428] = "PALADIN", -- Divine Plea + [7328] = "PALADIN", -- Redemption + [116467] = "PALADIN", -- Consecration + [31801] = "PALADIN", -- Seal of Truth + [20165] = "PALADIN", -- Seal of Insight + [20473] = "PALADIN",-- Holy Shock + [114158] = "PALADIN",-- Light's Hammer + [85673] = "PALADIN",-- Word of Glory + [85499] = "PALADIN",-- Speed of Light + [84963] = "PALADIN",-- Inquisition + [31884] = "PALADIN",-- Avenging Wrath + [24275] = "PALADIN",-- Hammer of Wrath + [114165] = "PALADIN",-- Holy Prism + [20925] = "PALADIN",-- Sacred Shield + [53563] = "PALADIN",-- Beacon of Light + [633] = "PALADIN",-- Lay on Hands + [88263] = "PALADIN",-- Hammer of the Righteous + [53595] = "PALADIN",-- Hammer of the Righteous + [53600] = "PALADIN",-- Shield of the Righteous + [26573] = "PALADIN",-- Consecration + [119072] = "PALADIN",-- Holy Wrath + [105593] = "PALADIN",-- Fist of Justice + [114163] = "PALADIN",-- Eternal Flame + [62124] = "PALADIN",-- Reckoning + [121783] = "PALADIN",-- Emancipate + [98057] = "PALADIN",-- Grand Crusader + [642] = "PALADIN",-- Divine Shield + [122032] = "PALADIN",-- Exorcism + [20217] = "PALADIN",-- Blessing of Kings + [96231] = "PALADIN",-- Rebuke + [105809] = "PALADIN",-- Holy Avenger + [25780] = "PALADIN",-- Righteous Fury + [115750] = "PALADIN",-- Blinding Light + [31821] = "PALADIN",-- Devotion Aura + [53385] = "PALADIN",-- Divine Storm + [20154] = "PALADIN",-- Seal of Righteousness + [19740] = "PALADIN",-- Blessing of Might + [148039] = "PALADIN",-- Sacred Shield + [82326] = "PALADIN",-- Divine Light + [35395] = "PALADIN",--cruzade strike + [879] = "PALADIN",--exorcism + [85256] = "PALADIN",--templar's verdict + [20167] = "PALADIN",--seal of insight (mana) + [31935] = "PALADIN",--avenger's shield + [20271] = "PALADIN", --judgment + [35395] = "PALADIN", --cruzader strike + [81297] = "PALADIN", --consacration + [31803] = "PALADIN", --censure + [65148] = "PALADIN", --Sacred Shield + [20167] = "PALADIN", --Seal of Insight + [86273] = "PALADIN", --illuminated healing + [85222] = "PALADIN", --light of dawn + [53652] = "PALADIN", --beacon of light + [82327] = "PALADIN", --holy radiance + [119952] = "PALADIN", --arcing light + [25914] = "PALADIN", --holy shock + [19750] = "PALADIN", --flash of light + + --priest + [19236] = "PRIEST", -- Desperate Prayer + [47788] = "PRIEST", -- Guardian Spirit + [81206] = "PRIEST", -- Chakra: Sanctuary + [62618] = "PRIEST", -- Power Word: Barrier + [32375] = "PRIEST", -- Mass Dispel + [32546] = "PRIEST", -- Binding Heal + [126135] = "PRIEST", -- Lightwell + [81209] = "PRIEST", -- Chakra: Chastise + [81208] = "PRIEST", -- Chakra: Serenity + [2006] = "PRIEST", -- Resurrection + [1706] = "PRIEST", -- Levitate + [73510] = "PRIEST", -- Mind Spike + [127632] = "PRIEST", -- Cascade + [108921] = "PRIEST", -- Psyfiend + [88625] = "PRIEST", -- Holy Word: Chastise + [121135] = "PRIEST", -- Cascade + [122121] = "PRIEST", -- Divine Star + [110744] = "PRIEST", -- Divine Star + [8122] = "PRIEST", -- Psychic Scream + [81700] = "PRIEST", -- Archangel + [123258] = "PRIEST", -- Power Word: Shield + [48045] = "PRIEST", -- Mind Sear + [49821] = "PRIEST", -- Mind Sear + [123040] = "PRIEST", -- Mindbender + [121536] = "PRIEST", -- Angelic Feather + [121557] = "PRIEST", -- Angelic Feather + [88685] = "PRIEST", -- Holy Word: Sanctuary + [88684] = "PRIEST", -- Holy Word: Serenity + [33076] = "PRIEST", -- Prayer of Mending + [32379] = "PRIEST", -- Shadow Word: Death + [129176] = "PRIEST", -- Shadow Word: Death + [586] = "PRIEST", -- Fade + [120517] = "PRIEST", -- Halo + [64901] = "PRIEST", -- Hymn of Hope + [64843] = "PRIEST", -- Divine Hymn + [64844] = "PRIEST", -- Divine Hymn + [34433] = "PRIEST", -- Shadowfiend + [120644] = "PRIEST", -- Halo + [15487] = "PRIEST", -- Silence + [89485] = "PRIEST", -- Inner Focus + [109964] = "PRIEST", -- Spirit Shell + [129197] = "PRIEST", -- Mind Flay (Insanity) + [112833] = "PRIEST", -- Spectral Guise + [47750] = "PRIEST", -- Penance + [33206] = "PRIEST", -- Pain Suppression + [15286] = "PRIEST", -- Vampiric Embrace + [588] = "PRIEST", -- Inner Fire + [21562] = "PRIEST", -- Power Word: Fortitude + [73413] = "PRIEST", -- Inner Will + [10060] = "PRIEST", -- Power Infusion + [2050] = "PRIEST", -- Heal + [15473] = "PRIEST", -- Shadowform + [108920] = "PRIEST", -- Void Tendrils + [47585] = "PRIEST", -- Dispersion + [123259] = "PRIEST", -- Prayer of Mending + [34650] = "PRIEST", --mana leech (pet) + [589] = "PRIEST", --shadow word: pain + [34914] = "PRIEST", --vampiric touch + [34919] = "PRIEST", --vampiric touch (mana) + [15407] = "PRIEST", --mind flay + [8092] = "PRIEST", --mind blast + [15290] = "PRIEST",-- Vampiric Embrace + [127626] = "PRIEST",--devouring plague (heal) + [2944] = "PRIEST",--devouring plague (damage) + [585] = "PRIEST", --smite + [47666] = "PRIEST", --penance + [14914] = "PRIEST", --holy fire + [81751] = "PRIEST", --atonement + [47753] = "PRIEST", --divine aegis + [33110] = "PRIEST", --prayer of mending + [77489] = "PRIEST", --mastery echo of light + [596] = "PRIEST", --prayer of healing + [34861] = "PRIEST", --circle of healing + [139] = "PRIEST", --renew + [120692] = "PRIEST", --halo + [2060] = "PRIEST", --greater heal + [110745] = "PRIEST", --divine star + [2061] = "PRIEST", --flash heal + [88686] = "PRIEST", --santuary + [17] = "PRIEST", --power word: shield + [64904] = "PRIEST", --hymn of hope + [129250] = "PRIEST", --power word: solace + + --rogue + [74001] = "ROGUE", -- Combat Readiness + [14183] = "ROGUE", -- Premeditation + [108211] = "ROGUE", -- Leeching Poison + [5761] = "ROGUE", -- Mind-numbing Poison + [8679] = "ROGUE", -- Wound Poison + + [137584] = "ROGUE", -- Shuriken Toss + [137585] = "ROGUE", -- Shuriken Toss Off-hand + [1833] = "ROGUE", -- Cheap Shot + [121733] = "ROGUE", -- Throw + [1776] = "ROGUE", -- Gouge + [108212] = "ROGUE", -- Burst of Speed + [27576] = "ROGUE", -- Mutilate Off-Hand + [1329] = "ROGUE", -- Mutilate + [5171] = "ROGUE", -- Slice and Dice + [2983] = "ROGUE", -- Sprint + [1966] = "ROGUE", -- Feint + [36554] = "ROGUE", -- Shadowstep + [31224] = "ROGUE", -- Cloak of Shadows + [1784] = "ROGUE", -- Stealth + [84617] = "ROGUE", -- Revealing Strike + [13750] = "ROGUE", -- Adrenaline Rush + [121471] = "ROGUE", -- Shadow Blades + [121473] = "ROGUE", -- Shadow Blade + [1752] = "ROGUE", -- Sinister Strike + [51690] = "ROGUE", -- Killing Spree + [121474] = "ROGUE", -- Shadow Blade Off-hand + [1766] = "ROGUE", -- Kick + [76577] = "ROGUE", -- Smoke Bomb + [5277] = "ROGUE", -- Evasion + [137619] = "ROGUE", -- Marked for Death + [8647] = "ROGUE", -- Expose Armor + [79140] = "ROGUE", -- Vendetta + [51713] = "ROGUE", -- Shadow Dance + [2823] = "ROGUE", -- Deadly Poison + [115191] = "ROGUE", -- Stealth + [108215] = "ROGUE", -- Paralytic Poison + [14185] = "ROGUE", -- Preparation + [2094] = "ROGUE", -- Blind + [121411] = "ROGUE", -- Crimson Tempest + [53] = "ROGUE", --backstab + [8680] = "ROGUE", --wound pouson + [2098] = "ROGUE", --eviscerate + [2818] = "ROGUE", --deadly poison + [113780] = "ROGUE", --deadly poison + [51723] = "ROGUE", --fan of knifes + [111240] = "ROGUE", --dispatch + [703] = "ROGUE", --garrote + [1943] = "ROGUE", --rupture + [114014] = "ROGUE", --shuriken toss + [16511] = "ROGUE", --hemorrhage + [89775] = "ROGUE", --hemorrhage + [8676] = "ROGUE", --amcush + [5374] = "ROGUE", --mutilate + [32645] = "ROGUE", --envenom + [1943] = "ROGUE", --rupture + [73651] = "ROGUE", --Recuperate (heal) + [35546] = "ROGUE", --combat potency (energy) + [98440] = "ROGUE", --relentless strikes (energy) + [51637] = "ROGUE", --venomous vim (energy) + + --shaman + [51886] = "SHAMAN", -- Cleanse Spirit + [98008] = "SHAMAN", -- Spirit Link Totem + [8177] = "SHAMAN", -- Grounding Totem + [8143] = "SHAMAN", -- Tremor Totem + [108273] = "SHAMAN", -- Windwalk Totem + [51514] = "SHAMAN", -- Hex + [73682] = "SHAMAN", -- Unleash Frost + [8033] = "SHAMAN", -- Frostbrand Weapon + [114074] = "SHAMAN", -- Lava Beam + [120668] = "SHAMAN", --Stormlash Totem + [2894] = "SHAMAN", -- Fire Elemental Totem + [2825] = "SHAMAN", -- Bloodlust + [114049] = "SHAMAN", -- Ascendance + [73680] = "SHAMAN", -- Unleash Elements + [5394] = "SHAMAN", -- Healing Stream Totem + [108280] = "SHAMAN", -- Healing Tide Totem + [3599] = "SHAMAN", -- Searing Totem + [73920] = "SHAMAN", -- Healing Rain + [2645] = "SHAMAN", -- Ghost Wolf + [16166] = "SHAMAN", -- Elemental Mastery + [108281] = "SHAMAN", -- Ancestral Guidance + [108270] = "SHAMAN", -- Stone Bulwark Totem + [108285] = "SHAMAN", -- Call of the Elements + [115356] = "SHAMAN", -- Stormblast + [60103] = "SHAMAN", -- Lava Lash + [51533] = "SHAMAN", -- Feral Spirit + [17364] = "SHAMAN", -- Stormstrike + [16188] = "SHAMAN", -- Ancestral Swiftness + [2062] = "SHAMAN", -- Earth Elemental Totem + [8024] = "SHAMAN", -- Flametongue Weapon + [51485] = "SHAMAN", -- Earthgrab Totem + [331] = "SHAMAN", -- Healing Wave + [61882] = "SHAMAN", -- Earthquake + [52127] = "SHAMAN", -- Water Shield + [77472] = "SHAMAN", -- Greater Healing Wave + [108269] = "SHAMAN", -- Capacitor Totem + [79206] = "SHAMAN", -- Spiritwalker's Grace + [57994] = "SHAMAN", -- Wind Shear + [108271] = "SHAMAN", -- Astral Shift + [30823] = "SHAMAN", --istic Rage + [77130] = "SHAMAN", -- Purify Spirit + [58875] = "SHAMAN", -- Spirit Walk + [36936] = "SHAMAN", -- Totemic Recall + [51730] = "SHAMAN", -- Earthliving Weapon + [8056] = "SHAMAN", -- Frost Shock + [88765] = "SHAMAN", --rolling thunder (mana) + [51490] = "SHAMAN", --thunderstorm (mana) + [82987] = "SHAMAN", --telluric currents glyph (mana) + [101033] = "SHAMAN", --resurgence (mana) + [51505] = "SHAMAN", --lava burst + [8050] = "SHAMAN", --flame shock + [117014] = "SHAMAN", --elemental blast + [403] = "SHAMAN", --lightning bolt + [45284] = "SHAMAN", --lightning bolt + [421] = "SHAMAN", --chain lightining + [32175] = "SHAMAN", --stormstrike + [25504] = "SHAMAN", --windfury + [8042] = "SHAMAN", --earthshock + [26364] = "SHAMAN", --lightning shield + [117014] = "SHAMAN", --elemental blast + [73683] = "SHAMAN", --unleash flame + [51522] = "SHAMAN", --primal wisdom (mana) + [63375] = "SHAMAN", --primal wisdom (mana) + [114942] = "SHAMAN", --healing tide + [73921] = "SHAMAN", --healing rain + [1064] = "SHAMAN", --chain heal + [52042] = "SHAMAN", --healing stream totem + [61295] = "SHAMAN", --riptide + [51945] = "SHAMAN", --earthliving + [114083] = "SHAMAN", --restorative mists + [8004] = "SHAMAN", --healing surge + + --warlock + [80240] = "WARLOCK", -- Havoc + [112921] = "WARLOCK", -- Summon Abyssal + [48020] = "WARLOCK", -- Demonic Circle: Teleport + [111397] = "WARLOCK", -- Blood Horror + [112869] = "WARLOCK", -- Summon Observer + [1454] = "WARLOCK", -- Life Tap + [112868] = "WARLOCK", -- Summon Shivarra + [112869] = "WARLOCK", -- Summon Observer + [120451] = "WARLOCK", -- Flames of Xoroth + [29893] = "WARLOCK", -- Create Soulwell + [114189] = "WARLOCK", -- Health Funnel + [112866] = "WARLOCK", -- Summon Fel Imp + [108683] = "WARLOCK", -- Fire and Brimstone + [688] = "WARLOCK", -- Summon Imp + [112092] = "WARLOCK", -- Shadow Bolt + [113861] = "WARLOCK", -- Dark Soul: Knowledge + [103967] = "WARLOCK", -- Carrion Swarm + [112870] = "WARLOCK", -- Summon Wrathguard + [104316] = "WARLOCK", -- Imp Swarm + [17962] = "WARLOCK", -- Conflagrate + [108359] = "WARLOCK", -- Dark Regeneration + [110913] = "WARLOCK", -- Dark Bargain + [105174] = "WARLOCK", -- Hand of Gul'dan + [697] = "WARLOCK", -- Summon Voidwalker + [6201] = "WARLOCK", -- Create Healthstone + [146739] = "WARLOCK", -- Corruption + [109151] = "WARLOCK", -- Demonic Leap + [104773] = "WARLOCK", -- Unending Resolve + [103958] = "WARLOCK", -- Metamorphosis + [119678] = "WARLOCK", -- Soul Swap + [6229] = "WARLOCK", -- Twilight Ward + [74434] = "WARLOCK", -- Soulburn + [30283] = "WARLOCK", -- Shadowfury + [113860] = "WARLOCK", -- Dark Soul: Misery + [108503] = "WARLOCK", -- Grimoire of Sacrifice + [104232] = "WARLOCK", -- Rain of Fire + [6353] = "WARLOCK", -- Soul Fire + [689] = "WARLOCK", -- Drain Life + [17877] = "WARLOCK", -- Shadowburn + [113858] = "WARLOCK", -- Dark Soul: Instability + [1490] = "WARLOCK", -- Curse of the Elements + [114635] = "WARLOCK", -- Ember Tap + [27243] = "WARLOCK", -- Seed of Corruption + [131623] = "WARLOCK", -- Twilight Ward + [6789] = "WARLOCK", -- Mortal Coil + [111400] = "WARLOCK", -- Burning Rush + [124916] = "WARLOCK", -- Chaos Wave + [1120] = "WARLOCK", -- Drain Soul + [109773] = "WARLOCK", -- Dark Intent + [112927] = "WARLOCK", -- Summon Terrorguard + [1122] = "WARLOCK", -- Summon Infernal + [108416] = "WARLOCK", -- Sacrificial Pact + [5484] = "WARLOCK", -- Howl of Terror + [29858] = "WARLOCK", -- Soulshatter + [18540] = "WARLOCK", -- Summon Doomguard + [89420] = "WARLOCK", -- Drain Life + [20707] = "WARLOCK", -- Soulstone + [132413] = "WARLOCK", -- Shadow Bulwark + [109466] = "WARLOCK", -- Curse of Enfeeblement + [48018] = "WARLOCK", -- Demonic Circle: Summon + [77799] = "WARLOCK", --fel flame + [63106] = "WARLOCK", --siphon life + [1454] = "WARLOCK", --life tap + [103103] = "WARLOCK", --malefic grasp + [980] = "WARLOCK", --agony + [30108] = "WARLOCK", --unstable affliction + [172] = "WARLOCK", --corruption + [48181] = "WARLOCK", --haunt + [29722] = "WARLOCK", --incenerate + [348] = "WARLOCK", --Immolate + [116858] = "WARLOCK", --Chaos Bolt + [114654] = "WARLOCK", --incinerate + [108686] = "WARLOCK", --immolate + [108685] = "WARLOCK", --conflagrate + [104233] = "WARLOCK", --rain of fire + [103964] = "WARLOCK", --touch os chaos + [686] = "WARLOCK", --shadow bolt + [114328] = "WARLOCK", --shadow bolt glyph + [140719] = "WARLOCK", --hellfire + [104027] = "WARLOCK", --soul fire + [603] = "WARLOCK", --doom + [108371] = "WARLOCK", --Harvest life + + --warrior + [2565] = "WARRIOR", -- Shield Block + [2457] = "WARRIOR", -- Battle Stance + [12328] = "WARRIOR", -- Sweeping Strikes + [114192] = "WARRIOR", -- Mocking Banner + [12323] = "WARRIOR", -- Piercing Howl + [122475] = "WARRIOR", -- Throw + [845] = "WARRIOR", -- Cleave + [5246] = "WARRIOR", -- Intimidating Shout + [7386] = "WARRIOR", -- Sunder Armor + [107566] = "WARRIOR", -- Staggering Shout + [86346] = "WARRIOR", -- Colossus Smash + [18499] = "WARRIOR", -- Berserker Rage + [107570] = "WARRIOR", -- Storm Bolt + [1680] = "WARRIOR", -- Whirlwind + [85384] = "WARRIOR", -- Raging Blow Off-Hand + [85288] = "WARRIOR", -- Raging Blow + [100] = "WARRIOR", -- Charge + [7384] = "WARRIOR", -- Overpower + [23881] = "WARRIOR", -- Bloodthirst + [118000] = "WARRIOR", -- Dragon Roar + [50622] = "WARRIOR", -- Bladestorm + [46924] = "WARRIOR", -- Bladestorm + [6673] = "WARRIOR", -- Battle Shout + [103840] = "WARRIOR", -- Impending Victory + [5308] = "WARRIOR", -- Execute + [57755] = "WARRIOR", -- Heroic Throw + [871] = "WARRIOR", -- Shield Wall + [97462] = "WARRIOR", -- Rallying Cry + [118038] = "WARRIOR", -- Die by the Sword + [114203] = "WARRIOR", -- Demoralizing Banner + [52174] = "WARRIOR", -- Heroic Leap + [1719] = "WARRIOR", -- Recklessness + [114207] = "WARRIOR", -- Skull Banner + [1715] = "WARRIOR", -- Hamstring + [107574] = "WARRIOR", -- Avatar + [46968] = "WARRIOR", -- Shockwave + [6343] = "WARRIOR", -- Thunder Clap + [12292] = "WARRIOR", -- Bloodbath + [64382] = "WARRIOR", -- Shattering Throw + [114028] = "WARRIOR", -- Mass Spell Reflection + [55694] = "WARRIOR", -- Enraged Regeneration + [6552] = "WARRIOR", -- Pummel + [6572] = "WARRIOR", -- Revenge + [112048] = "WARRIOR", -- Shield Barrier + [23920] = "WARRIOR", -- Spell Reflection + [12975] = "WARRIOR", -- Last Stand + [355] = "WARRIOR", -- Taunt + [102060] = "WARRIOR", -- Disrupting Shout + + [100130] = "WARRIOR", --wild strike + [96103] = "WARRIOR", --raging blow + [12294] = "WARRIOR", --mortal strike + [1464] = "WARRIOR", --Slam + [23922] = "WARRIOR", --shield slam + [20243] = "WARRIOR", --devastate + [11800] = "WARRIOR", --dragon roar + [115767] = "WARRIOR", --deep wounds + [109128] = "WARRIOR", --charge + [11294] = "WARRIOR", --mortal strike + [109128] = "WARRIOR", --charge + [12880] = "WARRIOR", --enrage + [29842] = "WARRIOR", --undribled wrath + } \ No newline at end of file diff -r 000000000000 -r ce416064d8a1 Libs/AceAddon-3.0/AceAddon-3.0.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Libs/AceAddon-3.0/AceAddon-3.0.lua Sat May 17 02:17:10 2014 -0300 @@ -0,0 +1,659 @@ +--- **AceAddon-3.0** provides a template for creating addon objects. +-- It'll provide you with a set of callback functions that allow you to simplify the loading +-- process of your addon.\\ +-- Callbacks provided are:\\ +-- * **OnInitialize**, which is called directly after the addon is fully loaded. +-- * **OnEnable** which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present. +-- * **OnDisable**, which is only called when your addon is manually being disabled. +-- @usage +-- -- A small (but complete) addon, that doesn't do anything, +-- -- but shows usage of the callbacks. +-- local MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon") +-- +-- function MyAddon:OnInitialize() +-- -- do init tasks here, like loading the Saved Variables, +-- -- or setting up slash commands. +-- end +-- +-- function MyAddon:OnEnable() +-- -- Do more initialization here, that really enables the use of your addon. +-- -- Register Events, Hook functions, Create Frames, Get information from +-- -- the game that wasn't available in OnInitialize +-- end +-- +-- function MyAddon:OnDisable() +-- -- Unhook, Unregister Events, Hide frames that you created. +-- -- You would probably only use an OnDisable if you want to +-- -- build a "standby" mode, or be able to toggle modules on/off. +-- end +-- @class file +-- @name AceAddon-3.0.lua +-- @release $Id: AceAddon-3.0.lua 1036 2011-08-16 22:45:05Z nevcairiel $ + +local MAJOR, MINOR = "AceAddon-3.0", 11 +local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) + +if not AceAddon then return end -- No Upgrade needed. + +AceAddon.frame = AceAddon.frame or CreateFrame("Frame", "AceAddon30Frame") -- Our very own frame +AceAddon.addons = AceAddon.addons or {} -- addons in general +AceAddon.statuses = AceAddon.statuses or {} -- statuses of addon. +AceAddon.initializequeue = AceAddon.initializequeue or {} -- addons that are new and not initialized +AceAddon.enablequeue = AceAddon.enablequeue or {} -- addons that are initialized and waiting to be enabled +AceAddon.embeds = AceAddon.embeds or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end }) -- contains a list of libraries embedded in an addon + +-- Lua APIs +local tinsert, tconcat, tremove = table.insert, table.concat, table.remove +local fmt, tostring = string.format, tostring +local select, pairs, next, type, unpack = select, pairs, next, type, unpack +local loadstring, assert, error = loadstring, assert, error +local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget + +-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded +-- List them here for Mikk's FindGlobals script +-- GLOBALS: LibStub, IsLoggedIn, geterrorhandler + +--[[ + xpcall safecall implementation +]] +local xpcall = xpcall + +local function errorhandler(err) + return geterrorhandler()(err) +end + +local function CreateDispatcher(argCount) + local code = [[ + local xpcall, eh = ... + local method, ARGS + local function call() return method(ARGS) end + + local function dispatch(func, ...) + method = func + if not method then return end + ARGS = ... + return xpcall(call, eh) + end + + return dispatch + ]] + + local ARGS = {} + for i = 1, argCount do ARGS[i] = "arg"..i end + code = code:gsub("ARGS", tconcat(ARGS, ", ")) + return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) +end + +local Dispatchers = setmetatable({}, {__index=function(self, argCount) + local dispatcher = CreateDispatcher(argCount) + rawset(self, argCount, dispatcher) + return dispatcher +end}) +Dispatchers[0] = function(func) + return xpcall(func, errorhandler) +end + +local function safecall(func, ...) + -- we check to see if the func is passed is actually a function here and don't error when it isn't + -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not + -- present execution should continue without hinderance + if type(func) == "function" then + return Dispatchers[select('#', ...)](func, ...) + end +end + +-- local functions that will be implemented further down +local Enable, Disable, EnableModule, DisableModule, Embed, NewModule, GetModule, GetName, SetDefaultModuleState, SetDefaultModuleLibraries, SetEnabledState, SetDefaultModulePrototype + +-- used in the addon metatable +local function addontostring( self ) return self.name end + +--- Create a new AceAddon-3.0 addon. +-- Any libraries you specified will be embeded, and the addon will be scheduled for +-- its OnInitialize and OnEnable callbacks. +-- The final addon object, with all libraries embeded, will be returned. +-- @paramsig [object ,]name[, lib, ...] +-- @param object Table to use as a base for the addon (optional) +-- @param name Name of the addon object to create +-- @param lib List of libraries to embed into the addon +-- @usage +-- -- Create a simple addon object +-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceEvent-3.0") +-- +-- -- Create a Addon object based on the table of a frame +-- local MyFrame = CreateFrame("Frame") +-- MyAddon = LibStub("AceAddon-3.0"):NewAddon(MyFrame, "MyAddon", "AceEvent-3.0") +function AceAddon:NewAddon(objectorname, ...) + local object,name + local i=1 + if type(objectorname)=="table" then + object=objectorname + name=... + i=2 + else + name=objectorname + end + if type(name)~="string" then + error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) + end + if self.addons[name] then + error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists."):format(name), 2) + end + + object = object or {} + object.name = name + + local addonmeta = {} + local oldmeta = getmetatable(object) + if oldmeta then + for k, v in pairs(oldmeta) do addonmeta[k] = v end + end + addonmeta.__tostring = addontostring + + setmetatable( object, addonmeta ) + self.addons[name] = object + object.modules = {} + object.orderedModules = {} + object.defaultModuleLibraries = {} + Embed( object ) -- embed NewModule, GetModule methods + self:EmbedLibraries(object, select(i,...)) + + -- add to queue of addons to be initialized upon ADDON_LOADED + tinsert(self.initializequeue, object) + return object +end + + +--- Get the addon object by its name from the internal AceAddon registry. +-- Throws an error if the addon object cannot be found (except if silent is set). +-- @param name unique name of the addon object +-- @param silent if true, the addon is optional, silently return nil if its not found +-- @usage +-- -- Get the Addon +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +function AceAddon:GetAddon(name, silent) + if not silent and not self.addons[name] then + error(("Usage: GetAddon(name): 'name' - Cannot find an AceAddon '%s'."):format(tostring(name)), 2) + end + return self.addons[name] +end + +-- - Embed a list of libraries into the specified addon. +-- This function will try to embed all of the listed libraries into the addon +-- and error if a single one fails. +-- +-- **Note:** This function is for internal use by :NewAddon/:NewModule +-- @paramsig addon, [lib, ...] +-- @param addon addon object to embed the libs in +-- @param lib List of libraries to embed into the addon +function AceAddon:EmbedLibraries(addon, ...) + for i=1,select("#", ... ) do + local libname = select(i, ...) + self:EmbedLibrary(addon, libname, false, 4) + end +end + +-- - Embed a library into the addon object. +-- This function will check if the specified library is registered with LibStub +-- and if it has a :Embed function to call. It'll error if any of those conditions +-- fails. +-- +-- **Note:** This function is for internal use by :EmbedLibraries +-- @paramsig addon, libname[, silent[, offset]] +-- @param addon addon object to embed the library in +-- @param libname name of the library to embed +-- @param silent marks an embed to fail silently if the library doesn't exist (optional) +-- @param offset will push the error messages back to said offset, defaults to 2 (optional) +function AceAddon:EmbedLibrary(addon, libname, silent, offset) + local lib = LibStub:GetLibrary(libname, true) + if not lib and not silent then + error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of %q."):format(tostring(libname)), offset or 2) + elseif lib and type(lib.Embed) == "function" then + lib:Embed(addon) + tinsert(self.embeds[addon], libname) + return true + elseif lib then + error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Library '%s' is not Embed capable"):format(libname), offset or 2) + end +end + +--- Return the specified module from an addon object. +-- Throws an error if the addon object cannot be found (except if silent is set) +-- @name //addon//:GetModule +-- @paramsig name[, silent] +-- @param name unique name of the module +-- @param silent if true, the module is optional, silently return nil if its not found (optional) +-- @usage +-- -- Get the Addon +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- -- Get the Module +-- MyModule = MyAddon:GetModule("MyModule") +function GetModule(self, name, silent) + if not self.modules[name] and not silent then + error(("Usage: GetModule(name, silent): 'name' - Cannot find module '%s'."):format(tostring(name)), 2) + end + return self.modules[name] +end + +local function IsModuleTrue(self) return true end + +--- Create a new module for the addon. +-- The new module can have its own embeded libraries and/or use a module prototype to be mixed into the module.\\ +-- A module has the same functionality as a real addon, it can have modules of its own, and has the same API as +-- an addon object. +-- @name //addon//:NewModule +-- @paramsig name[, prototype|lib[, lib, ...]] +-- @param name unique name of the module +-- @param prototype object to derive this module from, methods and values from this table will be mixed into the module (optional) +-- @param lib List of libraries to embed into the addon +-- @usage +-- -- Create a module with some embeded libraries +-- MyModule = MyAddon:NewModule("MyModule", "AceEvent-3.0", "AceHook-3.0") +-- +-- -- Create a module with a prototype +-- local prototype = { OnEnable = function(self) print("OnEnable called!") end } +-- MyModule = MyAddon:NewModule("MyModule", prototype, "AceEvent-3.0", "AceHook-3.0") +function NewModule(self, name, prototype, ...) + if type(name) ~= "string" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) end + if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'."):format(type(prototype)), 2) end + + if self.modules[name] then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists."):format(name), 2) end + + -- modules are basically addons. We treat them as such. They will be added to the initializequeue properly as well. + -- NewModule can only be called after the parent addon is present thus the modules will be initialized after their parent is. + local module = AceAddon:NewAddon(fmt("%s_%s", self.name or tostring(self), name)) + + module.IsModule = IsModuleTrue + module:SetEnabledState(self.defaultModuleState) + module.moduleName = name + + if type(prototype) == "string" then + AceAddon:EmbedLibraries(module, prototype, ...) + else + AceAddon:EmbedLibraries(module, ...) + end + AceAddon:EmbedLibraries(module, unpack(self.defaultModuleLibraries)) + + if not prototype or type(prototype) == "string" then + prototype = self.defaultModulePrototype or nil + end + + if type(prototype) == "table" then + local mt = getmetatable(module) + mt.__index = prototype + setmetatable(module, mt) -- More of a Base class type feel. + end + + safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy. + self.modules[name] = module + tinsert(self.orderedModules, module) + + return module +end + +--- Returns the real name of the addon or module, without any prefix. +-- @name //addon//:GetName +-- @paramsig +-- @usage +-- print(MyAddon:GetName()) +-- -- prints "MyAddon" +function GetName(self) + return self.moduleName or self.name +end + +--- Enables the Addon, if possible, return true or false depending on success. +-- This internally calls AceAddon:EnableAddon(), thus dispatching a OnEnable callback +-- and enabling all modules of the addon (unless explicitly disabled).\\ +-- :Enable() also sets the internal `enableState` variable to true +-- @name //addon//:Enable +-- @paramsig +-- @usage +-- -- Enable MyModule +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyModule = MyAddon:GetModule("MyModule") +-- MyModule:Enable() +function Enable(self) + self:SetEnabledState(true) + return AceAddon:EnableAddon(self) +end + +--- Disables the Addon, if possible, return true or false depending on success. +-- This internally calls AceAddon:DisableAddon(), thus dispatching a OnDisable callback +-- and disabling all modules of the addon.\\ +-- :Disable() also sets the internal `enableState` variable to false +-- @name //addon//:Disable +-- @paramsig +-- @usage +-- -- Disable MyAddon +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyAddon:Disable() +function Disable(self) + self:SetEnabledState(false) + return AceAddon:DisableAddon(self) +end + +--- Enables the Module, if possible, return true or false depending on success. +-- Short-hand function that retrieves the module via `:GetModule` and calls `:Enable` on the module object. +-- @name //addon//:EnableModule +-- @paramsig name +-- @usage +-- -- Enable MyModule using :GetModule +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyModule = MyAddon:GetModule("MyModule") +-- MyModule:Enable() +-- +-- -- Enable MyModule using the short-hand +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyAddon:EnableModule("MyModule") +function EnableModule(self, name) + local module = self:GetModule( name ) + return module:Enable() +end + +--- Disables the Module, if possible, return true or false depending on success. +-- Short-hand function that retrieves the module via `:GetModule` and calls `:Disable` on the module object. +-- @name //addon//:DisableModule +-- @paramsig name +-- @usage +-- -- Disable MyModule using :GetModule +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyModule = MyAddon:GetModule("MyModule") +-- MyModule:Disable() +-- +-- -- Disable MyModule using the short-hand +-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") +-- MyAddon:DisableModule("MyModule") +function DisableModule(self, name) + local module = self:GetModule( name ) + return module:Disable() +end + +--- Set the default libraries to be mixed into all modules created by this object. +-- Note that you can only change the default module libraries before any module is created. +-- @name //addon//:SetDefaultModuleLibraries +-- @paramsig lib[, lib, ...] +-- @param lib List of libraries to embed into the addon +-- @usage +-- -- Create the addon object +-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon") +-- -- Configure default libraries for modules (all modules need AceEvent-3.0) +-- MyAddon:SetDefaultModuleLibraries("AceEvent-3.0") +-- -- Create a module +-- MyModule = MyAddon:NewModule("MyModule") +function SetDefaultModuleLibraries(self, ...) + if next(self.modules) then + error("Usage: SetDefaultModuleLibraries(...): cannot change the module defaults after a module has been registered.", 2) + end + self.defaultModuleLibraries = {...} +end + +--- Set the default state in which new modules are being created. +-- Note that you can only change the default state before any module is created. +-- @name //addon//:SetDefaultModuleState +-- @paramsig state +-- @param state Default state for new modules, true for enabled, false for disabled +-- @usage +-- -- Create the addon object +-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon") +-- -- Set the default state to "disabled" +-- MyAddon:SetDefaultModuleState(false) +-- -- Create a module and explicilty enable it +-- MyModule = MyAddon:NewModule("MyModule") +-- MyModule:Enable() +function SetDefaultModuleState(self, state) + if next(self.modules) then + error("Usage: SetDefaultModuleState(state): cannot change the module defaults after a module has been registered.", 2) + end + self.defaultModuleState = state +end + +--- Set the default prototype to use for new modules on creation. +-- Note that you can only change the default prototype before any module is created. +-- @name //addon//:SetDefaultModulePrototype +-- @paramsig prototype +-- @param prototype Default prototype for the new modules (table) +-- @usage +-- -- Define a prototype +-- local prototype = { OnEnable = function(self) print("OnEnable called!") end } +-- -- Set the default prototype +-- MyAddon:SetDefaultModulePrototype(prototype) +-- -- Create a module and explicitly Enable it +-- MyModule = MyAddon:NewModule("MyModule") +-- MyModule:Enable() +-- -- should print "OnEnable called!" now +-- @see NewModule +function SetDefaultModulePrototype(self, prototype) + if next(self.modules) then + error("Usage: SetDefaultModulePrototype(prototype): cannot change the module defaults after a module has been registered.", 2) + end + if type(prototype) ~= "table" then + error(("Usage: SetDefaultModulePrototype(prototype): 'prototype' - table expected got '%s'."):format(type(prototype)), 2) + end + self.defaultModulePrototype = prototype +end + +--- Set the state of an addon or module +-- This should only be called before any enabling actually happend, e.g. in/before OnInitialize. +-- @name //addon//:SetEnabledState +-- @paramsig state +-- @param state the state of an addon or module (enabled=true, disabled=false) +function SetEnabledState(self, state) + self.enabledState = state +end + + +--- Return an iterator of all modules associated to the addon. +-- @name //addon//:IterateModules +-- @paramsig +-- @usage +-- -- Enable all modules +-- for name, module in MyAddon:IterateModules() do +-- module:Enable() +-- end +local function IterateModules(self) return pairs(self.modules) end + +-- Returns an iterator of all embeds in the addon +-- @name //addon//:IterateEmbeds +-- @paramsig +local function IterateEmbeds(self) return pairs(AceAddon.embeds[self]) end + +--- Query the enabledState of an addon. +-- @name //addon//:IsEnabled +-- @paramsig +-- @usage +-- if MyAddon:IsEnabled() then +-- MyAddon:Disable() +-- end +local function IsEnabled(self) return self.enabledState end +local mixins = { + NewModule = NewModule, + GetModule = GetModule, + Enable = Enable, + Disable = Disable, + EnableModule = EnableModule, + DisableModule = DisableModule, + IsEnabled = IsEnabled, + SetDefaultModuleLibraries = SetDefaultModuleLibraries, + SetDefaultModuleState = SetDefaultModuleState, + SetDefaultModulePrototype = SetDefaultModulePrototype, + SetEnabledState = SetEnabledState, + IterateModules = IterateModules, + IterateEmbeds = IterateEmbeds, + GetName = GetName, +} +local function IsModule(self) return false end +local pmixins = { + defaultModuleState = true, + enabledState = true, + IsModule = IsModule, +} +-- Embed( target ) +-- target (object) - target object to embed aceaddon in +-- +-- this is a local function specifically since it's meant to be only called internally +function Embed(target, skipPMixins) + for k, v in pairs(mixins) do + target[k] = v + end + if not skipPMixins then + for k, v in pairs(pmixins) do + target[k] = target[k] or v + end + end +end + + +-- - Initialize the addon after creation. +-- This function is only used internally during the ADDON_LOADED event +-- It will call the **OnInitialize** function on the addon object (if present), +-- and the **OnEmbedInitialize** function on all embeded libraries. +-- +-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing. +-- @param addon addon object to intialize +function AceAddon:InitializeAddon(addon) + safecall(addon.OnInitialize, addon) + + local embeds = self.embeds[addon] + for i = 1, #embeds do + local lib = LibStub:GetLibrary(embeds[i], true) + if lib then safecall(lib.OnEmbedInitialize, lib, addon) end + end + + -- we don't call InitializeAddon on modules specifically, this is handled + -- from the event handler and only done _once_ +end + +-- - Enable the addon after creation. +-- Note: This function is only used internally during the PLAYER_LOGIN event, or during ADDON_LOADED, +-- if IsLoggedIn() already returns true at that point, e.g. for LoD Addons. +-- It will call the **OnEnable** function on the addon object (if present), +-- and the **OnEmbedEnable** function on all embeded libraries.\\ +-- This function does not toggle the enable state of the addon itself, and will return early if the addon is disabled. +-- +-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing. +-- Use :Enable on the addon itself instead. +-- @param addon addon object to enable +function AceAddon:EnableAddon(addon) + if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end + if self.statuses[addon.name] or not addon.enabledState then return false end + + -- set the statuses first, before calling the OnEnable. this allows for Disabling of the addon in OnEnable. + self.statuses[addon.name] = true + + safecall(addon.OnEnable, addon) + + -- make sure we're still enabled before continueing + if self.statuses[addon.name] then + local embeds = self.embeds[addon] + for i = 1, #embeds do + local lib = LibStub:GetLibrary(embeds[i], true) + if lib then safecall(lib.OnEmbedEnable, lib, addon) end + end + + -- enable possible modules. + local modules = addon.orderedModules + for i = 1, #modules do + self:EnableAddon(modules[i]) + end + end + return self.statuses[addon.name] -- return true if we're disabled +end + +-- - Disable the addon +-- Note: This function is only used internally. +-- It will call the **OnDisable** function on the addon object (if present), +-- and the **OnEmbedDisable** function on all embeded libraries.\\ +-- This function does not toggle the enable state of the addon itself, and will return early if the addon is still enabled. +-- +-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing. +-- Use :Disable on the addon itself instead. +-- @param addon addon object to enable +function AceAddon:DisableAddon(addon) + if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end + if not self.statuses[addon.name] then return false end + + -- set statuses first before calling OnDisable, this allows for aborting the disable in OnDisable. + self.statuses[addon.name] = false + + safecall( addon.OnDisable, addon ) + + -- make sure we're still disabling... + if not self.statuses[addon.name] then + local embeds = self.embeds[addon] + for i = 1, #embeds do + local lib = LibStub:GetLibrary(embeds[i], true) + if lib then safecall(lib.OnEmbedDisable, lib, addon) end + end + -- disable possible modules. + local modules = addon.orderedModules + for i = 1, #modules do + self:DisableAddon(modules[i]) + end + end + + return not self.statuses[addon.name] -- return true if we're disabled +end + +--- Get an iterator over all registered addons. +-- @usage +-- -- Print a list of all installed AceAddon's +-- for name, addon in AceAddon:IterateAddons() do +-- print("Addon: " .. name) +-- end +function AceAddon:IterateAddons() return pairs(self.addons) end + +--- Get an iterator over the internal status registry. +-- @usage +-- -- Print a list of all enabled addons +-- for name, status in AceAddon:IterateAddonStatus() do +-- if status then +-- print("EnabledAddon: " .. name) +-- end +-- end +function AceAddon:IterateAddonStatus() return pairs(self.statuses) end + +-- Following Iterators are deprecated, and their addon specific versions should be used +-- e.g. addon:IterateEmbeds() instead of :IterateEmbedsOnAddon(addon) +function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end +function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end + +-- Event Handling +local function onEvent(this, event, arg1) + -- 2011-08-17 nevcairiel - ignore the load event of Blizzard_DebugTools, so a potential startup error isn't swallowed up + if (event == "ADDON_LOADED" and arg1 ~= "Blizzard_DebugTools") or event == "PLAYER_LOGIN" then + -- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration + while(#AceAddon.initializequeue > 0) do + local addon = tremove(AceAddon.initializequeue, 1) + -- this might be an issue with recursion - TODO: validate + if event == "ADDON_LOADED" then addon.baseName = arg1 end + AceAddon:InitializeAddon(addon) + tinsert(AceAddon.enablequeue, addon) + end + + if IsLoggedIn() then + while(#AceAddon.enablequeue > 0) do + local addon = tremove(AceAddon.enablequeue, 1) + AceAddon:EnableAddon(addon) + end + end + end +end + +AceAddon.frame:RegisterEvent("ADDON_LOADED") +AceAddon.frame:RegisterEvent("PLAYER_LOGIN") +AceAddon.frame:SetScript("OnEvent", onEvent) + +-- upgrade embeded +for name, addon in pairs(AceAddon.addons) do + Embed(addon, true) +end + +-- 2010-10-27 nevcairiel - add new "orderedModules" table +if oldminor and oldminor < 10 then + for name, addon in pairs(AceAddon.addons) do + addon.orderedModules = {} + for module_name, module in pairs(addon.modules) do + tinsert(addon.orderedModules, module) + end + end +end diff -r 000000000000 -r ce416064d8a1 Libs/AceAddon-3.0/AceAddon-3.0.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Libs/AceAddon-3.0/AceAddon-3.0.xml Sat May 17 02:17:10 2014 -0300 @@ -0,0 +1,4 @@ + +