diff --git a/AuraFilter.lua b/AuraFilter.lua index 6a128df..654d78b 100644 --- a/AuraFilter.lua +++ b/AuraFilter.lua @@ -12,675 +12,987 @@ local playerClass = select(2, UnitClass('player')) local playerRace = select(2, UnitRace('player')) -local auras = {} +local updateFuncs = {} -- functions to call to add/remove auras + +local BaseAuras = { + [1022] = 4, -- Hand of Protection + [29166] = 4, -- Innervate + [102342] = 4, -- Ironbark + [33206] = 4, -- Pain Suppression + [10060] = 4, -- Power Infusion + [49016] = 4, -- Unholy Frenzy + -- Bloodlust + [90355] = 4, -- Ancient Hysteria (core hound) + [2825] = 4, -- Bloodlust (shaman) + [32182] = 4, -- Heroism (shaman) + [80353] = 4, -- Time Warp (mage) + -- Herbalism + [81708] = 2, -- Lifeblood (Rank 1) + [55428] = 2, -- Lifeblood (Rank 2) + [55480] = 2, -- Lifeblood (Rank 3) + [55500] = 2, -- Lifeblood (Rank 4) + [55501] = 2, -- Lifeblood (Rank 5) + [55502] = 2, -- Lifeblood (Rank 6) + [55503] = 2, -- Lifeblood (Rank 7) + [74497] = 2, -- Lifeblood (Rank 8) + [121279] = 2, -- Lifeblood (Rank 9) + -- Crowd Control + [710] = 1, -- Banish + [76780] = 1, -- Bind Elemental + [33786] = 1, -- Cyclone + [339] = 1, -- Entangling Roots + [5782] = 1, -- Fear -- NEEDS CHECK + [118699] = 1, -- Fear + [3355] = 1, -- Freezing Trap, -- NEEDS CHECK + [43448] = 1, -- Freezing Trap, -- NEEDS CHECK + [51514] = 1, -- Hex + [2637] = 1, -- Hibernate + [118] = 1, -- Polymorph + [61305] = 1, -- Polymorph [Black Cat] + [28272] = 1, -- Polymorph [Pig] + [61721] = 1, -- Polymorph [Rabbit] + [61780] = 1, -- Polymorph [Turkey] + [28271] = 1, -- Polymorph [Turtle] + [20066] = 1, -- Repentance + [6770] = 1, -- Sap + [6358] = 1, -- Seduction + [9484] = 1, -- Shackle Undead + [10326] = 1, -- Turn Evil + [114404] = 1, -- Void Tendrils + [19386] = 1, -- Wyvern Sting +} + +------------------------------------------------------------------------ +-- Death Knight + +if playerClass == "DEATHKNIGHT" then + -- Self Buffs + BaseAuras[48707] = 4 -- Anti-Magic Shell + BaseAuras[49222] = 4 -- Bone Shield + BaseAuras[53386] = 4 -- Cinderglacier + BaseAuras[119975] = 4 -- Conversion + BaseAuras[101568] = 4 -- Dark Succor <= glyph + BaseAuras[96268] = 4 -- Death's Advance + BaseAuras[59052] = 4 -- Freezing Fog <= Rime + BaseAuras[48792] = 4 -- Icebound Fortitude + BaseAuras[51124] = 4 -- Killing Machine + BaseAuras[49039] = 4 -- Lichborne + BaseAuras[51271] = 4 -- Pillar of Frost + BaseAuras[46584] = 4 -- Raise Dead + BaseAuras[108200] = 4 -- Remorseless Winter + BaseAuras[51460] = 4 -- Runic Corruption + BaseAuras[50421] = 4 -- Scent of Blood + BaseAuras[116888] = 4 -- Shroud of Purgatory + BaseAuras[8134] = 4 -- Soul Reaper + BaseAuras[81340] = 4 -- Sudden Doom + BaseAuras[115989] = 4 -- Unholy Blight +-- BaseAuras[53365] = 4 -- Unholy Strength <= Rune of the Fallen Crusader + BaseAuras[55233] = 4 -- Vampiric Blood + BaseAuras[81162] = 4 -- Will of the Necropolis (damage reduction) + BaseAuras[96171] = 4 -- Will of the Necropolis (free Rune Tap) + + -- Pet Buffs + BaseAuras[63560] = 2 -- Dark Transformation + + -- Buffs + BaseAuras[49016] = 3 -- Unholy Frenzy + + -- Debuffs + BaseAuras[108194] = 1 -- Asphyxiate + BaseAuras[55078] = 2 -- Blood Plague + BaseAuras[45524] = 1 -- Chains of Ice +-- BaseAuras[50435] = 1 -- Chilblains + BaseAuras[111673] = 2 -- Control Undead -- needs check + BaseAuras[77606] = 2 -- Dark Simulacrum + BaseAuras[55095] = 2 -- Frost Fever + BaseAuras[51714] = 2 -- Frost Vulernability <= Rune of Razorice + BaseAuras[73975] = 1 -- Necrotic Strike + BaseAuras[115000] = 2 -- Remorseless Winter (slow) + BaseAuras[115001] = 2 -- Remorseless Winter (stun) + BaseAuras[114866] = 2 -- Soul Reaper (blood) + BaseAuras[130735] = 2 -- Soul Reaper (frost) + BaseAuras[130736] = 2 -- Soul Reaper (unholy) + BaseAuras[47476] = 1 -- Strangulate -local function addAuras(t) - for k, v in pairs(t) do - if not auras[k] then - auras[k] = v - end - end end ------------------------------------------------------------------------ --- Buffed - -addAuras({ - [90355] = 4, -- Ancient Hysteria [hunter core hound] - [2825] = 4, -- Bloodlust - [1022] = 4, -- Hand of Protection - [32182] = 4, -- Heroism - [29166] = 4, -- Innervate - [55503] = 4, -- Lifeblood [herbalism] - [80353] = 4, -- Time Warp - [33206] = 4, -- Pain Suppression - [10060] = 4, -- Power Infusion - [49016] = 4, -- Unholy Frenzy -}) +-- Druid + +if playerClass == "DRUID" then + -- Self Buffs + BaseAuras[22812] = 4 -- Barkskin + BaseAuras[106951] = 4 -- Berserk (cat) + BaseAuras[50334] = 4 -- Berserk (bear) + BaseAuras[112071] = 4 -- Celestial Alignment + BaseAuras[16870] = 4 -- Clearcasting <= Omen of Clarity + BaseAuras[1850] = 4 -- Dash + BaseAuras[108381] = 4 -- Dream of Cenarius (+damage) + BaseAuras[108382] = 4 -- Dream of Cenarius (+healing) + BaseAuras[48518] = 4 -- Eclipse (Lunar) + BaseAuras[48517] = 4 -- Eclipse (Solar) + BaseAuras[5229] = 4 -- Enrage + BaseAuras[124769] = 4 -- Frenzied Regeneration <= glyph + BaseAuras[102560] = 4 -- Incarnation: Chosen of Elune + BaseAuras[102543] = 4 -- Incarnation: King of the Jungle + BaseAuras[102558] = 4 -- Incarnation: Son of Ursoc + BaseAuras[33891] = 4 -- Incarnation: Tree of Life -- NEEDS CHECK + BaseAuras[81192] = 4 -- Lunar Shower + BaseAuras[106922] = 4 -- Might of Ursoc + BaseAuras[16689] = 4 -- Nature's Grasp + BaseAuras[132158] = 4 -- Nature's Swiftness + BaseAuras[124974] = 4 -- Nature's Vigil + BaseAuras[48391] = 4 -- Owlkin Frenzy + BaseAuras[69369] = 4 -- Predator's Swiftness + BaseAuras[132402] = 4 -- Savage Defense + BaseAuras[52610] = 4 -- Savage Roar -- VERIFIED 13/02/20 on tauren feral + BaseAuras[127538] = 4 -- Savage Roar -- NEEDS CHECK + BaseAuras[93400] = 4 -- Shooting Stars + BaseAuras[114108] = 2 -- Soul of the Forest (resto) + BaseAuras[48505] = 4 -- Starfall + BaseAuras[61336] = 4 -- Survival Instincts + BaseAuras[5217] = 4 -- Tiger's Fury + BaseAuras[102416] = 4 -- Wild Charge (aquatic) + + -- Buffs + BaseAuras[102351] = 2 -- Cenarion Ward (buff) + BaseAuras[102352] = 2 -- Cenarion Ward (heal) + BaseAuras[29166] = 3 -- Innervate + BaseAuras[102342] = 3 -- Ironbark + BaseAuras[33763] = 2 -- Lifebloom + BaseAuras[94447] = 2 -- Lifebloom (tree) + BaseAuras[8936] = 2 -- Regrowth + BaseAuras[774] = 2 -- Rejuvenation + BaseAuras[77761] = 3 -- Stampeding Roar (bear) + BaseAuras[77764] = 3 -- Stampeding Roar (cat) + BaseAuras[106898] = 3 -- Stampeding Roar (caster) + BaseAuras[48438] = 2 -- Wild Growth + + -- Debuffs + BaseAuras[102795] = 1 -- Bear Hug + BaseAuras[33786] = 1 -- Cyclone + BaseAuras[99] = 1 -- Disorienting Roar + BaseAuras[339] = 1 -- Entangling Roots + BaseAuras[114238] = 1 -- Fae Silence <= glpyh + BaseAuras[81281] = 1 -- Fungal Growth <= Wild Mushroom: Detonate + BaseAuras[2637] = 1 -- Hibernate + BaseAuras[33745] = 2 -- Lacerate + BaseAuras[22570] = 1 -- Maim + BaseAuras[5211] = 1 -- Mighty Bash + BaseAuras[8921] = 2 -- Moonfire + BaseAuras[9005] = 2 -- Pounce -- NEEDS CHECK + BaseAuras[102546] = 2 -- Pounce -- NEEDS CHECK + BaseAuras[9007] = 2 -- Pounce Bleed + BaseAuras[1822] = 2 -- Rake + BaseAuras[1079] = 2 -- Rip + BaseAuras[106839] = 1 -- Skull Bash -- NOT CURRENTLY USED + BaseAuras[78675] = 1 -- Solar Beam (silence) + BaseAuras[97547] = 1 -- Solar Beam (interrupt) + BaseAuras[93402] = 2 -- Sunfire + BaseAuras[77758] = 2 -- Thrash (bear) + BaseAuras[106830] = 2 -- Thrash (cat) + BaseAuras[61391] = 3 -- Typhoon + BaseAuras[102793] = 1 -- Ursol's Vortex + BaseAuras[45334] = 1 -- Immobilize <= Wild Charge (bear) + BaseAuras[50259] = 1 -- Dazed <= Wild Charge (cat) +--[[ + if PVP_MODE then + BaseAuras[770] = 1 -- Faerie Fire + BaseAuras[102355] = 1 -- Faerie Swarm + end +]] +end ------------------------------------------------------------------------ --- Armor reduced +-- Hunter -if playerClass == 'DRUID' or playerClass == 'WARRIOR' then addAuras({ - [35387] = 1, -- Corrosive Spit [hunter serpent] - [91565] = 1, -- Faerie Fire - [8647] = 1, -- Expose Armor - [7386] = 1, -- Sunder Armor - [50498] = 1, -- Tear Armor [hunter raptor] -}) end +if playerClass == "HUNTER" then + -- Self Buffs + BaseAuras[83559] = 4 -- Black Ice +-- BaseAuras[82921] = 4 -- Bombardment +-- BaseAuras[53257] = 4 -- Cobra Strikes + BaseAuras[51755] = 4 -- Camouflage + BaseAuras[19263] = 4 -- Deterrence + BaseAuras[15571] = 4 -- Dazed <== Aspect of the Cheetah + BaseAuras[6197] = 4 -- Eagle Eye + BaseAuras[5384] = 4 -- Feign Death + BaseAuras[82726] = 4 -- Fervor + BaseAuras[82926] = 4 -- Fire! <= Master Marksman + BaseAuras[82692] = 4 -- Focus Fire + BaseAuras[56453] = 4 -- Lock and Load + BaseAuras[54216] = 4 -- Master's Call + BaseAuras[34477] = 4 -- Misdirection + BaseAuras[118922] = 4 -- Posthaste + BaseAuras[3045] = 4 -- Rapid Fire +-- BaseAuras[82925] = 4 -- Ready, Set, Aim... <= Master Marksman + BaseAuras[53220] = 4 -- Steady Focus + BaseAuras[34471] = 4 -- The Beast Within + BaseAuras[34720] = 4 -- Thrill of the Hunt + + -- Pet Buffs + BaseAuras[19615] = 2 -- Frenzy + BaseAuras[19574] = 2 -- Bestial Wrath + BaseAuras[136] = 2 -- Mend Pet + + -- Buffs + BaseAuras[34477] = 1 -- Misdirection (30 sec threat) + BaseAuras[35079] = 1 -- Misdirection (4 sec transfer) + + -- Debuffs + BaseAuras[131894] = 2 -- BaseAuras Murder of Crows + BaseAuras[117526] = 2 -- Binding Shot (stun) + BaseAuras[117405] = 2 -- Binding Shot (tether) + BaseAuras[3674] = 2 -- Black Arrow + BaseAuras[35101] = 2 -- Concussive Barrage + BaseAuras[5116] = 2 -- Concussive Shot + BaseAuras[20736] = 2 -- Distracting Shot + BaseAuras[64803] = 2 -- Entrapment + BaseAuras[53301] = 2 -- Explosive Shot + BaseAuras[13812] = 2 -- Explosive Trap + BaseAuras[43446] = 2 -- Explosive Trap Effect -- NEEDS CHECK + BaseAuras[128961] = 2 -- Explosive Trap Effect -- NEEDS CHECK + BaseAuras[3355] = 2 -- Freezing Trap + BaseAuras[61394] = 2 -- Frozen Wake <= Glyph of Freezing Trap + BaseAuras[120761] = 2 -- Glaive Toss -- NEEDS CHECK + BaseAuras[121414] = 2 -- Glaive Toss -- NEEDS CHECK + BaseAuras[1130] = 1 -- Hunter's Mark + BaseAuras[135299] = 1 -- Ice Trap + BaseAuras[34394] = 2 -- Intimidation + BaseAuras[115928] = 2 -- Narrow Escape -- NEEDS CHECK + BaseAuras[128405] = 2 -- Narrow Escape -- NEEDS CHECK +-- BaseAuras[63468] = 2 -- Piercing Shots + BaseAuras[1513] = 2 -- Scare Beast + BaseAuras[19503] = 2 -- Scatter Shot + BaseAuras[118253] = 2 -- Serpent Sting + BaseAuras[34490] = 2 -- Silencing Shot + BaseAuras[82654] = 2 -- Widow Venom + BaseAuras[19386] = 2 -- Wyvern Sting +end ------------------------------------------------------------------------ --- Attack speed reduced - -if playerClass == 'WARRIOR' then addAuras({ - [54404] = 1, -- Dust Cloud [hunter tallstrider] - [8042] = 1, -- Earth Shock - [55095] = 1, -- Frost Fever - [58179] = 1, -- Infected Wounds [Rank 1] - [58180] = 1, -- Infected Wounds [Rank 2] - [68055] = 1, -- Judgements of the Just - [14251] = 1, -- Riposte - [90315] = 1, -- Tailspin [hunter fox] - [6343] = 1, -- Thunder Clap -}) end +-- Mage + +if playerClass == "MAGE" then + -- Self Buffs + BaseAuras[110909] = 4 -- Alter Time + BaseAuras[36032] = 4 -- Arcane Charge + BaseAuras[12042] = 4 -- Arcane Power + BaseAuras[108843] = 4 -- Blazing Speed + BaseAuras[57761] = 4 -- Brain Freeze + BaseAuras[87023] = 4 -- Cauterize + BaseAuras[44544] = 4 -- Fingers of Frost + BaseAuras[110960] = 4 -- Greater Invisibility + BaseAuras[48107] = 4 -- Heating Up + BaseAuras[11426] = 4 -- Ice Barrier + BaseAuras[45438] = 4 -- Ice Block + BaseAuras[108839] = 4 -- Ice Floes + BaseAuras[12472] = 4 -- Icy Veins + BaseAuras[116267] = 4 -- Inacnter's Absorption + BaseAuras[1463] = 4 -- Inacnter's Ward + BaseAuras[66] = 4 -- Invisibility + BaseAuras[12043] = 4 -- Presence of Mind + BaseAuras[116014] = 4 -- Rune of Power + BaseAuras[48108] = 4 -- Pyroblast! + BaseAuras[115610] = 4 -- Temporal Shield (shield) + BaseAuras[115611] = 4 -- Temporal Shield (heal) + + -- Debuffs + BaseAuras[34356] = 2 -- Blizzard (slow) -- NEEDS CHECK + BaseAuras[83853] = 2 -- Combustion + BaseAuras[120] = 2 -- Cone of Cold + BaseAuras[44572] = 2 -- Deep Freeze + BaseAuras[31661] = 2 -- Dragon's Breath + BaseAuras[112948] = 2 -- Frost Bomb + BaseAuras[113092] = 2 -- Frost Bomb (slow) + BaseAuras[122] = 2 -- Frost Nova + BaseAuras[116] = 2 -- Frostbolt + BaseAuras[44614] = 2 -- Frostfire Bolt + BaseAuras[102051] = 2 -- Frostjaw + BaseAuras[84721] = 2 -- Frozen Orb +-- BaseAuras[12654] = 2 -- Ignite + BaseAuras[44457] = 2 -- Living Bomb + BaseAuras[114923] = 2 -- Nether Tempest + BaseAuras[118] = 2 -- Polymorph + BaseAuras[61305] = 2 -- Polymorph (Black Cat) + BaseAuras[28272] = 2 -- Polymorph (Pig) + BaseAuras[61721] = 2 -- Polymorph (Rabbit) + BaseAuras[61780] = 2 -- Polymorph (Turkey) + BaseAuras[28217] = 2 -- Polymorph (Turtle) +-- BaseAuras[11366] = 2 -- Pyroblast + BaseAuras[132210] = 2 -- Pyromaniac + BaseAuras[82691] = 2 -- Ring of Frost + BaseAuras[55021] = 2 -- Silenced - Improved Counterspell + BaseAuras[31589] = 2 -- Slow +end ------------------------------------------------------------------------ --- Bleed damage taken increased - -if playerClass == 'DRUID' or playerClass == 'ROGUE' then addAuras({ - [35290] = 1, -- Gore [hunter boar] -- NEEDS CHECK - [16511] = 1, -- Hemorrhage - [33878] = 1, -- Mangle [Bear Form] - [33876] = 1, -- Mangle [Cat Form] - [57386] = 1, -- Stampede [hunter rhino] - [50271] = 1, -- Tendon Rip [hunter hyena] - [46857] = 1, -- Trauma <== Blood Frenzy -}) end +-- Monk + +if playerClass == "MONK" then + -- Self Buffs + BaseAuras[122278] = 4 -- Dampen Harm + BaseAuras[121125] = 4 -- Death Note + BaseAuras[122783] = 4 -- Diffuse Magic + BaseAuras[128939] = 4 -- Elusive Brew (stack) + BaseAuras[115308] = 4 -- Elusive Brew (consume) + BaseAuras[115288] = 4 -- Energizing Brew + BaseAuras[115203] = 4 -- Fortifying Brew + BaseAuras[115295] = 4 -- Guard + BaseAuras[123402] = 4 -- Guard (glyphed) + BaseAuras[124458] = 4 -- Healing Sphere (count) + BaseAuras[115867] = 4 -- Mana Tea (stack) + BaseAuras[119085] = 4 -- Momentum + BaseAuras[124968] = 4 -- Retreat + BaseAuras[127722] = 4 -- Serpent's Zeal + BaseAuras[125359] = 4 -- Tiger Power + BaseAuras[116841] = 4 -- Tiger's Lust + BaseAuras[125195] = 4 -- Tigereye Brew (stack) + BaseAuras[116740] = 4 -- Tigereye Brew (consume) + BaseAuras[122470] = 4 -- Touch of Karma + BaseAuras[118674] = 4 -- Vital Mists + + -- Buffs + BaseAuras[132120] = 2 -- Enveloping Mist + BaseAuras[116849] = 3 -- Life Cocoon + BaseAuras[119607] = 2 -- Renewing Mist (jump) + BaseAuras[119611] = 2 -- Renewing Mist (hot) + BaseAuras[124081] = 2 -- Zen Sphere + + -- Debuffs + BaseAuras[123393] = 2 -- Breath of Fire (disorient) + BaseAuras[123725] = 2 -- Breath of Fire (dot) + BaseAuras[119392] = 2 -- Charging Ox Wave + BaseAuras[122242] = 2 -- Clash (stun) -- NEEDS CHECK + BaseAuras[126451] = 2 -- Clash (stun) -- NEEDS CHECK + BaseAuras[128846] = 2 -- Clash (stun) -- NEEDS CHECK + BaseAuras[116095] = 2 -- Disable + BaseAuras[116330] = 2 -- Dizzying Haze -- NEEDS CHECK + BaseAuras[123727] = 2 -- Dizzying Haze -- NEEDS CHECK + BaseAuras[117368] = 2 -- Grapple Weapon + BaseAuras[118585] = 2 -- Leer of the Ox + BaseAuras[119381] = 2 -- Leg Sweep + BaseAuras[115078] = 2 -- Paralysis + BaseAuras[118635] = 2 -- Provoke -- NEEDS CHECK + BaseAuras[116189] = 2 -- Provoke -- NEEDS CHECK + BaseAuras[130320] = 2 -- Rising Sun Kick + BaseAuras[116847] = 2 -- Rushing Jade Wind + BaseAuras[116709] = 2 -- Spear Hand Strike + BaseAuras[123407] = 2 -- Spinning Fire Blossom +end ------------------------------------------------------------------------ --- Casting speed reduced +-- Paladin -if playerClass == 'MAGE' or playerClass == 'ROGUE' or playerClass == 'WARLOCK' then addAuras({ - [1714] = 1, -- Curse of Tongues - [58604] = 1, -- Lava Breath [hunter core hound] - [5760] = 1, -- Mind-Numbing Poison - [31589] = 1, -- Slow - [50274] = 1, -- Spore Cloud [hunter sporebat] -}) end +if playerClass == "PALADIN" then + -- Self Buffs + BaseAuras[121467] = 4 -- Alabaster Shield + BaseAuras[31850] = 4 -- Ardent Defender + BaseAuras[31884] = 4 -- Avenging Wrath + BaseAuras[114637] = 4 -- Bastion of Glory + BaseAuras[88819] = 4 -- Daybreak + BaseAuras[31842] = 4 -- Divine Favor + BaseAuras[54428] = 4 -- Divine Plea + BaseAuras[498] = 4 -- Divine Protection + BaseAuras[90174] = 4 -- Divine Purpose + BaseAuras[642] = 4 -- Divine Shield + BaseAuras[54957] = 4 -- Glyph of Flash of Light + BaseAuras[85416] = 4 -- Grand Crusader + BaseAuras[86659] = 4 -- Guardian of Ancient Kings (protection) + BaseAuras[86669] = 4 -- Guardian of Ancient Kings (holy) + BaseAuras[86698] = 4 -- Guardian of Ancient Kings (retribution) + BaseAuras[105809] = 4 -- Holy Avenger + BaseAuras[54149] = 4 -- Infusion of Light + BaseAuras[84963] = 4 -- Inquisition + BaseAuras[114250] = 4 -- Selfless Healer +-- BaseAuras[132403] = 4 -- Shield of the Righteous + BaseAuras[85499] = 4 -- Speed of Light + BaseAuras[94686] = 4 -- Supplication + + -- Buffs + BaseAuras[31821] = 3 -- Devotion Aura + BaseAuras[114163] = 3 -- Eternal Flame + BaseAuras[1044] = 3 -- Hand of Freedom + BaseAuras[1022] = 3 -- Hand of Protection + BaseAuras[114039] = 3 -- Hand of Purity + BaseAuras[6940] = 3 -- Hand of Sacrifice + BaseAuras[1038] = 3 -- Hand of Salvation + BaseAuras[86273] = 3 -- Illuminated Healing + BaseAuras[20925] = 3 -- Sacred Shield + BaseAuras[20170] = 3 -- Seal of Justice + BaseAuras[114917] = 3 -- Stay of Execution + + -- Buff Debuffs + BaseAuras[25771] = 3 -- Forbearace + + -- Debuffs + BaseAuras[31935] = 2 -- Avenger's Shield +-- BaseAuras[110300] = 2 -- Burden of Guilt + BaseAuras[105421] = 2 -- Blinding Light + BaseAuras[31803] = 2 -- Censure + BaseAuras[63529] = 2 -- Dazed - Avenger's Shield + BaseAuras[2812] = 2 -- Denounce + BaseAuras[114916] = 2 -- Execution Sentence + BaseAuras[105593] = 2 -- Fist of Justice + BaseAuras[853] = 2 -- Hammer of Justice + BaseAuras[119072] = 2 -- Holy Wrath + BaseAuras[20066] = 2 -- Repentance + BaseAuras[10326] = 2 -- Turn Evil +end ------------------------------------------------------------------------ --- Healing effects reduced - -if playerClass == 'HUNTER' or playerClass == 'ROGUE' or playerClass == 'WARRIOR' then addAuras({ - [56112] = 1, -- Furious Attacks - [48301] = 1, -- Mind Trauma <== Improved Mind Blast - [30213] = 1, -- Legion Strike [warlock felguard] - [54680] = 1, -- Monstrous Bite [hunter devilsaur] - [12294] = 1, -- Mortal Strike - [82654] = 1, -- Widow Venom - [13218] = 1, -- Wound Poison -}) end +-- Priest + +if playerClass == "PRIEST" then + -- Self Buffs +-- BaseAuras[114214] = 4 -- Angelic Bulwark + BaseAuras[81700] = 4 -- Archangel +-- BaseAuras[59889] = 4 -- Borrowed Time + BaseAuras[47585] = 4 -- Dispersion + BaseAuras[123266] = 4 -- Divine Insight (discipline) + BaseAuras[123267] = 4 -- Divine Insight (holy) + BaseAuras[124430] = 4 -- Divine Insight (shadow) + BaseAuras[81661] = 4 -- Evangelism + BaseAuras[586] = 4 -- Fade + BaseAuras[2096] = 4 -- Mind Vision + BaseAuras[114239] = 4 -- Phantasm + BaseAuras[10060] = 4 -- Power Infusion + BaseAuras[63735] = 4 -- Serendipity + BaseAuras[112833] = 4 -- Spectral Guise + BaseAuras[109964] = 4 -- Spirit Shell (self) + BaseAuras[87160] = 4 -- Surge of Darkness + BaseAuras[114255] = 4 -- Surge of Light + BaseAuras[123254] = 4 -- Twist of Fate + BaseAuras[15286] = 4 -- Vampiric Embrace + + -- Buffs + BaseAuras[47753] = 3 -- Divine Aegis + BaseAuras[77613] = 2 -- Grace + BaseAuras[47788] = 3 -- Guardian Spirit + BaseAuras[88684] = 3 -- Holy Word: Serenity + BaseAuras[33206] = 3 -- Pain Suppression + BaseAuras[81782] = 3 -- Power Word: Barrier + BaseAuras[17] = 3 -- Power Word: Shield + BaseAuras[41635] = 3 -- Prayer of Mending + BaseAuras[139] = 3 -- Renew + BaseAuras[114908] = 3 -- Spirit Shell (shield) + + -- Buff Debuffs + BaseAuras[6788] = 1 -- Weakened Soul + + -- Debuffs + BaseAuras[2944] = 2 -- Devouring Plague + BaseAuras[14914] = 2 -- Holy Fire + BaseAuras[88625] = 2 -- Holy Word: Chastise + BaseAuras[89485] = 2 -- Inner Focus + BaseAuras[64044] = 2 -- Psychic Horror (horror) +-- BaseAuras[64058] = 2 -- Psychic Horror (disarm) + BaseAuras[8122] = 2 -- Psychic Scream + BaseAuras[113792] = 2 -- Psychic Terror + BaseAuras[9484] = 2 -- Shackle Undead + BaseAuras[589] = 2 -- Shadow Word: Pain + BaseAuras[15487] = 2 -- Silence + BaseAuras[34914] = 2 -- Vampiric Touch +end ------------------------------------------------------------------------ --- Physical damage dealt reduced +-- Rogue -if playerClass == 'DEATHKNIGHT' or playerClass == 'DRUID' or playerClass == 'WARRIOR' then addAuras({ - [702] = 1, -- Curse of Weakness - [99] = 1, -- Demoralizing Roar - [50256] = 1, -- Demoralizing Roar [hunter bear] - [1160] = 1, -- Demoralizing Shout - [81130] = 1, -- Scarlet Fever - [26017] = 1, -- Vindication -}) end +if playerClass == "ROGUE" then + -- Self Buffs + BaseAuras[13750] = 4 -- Adrenaline Rush + BaseAuras[115189] = 4 -- Anticipation + BaseAuras[18377] = 4 -- Blade Flurry + BaseAuras[121153] = 4 -- Blindside + BaseAuras[108212] = 4 -- Burst of Speed + BaseAuras[31224] = 4 -- Cloak of Shadows + BaseAuras[74002] = 4 -- Combat Insight + BaseAuras[74001] = 4 -- Combat Readiness + BaseAuras[84747] = 4 -- Deep Insight + BaseAuras[56814] = 4 -- Detection + BaseAuras[32645] = 4 -- Envenom + BaseAuras[5277] = 4 -- Evasion + BaseAuras[1966] = 4 -- Feint + BaseAuras[51690] = 4 -- Killing Spree + BaseAuras[84746] = 4 -- Moderate Insight + BaseAuras[73651] = 4 -- Recuperate + BaseAuras[121472] = 4 -- Shadow Blades + BaseAuras[51713] = 4 -- Shadow Dance + BaseAuras[114842] = 4 -- Shadow Walk + BaseAuras[36554] = 4 -- Shadowstep + BaseAuras[84745] = 4 -- Shallow Insight + BaseAuras[114018] = 4 -- Shroud of Concealment + BaseAuras[5171] = 4 -- Slice and Dice + BaseAuras[76577] = 4 -- Smoke Bomb + BaseAuras[2983] = 4 -- Sprint + BaseAuras[57934] = 4 -- Tricks of the Trade + BaseAuras[1856] = 4 -- Vanish + + -- Debuffs + BaseAuras[2094] = 2 -- Blind + BaseAuras[1833] = 2 -- Cheap Shot +-- BaseAuras[122233] = 2 -- Crimson Tempest +-- BaseAuras[3409] = 2 -- Crippling Poison +-- BaseAuras[2818] = 2 -- Deadly Poison + BaseAuras[26679] = 2 -- Deadly Throw + BaseAuras[51722] = 2 -- Dismantle + BaseAuras[91021] = 2 -- Find Weakness + BaseAuras[703] = 2 -- Garrote + BaseAuras[1330] = 2 -- Garrote - Silence + BaseAuras[1773] = 2 -- Gouge + BaseAuras[89774] = 2 -- Hemorrhage + BaseAuras[408] = 2 -- Kidney Shot + BaseAuras[112961] = 2 -- Leeching Poison + BaseAuras[5760] = 2 -- Mind-numbing Poison + BaseAuras[112947] = 2 -- Nerve Strike + BaseAuras[113952] = 2 -- Paralytic Poison + BaseAuras[84617] = 2 -- Revealing Strike + BaseAuras[1943] = 2 -- Rupture + BaseAuras[6770] = 2 -- Sap + BaseAuras[57933] = 2 -- Tricks of the Trade + BaseAuras[79140] = 2 -- Vendetta + BaseAuras[8680] = 2 -- Wound Poison +end ------------------------------------------------------------------------ --- Disarmed +-- Shaman -if playerClass == '' then addAuras({ - [50541] = 1, -- Clench (hunter scorpid) - [676] = 1, -- Disarm (warrior) - [51722] = 1, -- Dismantle (rogue) - [64058] = 1, -- Psychic Horror (priest) - [91644] = 1, -- Snatch (hunter bird of prey) -}) end +if playerClass == "SHAMAN" then + -- Self Buffs + BaseAuras[108281] = 4 -- Ancestral Guidance + BaseAuras[16188] = 4 -- Ancestral Swiftness + BaseAuras[114050] = 4 -- Ascendance (elemental) + BaseAuras[114051] = 4 -- Ascendance (enhancement) + BaseAuras[114052] = 4 -- Ascendance (restoration) + BaseAuras[108271] = 4 -- Astral Shift + BaseAuras[16166] = 4 -- Elemental Mastery + BaseAuras[77762] = 4 -- Lava Surge + BaseAuras[31616] = 4 -- Nature's Guardian + BaseAuras[77661] = 4 -- Searing Flames + BaseAuras[30823] = 4 -- Shamanistic Rage + BaseAuras[58876] = 4 -- Spirit Walk + BaseAuras[79206] = 4 -- Spiritwalker's Grace + BaseAuras[53390] = 4 -- Tidal Waves + + -- Buffs + --BaseAuras[2825] = 3 -- Bloodlust (shaman) -- show all + BaseAuras[32182] = 3 -- Heroism (shaman) + BaseAuras[974] = 2 -- Earth Shield + BaseAuras[8178] = 1 -- Grounding Totem Effect + BaseAuras[89523] = 1 -- Grounding Totem (reflect) + BaseAuras[119523] = 3 -- Healing Stream Totem (resistance) + BaseAuras[16191] = 3 -- Mana Tide + BaseAuras[61295] = 2 -- Riptide + BaseAuras[98007] = 3 -- Spirit Link Totem + BaseAuras[114893] = 3 -- Stone Bulwark + --BaseAuras[120676] = 1 -- Stormlash Totem -- see totem timer + BaseAuras[73685] = 4 -- Unleash Life + BaseAuras[118473] = 2 -- Unleashed Fury (earthliving) + BaseAuras[114896] = 3 -- Windwalk Totem + + -- Debuffs + BaseAuras[61882] = 2 -- Earthquake + BaseAuras[8050] = 2 -- Flame Shock + BaseAuras[115356] = 2 -- Stormblast + BaseAuras[17364] = 2 -- Stormstrike + --BaseAuras[73684] = 2 -- Unleash Earth + BaseAuras[73682] = 2 -- Unleash Frost + BaseAuras[118470] = 2 -- Unleashed Fury (flametongue) + + -- Debuffs - Crowd Control + BaseAuras[76780] = 1 -- Bind Elemental + BaseAuras[51514] = 1 -- Hex + + -- Debuffs - Root/Slow + BaseAuras[3600] = 1 -- Earthbind <= Earthbind Totem + BaseAuras[64695] = 1 -- Earthgrab <= Earthgrab Totem + BaseAuras[8056] = 1 -- Frost Shock + BaseAuras[8034] = 2 -- Frostbrand Attack <= Frostbrand Weapon + BaseAuras[63685] = 1 -- Freeze <= Frozen Power + BaseAuras[118905] = 1 -- Static Charge <= Capacitor Totem + --BaseAuras[51490] = 1 -- Thunderstorm +end ------------------------------------------------------------------------ --- Silenced - -if playerClass == '' then addAuras({ - [25046] = 1, -- Arcane Torrent (blood elf) - [31935] = 1, -- Avenger's Shield (paladin) - [1330] = 1, -- Garrote - Silence (rogue) - [50479] = 1, -- Nether Shock (hunter nether ray) - [15487] = 1, -- Silence (priest) - [18498] = 1, -- Silenced - Gag Order (warrior) - [18469] = 1, -- Silenced - Improved Counterspell (mage) - [18425] = 1, -- Silenced - Improved Kick (rogue) - [34490] = 1, -- Silencing Shot (hunter) - [81261] = 1, -- Solar Beam (druid) - [24259] = 1, -- Spell Lock (warlock felhunter) - [47476] = 1, -- Strangulate (death knight) -}) end +-- Warlock ------------------------------------------------------------------------- --- Spell-locked - -if playerClass == '' then addAuras({ - [2139] = 1, -- Counterspell (mage) - [1766] = 1, -- Kick (rogue) - [47528] = 1, -- Mind Freeze (death knight) - [6552] = 1, -- Pummel (warrior) - [26090] = 1, -- Pummel (hunter gorilla) - [50318] = 1, -- Serenity Dust (hunter moth) - [72] = 1, -- Shield Bash (warrior) - [80964] = 1, -- Skull Bash (Bear) (druid) - [80965] = 1, -- Skull Bash (Cat) (druid) - [57994] = 1, -- Wind Shear (shaman) -}) end +if playerClass == "WARLOCK" then + -- Self Buffs + BaseAuras[116198] = 2 -- Aura of Enfeeblement + BaseAuras[116202] = 2 -- Aura of the Elements + BaseAuras[117828] = 4 -- Backdraft + BaseAuras[111400] = 4 -- Burning Rush + BaseAuras[114168] = 4 -- Dark Apotheosis + BaseAuras[110913] = 4 -- Dark Bargain (absorb) + BaseAuras[110914] = 4 -- Dark Bargain (dot) + BaseAuras[108359] = 4 -- Dark Regeneration + BaseAuras[113858] = 4 -- Dark Soul: Instability + BaseAuras[113861] = 4 -- Dark Soul: Knowledge + BaseAuras[113860] = 4 -- Dark Soul: Misery + BaseAuras[88448] = 4 -- Demonic Rebirth + BaseAuras[126] = 4 -- Eye of Kilrogg + BaseAuras[108683] = 4 -- Fire and Brimstone + BaseAuras[119839] = 4 -- Fury Ward + BaseAuras[119049] = 4 -- Kil'jaeden's Cunning + BaseAuras[126090] = 4 -- Molten Core -- NEEDS CHECK + BaseAuras[122355] = 4 -- Molten Core -- NEEDS CHECK + BaseAuras[104232] = 4 -- Rain of Fire + BaseAuras[108416] = 4 -- Sacrificial Pact + BaseAuras[86211] = 4 -- Soul Swap + BaseAuras[104773] = 4 -- Unending Resolve + + -- Buffs + BaseAuras[20707] = 1 -- Soulstone + + -- Debuffs + BaseAuras[980] = 2 -- Agony + BaseAuras[108505] = 2 -- Archimonde's Vengeance + BaseAuras[124915] = 2 -- Chaos Wave + BaseAuras[17962] = 2 -- Conflagrate (slow) + BaseAuras[172] = 2 -- Corruption + BaseAuras[109466] = 2 -- Curse of Enfeeblement + BaseAuras[18223] = 2 -- Curse of Exhaustion + BaseAuras[1490] = 2 -- Curse of the Elements + BaseAuras[603] = 2 -- Doom + BaseAuras[48181] = 2 -- Haunt + BaseAuras[80240] = 2 -- Havoc + BaseAuras[348] = 2 -- Immolate + BaseAuras[108686] = 2 -- Immolate <= Fire and Brimstone + BaseAuras[60947] = 2 -- Nightmare + BaseAuras[30108] = 2 -- Seed of Corruption + BaseAuras[47960] = 2 -- Shadowflame + BaseAuras[30283] = 2 -- Shadowfury + BaseAuras[27243] = 2 -- Unstable Affliction + + -- Debuffs - Crowd Control + BaseAuras[170] = 2 -- Banish + BaseAuras[111397] = 2 -- Blood Fear + BaseAuras[137143] = 2 -- Blood Horror + BaseAuras[1098] = 2 -- Enslave Demon + BaseAuras[5782] = 2 -- Fear + BaseAuras[5484] = 2 -- Howl of Terror + BaseAuras[6789] = 2 -- Mortal Coil +end ------------------------------------------------------------------------ --- Taunted +-- Warrior -if playerClass == 'DEATHKNIGHT' or playerClass == 'DRUID' or playerClass == 'PALADIN' or playerClass == 'WARRIOR' then addAuras({ - [5209] = 1, -- Challenging Roar - [1161] = 1, -- Challenging Shout - [56222] = 1, -- Dark Command - [57604] = 1, -- Death Grip -- NEEDS CHECK 57603 - [20736] = 1, -- Distracting Shot - [6794] = 1, -- Growl - [62124] = 1, -- Hand of Reckoning - [31790] = 1, -- Righteous Defense - [355] = 1, -- Taunt - [58857] = 1, -- Twin Howl [shaman spirit wolves] -}) end +if playerClass == "WARRIOR" then + -- Self Buffs + BaseAuras[107574] = 4 -- Avatar + BaseAuras[18499] = 4 -- Berserker Rage + BaseAuras[46924] = 4 -- Bladestorm + BaseAuras[12292] = 4 -- Bloodbath + BaseAuras[46916] = 4 -- Bloodsurge + BaseAuras[85730] = 4 -- Deadly Calm + BaseAuras[125565] = 4 -- Demoralizing Shout + BaseAuras[118038] = 4 -- Die by the Sword + BaseAuras[12880] = 4 -- Enrage + BaseAuras[55964] = 4 -- Enraged Regeneration + BaseAuras[115945] = 4 -- Glyph of Hamstring + BaseAuras[12975] = 4 -- Last Stand + BaseAuras[114028] = 4 -- Mass Spell Reflection + BaseAuras[85739] = 4 -- Meat Cleaver + BaseAuras[114192] = 4 -- Mocking Banner + BaseAuras[97463] = 4 -- Rallying Cry + BaseAuras[1719] = 4 -- Recklessness + BaseAuras[112048] = 4 -- Shield Barrier + BaseAuras[2565] = 4 -- Shield Block + BaseAuras[871] = 4 -- Shield Wall + BaseAuras[114206] = 4 -- Skull Banner + BaseAuras[23920] = 4 -- Spell Banner + BaseAuras[52437] = 4 -- Sudden Death + BaseAuras[12328] = 4 -- Sweeping Strikes + BaseAuras[50227] = 4 -- Sword and Board + BaseAuras[125831] = 4 -- Taste for Blood + BaseAuras[122510] = 4 -- Ultimatum + + -- Buffs + BaseAuras[46947] = 3 -- Safeguard (damage reduction) + BaseAuras[114029] = 3 -- Safeguard (intercept) + BaseAuras[114030] = 3 -- Vigilance + + -- Debuffs + BaseAuras[86346] = 2 -- Colossus Smash + BaseAuras[114205] = 2 -- Demoralizing Banner + BaseAuras[1160] = 2 -- Demoralizing Shout + BaseAuras[676] = 2 -- Disarm + BaseAuras[118895] = 2 -- Dragon Roar + BaseAuras[1715] = 2 -- Hamstring + BaseAuras[5246] = 2 -- Intimidating Shout -- NEEDS CHECK + BaseAuras[20511] = 2 -- Intimidating Shout -- NEEDS CHECK + BaseAuras[12323] = 2 -- Piercing Howl + BaseAuras[64382] = 2 -- Shattering Throw + BaseAuras[46968] = 2 -- Shockwave + BaseAuras[18498] = 2 -- Silenced - Gag Order + BaseAuras[107566] = 2 -- Staggering Shout + BaseAuras[107570] = 2 -- Storm Bolt + BaseAuras[355] = 2 -- Taunt + BaseAuras[105771] = 2 -- Warbringer +end ------------------------------------------------------------------------ --- Crowd controlled - -addAuras({ - [710] = 1, -- Banish - [76780] = 1, -- Bind Elemental - [33786] = 1, -- Cyclone - [339] = 1, -- Entangling Roots - [5782] = 1, -- Fear - [3355] = 1, -- Freezing Trap -- NEEDS CHECK 31932 43415 55041 - [51514] = 1, -- Hex - [2637] = 1, -- Hibernate - [118] = 1, -- Polymorph - [61305] = 1, -- Polymorph [Black Cat] - [28272] = 1, -- Polymorph [Pig] - [61721] = 1, -- Polymorph [Rabbit] - [61780] = 1, -- Polymorph [Turkey] - [28271] = 1, -- Polymorph [Turtle] - [20066] = 1, -- Repentance - [6770] = 1, -- Sap - [6358] = 1, -- Seduction - [9484] = 1, -- Shackle Undead - [10326] = 1, -- Turn Evil - [19386] = 1, -- Wyvern Sting -}) +-- Racials + +if playerRace == "BloodElf" then + BaseAuras[50613] = 2 -- Arcane Torrent (death knight) + BaseAuras[80483] = 2 -- Arcane Torrent (hunter) + BaseAuras[28730] = 2 -- Arcane Torrent (mage, paladin, priest, warlock) + BaseAuras[129597] = 2 -- Arcane Torrent (monk) + BaseAuras[25046] = 2 -- Arcane Torrent (rogue) + BaseAuras[69179] = 2 -- Arcane Torrent (warrior) +elseif playerRace == "Draenei" then + BaseAuras[59545] = 4 -- Gift of the Naaru (death knight) + BaseAuras[59543] = 4 -- Gift of the Naaru (hunter) + BaseAuras[59548] = 4 -- Gift of the Naaru (mage) + BaseAuras[121093] = 4 -- Gift of the Naaru (monk) + BaseAuras[59542] = 4 -- Gift of the Naaru (paladin) + BaseAuras[59544] = 4 -- Gift of the Naaru (priest) + BaseAuras[59547] = 4 -- Gift of the Naaru (shaman) + BaseAuras[28880] = 4 -- Gift of the Naaru (warrior) +elseif playerRace == "Dwarf" then + BaseAuras[20594] = 4 -- Stoneform +elseif playerRace == "NightElf" then + BaseAuras[58984] = 4 -- Shadowmeld +elseif playerRace == "Orc" then + BaseAuras[20572] = 4 -- Blood Fury (attack power) + BaseAuras[33702] = 4 -- Blood Fury (spell power) + BaseAuras[33697] = 4 -- Blood Fury (attack power and spell damage) +elseif playerRace == "Pandaren" then + BaseAuras[107079] = 4 -- Quaking Palm +elseif playerRace == "Scourge" then + BaseAuras[7744] = 4 -- Will of the Forsaken +elseif playerRace == "Tauren" then + BaseAuras[20549] = 1 -- War Stomp +elseif playerRace == "Troll" then + BaseAuras[26297] = 4 -- Berserking +elseif playerRace == "Worgen" then + BaseAuras[68992] = 4 -- Darkflight +end ------------------------------------------------------------------------ --- Death Knight +-- Magic Vulnerability -if playerClass == 'DEATHKNIGHT' then addAuras({ - [55078] = 2, -- Blood Plague - [45524] = 1, -- Chains of Ice - [77606] = 2, -- Dark Simulacrum - [43265] = 2, -- Death and Decay - [65142] = 2, -- Ebon Plague - [55095] = 2, -- Frost Fever - [49203] = 1, -- Hungering Cold - [81130] = 2, -- Scarlet Fever - [50536] = 2, -- Unholy Blight -- NEEDS CHECK - - [48707] = 4, -- Anti-Magic Shell - [81141] = 4, -- Blood Swarm <== Crimson Scourge - [49222] = 4, -- Bone Shield - [81256] = 4, -- Dancing Rune Weapon - [59052] = 4, -- Freezing Fog <== Rime - [48792] = 4, -- Icebound Fortitude - [51124] = 4, -- Killing Machine - [49039] = 4, -- Lichborne - [51271] = 4, -- Pillar of Frost - [50421] = 4, -- Scent of Blood - [81340] = 4, -- Sudden Doom - [55233] = 4, -- Vampiric Blood - [81162] = 4, -- Will of the Necropolis -- NEEDS CHECK - - [49016] = 1, -- Unholy Frenzy -}) end +if playerClass == "ROGUE" or playerClass == "WARLOCK" then + BaseAuras[1490] = 1 -- Curse of the Elements (warlock) + BaseAuras[34889] = 1 -- Fire Breath (hunter dragonhawk) + BaseAuras[24844] = 1 -- Lightning Breath (hunter wind serpent) + BaseAuras[93068] = 1 -- Master Poisoner (rogue) +end ------------------------------------------------------------------------ --- Druid +-- Mortal Wounds -if playerClass == 'DRUID' then addAuras({ - [5211] = 2, -- Bash - [33786] = 2, -- Cyclone - [339] = 2, -- Entangling Roots - [45334] = 2, -- Feral Charge Effect [Bear Form] - [61138] = 2, -- Feral Charge - Cat -- NEEDS CHECK - [2637] = 2, -- Hibernate - [5570] = 2, -- Insect Swarm - [33745] = 2, -- Lacerate - [22570] = 2, -- Maim - [8921] = 2, -- Moonfire - [9005] = 2, -- Pounce - [9007] = 2, -- Pounce Bleed - [1822] = 2, -- Rake - [1079] = 2, -- Rip - [93402] = 2, -- Sunfire - [77758] = 2, -- Thrash - - [22812] = 4, -- Barkskin - [50334] = 4, -- Berserk - [16870] = 4, -- Clearcasting <== Omen of Clarity - [1850] = 4, -- Dash - [5229] = 4, -- Enrage - [48518] = 4, -- Eclipse (Lunar) - [48517] = 4, -- Eclipse (Solar) - [22842] = 4, -- Frenzied Regeneration - [81093] = 4, -- Fury of Stormrage - [81192] = 4, -- Lunar Shower - [16886] = 4, -- Nature's Grace - [16689] = 4, -- Nature's Grasp - [17116] = 4, -- Nature's Swiftness - [80951] = 4, -- Pulverize - [52610] = 4, -- Savage Roar - [93400] = 4, -- Shooting Stars - [81021] = 4, -- Stampede [Ravage effect] - [81022] = 4, -- Stampede [Ravage effect] - [61336] = 4, -- Survival Instincts - [5217] = 4, -- Tiger's Fury - [33891] = 4, -- Tree of Life - [61391] = 4, -- Typhoon - - [33763] = 2, -- Lifebloom - [94447] = 2, -- Lifebloom [Tree of Life version] - [8936] = 2, -- Regrowth - [774] = 2, -- Rejuvenation - [77764] = 1, -- Stampeding Roar - [467] = 1, -- Thorns - [48438] = 2, -- Wild Growth -}) end +if playerClass == "HUNTER" or playerClass == "MONK" or playerClass == "ROGUE" or playerClass == "WARRIOR" then + BaseAuras[54680] = 1 -- Monstrous Bite (hunter devilsaur) + BaseAuras[115804] = 1 -- Mortal Wounds (monk, warrior) + BaseAuras[82654] = 1 -- Widow Venom (hunter) + BaseAuras[8680] = 1 -- Wound Poison (rogue) +end ------------------------------------------------------------------------ --- Hunter +-- Physical Vulnerability + +if playerClass == "DEATHKNIGHT" or playerClass == "PALADIN" or playerClass == "WARRIOR" then + BaseAuras[55749] = 1 -- Acid Rain (hunter worm) + BaseAuras[35290] = 1 -- Gore (hunter boar) + BaseAuras[81326] = 1 -- Physical Vulnerability (death knight, paladin, warrior) + BaseAuras[50518] = 1 -- Ravage (hunter ravager) + BaseAuras[57386] = 1 -- Stampede (hunter rhino) +end -if playerClass == 'HUNTER' then addAuras({ - [50433] = 2, -- Ankle Crack [crocolisk] - [3674] = 2, -- Black Arrow - [35101] = 2, -- Concussive Barrage - [5116] = 2, -- Concussive Shot - [19306] = 2, -- Counterattack - [20736] = 2, -- Distracting Shot - [64803] = 2, -- Entrapment - [53301] = 2, -- Explosive Shot - [13812] = 2, -- Explosive Trap -- NEEDS CHECK 43446 - [3355] = 2, -- Freezing Trap -- NEEDS CHECK 31932 43415 55041 - [1130] = 1, -- Hunter's Mark - [13810] = 2, -- Ice Trap - [13797] = 2, -- Immolation Trap -- NEEDS CHECK 51740 - [24394] = 2, -- Intimidation - [88691] = 1, -- Marked for Death - [63468] = 2, -- Piercing Shots - [1513] = 2, -- Scare Beast - [19503] = 2, -- Scatter Shot - [1978] = 2, -- Serpent Sting - [82654] = 1, -- Widow Venom - [2974] = 2, -- Wing Clip - [19386] = 2, -- Wyvern Sting - - [82921] = 4, -- Bombardment - [51755] = 4, -- Camouflage - [15571] = 4, -- Dazed <== Aspect of the Cheetah - [19263] = 4, -- Deterrence - [5384] = 4, -- Feign Death - [82926] = 4, -- Fire! <== Lock and Load - [64418] = 4, -- Sniper Training [Rank 1] - [64419] = 4, -- Sniper Training [Rank 2] - [64420] = 4, -- Sniper Training [Rank 3] - [56453] = 4, -- Lock and Load - [34477] = 4, -- Misdirection - [3045] = 4, -- Rapid Fire - [35099] = 4, -- Rapid Killing --- [82925] = 4, -- Ready, Set, Aim... - - [19574] = 2, -- Bestial Wrath - [1539] = 2, -- Feed Pet - [136] = 2, -- Mend Pet -}) end +------------------------------------------------------------------------ +-- Slow Casting + +if playerClass == "DEATHKNIGHT" or playerClass == "MAGE" or playerClass == "ROGUE" or playerClass == "WARLOCK" then + BaseAuras[109466] = 1 -- Curse of Enfeeblement (warlock) + BaseAuras[5760] = 1 -- Mind-numbing Poison (rogue) + BaseAuras[73975] = 1 -- Necrotic Strike (death knight) + BaseAuras[31589] = 1 -- Slow (mage) + BaseAuras[50274] = 1 -- Spore Cloud (hunter sporebat) + BaseAuras[90315] = 1 -- Tailspin (hunter fox) + BaseAuras[126406] = 1 -- Trample (hunter goat) + BaseAuras[58604] = 1 -- Lava Breath (hunter core hound) +end ------------------------------------------------------------------------ --- Mage +-- Weakened Armor -if playerClass == 'MAGE' then addAuras({ - [11113] = 2, -- Blast Wave - [12486] = 2, -- Chilled <== Blizzard <== Ice Shards -- NEEDS CHECK - [7321] = 2, -- Chilled <== Frost Aura - [83853] = 2, -- Combustion - [120] = 2, -- Cone of Cold - [44572] = 2, -- Deep Freeze - [31661] = 2, -- Dragon's Breath - [122] = 2, -- Frost Nova - [116] = 2, -- Frostbolt - [44614] = 2, -- Frostfire Bolt - [12654] = 2, -- Ignite - [12355] = 2, -- Impact - [83301] = 2, -- Improved Cone of Cold [Rank 1] - [83302] = 2, -- Improved Cone of Cold [Rank 2] - [44457] = 2, -- Living Bomb - [118] = 2, -- Polymorph - [61305] = 2, -- Polymorph [Black Cat] - [28272] = 2, -- Polymorph [Pig] - [61721] = 2, -- Polymorph [Rabbit] - [61780] = 2, -- Polymorph [Turkey] - [28271] = 2, -- Polymorph [Turtle] - [82691] = 2, -- Ring of Frost - [31589] = 2, -- Slow - - [36032] = 4, -- Arcane Blast - [79683] = 4, -- Arcane Missiles! - [12042] = 4, -- Arcane Power - [31643] = 4, -- Blazing Speed - [57761] = 4, -- Brain Freeze - [44544] = 4, -- Fingers of Frost - [48108] = 4, -- Hot Streak - [11426] = 4, -- Ice Barrier - [45438] = 4, -- Ice Block - [12472] = 4, -- Icy Veins - [64343] = 4, -- Impact - [66] = 4, -- Invisibility - [543] = 4, -- Mage Ward - [1436] = 4, -- Mana Shield - [12043] = 4, -- Presence of Mind - - [54646] = 2, -- Focus Magic - [130] = 2, -- Slow Fall -}) end +if playerClass == "DRUID" or playerClass == "ROGUE" or playerClass == "WARRIOR" then + -- druids need to keep Faerie Fire/Swarm up anyway, no need to see both, this has the shorter duration + BaseAuras[113746] = 1 -- Weakened Armor (druid, hunter raptor, hunter tallstrider, rogue, warrior) +end ------------------------------------------------------------------------ --- Paladin - -if playerClass == 'PALADIN' then addAuras({ - [31935] = 2, -- Avenger's Shield - [31803] = 2, -- Censure <== Seal of Truth - [25771] = 1, -- Forbearance - [853] = 2, -- Hammer of Justice - [2812] = 2, -- Holy Wrath - [20066] = 2, -- Repentance - [10326] = 2, -- Turn Evil - - [86701] = 4, -- Ancient Crusader <== Guardian of Ancient Kings - [86657] = 4, -- Ancient Guardian <== Guardian of Ancient Kings - [86674] = 4, -- Ancient Healer <== Guardian of Ancient Kings - [31850] = 4, -- Ardent Defender - [31821] = 4, -- Aura Mastery - [31884] = 4, -- Avenging Wrath - [88819] = 4, -- Daybreak - [85509] = 4, -- Denounce - [31842] = 4, -- Divine Favor - [54428] = 4, -- Divine Plea - [498] = 4, -- Divine Protection - [642] = 4, -- Divine Shield - [82327] = 4, -- Holy Radiance - [20925] = 4, -- Holy Shield - [54149] = 4, -- Infusion of Light - [84963] = 4, -- Inquisition - [85433] = 4, -- Sacred Duty - [85497] = 4, -- Speed of Light [haste effect] - [59578] = 4, -- The Art of War - [85696] = 4, -- Zealotry - - [53563] = 2, -- Beacon of Light - [70940] = 1, -- Divine Guardian - [1044] = 1, -- Hand of Freedom - [1022] = 1, -- Hand of Protection - [6940] = 1, -- Hand of Sacrifice - [1038] = 1, -- Hand of Salvation -}) end +-- Weakened Blows (tanks only) + +if playerClass == "DEATHKNIGHT" or playerClass == "MONK" or playerClass == "PALADIN" or playerClass == "WARRIOR" then + -- druids need to keep Thrash up anyway, no need to see both + tinsert(updateFuncs, function(auraList) + if GetPlayerRole() == "TANK" then + --print("Adding Weakened Blows") + auraList[109466] = 1 -- Curse of Enfeeblement (warlock) + auraList[60256] = 1 -- Demoralizing Roar (hunter bear) + auraList[24423] = 1 -- Demoralizing Screech (hunter carrion bird) + auraList[115798] = 1 -- Weakened Blows (death knight, druid, monk, paladin, shaman, warrior) + end + end) +end ------------------------------------------------------------------------ --- Priest +-- Taunted -if playerClass == 'PRIEST' then addAuras({ - [2944] = 2, -- Devouring Plague - [88625] = 2, -- Holy Word: Chastise - [605] = 2, -- Mind Control - [453] = 1, -- Mind Soothe - [87178] = 2, -- Mind Spike - [87193] = 2, -- Paralysis [Rank 1] - [87194] = 2, -- Paralysis [Rank 2] - [64044] = 2, -- Psychic Horror - [8122] = 2, -- Psychic Scream - [9484] = 2, -- Shackle Undead - [589] = 2, -- Shadow Word: Pain - [34914] = 2, -- Vampiric Touch - [6788] = 1, -- Weakened Soul - - [81700] = 4, -- Archangel - [14751] = 4, -- Chakra - [81208] = 4, -- Chakra: Heal - [81206] = 4, -- Chakra: Prayer of Healing - [81207] = 4, -- Chakra: Renew - [81209] = 4, -- Chakra: Smite - [87153] = 4, -- Dark Archangel - [87117] = 4, -- Dark Evangelism -- NEEDS CHECK - [87118] = 4, -- Dark Evangelism -- NEEDS CHECK - [47585] = 4, -- Dispersion - [81660] = 4, -- Evangelism -- NEEDS CHECK - [81661] = 4, -- Evangelism -- NEEDS CHECK - [586] = 4, -- Fade - [89485] = 4, -- Inner Focus - [81292] = 4, -- Mind Melt [Rank 1] - [87160] = 4, -- Mind Melt [Rank 2] - [88688] = 4, -- Surge of Light - - [6346] = 1, -- Fear Ward - [77613] = 2, -- Grace - [47788] = 2, -- Guardian Spirit - [88682] = 2, -- Holy Word: Aspire - [33206] = 2, -- Pain Suppression - [10060] = 2, -- Power Infusion - [17] = 1, -- Power Word: Shield - [41635] = 2, -- Prayer of Mending - [139] = 2, -- Renew -}) end +if playerClass == "DEATHKNIGHT" or playerClass == "DRUID" or playerClass == "MONK" or playerClass == "PALADIN" or playerClass == "WARRIOR" then + local Taunts = { + [56222] = 1, -- Dark Command + [57604] = 1, -- Death Grip -- NEEDS CHECK 57603 + [20736] = 1, -- Distracting Shot + [6795] = 1, -- Growl + [118585] = 1, -- Leer of the Ox + [62124] = 1, -- Reckoning + [355] = 1, -- Taunt + } + tinsert(updateFuncs, function(auraList) + --print("Adding taunts for PVE") + for aura, filter in pairs(Taunts) do + auraList[aura] = filter + end + end) +end ------------------------------------------------------------------------ --- Rogue +-- Random quest related auras -if playerClass == 'ROGUE' then addAuras({ - [51585] = 2, -- Blade Twisting - [2094] = 2, -- Blind - [1833] = 2, -- Cheap Shot - [3409] = 2, -- Crippling Poison - [2818] = 2, -- Deadly Poison - [26679] = 2, -- Deadly Throw - [51722] = 2, -- Dismantle - [8647] = 1, -- Expose Armor - [703] = 2, -- Garrote - [1776] = 2, -- Gouge - [89775] = 2, -- Hemorrhage [dot from glyph] - [408] = 2, -- Kidney Shot - [84617] = 2, -- Revealing Strike - [14251] = 1, -- Riposte - [1943] = 2, -- Rupture - [79140] = 2, -- Vendetta - [13218] = 2, -- Wound Poison - - [13750] = 4, -- Adrenaline Rush - [13877] = 4, -- Blade Flurry - [31224] = 4, -- Cloak of Shadows - [14177] = 4, -- Cold Blood - [84590] = 4, -- Deadly Momentum - [5277] = 4, -- Evasion - [73651] = 4, -- Recuperate - [5171] = 4, -- Slice and Dice - [2983] = 4, -- Sprint - [57934] = 4, -- Tricks of the Trade -}) end +BaseAuras[127372] = 2 -- Unstable Serum (Klaxxi Enhancement: Raining Blood) ------------------------------------------------------------------------ --- Shaman +-- Boss debuffs that Blizzard forgot to flag -if playerClass == 'SHAMAN' then addAuras({ - [76780] = 2, -- Bind Elemental - [8042] = 2, -- Earth Shock - [3600] = 1, -- Earthbind - [56425] = 1, -- Earth's Grasp -- NEEDS CHECK - [8050] = 2, -- Flame Shock - [8056] = 2, -- Frost Shock - [8034] = 2, -- Frostbrand Attack -- NEEDS CHECK - [89523] = 1, -- Grounding Totem [reflect] - [8178] = 1, -- Grounding Totem Effect - [51514] = 2, -- Hex - [77661] = 1, -- Searing Flames - [39796] = 1, -- Stoneclaw Stun - [17364] = 2, -- Stormstrike - - [16166] = 4, -- Elemental Mastery [instant cast] - [77800] = 4, -- Focused Insight - [65264] = 4, -- Lava Flows -- NEEDS CHECK - [31616] = 4, -- Nature's Guardian - [16188] = 4, -- Nature's Swiftness - [30823] = 4, -- Shamanistic Rage - [79206] = 4, -- Spiritwalker's Grace - [53390] = 4, -- Tidal Waves - - [974] = 2, -- Earth Shield - [61295] = 2, -- Riptide -}) end +BaseAuras[106648] = 1 -- Brew Explosion (Ook Ook in Stormsnout Brewery) +BaseAuras[106784] = 1 -- Brew Explosion (Ook Ook in Stormsnout Brewery) +BaseAuras[123059] = 1 -- Destabilize (Amber-Shaper Un'sok) ------------------------------------------------------------------------ --- Warlock +-- Enchant procs that Blizzard failed to flag with their caster -if playerClass == 'WARLOCK' then addAuras({ - [93986] = 2, -- Aura of Foreboding [stun effect] -- NEEDS CHECK 93975 - [93987] = 2, -- Aura of Foreboding [root effect] -- NEEDS CHECK 93974 - [980] = 2, -- Bane of Agony - [603] = 2, -- Bane of Doom - [80240] = 2, -- Bane of Havoc - [710] = 2, -- Banish - [172] = 2, -- Corruption - [29539] = 1, -- Curse of Exhaustion - [1490] = 1, -- Curse of the Elements - [1714] = 1, -- Curse of Tongues - [702] = 1, -- Curse of Weakness - [5782] = 2, -- Fear - [48181] = 2, -- Haunt - [5484] = 2, -- Howl of Terror - [348] = 2, -- Immolate - [60947] = 2, -- Nightmare <== Improved Fear -- NEEDS CHECK 60946 - [27243] = 2, -- Seed of Corruption - [47960] = 2, -- Shadowflame -- NEEDS CHECK 47897 - [30283] = 2, -- Shadowfury - [63311] = 2, -- Shadowsnare <== Glyph of Shadowflame - [30108] = 2, -- Unstable Affliction - - [54277] = 4, -- Backdraft - [34936] = 4, -- Backlash - [79462] = 4, -- Demon Soul: Felguard - [79460] = 4, -- Demon Soul: Felhunter - [79459] = 4, -- Demon Soul: Imp - [79463] = 4, -- Demon Soul: Succubus - [79464] = 4, -- Demon Soul: Voidwalker - [88448] = 4, -- Demonic Rebirth - [47283] = 4, -- Empowered Imp - [64371] = 4, -- Eradication - [50589] = 4, -- Immolation Aura - [47241] = 4, -- Metamorphosis - [71165] = 4, -- Molten Core - [54373] = 4, -- Nether Protection (Arcane) - [54371] = 4, -- Nether Protection (Fire) - [54372] = 4, -- Nether Protection (Frost) - [54370] = 4, -- Nether Protection (Holy) - [54375] = 4, -- Nether Protection (Nature) - [54374] = 4, -- Nether Protection (Shadow) - [91711] = 4, -- Nether Ward - [7812] = 4, -- Sacrifice - [17941] = 4, -- Shadow Trance <== Nightfall - [6229] = 4, -- Shadow Ward - [86211] = 4, -- Soul Swap - [74434] = 4, -- Soulburn - - [85767] = 2, -- Dark Intent - [20707] = 1, -- Soulstone Resurrection -}) end +BaseAuras[116631] = 0 -- Colossus +BaseAuras[118334] = 0 -- Dancing Steel (agi) +BaseAuras[118335] = 0 -- Dancing Steel (str) +BaseAuras[104993] = 0 -- Jade Spirit +BaseAuras[116660] = 0 -- River's Song +BaseAuras[104509] = 0 -- Windsong (crit) +BaseAuras[104423] = 0 -- Windsong (haste) +BaseAuras[104510] = 0 -- Windsong (mastery) ------------------------------------------------------------------------ --- Warrior - -if playerClass == 'WARRIOR' then addAuras({ - [86346] = 2, -- Colossus Smash - [12809] = 2, -- Concussion Blow - [1160] = 1, -- Demoralizing Shout - [676] = 1, -- Disarm - [1715] = 2, -- Hamstring - [20511] = 2, -- Intimidating Shout - [12294] = 2, -- Mortal Strike - [12323] = 2, -- Piercing Howl - [94009] = 2, -- Rend - [64382] = 1, -- Shattering Throw - [46968] = 2, -- Shockwave - [58567] = 2, -- Sunder Armor - [85388] = 2, -- Throwdown - [6343] = 2, -- Thunder Clap - - [12964] = 4, -- Battle Trance - [18499] = 4, -- Berserker Rage - [46924] = 4, -- Bladestorm - [46916] = 4, -- Bloodsurge - [23885] = 4, -- Bloodthirst -- NEEDS CHECK - [85730] = 4, -- Deadly Calm - [12292] = 4, -- Death Wish - [55694] = 4, -- Enraged Regeneration - [1134] = 4, -- Inner Rage - [65156] = 4, -- Juggernaut - [12976] = 4, -- Last Stand - [1719] = 4, -- Recklessness - [20230] = 4, -- Retaliation - [2565] = 4, -- Shield Block - [871] = 4, -- Shield Wall - [23920] = 4, -- Spell Reflection - [50227] = 4, -- Sword and Board - [87069] = 4, -- Thunderstruck - [32216] = 4, -- Victory Rush - - [3411] = 2, -- Intervene - [50720] = 2, -- Vigilance -}) end +-- NPC buffs that are completely useless + +BaseAuras[63501] = 0 -- Argent Crusade Champion's Pennant +BaseAuras[60023] = 0 -- Scourge Banner Aura (Boneguard Commander in Icecrown) +BaseAuras[63406] = 0 -- Darnassus Champion's Pennant +BaseAuras[63405] = 0 -- Darnassus Valiant's Pennant +BaseAuras[63423] = 0 -- Exodar Champion's Pennant +BaseAuras[63422] = 0 -- Exodar Valiant's Pennant +BaseAuras[63396] = 0 -- Gnomeregan Champion's Pennant +BaseAuras[63395] = 0 -- Gnomeregan Valiant's Pennant +BaseAuras[63427] = 0 -- Ironforge Champion's Pennant +BaseAuras[63426] = 0 -- Ironforge Valiant's Pennant +BaseAuras[63433] = 0 -- Orgrimmar Champion's Pennant +BaseAuras[63432] = 0 -- Orgrimmar Valiant's Pennant +BaseAuras[63399] = 0 -- Sen'jin Champion's Pennant +BaseAuras[63398] = 0 -- Sen'jin Valiant's Pennant +BaseAuras[63403] = 0 -- Silvermoon Champion's Pennant +BaseAuras[63402] = 0 -- Silvermoon Valiant's Pennant +BaseAuras[62594] = 0 -- Stormwind Champion's Pennant +BaseAuras[62596] = 0 -- Stormwind Valiant's Pennant +BaseAuras[63436] = 0 -- Thunder Bluff Champion's Pennant +BaseAuras[63435] = 0 -- Thunder Bluff Valiant's Pennant +BaseAuras[63430] = 0 -- Undercity Champion's Pennant +BaseAuras[63429] = 0 -- Undercity Valiant's Pennant ------------------------------------------------------------------------ --- Racials -if playerRace == 'Draenei' then - auras[59545] = 4 -- Gift of the Naaru (death knight) - auras[59543] = 4 -- Gift of the Naaru (hunter) - auras[59548] = 4 -- Gift of the Naaru (mage) - auras[59542] = 4 -- Gift of the Naaru (paladin) - auras[59544] = 4 -- Gift of the Naaru (priest) - auras[59547] = 4 -- Gift of the Naaru (shaman) - auras[28880] = 4 -- Gift of the Naaru (warrior) -elseif playerRace == 'Dwarf' then - auras[20594] = 4 -- Stoneform -elseif playerRace == 'NightElf' then - auras[58984] = 4 -- Shadowmeld -elseif playerRace == 'Orc' then - auras[20572] = 4 -- Blood Fury (attack power) - auras[33702] = 4 -- Blood Fury (spell power) - auras[33697] = 4 -- Blood Fury (attack power and spell damage) -elseif playerRace == 'Scourge' then - auras[7744] = 4 -- Will of the Forsaken -elseif playerRace == 'Tauren' then - auras[20549] = 1 -- War Stomp -elseif playerRace == 'Troll' then - auras[26297] = 4 -- Berserking -elseif playerRace == 'Worgen' then - auras[68992] = 4 -- Darkflight +local auraList = {} +AuraList = auraList + +UpdateAuraList = function() + --print("UpdateAuraList") + wipe(auraList) + -- Add base auras + for aura, filter in pairs(BaseAuras) do + auraList[aura] = filter + end + -- Add auras that depend on spec or PVP mode + for i = 1, #updateFuncs do + updateFuncs[i](auraList) + end + -- Add custom auras + for aura, filter in pairs(oUFLanAura) do + auraList[aura] = filter + end + -- Update all the things + for _, obj in pairs(oUF.objects) do + if obj.Auras then + obj.Auras:ForceUpdate() + end + if obj.Buffs then + obj.Buffs:ForceUpdate() + end + if obj.Debuffs then + obj.Debuffs:ForceUpdate() + end + end end ------------------------------------------------------------------------ +local IsInInstance, UnitCanAttack, UnitIsFriend, UnitIsUnit, UnitPlayerControlled + = IsInInstance, UnitCanAttack, UnitIsFriend, UnitIsUnit, UnitPlayerControlled + local unitIsPlayer = { player = true, pet = true, vehicle = true } local filters = { - [1] = function( self, unit, caster ) return true end, - [2] = function( self, unit, caster ) return unitIsPlayer[ caster ] end, - [3] = function( self, unit, caster ) return UnitIsFriend( unit, 'player' ) and UnitPlayerControlled( unit ) end, - [4] = function( self, unit, caster ) return unit == 'player' and not self.__owner.isGroupFrame end, + [2] = function(self, unit, caster) return unitIsPlayer[caster] end, + [3] = function(self, unit, caster) return UnitIsFriend(unit, "player") and UnitPlayerControlled(unit) end, + [4] = function(self, unit, caster) return unit == "player" and not self.__owner.isGroupFrame end, } -CustomAuraFilter = function( self, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster, isStealable, shouldConsolidate, spellID ) - local v = auras[ spellID ] - - -- print( 'CustomAuraFilter', unit, caster, name, spellID, v ) - - if v and filters[ v ] then - return filters[ v ]( self, unit, caster ) - else - return ( not caster or caster == unit ) and UnitCanAttack( unit, 'player' ) and not UnitPlayerControlled( unit ) - end -end - -AuraList = auras \ No newline at end of file +CustomAuraFilters = { + player = function(self, unit, iconFrame, name, rank, icon, count, debuffType, duration, expirationTime, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, isCastByPlayer, value1, value2, value3) + -- print("CustomAuraFilter", self.__owner:GetName(), "[unit]", unit, "[caster]", caster, "[name]", name, "[id]", spellID, "[filter]", v, caster == "vehicle") + local v = auraList[spellID] + if v and filters[v] then + return filters[v](self, unit, caster) + elseif v then + return v > 0 + else + return caster and UnitIsUnit(caster, "vehicle") + end + end, + pet = function(self, unit, iconFrame, name, rank, icon, count, debuffType, duration, expirationTime, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, isCastByPlayer, value1, value2, value3) + return caster and unitIsPlayer[caster] and auraList[spellID] == 2 + end, + target = function(self, unit, iconFrame, name, rank, icon, count, debuffType, duration, expirationTime, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, isCastByPlayer, value1, value2, value3) + local v = auraList[spellID] + -- print("CustomAuraFilter", unit, spellID, name, caster, v) + if v and filters[v] then + return filters[v](self, unit, caster) + elseif v then + return v > 0 + elseif not caster and not IsInInstance() then + -- test + return + elseif UnitCanAttack("player", unit) and not UnitPlayerControlled(unit) then + -- Hostile NPC. Show boss debuffs, auraList cast by the unit, or auras cast by the player's vehicle. + -- print("hostile NPC") + return isBossDebuff or not caster or caster == unit or UnitIsUnit(caster, "vehicle") + else + -- Friendly target or hostile player. Show boss debuffs, or auras cast by the player's vehicle. + -- print("hostile player / friendly unit") + return isBossDebuff or not caster or UnitIsUnit(caster, "vehicle") + end + end, + party = function(self, unit, iconFrame, name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, isCastByPlayer, value1, value2, value3) + local v = auraList[spellID] + return v and v < 4 + end, +} \ No newline at end of file diff --git a/Tags.lua b/Tags.lua index c9d9681..fce96f6 100644 --- a/Tags.lua +++ b/Tags.lua @@ -82,7 +82,7 @@ end oUF.Tags.Events['LanRaidName'] = 'UNIT_NAME_UPDATE UNIT_HEALTH' oUF.Tags.Methods['LanRaidName'] = function(unit) if (not UnitIsConnected(unit)) then - Name = '|cffD7BEA5'..'OFFLINE' + Name = '|cffD7BEA5'..'OFF' elseif (UnitIsDead(unit)) then Name = '|cffD7BEA5'..'DEAD' elseif (UnitIsGhost(unit)) then diff --git a/oUF_Lanerra.lua b/oUF_Lanerra.lua index 26a07b1..b4b87fd 100644 --- a/oUF_Lanerra.lua +++ b/oUF_Lanerra.lua @@ -12,7 +12,6 @@ InterfaceOptionsFrameCategoriesButton11:SetScale(0.00001) InterfaceOptionsFrameCategoriesButton11:SetAlpha(0) - ------------------------------------------------- -- Kill some unitframe stuff ------------------------------------------------- @@ -51,9 +50,18 @@ local colors = oUF.colors local playerClass = select(2, UnitClass('player')) local isHealer = (playerClass == 'DRUID' or playerClass == 'PALADIN' or playerClass == 'PRIEST' or playerClass == 'SHAMAN') +local Loader = CreateFrame("Frame") +Loader:RegisterEvent("ADDON_LOADED") +Loader:SetScript("OnEvent", function(self, event, addon) + if addon ~= "oUF_Lanerra" then return end + + oUFLanAura = oUFLanAura or {} + UpdateAuraList() +end) + -- A little backdrop local to save us some typing...because I'm lazy local backdrop = { - bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], + bgFile = [[Interface\BUTTONS\WHITE8X8]], insets = {top = -1, left = -1, bottom = -1, right = -1}, } @@ -74,17 +82,17 @@ PowerBarColor['ENERGY'] = { r = 1, g = 1, b = 35/255 } PowerBarColor['RUNIC_POWER'] = { r = 0.45, g = 0.85, b = 1 } -- Threat color handling -oUF.colors.threat = { } +oUF.colors.threat = {} for i = 1, 3 do local r, g, b = GetThreatStatusColor(i) oUF.colors.threat[i] = { r, g, b } end -- Debuff color handling -colors.Debuff = { } +colors.debuff = {} for type, color in pairs(DebuffTypeColor) do if (type ~= 'none') then - colors.Debuff[type] = { color.r, color.g, color.b } + colors.debuff[type] = { color.r, color.g, color.b } end end @@ -100,22 +108,21 @@ end -- Border update function local function UpdateBorder(self) - local Threat, Debuff, Dispellable = self.threatLevel, self.debuffType, self.debuffDispellable - - local color - if Debuff and Dispellable then - color = colors.Debuff[Debuff] - elseif Debuff and Threat then - color = colors.Debuff[Debuff] - elseif Threat and Threat > 1 then - color = colors.threat[Threat] - elseif Debuff then - color = colors.Debuff[Debuff] - elseif Threat and Threat > 0 then - color = colors.threat[Threat] - end - - + local threat, debuff, dispellable = self.threatLevel, self.debuffType, self.debuffDispellable + + local color, glow + if debuff and dispellable then + color = colors.debuff[debuff] + glow = true + elseif threat and threat > 1 then + color = colors.threat[threat] + glow = true + elseif debuff then + color = colors.debuff[debuff] + elseif threat and threat > 0 then + color = colors.threat[threat] + end + if color then self:SetBackdropBorderColor(color[1], color[2], color[3], 1) else @@ -192,10 +199,8 @@ local function PostCastStart(Castbar, unit) if (unit == 'target') then if (self.Castbar.interrupt) then - self.Castbar.Border:SetBorderTexture(Interrupt) - --print('Changed the border, chief!') - self.Castbar.Border:SetBorderColor(1, 0, 1) - self.Castbar.Border:SetBorderShadowColor(1, 0, 1) + self.Castbar.Border:SetBeautyBorderTexture(Interrupt) + self.Castbar.Border:SetBeautyBorderColor(1, 0, 1) else self.Castbar.Border:SetBorderTexture(Normal) self.Castbar.Border:SetBorderColor(1, 1, 1) @@ -409,27 +414,32 @@ end -- Aura Icon Show local AuraIconCD_OnShow = function(cd) local button = cd:GetParent() - button:SetBorderParent(cd) button.count:SetParent(cd) end -- Aura Icon Hide local AuraIconCD_OnHide = function(cd) local button = cd:GetParent() - button:SetBorderParent(button) button.count:SetParent(button) end + -- Aura Icon Overlay local AuraIconOverlay_SetBorderColor = function(overlay, r, g, b) if not r or not g or not b then r, g, b = unpack(Settings.Media.BorderColor) end - overlay:GetParent():SetBorderColor(r, g, b) + + local over = overlay:GetParent() + + over.border:SetBorderColor(r, g, b) end -- Aura Icon Creation Function local function PostCreateAuraIcon(iconframe, button) - AddBorder(button, Settings.Media.BorderSize, Settings.Media.BorderPadding) + local border = CreateFrame('Frame', nil, button) + border:SetAllPoints(button) + AddBorder(border, Settings.Media.BorderSize, 2) + button.border = border button.cd:SetReverse(true) button.cd:SetScript('OnHide', AuraIconCD_OnHide) @@ -810,16 +820,16 @@ local Stylish = function(self, unit, isSingle) MHPB:SetOrientation('HORIZONTAL') MHPB:SetPoint('LEFT', self.Health:GetStatusBarTexture(), 'RIGHT', 0, 0) MHPB:SetStatusBarTexture(Settings.Media.StatusBar) - MHPB:SetWidth(200) - MHPB:SetHeight(22) + MHPB:SetWidth(self.Health:GetWidth()) + MHPB:SetHeight(self.Health:GetHeight()) MHPB:SetStatusBarColor(0, 1, 0.5, 0.25) local OHPB = CreateFrame('StatusBar', nil, self.Health) OHPB:SetOrientation('HORIZONTAL') OHPB:SetPoint('LEFT', MHPB:GetStatusBarTexture(), 'RIGHT', 0, 0) OHPB:SetStatusBarTexture(Settings.Media.StatusBar) - OHPB:SetWidth(200) - OHPB:SetHeight(22) + OHPB:SetWidth(self.Health:GetWidth()) + OHPB:SetHeight(self.Health:GetHeight()) OHPB:SetStatusBarColor(0, 1, 0, 0.25) self.HealPrediction = { @@ -835,16 +845,16 @@ local Stylish = function(self, unit, isSingle) MHPB:SetOrientation('HORIZONTAL') MHPB:SetPoint('LEFT', self.Health:GetStatusBarTexture(), 'RIGHT', 0, 0) MHPB:SetStatusBarTexture(Settings.Media.StatusBar) - MHPB:SetWidth(200) - MHPB:SetHeight(22) + MHPB:SetWidth(self.Health:GetWidth()) + MHPB:SetHeight(self.Health:GetHeight()) MHPB:SetStatusBarColor(0, 1, 0.5, 0.25) local OHPB = CreateFrame('StatusBar', nil, self.Health) OHPB:SetOrientation('HORIZONTAL') OHPB:SetPoint('LEFT', MHPB:GetStatusBarTexture(), 'RIGHT', 0, 0) OHPB:SetStatusBarTexture(Settings.Media.StatusBar) - OHPB:SetWidth(200) - OHPB:SetHeight(22) + OHPB:SetWidth(self.Health:GetWidth()) + OHPB:SetHeight(self.Health:GetHeight()) OHPB:SetStatusBarColor(0, 1, 0, 0.25) self.HealPrediction = { @@ -862,6 +872,7 @@ local Stylish = function(self, unit, isSingle) self.Status:SetParent(self.Overlay) self.Status:SetFont(Settings.Media.Font, Settings.Media.FontSize) self.Status:SetPoint('LEFT', self.Health, 'TOPLEFT', 2, 2) + self.Status:SetDrawLayer('OVERLAY', 7) self:Tag(self.Status, '[LanLeader][LanMaster]') @@ -869,16 +880,18 @@ local Stylish = function(self, unit, isSingle) self.Resting:SetParent(self.Overlay) self.Resting:SetPoint('CENTER', self.Health, 'BOTTOMLEFT', 0, -4) self.Resting:SetSize(20, 20) + self.Resting:SetDrawLayer('OVERLAY', 7) self.Combat = self.Health:CreateTexture(nil, 'OVERLAY') self.Combat:SetParent(self.Overlay) self.Combat:SetPoint('CENTER', self.Health, 'BOTTOMRIGHT', 0, -4) self.Combat:SetSize(24, 24) + self.Combat:SetDrawLayer('OVERLAY', 7) end -- Aura/buff/debuff handling, update those suckers! if (unit == 'player' and Settings.Units.Player.ShowBuffs) then - local GAP = 6 + local GAP = 4 self.Buffs = CreateFrame('Frame', nil, self) self.Buffs:SetPoint('BOTTOMLEFT', self, 'TOPLEFT', 0, 10) @@ -889,17 +902,17 @@ local Stylish = function(self, unit, isSingle) self.Buffs['growth-y'] = 'UP' self.Buffs['initialAnchor'] = 'BOTTOMRIGHT' self.Buffs['num'] = math.floor((Settings.Units.Player.Width - 4 + GAP) / (30 + GAP)) - self.Buffs['size'] = Settings.Units.Player.Height + self.Buffs['size'] = Settings.Units.Player.Height - 6 self.Buffs['spacing-x'] = GAP self.Buffs['spacing-y'] = GAP - self.Buffs.CustomFilter = CustomAuraFilter + self.Buffs.CustomFilter = CustomAuraFilters.player self.Buffs.PostCreateIcon = PostCreateAuraIcon self.Buffs.PostUpdateIcon = PostUpdateAuraIcon self.Buffs.parent = self elseif (unit == 'target') then - local GAP = 6 + local GAP = 4 local MAX_ICONS = math.floor((Settings.Units.Target.Width + GAP) / (Settings.Units.Target.Height + GAP)) - 1 local NUM_BUFFS = math.max(1, math.floor(MAX_ICONS * 0.2)) @@ -914,7 +927,7 @@ local Stylish = function(self, unit, isSingle) end self.Debuffs = CreateFrame('Frame', nil, self) - self.Debuffs:SetPoint('BOTTOMLEFT', self, 'TOPLEFT', 0, 24) + self.Debuffs:SetPoint('BOTTOMLEFT', self, 'TOPLEFT', -2, 16) self.Debuffs:SetWidth((Settings.Units.Target.Height * NUM_DEBUFFS - 1) + (GAP * (NUM_DEBUFFS - 1))) self.Debuffs:SetHeight((Settings.Units.Target.Height * 2) + (GAP * 2)) @@ -923,18 +936,18 @@ local Stylish = function(self, unit, isSingle) self.Debuffs['initialAnchor'] = 'BOTTOMLEFT' self.Debuffs['num'] = debuffs self.Debuffs['showType'] = false - self.Debuffs['size'] = Settings.Units.Target.Height + self.Debuffs['size'] = Settings.Units.Target.Height - 6 self.Debuffs['spacing-x'] = GAP self.Debuffs['spacing-y'] = GAP * 2 - self.Debuffs.CustomFilter = CustomAuraFilter + self.Debuffs.CustomFilter = CustomAuraFilters.target self.Debuffs.PostCreateIcon = PostCreateAuraIcon self.Debuffs.PostUpdateIcon = PostUpdateAuraIcon self.Debuffs.parent = self self.Buffs = CreateFrame('Frame', nil, self) - self.Buffs:SetPoint('BOTTOMRIGHT', self, 'TOPRIGHT', 2, 24) + self.Buffs:SetPoint('BOTTOMRIGHT', self, 'TOPRIGHT', 2, 16) self.Buffs:SetWidth((Settings.Units.Target.Height * NUM_BUFFS + 1) + (GAP * (NUM_BUFFS - 1))) self.Buffs:SetHeight((Settings.Units.Target.Height * 2) + (GAP * 2)) @@ -949,7 +962,7 @@ local Stylish = function(self, unit, isSingle) - self.Buffs.CustomFilter = CustomAuraFilter + self.Buffs.CustomFilter = CustomAuraFilters.target self.Buffs.PostCreateIcon = PostCreateAuraIcon self.Buffs.PostUpdateIcon = PostUpdateAuraIcon @@ -997,8 +1010,8 @@ local Stylish = function(self, unit, isSingle) self.Druid.Power:SetStatusBarTexture(Settings.Media.StatusBar) self.Druid.Power:SetFrameStrata('LOW') self.Druid.Power:SetFrameLevel(self.Druid:GetFrameLevel() - 1) - self.Druid.Power:SetHeight(10) - self.Druid.Power:SetWidth(200) + self.Druid.Power:SetHeight(self.Power:GetHeight()) + self.Druid.Power:SetWidth(self.Power:GetWidth()) self.Druid.Power:SetBackdrop(backdrop) self.Druid.Power:SetBackdropColor(0, 0, 0, 0.5) @@ -1020,7 +1033,7 @@ local Stylish = function(self, unit, isSingle) local EclipseBar = CreateFrame('Frame', nil, self) EclipseBar:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -10) EclipseBar:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 0, -10) - EclipseBar:SetSize(200, 10) + EclipseBar:SetSize(self.Power:GetWidth(), self.Power:GetHeight()) EclipseBar:SetBackdrop(backdrop) EclipseBar:SetBackdropColor(0, 0, 0, 0.6) @@ -1032,14 +1045,14 @@ local Stylish = function(self, unit, isSingle) local LunarBar = CreateFrame('StatusBar', nil, EclipseBar) LunarBar:SetPoint('LEFT', EclipseBar, 'LEFT', 0, 0) - LunarBar:SetSize(200, 10) + LunarBar:SetSize(self.Power:GetWidth(), self.Power:GetHeight()) LunarBar:SetStatusBarTexture(Settings.Media.StatusBar) LunarBar:SetStatusBarColor(1, 1, 1) EclipseBar.LunarBar = LunarBar local SolarBar = CreateFrame('StatusBar', nil, EclipseBar) SolarBar:SetPoint('LEFT', LunarBar:GetStatusBarTexture(), 'RIGHT', 0, 0) - SolarBar:SetSize(200, 10) + SolarBar:SetSize(self.Power:GetWidth(), self.Power:GetHeight()) SolarBar:SetStatusBarTexture(Settings.Media.StatusBar) SolarBar:SetStatusBarColor(1, 3/5, 0) EclipseBar.SolarBar = SolarBar @@ -1094,7 +1107,7 @@ local Stylish = function(self, unit, isSingle) self.RaidIcon:SetHeight(18) self.RaidIcon:SetWidth(18) self.RaidIcon:SetPoint('CENTER', self.Overlay, 'TOP') - self.RaidIcon:SetTexture('Interface\\TargettingFrame\\UI-RaidTargetingIcons') + self.RaidIcon:SetDrawLayer('OVERLAY', 7) end -- Custom sizes for our frames @@ -1150,7 +1163,7 @@ local function StylishGroup(self, unit) self:EnableMouse(true) self:RegisterForClicks('AnyUp') - if (Settings.Show.Party) then + if Settings.Show.Party and not InCombatLockdown() then if (Settings.Units.Party.Healer) then self:SetSize(100, 35) else @@ -1213,15 +1226,15 @@ local function StylishGroup(self, unit) local MHPB = CreateFrame('StatusBar', nil, self.Health) MHPB:SetPoint('LEFT', self.Health:GetStatusBarTexture(), 'RIGHT', 0, 0) MHPB:SetStatusBarTexture(Settings.Media.StatusBar) - MHPB:SetWidth(100) - MHPB:SetHeight(35) + MHPB:SetWidth(self.Health:GetWidth()) + MHPB:SetHeight(self.Health:GetHeight()) MHPB:SetStatusBarColor(0, 1, 0.5, 0.25) local OHPB = CreateFrame('StatusBar', nil, self.Health) OHPB:SetPoint('LEFT', MHPB:GetStatusBarTexture(), 'RIGHT', 0, 0) OHPB:SetStatusBarTexture(Settings.Media.StatusBar) - OHPB:SetWidth(100) - OHPB:SetHeight(35) + OHPB:SetWidth(self.Health:GetWidth()) + OHPB:SetHeight(self.Health:GetHeight()) OHPB:SetStatusBarColor(0, 1, 0, 0.25) self.HealPrediction = { @@ -1234,15 +1247,15 @@ local function StylishGroup(self, unit) local MHPB = CreateFrame('StatusBar', nil, self.Health) MHPB:SetPoint('LEFT', self.Health:GetStatusBarTexture(), 'RIGHT', 0, 0) MHPB:SetStatusBarTexture(Settings.Media.StatusBar) - MHPB:SetWidth(100) - MHPB:SetHeight(35) + MHPB:SetWidth(self.Health:GetWidth()) + MHPB:SetHeight(self.Health:GetHeight()) MHPB:SetStatusBarColor(0, 1, 0.5, 0.25) local OHPB = CreateFrame('StatusBar', nil, self.Health) OHPB:SetPoint('LEFT', MHPB:GetStatusBarTexture(), 'RIGHT', 0, 0) OHPB:SetStatusBarTexture(Settings.Media.StatusBar) - OHPB:SetWidth(100) - OHPB:SetHeight(35) + OHPB:SetWidth(self.Health:GetWidth()) + OHPB:SetHeight(self.Health:GetHeight()) OHPB:SetStatusBarColor(0, 1, 0, 0.25) self.HealPrediction = { @@ -1257,6 +1270,7 @@ local function StylishGroup(self, unit) self.Status = self.Overlay:CreateFontString(nil, 'OVERLAY') self.Status:SetFont(Settings.Media.Font, Settings.Media.FontSize) self.Status:SetPoint('RIGHT', self.Health, 'BOTTOMRIGHT', -2, 0) + self.Status:SetDrawLayer('OVERLAY', 7) self:Tag(self.Status, '[LanMaster][LanLeader]') end @@ -1266,12 +1280,13 @@ local function StylishGroup(self, unit) self.RaidIcon:SetHeight(18) self.RaidIcon:SetWidth(18) self.RaidIcon:SetPoint('CENTER', self.Overlay, 'TOP') - self.RaidIcon:SetTexture('Interface\\TargettingFrame\\UI-RaidTargetingIcons') + self.RaidIcon:SetDrawLayer('OVERLAY', 7) -- LFD Role self.LFDRole = self.Overlay:CreateTexture(nil, 'OVERLAY') self.LFDRole:SetPoint('CENTER', self, 'RIGHT', 2, 0) self.LFDRole:SetSize(16, 16) + self.LFDRole:SetDrawLayer('OVERLAY', 7) -- Buffs local GAP = 6 @@ -1289,7 +1304,7 @@ local function StylishGroup(self, unit) self.Buffs['spacing-x'] = GAP self.Buffs['spacing-y'] = GAP - self.Buffs.CustomFilter = CustomAuraFilter + self.Buffs.CustomFilter = CustomAuraFilters.party self.Buffs.PostCreateIcon = PostCreateAuraIcon self.Buffs.PostUpdateIcon = PostUpdateAuraIcon @@ -1324,6 +1339,8 @@ oUF:RegisterStyle('oUF_Lanerra_Group', StylishGroup) -- Now the raid style local function StylishRaid(self, unit) self.menu = CreateDropDown + local HealW = 75 + local HealH = 30 self:SetScript('OnEnter', UnitFrame_OnEnter) self:SetScript('OnLeave', UnitFrame_OnLeave) @@ -1335,9 +1352,9 @@ local function StylishRaid(self, unit) self:EnableMouse(true) self:RegisterForClicks('AnyUp') - if (Settings.Show.Raid) then + if Settings.Show.Raid and not InCombatLockdown() then if (Settings.Units.Raid.Healer) then - self:SetSize(75, 35) + self:SetSize(HealW, HealH) else self:SetSize(Settings.Units.Raid.Width, Settings.Units.Raid.Height) end @@ -1384,14 +1401,14 @@ local function StylishRaid(self, unit) -- Display group names if (Settings.Units.Raid.Healer) then self.Name = self.Health:CreateFontString('$parentName', 'OVERLAY') - self.Name:SetPoint('TOP', 0, -2) + self.Name:SetPoint('CENTER') self.Name:SetFont(Settings.Media.Font, 13) self.Name:SetShadowOffset(1, -1) self.Name:SetJustifyH('CENTER') self:Tag(self.Name, '|cffffffff[LanRaidName]|r') else self.Name = self.Health:CreateFontString('$parentName', 'OVERLAY') - self.Name:SetPoint('LEFT', self.Health, 5, 1) + self.Name:SetPoint('CENTER') self.Name:SetFont(Settings.Media.Font, 13) self.Name:SetShadowOffset(1, -1) self:Tag(self.Name, '|cffffffff[LanName]|r') @@ -1404,15 +1421,15 @@ local function StylishRaid(self, unit) local MHPB = CreateFrame('StatusBar', nil, self.Health) MHPB:SetPoint('LEFT', self.Health:GetStatusBarTexture(), 'RIGHT', 0, 0) MHPB:SetStatusBarTexture(Settings.Media.StatusBar) - MHPB:SetWidth(75) - MHPB:SetHeight(35) + MHPB:SetWidth(HealW) + MHPB:SetHeight(HealH) MHPB:SetStatusBarColor(0, 1, 0.5, 0.25) local OHPB = CreateFrame('StatusBar', nil, self.Health) OHPB:SetPoint('LEFT', MHPB:GetStatusBarTexture(), 'RIGHT', 0, 0) OHPB:SetStatusBarTexture(Settings.Media.StatusBar) - OHPB:SetWidth(75) - OHPB:SetHeight(35) + OHPB:SetWidth(HealW) + OHPB:SetHeight(HealH) OHPB:SetStatusBarColor(0, 1, 0, 0.25) self.HealPrediction = { @@ -1425,15 +1442,15 @@ local function StylishRaid(self, unit) local MHPB = CreateFrame('StatusBar', nil, self.Health) MHPB:SetPoint('LEFT', self.Health:GetStatusBarTexture(), 'RIGHT', 0, 0) MHPB:SetStatusBarTexture(Settings.Media.StatusBar) - MHPB:SetWidth(75) - MHPB:SetHeight(35) + MHPB:SetWidth(HealW) + MHPB:SetHeight(HealH) MHPB:SetStatusBarColor(0, 1, 0.5, 0.25) local OHPB = CreateFrame('StatusBar', nil, self.Health) OHPB:SetPoint('LEFT', MHPB:GetStatusBarTexture(), 'RIGHT', 0, 0) OHPB:SetStatusBarTexture(Settings.Media.StatusBar) - OHPB:SetWidth(75) - OHPB:SetHeight(35) + OHPB:SetWidth(HealW) + OHPB:SetHeight(HealH) OHPB:SetStatusBarColor(0, 1, 0, 0.25) self.HealPrediction = { @@ -1448,6 +1465,7 @@ local function StylishRaid(self, unit) self.Status = self.Overlay:CreateFontString(nil, 'OVERLAY') self.Status:SetFont(Settings.Media.Font, Settings.Media.FontSize) self.Status:SetPoint('RIGHT', self.Health, 'BOTTOMRIGHT', -2, 0) + self.Status:SetDrawLayer('OVERLAY', 7) self:Tag(self.Status, '[LanMaster][LanLeader]') @@ -1455,8 +1473,8 @@ local function StylishRaid(self, unit) self.RaidIcon = self.Overlay:CreateTexture('$parentRaidIcon', 'ARTWORK') self.RaidIcon:SetHeight(18) self.RaidIcon:SetWidth(18) - self.RaidIcon:SetPoint('CENTER', self.Overlay, 'TOP') - self.RaidIcon:SetTexture('Interface\\TargettingFrame\\UI-RaidTargetingIcons') + self.RaidIcon:SetPoint('RIGHT', self.Name, 'LEFT', -2, 0) + self.RaidIcon:SetDrawLayer('OVERLAY', 7) -- Range-finding support self.Range = { @@ -1559,12 +1577,12 @@ oUF:Factory(function(self) 'columnAnchorPoint', 'TOP', 'oUF-initialConfigFunction', [[ self:SetAttribute('initial-width', 75) - self:SetAttribute('initial-height', 35) + self:SetAttribute('initial-height', 30) self:SetWidth(75) - self:SetHeight(35) + self:SetHeight(30) ]] ) - raid:SetPoint('CENTER', UIParent, 0, -310) + raid:SetPoint('CENTER', UIParent, 0, -300) if (Settings.Units.Raid.Healer) then local RaidShift, raid = false @@ -1578,9 +1596,9 @@ oUF:Factory(function(self) else self:UnregisterEvent('PLAYER_REGEN_ENABLED') if (GetNumGroupMembers() < 26 and GetNumGroupMembers() > 10) then - raid:SetPoint('CENTER', UIParent, -105, -200) + raid:SetPoint('CENTER', UIParent, -105, -300) elseif (GetNumGroupMembers() < 11) then - raid:SetPoint('CENTER', UIParent, -21, -200) + raid:SetPoint('CENTER', UIParent, -21, -240) end end end) @@ -1599,10 +1617,10 @@ oUF:Factory(function(self) --'showSolo', true, 'yOffset', -10, 'oUF-initialConfigFunction', [[ - self:SetAttribute('initial-width', 100) - self:SetAttribute('initial-height', 18) - self:SetWidth(100) - self:SetHeight(18) + self:SetAttribute('initial-width', Settings.Units.Raid.Width) + self:SetAttribute('initial-height', Settings.Units.Raid.Height) + self:SetWidth(Settings.Units.Raid.Width) + self:SetHeight(Settings.Units.Raid.Height) ]] ) table.insert(raid, raid[i]) @@ -1614,4 +1632,209 @@ oUF:Factory(function(self) raid[i]:Show() end end -end) \ No newline at end of file +end) + +local HandleFrame = function(baseName) + local frame + if(type(baseName) == 'string') then + frame = _G[baseName] + else + frame = baseName + end + + if(frame) then + frame:UnregisterAllEvents() + frame:Hide() + + -- Keep frame hidden without causing taint + frame:SetParent(frameHider) + + local health = frame.healthbar + if(health) then + health:UnregisterAllEvents() + end + + local power = frame.manabar + if(power) then + power:UnregisterAllEvents() + end + + local spell = frame.spellbar + if(spell) then + spell:UnregisterAllEvents() + end + + local altpowerbar = frame.powerBarAlt + if(altpowerbar) then + altpowerbar:UnregisterAllEvents() + end + end +end + +function oUF:DisableBlizzard(unit) + if(not unit) then return end + + if(unit == 'player') then + HandleFrame(PlayerFrame) + + -- For the damn vehicle support: + PlayerFrame:RegisterEvent('PLAYER_ENTERING_WORLD') + PlayerFrame:RegisterEvent('UNIT_ENTERING_VEHICLE') + PlayerFrame:RegisterEvent('UNIT_ENTERED_VEHICLE') + PlayerFrame:RegisterEvent('UNIT_EXITING_VEHICLE') + PlayerFrame:RegisterEvent('UNIT_EXITED_VEHICLE') + + -- User placed frames don't animate + PlayerFrame:SetUserPlaced(true) + PlayerFrame:SetDontSavePosition(true) + elseif(unit == 'pet') then + HandleFrame(PetFrame) + elseif(unit == 'target') then + HandleFrame(TargetFrame) + HandleFrame(ComboFrame) + elseif(unit == 'focus') then + HandleFrame(FocusFrame) + HandleFrame(TargetofFocusFrame) + elseif(unit == 'targettarget') then + HandleFrame(TargetFrameToT) + elseif(unit:match'(boss)%d?$' == 'boss') then + local id = unit:match'boss(%d)' + if(id) then + HandleFrame('Boss' .. id .. 'TargetFrame') + else + for i=1, 4 do + HandleFrame(('Boss%dTargetFrame'):format(i)) + end + end + elseif(unit:match'(party)%d?$' == 'party') then + local id = unit:match'party(%d)' + if(id) then + HandleFrame('PartyMemberFrame' .. id) + else + for i=1, 4 do + HandleFrame(('PartyMemberFrame%d'):format(i)) + end + end + elseif(unit:match'(arena)%d?$' == 'arena') then + local id = unit:match'arena(%d)' + if(id) then + HandleFrame('ArenaEnemyFrame' .. id) + else + for i=1, 4 do + HandleFrame(('ArenaEnemyFrame%d'):format(i)) + end + end + + -- Blizzard_ArenaUI should not be loaded + Arena_LoadUI = function() end + SetCVar('showArenaEnemyFrames', '0', 'SHOW_ARENA_ENEMY_FRAMES_TEXT') + end +end + +-- Role Checker + +local CURRENT_ROLE = "DAMAGER" +local getRole, updateEvents + +function GetPlayerRole() + return CURRENT_ROLE +end + +if playerClass == "DEATHKNIGHT" then + updateEvents = "UPDATE_SHAPESHIFT_FORM" + function getRole() + if GetSpecialization() == 1 then -- Blood 1, Frost 2, Unholy 3 + return "TANK" + end + end +elseif playerClass == "DRUID" then + updateEvents = "UPDATE_SHAPESHIFT_FORM" + function getRole() + local form = GetShapeshiftFormID() -- Aquatic 4, Bear 5, Cat 1, Flight 29, Moonkin 31, Swift Flight 27, Travel 3, Tree 2 + if form == 5 then + return "TANK" + elseif GetSpecialization() == 4 then -- Balance 1, Feral 2, Guardian 3, Restoration 4 + return "HEALER" + end + end +elseif playerClass == "MONK" then + updateEvents = "UPDATE_SHAPESHIFT_FORM" + function getRole() + local form = GetShapeshiftFormID() -- Tiger 24, Ox 23, Serpent 20 + if form == 23 then + return "TANK" + elseif form == 20 then + return "HEALER" + end + end +elseif playerClass == "PALADIN" then + local RIGHTEOUS_FURY = GetSpellInfo(25780) + updateEvents = "PLAYER_REGEN_DISABLED" + function getRole() + if UnitAura("player", RIGHTEOUS_FURY, "HELPFUL") then + return "TANK" + elseif GetSpecialization() == 1 then -- Holy 1, Protection 2, Retribution 3 + return "HEALER" + end + end +elseif playerClass == "PRIEST" then + function getRole() + if GetSpecialization() ~= 3 then -- Discipline 1, Holy 2, Shadow 3 + return "HEALER" + end + end +elseif playerClass == "SHAMAN" then + function getRole() + if GetSpecialization() == 3 then -- Elemental 1, Enhancement 2, Restoration 3 + return "HEALER" + end + end +elseif playerClass == "WARRIOR" then + updateEvents = "UPDATE_SHAPESHIFT_FORM" + function getRole() + if GetSpecialization() == 3 and GetShapeshiftFormID() == 18 then -- Battle 17, Berserker 19, Defensive 18 + return "TANK" + end + end +end + +if getRole then + local eventFrame = CreateFrame("Frame") + eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD") + eventFrame:RegisterEvent("PLAYER_TALENT_UPDATE") + if updateEvents then + for event in gmatch(updateEvents, "%S+") do + eventFrame:RegisterEvent(event) + end + end + eventFrame:SetScript("OnEvent", function(_, event, ...) + local role = getRole() or "DAMAGER" + if role ~= CURRENT_ROLE then + --print(event, CURRENT_ROLE, "->", role) + CURRENT_ROLE = role + F.UpdateAuraList() + for _, frame in pairs(objects) do + if frame.updateOnRoleChange then + for _, func in pairs(frame.updateOnRoleChange) do + func(frame, role) + end + end + end + end + end) +end + +function hideBossFrames() + for i = 1, 4 do + local frame = _G["Boss"..i.."TargetFrame"] + + if frame then + frame:UnregisterAllEvents() + frame:Hide() + frame.Show = function () end + end + end +end + +-- Call the hide function +hideBossFrames() \ No newline at end of file diff --git a/oUF_Lanerra_Config.lua b/oUF_Lanerra_Config.lua index b4c3d24..07b9730 100644 --- a/oUF_Lanerra_Config.lua +++ b/oUF_Lanerra_Config.lua @@ -13,7 +13,7 @@ Settings = { StatusBar = 'Interface\\Addons\\oUF_Lanerra\\media\\statusbarTexture.tga', Font = 'Interface\\Addons\\oUF_Lanerra\\media\\font.ttf', FontSize = 15, - BorderSize = 14, + BorderSize = 12, BorderColor = { 0.65, 0.65, 0.65 }, BackdropColor = { 0, 0, 0, 0.75 }, BorderPadding = 4