diff --git a/Constants_BCC.lua b/Constants_BCC.lua index bdfa87e..e34756c 100644 --- a/Constants_BCC.lua +++ b/Constants_BCC.lua @@ -626,7 +626,7 @@ local importantAuras = { spellID = 24259, }, -- Unstable Affliction Silence - ["Unstable Affliction Silence"] = { -- GetSpellInfo returns "Unstable Affliction" + [select(1, GetSpellInfo(31117)) .. " Silence"] = { -- GetSpellInfo returns "Unstable Affliction" track = AURA_TYPE_DEBUFF, altName = select(1, GetSpellInfo(31117)) .. " Silence", duration = 5, @@ -759,9 +759,9 @@ local importantAuras = { }, -- Shadowsight Buff [GetSpellInfo(34709)] = { - track = AURA_TYPE_BUFF, + track = AURA_TYPE_DEBUFF, duration = 15, - priority = 15, + priority = 9, magic = true, spellID = 34709, }, @@ -978,7 +978,7 @@ local cooldownList = { icon = select(3, GetSpellInfo(14311)), }, [34490] = { cd = 20, spec = L["Marksmanship"], }, -- Silencing Shot - [19386] = { cd = 60, spec = L["Survival"], }, -- Wyvern Sting + [19386] = { cd = 120, spec = L["Survival"], }, -- Wyvern Sting [19577] = { cd = 60, spec = L["Beast Mastery"], }, -- Intimidation [34471] = { cd = 120, spec = L["Beast Mastery"], }, -- The Beast Within [5384] = 30, -- Feign Death @@ -1121,333 +1121,55 @@ end local totemData = { -- Fire - [string_lower("Searing Totem")] = {id = 3599,texture = select(3, GetSpellInfo(3599)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Flametongue Totem")] = {id = 8227,texture = select(3, GetSpellInfo(8227)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Magma Totem")] = {id = 8190,texture = select(3, GetSpellInfo(8190)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, - [string_lower("Fire Nova Totem")] = {id = 1535,texture = select(3, GetSpellInfo(1535)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = { cd = 4, once = true }}, - [string_lower("Totem of Wrath")] = {id = 30706,texture = select(3, GetSpellInfo(30706)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Fire Elemental Totem")] = {id = 32982,texture = select(3, GetSpellInfo(32982)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Frost Resistance Totem")] = {id = 8181,texture = select(3, GetSpellInfo(8181)), color = {r = 0, g = 0, b = 0, a = 1}}, -- Water - [string_lower("Fire Resistance Totem")] = {id = 8184,texture = select(3, GetSpellInfo(8184)), color = {r = 0, g = 0, b = 0, a = 1}}, [string_lower("Poison Cleansing Totem")] = {id = 8166,texture = select(3, GetSpellInfo(8166)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 5}, - [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 5}, - [string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, - [string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}}, [string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, -- Earth - [string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, pulse = 3}, - [string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, - [string_lower("Stoneskin Totem")] = {id = 8071,texture = select(3, GetSpellInfo(8071)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Strength of Earth Totem")] = {id = 8075,texture = select(3, GetSpellInfo(8075)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Earth Elemental Totem")] = {id = 33663,texture = select(3, GetSpellInfo(33663)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, pulse = 3}, -- Air - [string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}}, [string_lower("Grace of Air Totem")] = {id = 8835,texture = select(3, GetSpellInfo(8835)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Windfury Totem")] = {id = 8512,texture = select(3, GetSpellInfo(8512)), color = {r = 0.96, g = 0, b = 0.07, a = 1}}, - [string_lower("Sentry Totem")] = {id = 6495, texture = select(3, GetSpellInfo(6495)), color = {r = 0, g = 0, b = 0, a = 1}}, [string_lower("Windwall Totem")] = {id = 15107,texture = select(3, GetSpellInfo(15107)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Wrath of Air Totem")] = {id = 3738,texture = select(3, GetSpellInfo(3738)), color = {r = 0, g = 0, b = 0, a = 1}}, [string_lower("Tranquil Air Totem")] = {id = 25908,texture = select(3, GetSpellInfo(25908)), color = {r = 0, g = 0, b = 0, a = 1}}, } local totemSpellIdToPulse = { - [GetSpellInfo(totemData[string_lower("Earthbind Totem")].id)] = totemData[string_lower("Earthbind Totem")].pulse, - [2484] = totemData[string_lower("Earthbind Totem")].pulse, - [GetSpellInfo(totemData[string_lower("Tremor Totem")].id)] = totemData[string_lower("Tremor Totem")].pulse, - [8143] = totemData[string_lower("Tremor Totem")].pulse, [GetSpellInfo(totemData[string_lower("Poison Cleansing Totem")].id)] = totemData[string_lower("Poison Cleansing Totem")].pulse, [8166] = totemData[string_lower("Poison Cleansing Totem")].pulse, - [GetSpellInfo(totemData[string_lower("Disease Cleansing Totem")].id)] = totemData[string_lower("Disease Cleansing Totem")].pulse, - [8170] = totemData[string_lower("Disease Cleansing Totem")].pulse, - [GetSpellInfo(totemData[string_lower("Fire Nova Totem")].id)] = totemData[string_lower("Fire Nova Totem")].pulse, - [1535] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 1 - [8498] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 2 - [8499] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 3 - [11314] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 4 - [11315] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 5 - [25546] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 6 - [25547] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 7 - [GetSpellInfo(totemData[string_lower("Magma Totem")].id)] = totemData[string_lower("Magma Totem")].pulse, - [8190] = totemData[string_lower("Magma Totem")].pulse, -- Rank 1 - [10585] = totemData[string_lower("Magma Totem")].pulse, -- Rank 2 - [10586] = totemData[string_lower("Magma Totem")].pulse, -- Rank 3 - [10587] = totemData[string_lower("Magma Totem")].pulse, -- Rank 4 - [25552] = totemData[string_lower("Magma Totem")].pulse, -- Rank 5 - [GetSpellInfo(totemData[string_lower("Healing Stream Totem")].id)] = totemData[string_lower("Healing Stream Totem")].pulse, - [5394] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 1 - [6375] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 2 - [6377] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 3 - [10462] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 4 - [10463] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 5 - [25567] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 6 [GetSpellInfo(totemData[string_lower("Mana Spring Totem")].id)] = totemData[string_lower("Mana Spring Totem")].pulse, [5675] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 1 [10495] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 2 [10496] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 3 [10497] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 4 [25570] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 5 - [GetSpellInfo(totemData[string_lower("Stoneclaw Totem")].id)] = totemData[string_lower("Stoneclaw Totem")].pulse, - [5730] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 1 - [6390] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 2 - [6391] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 3 - [6392] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 4 - [10427] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 5 - [10428] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 6 - [25525] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 7 + [58771] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 6 + [58773] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 7 + [58774] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 8 } local totemNpcIdsToTotemData = { --fire - [2523] = totemData[string_lower("Searing Totem")], - [3902] = totemData[string_lower("Searing Totem")], - [3903] = totemData[string_lower("Searing Totem")], - [3904] = totemData[string_lower("Searing Totem")], - [7400] = totemData[string_lower("Searing Totem")], - [7402] = totemData[string_lower("Searing Totem")], - [15480] = totemData[string_lower("Searing Totem")], - [31162] = totemData[string_lower("Searing Totem")], - [31164] = totemData[string_lower("Searing Totem")], - [31165] = totemData[string_lower("Searing Totem")], - [21995] = totemData[string_lower("Searing Totem")], - [22209] = totemData[string_lower("Searing Totem")], - [22895] = totemData[string_lower("Searing Totem")], - [22896] = totemData[string_lower("Searing Totem")], - [34687] = totemData[string_lower("Searing Totem")], - [36532] = totemData[string_lower("Searing Totem")], - [43423] = totemData[string_lower("Searing Totem")], - [67380] = totemData[string_lower("Searing Totem")], - [73477] = totemData[string_lower("Searing Totem")], - [79238] = totemData[string_lower("Searing Totem")], - [22896] = totemData[string_lower("Searing Totem")], - [84519] = totemData[string_lower("Searing Totem")], - [110730] = totemData[string_lower("Searing Totem")], - [132178] = totemData[string_lower("Searing Totem")], - [9637] = totemData[string_lower("Searing Totem")], - - [5950] = totemData[string_lower("Flametongue Totem")], - [6012] = totemData[string_lower("Flametongue Totem")], - [7423] = totemData[string_lower("Flametongue Totem")], - [10557] = totemData[string_lower("Flametongue Totem")], - [15485] = totemData[string_lower("Flametongue Totem")], - [31132] = totemData[string_lower("Flametongue Totem")], - [31133] = totemData[string_lower("Flametongue Totem")], - [31158] = totemData[string_lower("Flametongue Totem")], - [42605] = totemData[string_lower("Flametongue Totem")], - - [5929] = totemData[string_lower("Magma Totem")], - [7464] = totemData[string_lower("Magma Totem")], - [7465] = totemData[string_lower("Magma Totem")], - [7466] = totemData[string_lower("Magma Totem")], - [15484] = totemData[string_lower("Magma Totem")], - [31166] = totemData[string_lower("Magma Totem")], - [31167] = totemData[string_lower("Magma Totem")], - [32887] = totemData[string_lower("Magma Totem")], - [42211] = totemData[string_lower("Magma Totem")], - [71335] = totemData[string_lower("Magma Totem")], - [71925] = totemData[string_lower("Magma Totem")], - [73085] = totemData[string_lower("Magma Totem")], - [73093] = totemData[string_lower("Magma Totem")], - [73268] = totemData[string_lower("Magma Totem")], - [88971] = totemData[string_lower("Magma Totem")], - [97369] = totemData[string_lower("Magma Totem")], - [98676] = totemData[string_lower("Magma Totem")], - - [5879] = totemData[string_lower("Fire Nova Totem")], - [6110] = totemData[string_lower("Fire Nova Totem")], - [6111] = totemData[string_lower("Fire Nova Totem")], - [7844] = totemData[string_lower("Fire Nova Totem")], - [7845] = totemData[string_lower("Fire Nova Totem")], - [14662] = totemData[string_lower("Fire Nova Totem")], - [15482] = totemData[string_lower("Fire Nova Totem")], - [15483] = totemData[string_lower("Fire Nova Totem")], - [24320] = totemData[string_lower("Fire Nova Totem")], - [32775] = totemData[string_lower("Fire Nova Totem")], - [32776] = totemData[string_lower("Fire Nova Totem")], - - [17539] = totemData[string_lower("Totem of Wrath")], - [22970] = totemData[string_lower("Totem of Wrath")], - [22971] = totemData[string_lower("Totem of Wrath")], - [30652] = totemData[string_lower("Totem of Wrath")], - [30653] = totemData[string_lower("Totem of Wrath")], - [30654] = totemData[string_lower("Totem of Wrath")], - - [15439] = totemData[string_lower("Fire Elemental Totem")], - [40830] = totemData[string_lower("Fire Elemental Totem")], - [41337] = totemData[string_lower("Fire Elemental Totem")], - [41346] = totemData[string_lower("Fire Elemental Totem")], - [72301] = totemData[string_lower("Fire Elemental Totem")], - - [5926] = totemData[string_lower("Frost Resistance Totem")], - [7412] = totemData[string_lower("Frost Resistance Totem")], - [7413] = totemData[string_lower("Frost Resistance Totem")], - [15486] = totemData[string_lower("Frost Resistance Totem")], - [31171] = totemData[string_lower("Frost Resistance Totem")], - [31172] = totemData[string_lower("Frost Resistance Totem")], - -- Water - [5927] = totemData[string_lower("Fire Resistance Totem")], - [7424] = totemData[string_lower("Fire Resistance Totem")], - [7425] = totemData[string_lower("Fire Resistance Totem")], - [15487] = totemData[string_lower("Fire Resistance Totem")], - [31169] = totemData[string_lower("Fire Resistance Totem")], - [31170] = totemData[string_lower("Fire Resistance Totem")], - [5923] = totemData[string_lower("Poison Cleansing Totem")], [22487] = totemData[string_lower("Poison Cleansing Totem")], - [5924] = totemData[string_lower("Disease Cleansing Totem")], - - [3527] = totemData[string_lower("Healing Stream Totem")], - [3906] = totemData[string_lower("Healing Stream Totem")], - [3907] = totemData[string_lower("Healing Stream Totem")], - [3908] = totemData[string_lower("Healing Stream Totem")], - [3909] = totemData[string_lower("Healing Stream Totem")], - [14664] = totemData[string_lower("Healing Stream Totem")], - [15488] = totemData[string_lower("Healing Stream Totem")], - [18235] = totemData[string_lower("Healing Stream Totem")], - [31181] = totemData[string_lower("Healing Stream Totem")], - [31182] = totemData[string_lower("Healing Stream Totem")], - [31185] = totemData[string_lower("Healing Stream Totem")], - [34686] = totemData[string_lower("Healing Stream Totem")], - [36542] = totemData[string_lower("Healing Stream Totem")], - [37810] = totemData[string_lower("Healing Stream Totem")], - [38428] = totemData[string_lower("Healing Stream Totem")], - [47077] = totemData[string_lower("Healing Stream Totem")], - [72309] = totemData[string_lower("Healing Stream Totem")], - [72457] = totemData[string_lower("Healing Stream Totem")], - [73890] = totemData[string_lower("Healing Stream Totem")], - [74433] = totemData[string_lower("Healing Stream Totem")], - [97508] = totemData[string_lower("Healing Stream Totem")], - [112567] = totemData[string_lower("Healing Stream Totem")], - [120357] = totemData[string_lower("Healing Stream Totem")], - [128539] = totemData[string_lower("Healing Stream Totem")], - [132049] = totemData[string_lower("Healing Stream Totem")], - - [10467] = totemData[string_lower("Mana Tide Totem")], - [11100] = totemData[string_lower("Mana Tide Totem")], - [11101] = totemData[string_lower("Mana Tide Totem")], - [17061] = totemData[string_lower("Mana Tide Totem")], - - [3573] = totemData[string_lower("Mana Spring Totem")], - [7414] = totemData[string_lower("Mana Spring Totem")], - [7415] = totemData[string_lower("Mana Spring Totem")], - [7416] = totemData[string_lower("Mana Spring Totem")], - [15304] = totemData[string_lower("Mana Spring Totem")], - [15489] = totemData[string_lower("Mana Spring Totem")], - [31186] = totemData[string_lower("Mana Spring Totem")], - [31189] = totemData[string_lower("Mana Spring Totem")], - [31190] = totemData[string_lower("Mana Spring Totem")], - -- Earth - [2630] = totemData[string_lower("Earthbind Totem")], - [22486] = totemData[string_lower("Earthbind Totem")], - [40233] = totemData[string_lower("Earthbind Totem")], - [74737] = totemData[string_lower("Earthbind Totem")], - [79155] = totemData[string_lower("Earthbind Totem")], - - [3579] = totemData[string_lower("Stoneclaw Totem")], - [3911] = totemData[string_lower("Stoneclaw Totem")], - [3912] = totemData[string_lower("Stoneclaw Totem")], - [3913] = totemData[string_lower("Stoneclaw Totem")], - [7398] = totemData[string_lower("Stoneclaw Totem")], - [7399] = totemData[string_lower("Stoneclaw Totem")], - [14870] = totemData[string_lower("Stoneclaw Totem")], - [15478] = totemData[string_lower("Stoneclaw Totem")], - [31120] = totemData[string_lower("Stoneclaw Totem")], - [31121] = totemData[string_lower("Stoneclaw Totem")], - [31122] = totemData[string_lower("Stoneclaw Totem")], - [40258] = totemData[string_lower("Stoneclaw Totem")], - [102402] = totemData[string_lower("Stoneclaw Totem")], - - [5873] = totemData[string_lower("Stoneskin Totem")], - [5919] = totemData[string_lower("Stoneskin Totem")], - [5920] = totemData[string_lower("Stoneskin Totem")], - [7366] = totemData[string_lower("Stoneskin Totem")], - [7367] = totemData[string_lower("Stoneskin Totem")], - [7368] = totemData[string_lower("Stoneskin Totem")], - [14663] = totemData[string_lower("Stoneskin Totem")], - [15470] = totemData[string_lower("Stoneskin Totem")], - [15474] = totemData[string_lower("Stoneskin Totem")], - [18177] = totemData[string_lower("Stoneskin Totem")], - [21994] = totemData[string_lower("Stoneskin Totem")], - [31175] = totemData[string_lower("Stoneskin Totem")], - [31176] = totemData[string_lower("Stoneskin Totem")], - [36550] = totemData[string_lower("Stoneskin Totem")], - [40267] = totemData[string_lower("Stoneskin Totem")], - [41967] = totemData[string_lower("Stoneskin Totem")], - - [5874] = totemData[string_lower("Strength of Earth Totem")], - [5921] = totemData[string_lower("Strength of Earth Totem")], - [5922] = totemData[string_lower("Strength of Earth Totem")], - [7403] = totemData[string_lower("Strength of Earth Totem")], - [15464] = totemData[string_lower("Strength of Earth Totem")], - [15479] = totemData[string_lower("Strength of Earth Totem")], - [21992] = totemData[string_lower("Strength of Earth Totem")], - [30647] = totemData[string_lower("Strength of Earth Totem")], - [31129] = totemData[string_lower("Strength of Earth Totem")], - [40266] = totemData[string_lower("Strength of Earth Totem")], - - [15430] = totemData[string_lower("Earth Elemental Totem")], - [24649] = totemData[string_lower("Earth Elemental Totem")], - [39387] = totemData[string_lower("Earth Elemental Totem")], - [40247] = totemData[string_lower("Earth Elemental Totem")], - [72307] = totemData[string_lower("Earth Elemental Totem")], - - [5913] = totemData[string_lower("Tremor Totem")], - [41938] = totemData[string_lower("Tremor Totem")], - [41939] = totemData[string_lower("Tremor Totem")], - -- Air - [5925] = totemData[string_lower("Grounding Totem")], - [128537] = totemData[string_lower("Grounding Totem")], - [136251] = totemData[string_lower("Grounding Totem")], - [7486] = totemData[string_lower("Grace of Air Totem")], [7487] = totemData[string_lower("Grace of Air Totem")], [15463] = totemData[string_lower("Grace of Air Totem")], - [7467] = totemData[string_lower("Nature Resistance Totem")], - [7468] = totemData[string_lower("Nature Resistance Totem")], - [7469] = totemData[string_lower("Nature Resistance Totem")], - [15490] = totemData[string_lower("Nature Resistance Totem")], - [31173] = totemData[string_lower("Nature Resistance Totem")], - [31174] = totemData[string_lower("Nature Resistance Totem")], - - [6112] = totemData[string_lower("Windfury Totem")], - [7483] = totemData[string_lower("Windfury Totem")], - [7484] = totemData[string_lower("Windfury Totem")], - [14666] = totemData[string_lower("Windfury Totem")], - [15496] = totemData[string_lower("Windfury Totem")], - [15497] = totemData[string_lower("Windfury Totem")], - [22897] = totemData[string_lower("Windfury Totem")], - [41940] = totemData[string_lower("Windfury Totem")], - [41941] = totemData[string_lower("Windfury Totem")], - [80703] = totemData[string_lower("Windfury Totem")], - [105690] = totemData[string_lower("Windfury Totem")], - [133684] = totemData[string_lower("Windfury Totem")], - - [3968] = totemData[string_lower("Sentry Totem")], - [28938] = totemData[string_lower("Sentry Totem")], - [40187] = totemData[string_lower("Sentry Totem")], - [69505] = totemData[string_lower("Sentry Totem")], - [70413] = totemData[string_lower("Sentry Totem")], - [71145] = totemData[string_lower("Sentry Totem")], - [147410] = totemData[string_lower("Sentry Totem")], - [9687] = totemData[string_lower("Windwall Totem")], [9688] = totemData[string_lower("Windwall Totem")], [9689] = totemData[string_lower("Windwall Totem")], [15492] = totemData[string_lower("Windwall Totem")], - [15447] = totemData[string_lower("Wrath of Air Totem")], - [36556] = totemData[string_lower("Wrath of Air Totem")], - [15803] = totemData[string_lower("Tranquil Air Totem")], } +local totemDataShared, totemNpcIdsToTotemDataShared, totemSpellIdToPulseShared = Gladdy:GetSharedTotemData() +Gladdy:AddEntriesToTable(totemData, totemDataShared) +Gladdy:AddEntriesToTable(totemNpcIdsToTotemData, totemNpcIdsToTotemDataShared) +Gladdy:AddEntriesToTable(totemSpellIdToPulse, totemSpellIdToPulseShared) + function Gladdy:GetTotemData() return totemData, totemNpcIdsToTotemData, totemSpellIdToPulse end diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua index 0b948d3..3fca03b 100644 --- a/Constants_Wrath.lua +++ b/Constants_Wrath.lua @@ -85,14 +85,17 @@ local specBuffs = { -- HUNTER [GetSpellInfo(20895)] = L["Beast Mastery"], -- Spirit Bond [GetSpellInfo(34471)] = L["Beast Mastery"], -- The Beast Within + [GetSpellInfo(75447)] = L["Beast Mastery"], -- Ferocious Inspiration [GetSpellInfo(19506)] = L["Marksmanship"], -- Trueshot Aura [GetSpellInfo(64420)] = L["Survival"], -- Sniper Training -- DRUID [GetSpellInfo(24932)] = L["Feral"], -- Leader of the Pack [GetSpellInfo(16975)] = L["Feral"], -- Predatory Strikes - [GetSpellInfo(50334)] = L["Feral"], -- Berserk + [GetSpellInfo(50334) .. " Feral"] = L["Feral"], -- Berserk [GetSpellInfo(24907)] = L["Balance"], -- Moonkin Aura [GetSpellInfo(24858)] = L["Balance"], -- Moonkin Form + [GetSpellInfo(48504)] = L["Restoration"], -- Living Seed + [GetSpellInfo(45283)] = L["Restoration"], -- Natural Perfection [GetSpellInfo(53251)] = L["Restoration"], -- Wild Growth [GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness [GetSpellInfo(33891)] = L["Restoration"], -- Tree of Life @@ -150,6 +153,7 @@ local specSpells = { [GetSpellInfo(47843)] = L["Affliction"], -- Unstable Affliction [GetSpellInfo(59672)] = L["Demonology"], -- Metamorphosis [GetSpellInfo(47193)] = L["Demonology"], -- Demonic Empowerment + [GetSpellInfo(47996) .. " Felguard"] = L["Demonology"], -- Intercept Felguard [GetSpellInfo(59172)] = L["Destruction"], -- Chaos Bolt [GetSpellInfo(47847)] = L["Destruction"], -- Shadowfury -- SHAMAN @@ -172,7 +176,7 @@ local specSpells = { [GetSpellInfo(24858)] = L["Balance"], -- Moonkin Form [GetSpellInfo(48566)] = L["Feral"], -- Mangle (Cat) [GetSpellInfo(48564)] = L["Feral"], -- Mangle (Bear) - [GetSpellInfo(50334)] = L["Feral"], -- Berserk + [GetSpellInfo(50334) .. " Feral"] = L["Feral"], -- Berserk [GetSpellInfo(18562)] = L["Restoration"], -- Swiftmend [GetSpellInfo(17116)] = L["Restoration"], -- Nature's Swiftness [GetSpellInfo(33891)] = L["Restoration"], -- Tree of Life @@ -486,7 +490,7 @@ local importantAuras = { priority = 20, spellID = 63529, }, - ["Unstable Affliction Silence"] = { -- Unstable Affliction Silence (GetSpellInfo returns "Unstable Affliction") + [select(1, GetSpellInfo(31117)) .. " Silence"] = { -- Unstable Affliction Silence (GetSpellInfo returns "Unstable Affliction") track = AURA_TYPE_DEBUFF, altName = select(1, GetSpellInfo(31117)) .. " Silence", priority = 20, @@ -583,7 +587,7 @@ local importantAuras = { }, [GetSpellInfo(54428)] = { -- Divine Plea track = AURA_TYPE_BUFF, - priority = 20, + priority = 15, spellID = 54428, }, [GetSpellInfo(31821)] = { -- Aura mastery @@ -611,11 +615,16 @@ local importantAuras = { priority = 9, spellID = 6346, }, - [GetSpellInfo(50334)] = {-- Berserk + [GetSpellInfo(50334) .. " Feral"] = {-- Berserk track = AURA_TYPE_BUFF, priority = 20, spellID = 50334, }, + [GetSpellInfo(46924)] = { -- Bladestorm + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 46924, + }, --- Turtling abilities [GetSpellInfo(871)] = { -- Shield Wall @@ -675,12 +684,22 @@ local importantAuras = { priority = 30, spellID = 1719, }, + [GetSpellInfo(48792)] = { -- Icebound Fortitude + track = AURA_TYPE_BUFF, + priority = 15, + spellID = 48792, + }, + [GetSpellInfo(49039)] = { -- Lichborne + track = AURA_TYPE_BUFF, + priority = 15, + spellID = 49039, + }, --- Alt Stuff [GetSpellInfo(34709)] = { -- Shadowsight Buff - track = AURA_TYPE_BUFF, + track = AURA_TYPE_DEBUFF, duration = 15, - priority = 15, + priority = 9, magic = true, spellID = 34709, }, @@ -784,10 +803,11 @@ local cooldownList = { [8983] = 60, -- Bash [53312] = 60, -- Natures Grasp [48505] = { cd = 90, spec = L["Balance"], }, -- Starfall - [50334] = { cd = 180, spec = L["Feral"], }, -- Berserk + [50334] = { cd = 180, spec = L["Feral"], altName = GetSpellInfo(50334) .. " Feral" }, -- Berserk [17116] = { cd = 120, spec = L["Restoration"], }, -- Natures Swiftness [18562] = { cd = 15, spec = L["Restoration"], }, -- Swiftmend [33831] = { cd = 180, spec = L["Balance"], }, -- Force of Nature + [61384] = { cd = 20, spec = L["Balance"], }, -- Typhoon }, -- Shaman @@ -845,7 +865,7 @@ local cooldownList = { [17962] = { cd = 10, spec = L["Destruction"], }, -- Conflagrate [59172] = { cd = 12, spec = L["Destruction"], }, -- Chaos Bolt [47241] = { cd = 180, spec = L["Demonology"], }, -- Metamorphosis - [47996] = { cd = 30, spec = L["Demonology"], pet = true, }, -- Intercept + [47996] = { cd = 30, spec = L["Demonology"], pet = true, altName = GetSpellInfo(47996) .. " Felguard" }, -- Intercept [1122] = { cd = 600, spec = L["Demonology"], }, -- Inferno }, @@ -889,7 +909,7 @@ local cooldownList = { [19503] = 30, -- Scatter Shot [19263] = 90, -- Deterrence [781] = 15, -- Disengage - [5384] = 20, -- Feign Death + [5384] = 30, -- Feign Death [3045] = 20, -- Rapid Fire [60192] = { cd = 28, -- Freezing Arrow sharedCD = { @@ -1067,211 +1087,21 @@ end local totemData = { -- Fire - [string_lower("Searing Totem")] = { id = 3599, texture = select(3, GetSpellInfo(3599)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Flametongue Totem")] = { id = 8227, texture = select(3, GetSpellInfo(8227)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Magma Totem")] = { id = 8190, texture = select(3, GetSpellInfo(8190)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 2 }, - [string_lower("Fire Nova Totem")] = { id = 1535, texture = select(3, GetSpellInfo(1535)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = { cd = 4, once = true } }, - [string_lower("Totem of Wrath")] = { id = 30706, texture = select(3, GetSpellInfo(30706)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Fire Elemental Totem")] = { id = 32982, texture = select(3, GetSpellInfo(32982)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Frost Resistance Totem")] = { id = 8181, texture = select(3, GetSpellInfo(8181)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Totem of Wrath")] = { id = 30706, texture = select(3, GetSpellInfo(30706)), color = { r = 0, g = 0, b = 0, a = 1 } }, -- Water - [string_lower("Fire Resistance Totem")] = { id = 8184, texture = select(3, GetSpellInfo(8184)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Disease Cleansing Totem")] = { id = 8170, texture = select(3, GetSpellInfo(8170)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 5 }, - [string_lower("Healing Stream Totem")] = { id = 5394, texture = select(3, GetSpellInfo(5394)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 2 }, - [string_lower("Mana Tide Totem")] = { id = 16190, texture = select(3, GetSpellInfo(16190)), color = { r = 0.078, g = 0.9, b = 0.16, a = 1 } }, - [string_lower("Mana Spring Totem")] = { id = 5675, texture = select(3, GetSpellInfo(5675)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 2 }, + [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 3}, + [string_lower("Mana Spring Totem")] = { id = 5675, texture = select(3, GetSpellInfo(5675)), color = { r = 0, g = 0, b = 0, a = 1 } }, -- Earth - [string_lower("Earthbind Totem")] = { id = 2484, texture = select(3, GetSpellInfo(2484)), color = { r = 0.5, g = 0.5, b = 0.5, a = 1 }, pulse = 3 }, - [string_lower("Stoneclaw Totem")] = { id = 5730, texture = select(3, GetSpellInfo(5730)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 2 }, - [string_lower("Stoneskin Totem")] = { id = 8071, texture = select(3, GetSpellInfo(8071)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Strength of Earth Totem")] = { id = 8075, texture = select(3, GetSpellInfo(8075)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Earth Elemental Totem")] = { id = 33663, texture = select(3, GetSpellInfo(33663)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Tremor Totem")] = { id = 8143, texture = select(3, GetSpellInfo(8143)), color = { r = 1, g = 0.9, b = 0.1, a = 1 }, pulse = 3 }, -- Air - [string_lower("Grounding Totem")] = { id = 8177, texture = select(3, GetSpellInfo(8177)), color = { r = 0, g = 0.53, b = 0.92, a = 1 } }, - [string_lower("Nature Resistance Totem")] = { id = 10595, texture = select(3, GetSpellInfo(10595)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Windfury Totem")] = { id = 8512, texture = select(3, GetSpellInfo(8512)), color = { r = 0.96, g = 0, b = 0.07, a = 1 } }, - [string_lower("Sentry Totem")] = { id = 6495, texture = select(3, GetSpellInfo(6495)), color = { r = 0, g = 0, b = 0, a = 1 } }, - [string_lower("Wrath of Air Totem")] = { id = 3738, texture = select(3, GetSpellInfo(3738)), color = { r = 0, g = 0, b = 0, a = 1 } }, } local totemSpellIdToPulse = { - [GetSpellInfo(totemData[string_lower("Earthbind Totem")].id)] = totemData[string_lower("Earthbind Totem")].pulse, - [2484] = totemData[string_lower("Earthbind Totem")].pulse, - [GetSpellInfo(totemData[string_lower("Tremor Totem")].id)] = totemData[string_lower("Tremor Totem")].pulse, - [8143] = totemData[string_lower("Tremor Totem")].pulse, - --[GetSpellInfo(totemData[string_lower("Poison Cleansing Totem")].id)] = totemData[string_lower("Poison Cleansing Totem")].pulse, - --[8166] = totemData[string_lower("Poison Cleansing Totem")].pulse, [GetSpellInfo(totemData[string_lower("Disease Cleansing Totem")].id)] = totemData[string_lower("Disease Cleansing Totem")].pulse, [8170] = totemData[string_lower("Disease Cleansing Totem")].pulse, - [GetSpellInfo(totemData[string_lower("Fire Nova Totem")].id)] = totemData[string_lower("Fire Nova Totem")].pulse, - [1535] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 1 - [8498] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 2 - [8499] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 3 - [11314] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 4 - [11315] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 5 - [25546] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 6 - [25547] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 7 - [GetSpellInfo(totemData[string_lower("Magma Totem")].id)] = totemData[string_lower("Magma Totem")].pulse, - [8190] = totemData[string_lower("Magma Totem")].pulse, -- Rank 1 - [10585] = totemData[string_lower("Magma Totem")].pulse, -- Rank 2 - [10586] = totemData[string_lower("Magma Totem")].pulse, -- Rank 3 - [10587] = totemData[string_lower("Magma Totem")].pulse, -- Rank 4 - [25552] = totemData[string_lower("Magma Totem")].pulse, -- Rank 5 - [GetSpellInfo(totemData[string_lower("Healing Stream Totem")].id)] = totemData[string_lower("Healing Stream Totem")].pulse, - [5394] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 1 - [6375] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 2 - [6377] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 3 - [10462] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 4 - [10463] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 5 - [25567] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 6 - [GetSpellInfo(totemData[string_lower("Mana Spring Totem")].id)] = totemData[string_lower("Mana Spring Totem")].pulse, - [5675] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 1 - [10495] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 2 - [10496] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 3 - [10497] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 4 - [25570] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 5 - [GetSpellInfo(totemData[string_lower("Stoneclaw Totem")].id)] = totemData[string_lower("Stoneclaw Totem")].pulse, - [5730] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 1 - [6390] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 2 - [6391] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 3 - [6392] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 4 - [10427] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 5 - [10428] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 6 - [25525] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 7 } local totemNpcIdsToTotemData = { - --fire - [2523] = totemData[string_lower("Searing Totem")], - [3902] = totemData[string_lower("Searing Totem")], - [3903] = totemData[string_lower("Searing Totem")], - [3904] = totemData[string_lower("Searing Totem")], - [7400] = totemData[string_lower("Searing Totem")], - [7402] = totemData[string_lower("Searing Totem")], - [15480] = totemData[string_lower("Searing Totem")], - [31162] = totemData[string_lower("Searing Totem")], - [31164] = totemData[string_lower("Searing Totem")], - [31165] = totemData[string_lower("Searing Totem")], - [21995] = totemData[string_lower("Searing Totem")], - [22209] = totemData[string_lower("Searing Totem")], - [22895] = totemData[string_lower("Searing Totem")], - [22896] = totemData[string_lower("Searing Totem")], - [34687] = totemData[string_lower("Searing Totem")], - [36532] = totemData[string_lower("Searing Totem")], - [43423] = totemData[string_lower("Searing Totem")], - [67380] = totemData[string_lower("Searing Totem")], - [73477] = totemData[string_lower("Searing Totem")], - [79238] = totemData[string_lower("Searing Totem")], - [22896] = totemData[string_lower("Searing Totem")], - [84519] = totemData[string_lower("Searing Totem")], - [110730] = totemData[string_lower("Searing Totem")], - [132178] = totemData[string_lower("Searing Totem")], - [9637] = totemData[string_lower("Searing Totem")], - - [5950] = totemData[string_lower("Flametongue Totem")], - [6012] = totemData[string_lower("Flametongue Totem")], - [7423] = totemData[string_lower("Flametongue Totem")], - [10557] = totemData[string_lower("Flametongue Totem")], - [15485] = totemData[string_lower("Flametongue Totem")], - [31132] = totemData[string_lower("Flametongue Totem")], - [31133] = totemData[string_lower("Flametongue Totem")], - [31158] = totemData[string_lower("Flametongue Totem")], - [42605] = totemData[string_lower("Flametongue Totem")], - - [5929] = totemData[string_lower("Magma Totem")], - [7464] = totemData[string_lower("Magma Totem")], - [7465] = totemData[string_lower("Magma Totem")], - [7466] = totemData[string_lower("Magma Totem")], - [15484] = totemData[string_lower("Magma Totem")], - [31166] = totemData[string_lower("Magma Totem")], - [31167] = totemData[string_lower("Magma Totem")], - [32887] = totemData[string_lower("Magma Totem")], - [42211] = totemData[string_lower("Magma Totem")], - [71335] = totemData[string_lower("Magma Totem")], - [71925] = totemData[string_lower("Magma Totem")], - [73085] = totemData[string_lower("Magma Totem")], - [73093] = totemData[string_lower("Magma Totem")], - [73268] = totemData[string_lower("Magma Totem")], - [88971] = totemData[string_lower("Magma Totem")], - [97369] = totemData[string_lower("Magma Totem")], - [98676] = totemData[string_lower("Magma Totem")], - - [5879] = totemData[string_lower("Fire Nova Totem")], - [6110] = totemData[string_lower("Fire Nova Totem")], - [6111] = totemData[string_lower("Fire Nova Totem")], - [7844] = totemData[string_lower("Fire Nova Totem")], - [7845] = totemData[string_lower("Fire Nova Totem")], - [14662] = totemData[string_lower("Fire Nova Totem")], - [15482] = totemData[string_lower("Fire Nova Totem")], - [15483] = totemData[string_lower("Fire Nova Totem")], - [24320] = totemData[string_lower("Fire Nova Totem")], - [32775] = totemData[string_lower("Fire Nova Totem")], - [32776] = totemData[string_lower("Fire Nova Totem")], - - [17539] = totemData[string_lower("Totem of Wrath")], - [22970] = totemData[string_lower("Totem of Wrath")], - [22971] = totemData[string_lower("Totem of Wrath")], - [30652] = totemData[string_lower("Totem of Wrath")], - [30653] = totemData[string_lower("Totem of Wrath")], - [30654] = totemData[string_lower("Totem of Wrath")], - - [15439] = totemData[string_lower("Fire Elemental Totem")], - [40830] = totemData[string_lower("Fire Elemental Totem")], - [41337] = totemData[string_lower("Fire Elemental Totem")], - [41346] = totemData[string_lower("Fire Elemental Totem")], - [72301] = totemData[string_lower("Fire Elemental Totem")], - - [5926] = totemData[string_lower("Frost Resistance Totem")], - [7412] = totemData[string_lower("Frost Resistance Totem")], - [7413] = totemData[string_lower("Frost Resistance Totem")], - [15486] = totemData[string_lower("Frost Resistance Totem")], - [31171] = totemData[string_lower("Frost Resistance Totem")], - [31172] = totemData[string_lower("Frost Resistance Totem")], - - -- Water - [5927] = totemData[string_lower("Fire Resistance Totem")], - [7424] = totemData[string_lower("Fire Resistance Totem")], - [7425] = totemData[string_lower("Fire Resistance Totem")], - [15487] = totemData[string_lower("Fire Resistance Totem")], - [31169] = totemData[string_lower("Fire Resistance Totem")], - [31170] = totemData[string_lower("Fire Resistance Totem")], - - [5924] = totemData[string_lower("Disease Cleansing Totem")], - [3527] = totemData[string_lower("Healing Stream Totem")], - [3906] = totemData[string_lower("Healing Stream Totem")], - [3907] = totemData[string_lower("Healing Stream Totem")], - [3908] = totemData[string_lower("Healing Stream Totem")], - [3909] = totemData[string_lower("Healing Stream Totem")], - [14664] = totemData[string_lower("Healing Stream Totem")], - [15488] = totemData[string_lower("Healing Stream Totem")], - [18235] = totemData[string_lower("Healing Stream Totem")], - [31181] = totemData[string_lower("Healing Stream Totem")], - [31182] = totemData[string_lower("Healing Stream Totem")], - [31185] = totemData[string_lower("Healing Stream Totem")], - [34686] = totemData[string_lower("Healing Stream Totem")], - [36542] = totemData[string_lower("Healing Stream Totem")], - [37810] = totemData[string_lower("Healing Stream Totem")], - [38428] = totemData[string_lower("Healing Stream Totem")], - [47077] = totemData[string_lower("Healing Stream Totem")], - [72309] = totemData[string_lower("Healing Stream Totem")], - [72457] = totemData[string_lower("Healing Stream Totem")], - [73890] = totemData[string_lower("Healing Stream Totem")], - [74433] = totemData[string_lower("Healing Stream Totem")], - [97508] = totemData[string_lower("Healing Stream Totem")], - [112567] = totemData[string_lower("Healing Stream Totem")], - [120357] = totemData[string_lower("Healing Stream Totem")], - [128539] = totemData[string_lower("Healing Stream Totem")], - [132049] = totemData[string_lower("Healing Stream Totem")], - - [10467] = totemData[string_lower("Mana Tide Totem")], - [11100] = totemData[string_lower("Mana Tide Totem")], - [11101] = totemData[string_lower("Mana Tide Totem")], - [17061] = totemData[string_lower("Mana Tide Totem")], - [3573] = totemData[string_lower("Mana Spring Totem")], [7414] = totemData[string_lower("Mana Spring Totem")], [7415] = totemData[string_lower("Mana Spring Totem")], @@ -1282,102 +1112,14 @@ local totemNpcIdsToTotemData = { [31189] = totemData[string_lower("Mana Spring Totem")], [31190] = totemData[string_lower("Mana Spring Totem")], - -- Earth - [2630] = totemData[string_lower("Earthbind Totem")], - [22486] = totemData[string_lower("Earthbind Totem")], - [40233] = totemData[string_lower("Earthbind Totem")], - [74737] = totemData[string_lower("Earthbind Totem")], - [79155] = totemData[string_lower("Earthbind Totem")], - [3579] = totemData[string_lower("Stoneclaw Totem")], - [3911] = totemData[string_lower("Stoneclaw Totem")], - [3912] = totemData[string_lower("Stoneclaw Totem")], - [3913] = totemData[string_lower("Stoneclaw Totem")], - [7398] = totemData[string_lower("Stoneclaw Totem")], - [7399] = totemData[string_lower("Stoneclaw Totem")], - [14870] = totemData[string_lower("Stoneclaw Totem")], - [15478] = totemData[string_lower("Stoneclaw Totem")], - [31120] = totemData[string_lower("Stoneclaw Totem")], - [31121] = totemData[string_lower("Stoneclaw Totem")], - [31122] = totemData[string_lower("Stoneclaw Totem")], - [40258] = totemData[string_lower("Stoneclaw Totem")], - [102402] = totemData[string_lower("Stoneclaw Totem")], - - [5873] = totemData[string_lower("Stoneskin Totem")], - [5919] = totemData[string_lower("Stoneskin Totem")], - [5920] = totemData[string_lower("Stoneskin Totem")], - [7366] = totemData[string_lower("Stoneskin Totem")], - [7367] = totemData[string_lower("Stoneskin Totem")], - [7368] = totemData[string_lower("Stoneskin Totem")], - [14663] = totemData[string_lower("Stoneskin Totem")], - [15470] = totemData[string_lower("Stoneskin Totem")], - [15474] = totemData[string_lower("Stoneskin Totem")], - [18177] = totemData[string_lower("Stoneskin Totem")], - [21994] = totemData[string_lower("Stoneskin Totem")], - [31175] = totemData[string_lower("Stoneskin Totem")], - [31176] = totemData[string_lower("Stoneskin Totem")], - [36550] = totemData[string_lower("Stoneskin Totem")], - [40267] = totemData[string_lower("Stoneskin Totem")], - [41967] = totemData[string_lower("Stoneskin Totem")], - - [5874] = totemData[string_lower("Strength of Earth Totem")], - [5921] = totemData[string_lower("Strength of Earth Totem")], - [5922] = totemData[string_lower("Strength of Earth Totem")], - [7403] = totemData[string_lower("Strength of Earth Totem")], - [15464] = totemData[string_lower("Strength of Earth Totem")], - [15479] = totemData[string_lower("Strength of Earth Totem")], - [21992] = totemData[string_lower("Strength of Earth Totem")], - [30647] = totemData[string_lower("Strength of Earth Totem")], - [31129] = totemData[string_lower("Strength of Earth Totem")], - [40266] = totemData[string_lower("Strength of Earth Totem")], - - [15430] = totemData[string_lower("Earth Elemental Totem")], - [24649] = totemData[string_lower("Earth Elemental Totem")], - [39387] = totemData[string_lower("Earth Elemental Totem")], - [40247] = totemData[string_lower("Earth Elemental Totem")], - [72307] = totemData[string_lower("Earth Elemental Totem")], - - [5913] = totemData[string_lower("Tremor Totem")], - [41938] = totemData[string_lower("Tremor Totem")], - [41939] = totemData[string_lower("Tremor Totem")], - - -- Air - [5925] = totemData[string_lower("Grounding Totem")], - [128537] = totemData[string_lower("Grounding Totem")], - [136251] = totemData[string_lower("Grounding Totem")], - - [7467] = totemData[string_lower("Nature Resistance Totem")], - [7468] = totemData[string_lower("Nature Resistance Totem")], - [7469] = totemData[string_lower("Nature Resistance Totem")], - [15490] = totemData[string_lower("Nature Resistance Totem")], - [31173] = totemData[string_lower("Nature Resistance Totem")], - [31174] = totemData[string_lower("Nature Resistance Totem")], - - [6112] = totemData[string_lower("Windfury Totem")], - [7483] = totemData[string_lower("Windfury Totem")], - [7484] = totemData[string_lower("Windfury Totem")], - [14666] = totemData[string_lower("Windfury Totem")], - [15496] = totemData[string_lower("Windfury Totem")], - [15497] = totemData[string_lower("Windfury Totem")], - [22897] = totemData[string_lower("Windfury Totem")], - [41940] = totemData[string_lower("Windfury Totem")], - [41941] = totemData[string_lower("Windfury Totem")], - [80703] = totemData[string_lower("Windfury Totem")], - [105690] = totemData[string_lower("Windfury Totem")], - [133684] = totemData[string_lower("Windfury Totem")], - - [3968] = totemData[string_lower("Sentry Totem")], - [28938] = totemData[string_lower("Sentry Totem")], - [40187] = totemData[string_lower("Sentry Totem")], - [69505] = totemData[string_lower("Sentry Totem")], - [70413] = totemData[string_lower("Sentry Totem")], - [71145] = totemData[string_lower("Sentry Totem")], - [147410] = totemData[string_lower("Sentry Totem")], - - [15447] = totemData[string_lower("Wrath of Air Totem")], - [36556] = totemData[string_lower("Wrath of Air Totem")], } +local totemDataShared, totemNpcIdsToTotemDataShared, totemSpellIdToPulseShared = Gladdy:GetSharedTotemData() +Gladdy:AddEntriesToTable(totemData, totemDataShared) +Gladdy:AddEntriesToTable(totemNpcIdsToTotemData, totemNpcIdsToTotemDataShared) +Gladdy:AddEntriesToTable(totemSpellIdToPulse, totemSpellIdToPulseShared) + function Gladdy:GetTotemData() return totemData, totemNpcIdsToTotemData, totemSpellIdToPulse end diff --git a/Constants_shared.lua b/Constants_shared.lua index c91bc19..57cb2bd 100644 --- a/Constants_shared.lua +++ b/Constants_shared.lua @@ -1,5 +1,6 @@ local tbl_sort, select, string_lower = table.sort, select, string.lower local GetLocale = GetLocale +local GetSpellInfo = GetSpellInfo local Gladdy = LibStub("Gladdy") local L = Gladdy.L @@ -183,6 +184,30 @@ Gladdy.frameStrataSorting = { [8] = "TOOLTIP", } +Gladdy.exceptionNames = { + [50334] = (GetSpellInfo(50334) or "...") .. " Feral", -- Berserk + [30151] = select(1, GetSpellInfo(30151)) .. " Felguard", -- Intercept + [30194] = select(1, GetSpellInfo(30151)) .. " Felguard", -- Intercept + [30198] = select(1, GetSpellInfo(30151)) .. " Felguard", -- Intercept + [47996] = select(1, GetSpellInfo(30151)) .. " Felguard", -- Intercept + [31117] = select(1, GetSpellInfo(30405)) .. " Silence", -- Unstable Affliction Silence + [43523] = select(1, GetSpellInfo(30405)) .. " Silence", + [24131] = select(1, GetSpellInfo(19386)) .. " Dot", -- Wyvern Sting Dot + [24134] = select(1, GetSpellInfo(19386)) .. " Dot", + [24135] = select(1, GetSpellInfo(19386)) .. " Dot", + [27069] = select(1, GetSpellInfo(19386)) .. " Dot", + [49009] = select(1, GetSpellInfo(19386)) .. " Dot", + [49010] = select(1, GetSpellInfo(19386)) .. " Dot", + [19975] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), -- Entangling Roots Nature's Grasp + [19974] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), + [19973] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), + [19972] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), + [19971] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), + [19971] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), + [27010] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), + [53312] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), +} + local dispelTypeColors = {} dispelTypeColors["none"] = { r = 0.80, g = 0, b = 0, a = 1 } dispelTypeColors["magic"] = { r = 0.20, g = 0.60, b = 1.00, a = 1 } @@ -292,4 +317,325 @@ local pvpTrinkets = { -- [itemID] = cd in ms function Gladdy:GetPvpTrinkets() return pvpTrinkets +end + +--------------------- +-- TOTEM STUFF +--------------------- + +local totemData = { + -- Fire + [string_lower("Searing Totem")] = {id = 3599,texture = select(3, GetSpellInfo(3599)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Flametongue Totem")] = {id = 8227,texture = select(3, GetSpellInfo(8227)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Magma Totem")] = {id = 8190,texture = select(3, GetSpellInfo(8190)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Fire Nova Totem")] = {id = 1535,texture = select(3, GetSpellInfo(1535)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = { cd = 4, once = true }}, + [string_lower("Totem of Wrath")] = {id = 30706,texture = select(3, GetSpellInfo(30706)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Fire Elemental Totem")] = {id = 32982,texture = select(3, GetSpellInfo(32982)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Frost Resistance Totem")] = {id = 8181,texture = select(3, GetSpellInfo(8181)), color = {r = 0, g = 0, b = 0, a = 1}}, + -- Water + [string_lower("Fire Resistance Totem")] = {id = 8184,texture = select(3, GetSpellInfo(8184)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 5}, + [string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}, pulse = 3 }, + [string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + -- Earth + [string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, pulse = 3}, + [string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Stoneskin Totem")] = {id = 8071,texture = select(3, GetSpellInfo(8071)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Strength of Earth Totem")] = {id = 8075,texture = select(3, GetSpellInfo(8075)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Earth Elemental Totem")] = {id = 33663,texture = select(3, GetSpellInfo(33663)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, pulse = 3}, + -- Air + [string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}}, + [string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Windfury Totem")] = {id = 8512,texture = select(3, GetSpellInfo(8512)), color = {r = 0.96, g = 0, b = 0.07, a = 1}}, + [string_lower("Sentry Totem")] = {id = 6495, texture = select(3, GetSpellInfo(6495)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Wrath of Air Totem")] = {id = 3738,texture = select(3, GetSpellInfo(3738)), color = {r = 0, g = 0, b = 0, a = 1}}, +} + +local totemSpellIdToPulse = { + [GetSpellInfo(totemData[string_lower("Earthbind Totem")].id)] = totemData[string_lower("Earthbind Totem")].pulse, + [2484] = totemData[string_lower("Earthbind Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Tremor Totem")].id)] = totemData[string_lower("Tremor Totem")].pulse, + [8143] = totemData[string_lower("Tremor Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Disease Cleansing Totem")].id)] = totemData[string_lower("Disease Cleansing Totem")].pulse, + [8170] = totemData[string_lower("Disease Cleansing Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Fire Nova Totem")].id)] = totemData[string_lower("Fire Nova Totem")].pulse, + [1535] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 1 + [8498] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 2 + [8499] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 3 + [11314] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 4 + [11315] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 5 + [25546] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 6 + [25547] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 7 + [GetSpellInfo(totemData[string_lower("Magma Totem")].id)] = totemData[string_lower("Magma Totem")].pulse, + [8190] = totemData[string_lower("Magma Totem")].pulse, -- Rank 1 + [10585] = totemData[string_lower("Magma Totem")].pulse, -- Rank 2 + [10586] = totemData[string_lower("Magma Totem")].pulse, -- Rank 3 + [10587] = totemData[string_lower("Magma Totem")].pulse, -- Rank 4 + [25552] = totemData[string_lower("Magma Totem")].pulse, -- Rank 5 + [58731] = totemData[string_lower("Magma Totem")].pulse, -- Rank 6 + [58734] = totemData[string_lower("Magma Totem")].pulse, -- Rank 7 + [GetSpellInfo(totemData[string_lower("Healing Stream Totem")].id)] = totemData[string_lower("Healing Stream Totem")].pulse, + [5394] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 1 + [6375] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 2 + [6377] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 3 + [10462] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 4 + [10463] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 5 + [25567] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 6 + [58755] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 7 + [58756] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 8 + [58757] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 9 + [GetSpellInfo(totemData[string_lower("Mana Tide Totem")].id)] = totemData[string_lower("Mana Tide Totem")].pulse, + [16190] = totemData[string_lower("Mana Tide Totem")].pulse, -- Rank 1 + [GetSpellInfo(totemData[string_lower("Stoneclaw Totem")].id)] = totemData[string_lower("Stoneclaw Totem")].pulse, + [5730] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 1 + [6390] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 2 + [6391] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 3 + [6392] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 4 + [10427] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 5 + [10428] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 6 + [25525] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 7 + [58580] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 8 + [58581] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 9 + [58582] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 10 +} + +local totemNpcIdsToTotemData = { + --fire + [2523] = totemData[string_lower("Searing Totem")], + [3902] = totemData[string_lower("Searing Totem")], + [3903] = totemData[string_lower("Searing Totem")], + [3904] = totemData[string_lower("Searing Totem")], + [7400] = totemData[string_lower("Searing Totem")], + [7402] = totemData[string_lower("Searing Totem")], + [15480] = totemData[string_lower("Searing Totem")], + [31162] = totemData[string_lower("Searing Totem")], + [31164] = totemData[string_lower("Searing Totem")], + [31165] = totemData[string_lower("Searing Totem")], + [21995] = totemData[string_lower("Searing Totem")], + [22209] = totemData[string_lower("Searing Totem")], + [22895] = totemData[string_lower("Searing Totem")], + [22896] = totemData[string_lower("Searing Totem")], + [34687] = totemData[string_lower("Searing Totem")], + [36532] = totemData[string_lower("Searing Totem")], + [43423] = totemData[string_lower("Searing Totem")], + [67380] = totemData[string_lower("Searing Totem")], + [73477] = totemData[string_lower("Searing Totem")], + [79238] = totemData[string_lower("Searing Totem")], + [22896] = totemData[string_lower("Searing Totem")], + [84519] = totemData[string_lower("Searing Totem")], + [110730] = totemData[string_lower("Searing Totem")], + [132178] = totemData[string_lower("Searing Totem")], + [9637] = totemData[string_lower("Searing Totem")], + + [5950] = totemData[string_lower("Flametongue Totem")], + [6012] = totemData[string_lower("Flametongue Totem")], + [7423] = totemData[string_lower("Flametongue Totem")], + [10557] = totemData[string_lower("Flametongue Totem")], + [15485] = totemData[string_lower("Flametongue Totem")], + [31132] = totemData[string_lower("Flametongue Totem")], + [31133] = totemData[string_lower("Flametongue Totem")], + [31158] = totemData[string_lower("Flametongue Totem")], + [42605] = totemData[string_lower("Flametongue Totem")], + + [5929] = totemData[string_lower("Magma Totem")], + [7464] = totemData[string_lower("Magma Totem")], + [7465] = totemData[string_lower("Magma Totem")], + [7466] = totemData[string_lower("Magma Totem")], + [15484] = totemData[string_lower("Magma Totem")], + [31166] = totemData[string_lower("Magma Totem")], + [31167] = totemData[string_lower("Magma Totem")], + [32887] = totemData[string_lower("Magma Totem")], + [42211] = totemData[string_lower("Magma Totem")], + [71335] = totemData[string_lower("Magma Totem")], + [71925] = totemData[string_lower("Magma Totem")], + [73085] = totemData[string_lower("Magma Totem")], + [73093] = totemData[string_lower("Magma Totem")], + [73268] = totemData[string_lower("Magma Totem")], + [88971] = totemData[string_lower("Magma Totem")], + [97369] = totemData[string_lower("Magma Totem")], + [98676] = totemData[string_lower("Magma Totem")], + + [5879] = totemData[string_lower("Fire Nova Totem")], + [6110] = totemData[string_lower("Fire Nova Totem")], + [6111] = totemData[string_lower("Fire Nova Totem")], + [7844] = totemData[string_lower("Fire Nova Totem")], + [7845] = totemData[string_lower("Fire Nova Totem")], + [14662] = totemData[string_lower("Fire Nova Totem")], + [15482] = totemData[string_lower("Fire Nova Totem")], + [15483] = totemData[string_lower("Fire Nova Totem")], + [24320] = totemData[string_lower("Fire Nova Totem")], + [32775] = totemData[string_lower("Fire Nova Totem")], + [32776] = totemData[string_lower("Fire Nova Totem")], + + [17539] = totemData[string_lower("Totem of Wrath")], + [22970] = totemData[string_lower("Totem of Wrath")], + [22971] = totemData[string_lower("Totem of Wrath")], + [30652] = totemData[string_lower("Totem of Wrath")], + [30653] = totemData[string_lower("Totem of Wrath")], + [30654] = totemData[string_lower("Totem of Wrath")], + + [15439] = totemData[string_lower("Fire Elemental Totem")], + [40830] = totemData[string_lower("Fire Elemental Totem")], + [41337] = totemData[string_lower("Fire Elemental Totem")], + [41346] = totemData[string_lower("Fire Elemental Totem")], + [72301] = totemData[string_lower("Fire Elemental Totem")], + + [5926] = totemData[string_lower("Frost Resistance Totem")], + [7412] = totemData[string_lower("Frost Resistance Totem")], + [7413] = totemData[string_lower("Frost Resistance Totem")], + [15486] = totemData[string_lower("Frost Resistance Totem")], + [31171] = totemData[string_lower("Frost Resistance Totem")], + [31172] = totemData[string_lower("Frost Resistance Totem")], + + -- Water + [5927] = totemData[string_lower("Fire Resistance Totem")], + [7424] = totemData[string_lower("Fire Resistance Totem")], + [7425] = totemData[string_lower("Fire Resistance Totem")], + [15487] = totemData[string_lower("Fire Resistance Totem")], + [31169] = totemData[string_lower("Fire Resistance Totem")], + [31170] = totemData[string_lower("Fire Resistance Totem")], + + [5924] = totemData[string_lower("Disease Cleansing Totem")], + + [3527] = totemData[string_lower("Healing Stream Totem")], + [3906] = totemData[string_lower("Healing Stream Totem")], + [3907] = totemData[string_lower("Healing Stream Totem")], + [3908] = totemData[string_lower("Healing Stream Totem")], + [3909] = totemData[string_lower("Healing Stream Totem")], + [14664] = totemData[string_lower("Healing Stream Totem")], + [15488] = totemData[string_lower("Healing Stream Totem")], + [18235] = totemData[string_lower("Healing Stream Totem")], + [31181] = totemData[string_lower("Healing Stream Totem")], + [31182] = totemData[string_lower("Healing Stream Totem")], + [31185] = totemData[string_lower("Healing Stream Totem")], + [34686] = totemData[string_lower("Healing Stream Totem")], + [36542] = totemData[string_lower("Healing Stream Totem")], + [37810] = totemData[string_lower("Healing Stream Totem")], + [38428] = totemData[string_lower("Healing Stream Totem")], + [47077] = totemData[string_lower("Healing Stream Totem")], + [72309] = totemData[string_lower("Healing Stream Totem")], + [72457] = totemData[string_lower("Healing Stream Totem")], + [73890] = totemData[string_lower("Healing Stream Totem")], + [74433] = totemData[string_lower("Healing Stream Totem")], + [97508] = totemData[string_lower("Healing Stream Totem")], + [112567] = totemData[string_lower("Healing Stream Totem")], + [120357] = totemData[string_lower("Healing Stream Totem")], + [128539] = totemData[string_lower("Healing Stream Totem")], + [132049] = totemData[string_lower("Healing Stream Totem")], + + [10467] = totemData[string_lower("Mana Tide Totem")], + [11100] = totemData[string_lower("Mana Tide Totem")], + [11101] = totemData[string_lower("Mana Tide Totem")], + [17061] = totemData[string_lower("Mana Tide Totem")], + + [3573] = totemData[string_lower("Mana Spring Totem")], + [7414] = totemData[string_lower("Mana Spring Totem")], + [7415] = totemData[string_lower("Mana Spring Totem")], + [7416] = totemData[string_lower("Mana Spring Totem")], + [15304] = totemData[string_lower("Mana Spring Totem")], + [15489] = totemData[string_lower("Mana Spring Totem")], + [31186] = totemData[string_lower("Mana Spring Totem")], + [31189] = totemData[string_lower("Mana Spring Totem")], + [31190] = totemData[string_lower("Mana Spring Totem")], + + -- Earth + [2630] = totemData[string_lower("Earthbind Totem")], + [22486] = totemData[string_lower("Earthbind Totem")], + [40233] = totemData[string_lower("Earthbind Totem")], + [74737] = totemData[string_lower("Earthbind Totem")], + [79155] = totemData[string_lower("Earthbind Totem")], + + [3579] = totemData[string_lower("Stoneclaw Totem")], + [3911] = totemData[string_lower("Stoneclaw Totem")], + [3912] = totemData[string_lower("Stoneclaw Totem")], + [3913] = totemData[string_lower("Stoneclaw Totem")], + [7398] = totemData[string_lower("Stoneclaw Totem")], + [7399] = totemData[string_lower("Stoneclaw Totem")], + [14870] = totemData[string_lower("Stoneclaw Totem")], + [15478] = totemData[string_lower("Stoneclaw Totem")], + [31120] = totemData[string_lower("Stoneclaw Totem")], + [31121] = totemData[string_lower("Stoneclaw Totem")], + [31122] = totemData[string_lower("Stoneclaw Totem")], + [40258] = totemData[string_lower("Stoneclaw Totem")], + [102402] = totemData[string_lower("Stoneclaw Totem")], + + [5873] = totemData[string_lower("Stoneskin Totem")], + [5919] = totemData[string_lower("Stoneskin Totem")], + [5920] = totemData[string_lower("Stoneskin Totem")], + [7366] = totemData[string_lower("Stoneskin Totem")], + [7367] = totemData[string_lower("Stoneskin Totem")], + [7368] = totemData[string_lower("Stoneskin Totem")], + [14663] = totemData[string_lower("Stoneskin Totem")], + [15470] = totemData[string_lower("Stoneskin Totem")], + [15474] = totemData[string_lower("Stoneskin Totem")], + [18177] = totemData[string_lower("Stoneskin Totem")], + [21994] = totemData[string_lower("Stoneskin Totem")], + [31175] = totemData[string_lower("Stoneskin Totem")], + [31176] = totemData[string_lower("Stoneskin Totem")], + [36550] = totemData[string_lower("Stoneskin Totem")], + [40267] = totemData[string_lower("Stoneskin Totem")], + [41967] = totemData[string_lower("Stoneskin Totem")], + + [5874] = totemData[string_lower("Strength of Earth Totem")], + [5921] = totemData[string_lower("Strength of Earth Totem")], + [5922] = totemData[string_lower("Strength of Earth Totem")], + [7403] = totemData[string_lower("Strength of Earth Totem")], + [15464] = totemData[string_lower("Strength of Earth Totem")], + [15479] = totemData[string_lower("Strength of Earth Totem")], + [21992] = totemData[string_lower("Strength of Earth Totem")], + [30647] = totemData[string_lower("Strength of Earth Totem")], + [31129] = totemData[string_lower("Strength of Earth Totem")], + [40266] = totemData[string_lower("Strength of Earth Totem")], + + [15430] = totemData[string_lower("Earth Elemental Totem")], + [24649] = totemData[string_lower("Earth Elemental Totem")], + [39387] = totemData[string_lower("Earth Elemental Totem")], + [40247] = totemData[string_lower("Earth Elemental Totem")], + [72307] = totemData[string_lower("Earth Elemental Totem")], + + [5913] = totemData[string_lower("Tremor Totem")], + [41938] = totemData[string_lower("Tremor Totem")], + [41939] = totemData[string_lower("Tremor Totem")], + + -- Air + [5925] = totemData[string_lower("Grounding Totem")], + [128537] = totemData[string_lower("Grounding Totem")], + [136251] = totemData[string_lower("Grounding Totem")], + + [7467] = totemData[string_lower("Nature Resistance Totem")], + [7468] = totemData[string_lower("Nature Resistance Totem")], + [7469] = totemData[string_lower("Nature Resistance Totem")], + [15490] = totemData[string_lower("Nature Resistance Totem")], + [31173] = totemData[string_lower("Nature Resistance Totem")], + [31174] = totemData[string_lower("Nature Resistance Totem")], + + [6112] = totemData[string_lower("Windfury Totem")], + [7483] = totemData[string_lower("Windfury Totem")], + [7484] = totemData[string_lower("Windfury Totem")], + [14666] = totemData[string_lower("Windfury Totem")], + [15496] = totemData[string_lower("Windfury Totem")], + [15497] = totemData[string_lower("Windfury Totem")], + [22897] = totemData[string_lower("Windfury Totem")], + [41940] = totemData[string_lower("Windfury Totem")], + [41941] = totemData[string_lower("Windfury Totem")], + [80703] = totemData[string_lower("Windfury Totem")], + [105690] = totemData[string_lower("Windfury Totem")], + [133684] = totemData[string_lower("Windfury Totem")], + + [3968] = totemData[string_lower("Sentry Totem")], + [28938] = totemData[string_lower("Sentry Totem")], + [40187] = totemData[string_lower("Sentry Totem")], + [69505] = totemData[string_lower("Sentry Totem")], + [70413] = totemData[string_lower("Sentry Totem")], + [71145] = totemData[string_lower("Sentry Totem")], + [147410] = totemData[string_lower("Sentry Totem")], + + [15447] = totemData[string_lower("Wrath of Air Totem")], + [36556] = totemData[string_lower("Wrath of Air Totem")], +} + +function Gladdy:GetSharedTotemData() + return totemData, totemNpcIdsToTotemData, totemSpellIdToPulse end \ No newline at end of file diff --git a/EventListener.lua b/EventListener.lua index 3e4cace..d280e99 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -1,4 +1,6 @@ local select, string_gsub, tostring, pairs, ipairs = select, string.gsub, tostring, pairs, ipairs +local wipe = wipe +local unpack = unpack local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF @@ -34,10 +36,11 @@ function EventListener:JOINED_ARENA() self:RegisterEvent("UNIT_SPELLCAST_START") self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START") self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED") - self:SetScript("OnEvent", EventListener.OnEvent) - -- in case arena has started already we check for units for i=1,Gladdy.curBracket do + if Gladdy.buttons["arena"..i].lastAuras then + wipe(Gladdy.buttons["arena"..i].lastAuras) + end if UnitExists("arena" .. i) then Gladdy:SpotEnemy("arena" .. i, true) end @@ -45,6 +48,7 @@ function EventListener:JOINED_ARENA() Gladdy:SendMessage("PET_SPOTTED", "arenapet" .. i) end end + self:SetScript("OnEvent", EventListener.OnEvent) end function EventListener:Reset() @@ -57,7 +61,6 @@ function Gladdy:SpotEnemy(unit, auraScan) if not unit or not button then return end - button.stealthed = false if UnitExists(unit) then button.raceLoc = UnitRace(unit) button.race = select(2, UnitRace(unit)) @@ -77,6 +80,11 @@ function Gladdy:SpotEnemy(unit, auraScan) Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, AURA_TYPE_BUFF, n - 1) break end + + if Gladdy.exceptionNames[spellID] then + spellName = Gladdy.exceptionNames[spellID] + end + if Gladdy.specBuffs[spellName] and unitCaster then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then @@ -108,15 +116,10 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() Gladdy.modules["Shadowsight Timer"]:AURA_GAIN(nil, nil, 34709) end + if Gladdy.exceptionNames[spellID] then + spellName = Gladdy.exceptionNames[spellID] + end if destUnit then - -- cooldown - if (Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName]) then - local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank - if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman) - spellId = spellID - end - Cooldowns:AURA_FADE(destUnit, spellID) - end -- diminish tracker if Gladdy.buttons[destUnit] and Gladdy.db.drEnabled and extraSpellId == AURA_TYPE_DEBUFF then if (eventType == "SPELL_AURA_REMOVED") then @@ -156,8 +159,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if not Gladdy.buttons[srcUnit].spec then self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) end - if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_AURA_APPLIED" or eventType == "SPELL_MISSED") then - self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) + if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_MISSED") then -- cooldown tracker if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName] then local unitClass @@ -165,23 +167,34 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman) spellId = spellID end - if Gladdy.db.cooldownCooldowns[tostring(spellId)] then + if Gladdy.db.cooldownCooldowns[tostring(spellId)] and (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_MISSED") then if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then unitClass = Gladdy.buttons[srcUnit].class else unitClass = Gladdy.buttons[srcUnit].race end - if spellID ~= 16188 and spellID ~= 17116 then -- Nature's Swiftness CD starts when buff fades - Gladdy:Debug("INFO", "SPELL_CAST_SUCCESS - CooldownUsed", srcUnit, "spellID:", spellID) + if spellID ~= 16188 and spellID ~= 17116 and spellID ~= 16166 and spellID ~= 12043 and spellID ~= 5384 then -- Nature's Swiftness CD starts when buff fades + Gladdy:Debug("INFO", eventType, "- CooldownUsed", srcUnit, "spellID:", spellID) Cooldowns:CooldownUsed(srcUnit, unitClass, spellId) end end end end - if (eventType == "SPELL_AURA_REMOVED" and (spellID == 16188 or spellID == 17116) and Gladdy.buttons[srcUnit].class) then + if (eventType == "SPELL_AURA_REMOVED" and (spellID == 16188 or spellID == 17116 or spellID == 16166 or spellID == 12043) and Gladdy.buttons[srcUnit].class) then Gladdy:Debug("INFO", "SPELL_AURA_REMOVED - CooldownUsed", srcUnit, "spellID:", spellID) Cooldowns:CooldownUsed(srcUnit, Gladdy.buttons[srcUnit].class, spellID) end + if (eventType == "SPELL_AURA_REMOVED" and Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName]) then + local unit = Gladdy:GetArenaUnit(srcUnit, true) + local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank + if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman) + spellId = spellID + end + if unit then + --Gladdy:Debug("INFO", "EL:CL:SPELL_AURA_REMOVED (srcUnit)", "Cooldowns:AURA_FADE", unit, spellId) + Cooldowns:AURA_FADE(unit, spellId) + end + end end end @@ -196,6 +209,7 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason) if updateReason == "seen" then -- ENEMY_SPOTTED if button then + button.stealthed = false Gladdy:SendMessage("ENEMY_STEALTH", unit, false) if not button.class or not button.race then Gladdy:SpotEnemy(unit, true) @@ -207,6 +221,7 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason) elseif updateReason == "unseen" then -- STEALTH if button then + button.stealthed = true Gladdy:SendMessage("ENEMY_STEALTH", unit, true) end if pet then @@ -226,25 +241,6 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason) end end -Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB - [31117] = GetSpellInfo(30405) .. " Silence", -- Unstable Affliction Silence - [43523] = GetSpellInfo(30405) .. " Silence", - [24131] = select(1, GetSpellInfo(19386)) .. " Dot", -- Wyvern Sting Dot - [24134] = select(1, GetSpellInfo(19386)) .. " Dot", - [24135] = select(1, GetSpellInfo(19386)) .. " Dot", - [27069] = select(1, GetSpellInfo(19386)) .. " Dot", - [49009] = select(1, GetSpellInfo(19386)) .. " Dot", - [49010] = select(1, GetSpellInfo(19386)) .. " Dot", - [19975] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), -- Entangling Roots Nature's Grasp - [19974] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), - [19973] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), - [19972] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), - [19971] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), - [19971] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), - [27010] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), - [53312] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), -} - Gladdy.cooldownBuffs = { [GetSpellInfo(6346)] = { cd = function(expTime) -- 180s uptime == cd return expTime @@ -275,19 +271,32 @@ function EventListener:UNIT_AURA(unit, isFullUpdate, updatedAuras) if not button then return end + if not button.auras then + button.auras = {} + end + wipe(button.auras) + if not button.lastAuras then + button.lastAuras = {} + end + Gladdy:Debug("INFO", "AURA_FADE", unit, AURA_TYPE_BUFF, AURA_TYPE_DEBUFF) + Gladdy:SendMessage("AURA_FADE", unit, AURA_TYPE_BUFF) + Gladdy:SendMessage("AURA_FADE", unit, AURA_TYPE_DEBUFF) for i = 1, 2 do if not Gladdy.buttons[unit].class or not Gladdy.buttons[unit].race then Gladdy:SpotEnemy(unit, false) end local filter = (i == 1 and "HELPFUL" or "HARMFUL") local auraType = i == 1 and AURA_TYPE_BUFF or AURA_TYPE_DEBUFF - Gladdy:SendMessage("AURA_FADE", unit, auraType) for n = 1, 30 do local spellName, texture, count, dispelType, duration, expirationTime, unitCaster, _, shouldConsolidate, spellID = UnitAura(unit, n, filter) if ( not spellID ) then Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, auraType, n - 1) break end + if Gladdy.exceptionNames[spellID] then + spellName = Gladdy.exceptionNames[spellID] + end + button.auras[spellID] = { auraType, spellID, spellName, texture, duration, expirationTime, count, dispelType } if not button.spec and Gladdy.specBuffs[spellName] and unitCaster then local unitPet = string_gsub(unit, "%d$", "pet%1") if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then @@ -305,12 +314,38 @@ function EventListener:UNIT_AURA(unit, isFullUpdate, updatedAuras) if Gladdy.cooldownBuffs.racials[spellName] then Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName) end - if Gladdy.exceptionNames[spellID] then - spellName = Gladdy.exceptionNames[spellID] - end + Gladdy:Debug("INFO", "AURA_GAIN", unit, auraType, spellName) Gladdy:SendMessage("AURA_GAIN", unit, auraType, spellID, spellName, texture, duration, expirationTime, count, dispelType, i, unitCaster) end end + -- check auras + for spellID,v in pairs(button.lastAuras) do + if not button.auras[spellID] then + if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[v[3]] then + local spellId = Cooldowns.cooldownSpellIds[v[3]] -- don't use spellId from combatlog, in case of different spellrank + if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman) + spellId = spellID + end + --Gladdy:Debug("INFO", "EL:UNIT_AURA Cooldowns:AURA_FADE", unit, spellId) + Cooldowns:AURA_FADE(unit, spellId) + if spellID == 5384 then -- Feign Death CD Detection needs this + Cooldowns:CooldownUsed(unit, Gladdy.buttons[unit].class, 5384) + end + end + end + end + wipe(button.lastAuras) + button.lastAuras = Gladdy:DeepCopy(button.auras) +end + +function EventListener:UpdateAuras(unit) + local button = Gladdy.buttons[unit] + if not button or button.lastAuras then + return + end + for i=1, #button.lastAuras do + Gladdy.modules["Auras"]:AURA_GAIN(unit, unpack(button.lastAuras[i])) + end end function EventListener:UNIT_SPELLCAST_START(unit) @@ -338,8 +373,12 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(...) local unitRace = Gladdy.buttons[unit].race local spellName = GetSpellInfo(spellID) + if Gladdy.exceptionNames[spellID] then + spellName = Gladdy.exceptionNames[spellID] + end + -- spec detection - if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then + if spellName and Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then self:DetectSpec(unit, Gladdy.specSpells[spellName]) end @@ -350,7 +389,7 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(...) end -- racial - if Gladdy:Racials()[unitRace].spellName == spellName and Gladdy:Racials()[unitRace][spellID] then + if unitRace and Gladdy:Racials()[unitRace].spellName == spellName and Gladdy:Racials()[unitRace][spellID] then Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED - RACIAL_USED", unit, spellID) Gladdy:SendMessage("RACIAL_USED", unit) end @@ -362,7 +401,7 @@ function EventListener:DetectSpec(unit, spec) if (not button or not spec or button.spec) then return end - if button.class == "PALADIN" and Gladdy:contains(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + if button.class == "PALADIN" and not Gladdy:contains(spec, {L["Holy"], L["Retribution"], L["Protection"]}) or button.class == "SHAMAN" and not Gladdy:contains(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) or button.class == "ROGUE" and not Gladdy:contains(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) or button.class == "WARLOCK" and not Gladdy:contains(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) diff --git a/Frame.lua b/Frame.lua index e236d2e..373698a 100644 --- a/Frame.lua +++ b/Frame.lua @@ -31,6 +31,8 @@ Gladdy.BUTTON_DEFAULTS = { stealthed = false, classColors = {}, lastState = 0, + auras = {}, + lastAuras = {} } function Gladdy:CreateFrame() diff --git a/Gladdy.lua b/Gladdy.lua index d996d35..fabed6f 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -27,13 +27,13 @@ local LibStub = LibStub --------------------------- -local MAJOR, MINOR = "Gladdy", 8 +local MAJOR, MINOR = "Gladdy", 9 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 2 Gladdy.version_minor_num = 0.20 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num -Gladdy.version_releaseType = RELEASE_TYPES.beta +Gladdy.version_releaseType = RELEASE_TYPES.release Gladdy.version = PREFIX .. string.format("%.2f", Gladdy.version_num) .. "-" .. Gladdy.version_releaseType Gladdy.VERSION_REGEX = VERSION_REGEX diff --git a/Gladdy.toc b/Gladdy.toc index 2d6724a..6b0610b 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -1,5 +1,5 @@ ## Title: Gladdy |cFFFF0000 game client not supported|r -## Version: 2.2-Beta +## Version: 2.20-Release ## Notes: The most powerful arena AddOn for WoW Classic TBC/WotLK ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 diff --git a/Gladdy_BCC.toc b/Gladdy_BCC.toc index aafb2b6..60f4d13 100644 --- a/Gladdy_BCC.toc +++ b/Gladdy_BCC.toc @@ -1,6 +1,6 @@ ## Interface: 20504 ## Title: Gladdy - TBC -## Version: 2.2-Beta +## Version: 2.20-Release ## Notes: The most powerful arena AddOn for WoW 2.5.4 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 @@ -13,12 +13,12 @@ embeds.xml Gladdy.lua Lang.lua +Util.lua Frame.lua Options.lua Constants_shared.lua Constants_BCC.lua ImportStrings.lua -Util.lua Modules\Announcements.lua Modules\Healthbar.lua diff --git a/Gladdy_Wrath.toc b/Gladdy_Wrath.toc index c9924b4..0070ee1 100644 --- a/Gladdy_Wrath.toc +++ b/Gladdy_Wrath.toc @@ -1,6 +1,6 @@ ## Interface: 30400 ## Title: Gladdy - WotLK -## Version: 2.2-Beta +## Version: 2.20-Release ## Notes: The most powerful arena AddOn for WoW 3.4.0 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 @@ -13,12 +13,12 @@ embeds.xml Gladdy.lua Lang.lua +Util.lua Frame.lua Options.lua Constants_shared.lua Constants_Wrath.lua ImportStrings.lua -Util.lua Modules\Announcements.lua Modules\Healthbar.lua diff --git a/Libs/DRList-1.0/DRList-1.0.lua b/Libs/DRList-1.0/DRList-1.0.lua index 505a3ac..0f2e52a 100644 --- a/Libs/DRList-1.0/DRList-1.0.lua +++ b/Libs/DRList-1.0/DRList-1.0.lua @@ -9,7 +9,7 @@ License: MIT --- DRList-1.0 -- @module DRList-1.0 -local MAJOR, MINOR = "DRList-1.0", 40 -- Don't forget to change this in Spells.lua aswell! +local MAJOR, MINOR = "DRList-1.0", 42 -- Don't forget to change this in Spells.lua aswell! local Lib = assert(LibStub, MAJOR .. " requires LibStub."):NewLibrary(MAJOR, MINOR) if not Lib then return end -- already loaded diff --git a/Libs/DRList-1.0/Spells.lua b/Libs/DRList-1.0/Spells.lua index 5fa14fc..3053a5d 100644 --- a/Libs/DRList-1.0/Spells.lua +++ b/Libs/DRList-1.0/Spells.lua @@ -1,5 +1,10 @@ -local Lib, version = LibStub("DRList-1.0") -if Lib.spellList and version >= 40 then return end +local MAJOR, MINOR = "DRList-1.0", 42 -- Don't forget to change this in DRList-1.0.lua aswell! +local Lib = LibStub(MAJOR) +if Lib.spellListVersion and Lib.spellListVersion >= MINOR then + return +end + +Lib.spellListVersion = MINOR if Lib.gameExpansion == "retail" then @@ -72,7 +77,7 @@ if Lib.gameExpansion == "retail" then [47476] = "silence", -- Strangulate [204490] = "silence", -- Sigil of Silence --- [78675] = "silence", -- Solar Beam (doesn't seem to DR) +-- [78675] = "silence", -- Solar Beam (has no DR) [202933] = "silence", -- Spider Sting [356727] = "silence", -- Spider Venom [217824] = "silence", -- Shield of Virtue @@ -214,6 +219,8 @@ elseif Lib.gameExpansion == "tbc" then [11285] = "incapacitate", -- Gouge (Rank 4) [11286] = "incapacitate", -- Gouge (Rank 5) [38764] = "incapacitate", -- Gouge (Rank 6) + [710] = "incapacitate", -- Banish (Rank 1) + [18647] = "incapacitate", -- Banish (Rank 2) [13327] = "incapacitate", -- Reckless Charge (Rocket Helmet) [4064] = "incapacitate", -- Rough Copper Bomb [4065] = "incapacitate", -- Large Copper Bomb @@ -552,8 +559,8 @@ elseif Lib.gameExpansion == "wotlk" then -- STILL WORK IN PROGRESS, I DON'T HAVE [24259] = "silence", -- Spell Lock [43523] = "silence", -- Unstable Affliction 1 [31117] = "silence", -- Unstable Affliction 2 - [18498] = "silence", -- Silenced - Gag Order 1 - [74347] = "silence", -- Silenced - Gag Order 1 + [18498] = "silence", -- Silenced - Gag Order (Shield Slam) + [74347] = "silence", -- Silenced - Gag Order (Heroic Throw?) [50613] = "silence", -- Arcane Torrent (Racial, Runic Power) [28730] = "silence", -- Arcane Torrent (Racial, Mana) [25046] = "silence", -- Arcane Torrent (Racial, Energy) diff --git a/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua b/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua index 401ed5d..7f15235 100644 --- a/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua +++ b/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua @@ -6,7 +6,7 @@ https://www.wowace.com/projects/libbuttonglow-1-0 -- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool local MAJOR_VERSION = "LibCustomGlow-1.0" -local MINOR_VERSION = 16 +local MINOR_VERSION = 17 if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) if not lib then return end @@ -313,6 +313,9 @@ function lib.PixelGlow_Stop(r,key) if not r then return end + if type(key) ~= "string" or type(key) ~= "number" then + key = nil + end key = key or "" if not r["_PixelGlow"..key] then return false @@ -408,6 +411,9 @@ function lib.AutoCastGlow_Stop(r,key) if not r then return end + if type(key) ~= "string" or type(key) ~= "number" then + key = nil + end key = key or "" if not r["_AutoCastGlow"..key] then diff --git a/Modules/Auras.lua b/Modules/Auras.lua index da9ede8..166a7d4 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -130,7 +130,7 @@ function Auras:CreateFrame(unit) self.frame:SetAlpha(1) end if (self.timeLeft <= 0) then - Auras:AURA_FADE(self.unit, self.track) + Auras:AURA_FADE(self.unit, self.track, true) else if self.spellID == 8178 then self.text:SetText("") @@ -554,8 +554,6 @@ function Auras:Test(unit) self:AURA_GAIN(unit,v.value.track, spellid, spellName, icon, duration, GetTime() + duration) end end - -- /run LibStub("Gladdy").modules["Auras"]:Test("arena1") - -- /run LibStub("Gladdy"):JoinedArena() --Interrupts if (unit == "arena1" or unit == "arena3") then @@ -596,10 +594,6 @@ function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, exp return end - if spellID == 31117 then - spellName = "Unstable Affliction Silence" - end - if not self.auras[spellName] then return end @@ -639,9 +633,9 @@ function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, exp end end -function Auras:AURA_FADE(unit, auraType) +function Auras:AURA_FADE(unit, auraType, force) local auraFrame = self.frames[unit] - if (not auraFrame or auraFrame.track ~= auraType) then + if (not auraFrame or auraFrame.track ~= auraType or not Gladdy.buttons[unit] or (not force and Gladdy.buttons[unit].stealthed)) then return end if auraFrame.active then @@ -1242,14 +1236,7 @@ function Auras:GetAuraOptions(auraType) for i,k in ipairs(auras) do options[tostring(k)] = { type = "group", - name = (Gladdy:GetImportantAuras()["Unstable Affliction Silence"] - and Gladdy:GetImportantAuras()["Unstable Affliction Silence"].spellID == k - and Gladdy:GetImportantAuras()["Unstable Affliction Silence"].altName) - or (Gladdy:GetImportantAuras()[select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))] - and Gladdy:GetImportantAuras()[select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))].spellID == k - and Gladdy:GetImportantAuras()[select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))].altName) - or Gladdy:GetImportantAuras()[GetSpellInfo(k)].altName - or GetSpellInfo(k), + name = Gladdy:GetExceptionSpellName(k), order = i+2, icon = Gladdy:GetImportantAuras()[GetSpellInfo(k)] and Gladdy:GetImportantAuras()[GetSpellInfo(k)].texture or select(3, GetSpellInfo(k)), args = { @@ -1322,10 +1309,7 @@ function Auras:GetInterruptOptions() for i,k in ipairs(auras) do options[tostring(k)] = { type = "group", - name = Gladdy:GetInterrupts()["Unstable Affliction Silence"] - and Gladdy:GetInterrupts()["Unstable Affliction Silence"].spellID == k - and Gladdy:GetInterrupts()["Unstable Affliction Silence"].altName - or GetSpellInfo(k), + name = GetSpellInfo(k), order = i+2, icon = Gladdy:GetInterrupts()[GetSpellInfo(k)] and Gladdy:GetInterrupts()[GetSpellInfo(k)].texture or select(3, GetSpellInfo(k)), args = { diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 21de6ab..8bb398c 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -1,5 +1,6 @@ local type, pairs, ipairs, ceil, tonumber, mod, tostring, upper, select, tinsert, tremove = type, pairs, ipairs, ceil, tonumber, mod, tostring, string.upper, select, tinsert, tremove local tbl_sort = table.sort +local C_Timer = C_Timer local GetTime = GetTime local CreateFrame = CreateFrame local GetSpellInfo = GetSpellInfo @@ -59,6 +60,7 @@ local Cooldowns = Gladdy:NewModule("Cooldowns", nil, { cooldownXOffset = 0, cooldownSize = 30, cooldownIconGlow = true, + cooldownIconGlowColor = {r = 0.95, g = 0.95, b = 0.32, a = 1}, cooldownIconZoomed = false, cooldownIconDesaturateOnCooldown = false, cooldownIconAlphaOnCooldown = 1, @@ -85,8 +87,13 @@ function Cooldowns:Initialize() for _,spellTable in pairs(Gladdy:GetCooldownList()) do for spellId,val in pairs(spellTable) do local spellName, _, texture = GetSpellInfo(spellId) - if type(val) == "table" and val.icon then - texture = val.icon + if type(val) == "table" then + if val.icon then + texture = val.icon + end + if val.altName then + spellName = val.altName + end end if spellName then self.cooldownSpellIds[spellName] = spellId @@ -109,7 +116,6 @@ end function Cooldowns:CreateFrame(unit) local button = Gladdy.buttons[unit] - -- Cooldown frame local spellCooldownFrame = CreateFrame("Frame", nil, button) spellCooldownFrame:EnableMouse(false) spellCooldownFrame:SetMovable(true) @@ -120,7 +126,7 @@ function Cooldowns:CreateFrame(unit) self.frames[unit] = spellCooldownFrame end -function Cooldowns:CreateIcon() -- returns iconFrame +function Cooldowns:CreateIcon() local icon if (#self.iconCache > 0) then icon = tremove(self.iconCache, #self.iconCache) @@ -148,6 +154,9 @@ function Cooldowns:CreateIcon() -- returns iconFrame icon.cooldownFont = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") icon.cooldownFont:SetAllPoints(icon) + icon.glow = CreateFrame("Frame", nil, icon) + icon.glow:SetAllPoints(icon) + self:UpdateIcon(icon) end return icon @@ -160,6 +169,8 @@ function Cooldowns:UpdateIcon(icon) icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) + icon.glow:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.glow:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 3) icon:SetHeight(Gladdy.db.cooldownSize) icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor) @@ -207,6 +218,9 @@ function Cooldowns:UpdateIcon(icon) else icon.texture:SetAlpha(1) end + if icon.timer and not icon.timer:IsCancelled() then + LCG.PixelGlow_Start(icon.glow, Gladdy:ColorAsArray(Gladdy.db.cooldownIconGlowColor), 12, 0.15, nil, 2) + end end function Cooldowns:IconsSetPoint(button) @@ -258,7 +272,6 @@ end function Cooldowns:UpdateFrame(unit) local button = Gladdy.buttons[unit] - -- Cooldown frame local testAgain = false if (Gladdy.db.cooldown) then button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize) @@ -333,6 +346,11 @@ function Cooldowns:ClearIcon(button, index, spellId, icon) end end end + icon:Show() + LCG:PixelGlow_Stop(icon.glow) + if icon.timer then + icon.timer:Cancel() + end icon:ClearAllPoints() icon:SetParent(nil) icon:Hide() @@ -341,7 +359,6 @@ function Cooldowns:ClearIcon(button, index, spellId, icon) icon.cooldown:Hide() icon.cooldownFont:SetText("") icon:SetScript("OnUpdate", nil) - LCG:ButtonGlow_Stop(icon) tinsert(self.iconCache, icon) end @@ -353,7 +370,7 @@ function Cooldowns:Test(unit) if Gladdy.frame.testing then self:UpdateTestCooldowns(unit) end - Cooldowns:AURA_GAIN(_, AURA_TYPE_BUFF, "22812", "Barkskin", _, 20, _, _, _, _, unit, true) -- unit, auraType, spellID, spellName, texture, duration, expirationTime + Cooldowns:AURA_GAIN(_, AURA_TYPE_BUFF, 22812, "Barkskin", _, 20, _, _, _, _, unit, true) end function Cooldowns:UpdateTestCooldowns(unit) @@ -368,6 +385,9 @@ function Cooldowns:UpdateTestCooldowns(unit) end) for _,icon in ipairs(orderedIcons) do + if icon.timer then + icon.timer:Cancel() + end self:CooldownUsed(unit, button.class, icon.spellId) end end @@ -394,13 +414,9 @@ function Cooldowns:UNIT_DESTROYED(unit) self:ResetUnit(unit) end ---[[ - /run local a=LibStub("Gladdy").modules["Cooldowns"] a:AURA_GAIN("arena1",22812) - /run local a=LibStub("Gladdy").modules["Cooldowns"] a:AURA_FADE("arena1",22812) ---]] function Cooldowns:AURA_GAIN(_, auraType, spellID, spellName, _, duration, _, _, _, _, unitCaster, test) local arenaUnit = test and unitCaster or Gladdy:GetArenaUnit(unitCaster, true) - if not Gladdy.db.cooldownIconGlow or not arenaUnit or not Gladdy.buttons[arenaUnit] or auraType ~= AURA_TYPE_BUFF then + if not Gladdy.db.cooldownIconGlow or not arenaUnit or not Gladdy.buttons[arenaUnit] or auraType ~= AURA_TYPE_BUFF or spellID == 26889 then return end local cooldownFrame = Gladdy.buttons[arenaUnit].spellCooldownFrame @@ -412,22 +428,31 @@ function Cooldowns:AURA_GAIN(_, auraType, spellID, spellName, _, duration, _, _, for _,icon in pairs(cooldownFrame.icons) do if (icon.spellId == spellId) then - if icon._ButtonGlow and not icon._ButtonGlow.animIn:IsPlaying() or not icon._ButtonGlow then - LCG.ButtonGlow_Start(icon, nil, 0.15) - C_Timer.NewTimer(duration, function() LCG.ButtonGlow_Stop(icon) end) + Gladdy:Debug("INFO", "Cooldowns:AURA_GAIN", "PixelGlow_Start", spellID) + LCG.PixelGlow_Start(icon.glow, Gladdy:ColorAsArray(Gladdy.db.cooldownIconGlowColor), 12, 0.15, nil, 2) + if icon.timer then + icon.timer:Cancel() end + icon.timer = C_Timer.NewTimer(duration, function() + LCG.PixelGlow_Stop(icon.glow) + icon.timer:Cancel() + end) end end end function Cooldowns:AURA_FADE(unit, spellID) - if not Gladdy.buttons[unit] then + if not Gladdy.buttons[unit] or Gladdy.buttons[unit].stealthed then return end local cooldownFrame = Gladdy.buttons[unit].spellCooldownFrame for _,icon in pairs(cooldownFrame.icons) do if (icon.spellId == spellID) then - LCG.ButtonGlow_Stop(icon) + Gladdy:Debug("INFO", "Cooldowns:AURA_FADE", "LCG.ButtonGlow_Stop") + if icon.timer then + icon.timer:Cancel() + end + LCG.PixelGlow_Stop(icon.glow) end end end @@ -437,12 +462,22 @@ end --------------------- function Cooldowns:CooldownStart(button, spellId, duration, start) - -- starts timer frame if not duration or duration == nil or type(duration) ~= "number" then return end + local cooldown = Gladdy:GetCooldownList()[button.class][spellId] + if type(cooldown) == "table" then + if (button.spec ~= nil and cooldown[button.spec] ~= nil) then + cooldown = cooldown[button.spec] + else + cooldown = cooldown.cd + end + end for _,icon in pairs(button.spellCooldownFrame.icons) do if (icon.spellId == spellId) then + if not start and icon.active and icon.timeLeft > cooldown/2 then + return -- do not trigger cooldown again + end icon.active = true icon.timeLeft = start and start - GetTime() + duration or duration if (not Gladdy.db.cooldownDisableCircle) then icon.cooldown:SetCooldown(start or GetTime(), duration) end @@ -452,7 +487,6 @@ function Cooldowns:CooldownStart(button, spellId, duration, start) if Gladdy.db.cooldownIconAlphaOnCooldown < 1 then icon.texture:SetAlpha(Gladdy.db.cooldownIconAlphaOnCooldown) end - --if math.random(1, 30 ) > 10 then LCG.ButtonGlow_Start(icon, nil, 0.15) end icon:SetScript("OnUpdate", function(self, elapsed) self.timeLeft = self.timeLeft - elapsed local timeLeft = ceil(self.timeLeft) @@ -471,6 +505,7 @@ function Cooldowns:CooldownStart(button, spellId, duration, start) Cooldowns:CooldownReady(button, spellId, icon) end end) + break --C_VoiceChat.SpeakText(2, GetSpellInfo(spellId), 3, 4, 100) end end @@ -487,7 +522,10 @@ local function resetIcon(icon) icon.cooldown:Hide() icon.cooldownFont:SetText("") icon:SetScript("OnUpdate", nil) - --LCG.ButtonGlow_Stop(icon) + if icon.timer then + icon.timer:Cancel() + end + LCG.PixelGlow_Stop(icon.glow) end function Cooldowns:CooldownReady(button, spellId, frame) @@ -507,13 +545,11 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond if not button then return end - -- if (self.db.cooldownList[spellId] == false) then return end local cooldown = Gladdy:GetCooldownList()[unitClass][spellId] local cd = cooldown if (type(cooldown) == "table") then -- return if the spec doesn't have a cooldown for this spell - --if (arenaSpecs[unit] ~= nil and cooldown.notSpec ~= nil and arenaSpecs[unit] == cooldown.notSpec) then return end if (button.spec ~= nil and cooldown.notSpec ~= nil and button.spec == cooldown.notSpec) then return end @@ -526,7 +562,6 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond end -- check if there is a special cooldown for the units spec - --if (arenaSpecs[unit] ~= nil and cooldown[arenaSpecs[unit]] ~= nil) then if (button.spec ~= nil and cooldown[button.spec] ~= nil) then cd = cooldown[button.spec] else @@ -601,7 +636,6 @@ function Cooldowns:AddCooldown(spellID, value, button) icon.texture:SetTexture(self.spellTextures[spellID]) tinsert(button.spellCooldownFrame.icons, icon) self:IconsSetPoint(button) - Gladdy:Debug("INFO", "Cooldowns:AddCooldown", button.unit, GetSpellInfo(spellID)) end end @@ -723,17 +757,10 @@ function Cooldowns:GetOptions() name = L["Cooldown"], order = 2, }, - cooldownIconGlow = Gladdy:option({ - type = "toggle", - name = L["Glow Icon"], - desc = L["Glow the icon when cooldown active"], - order = 3, - width = "full", - }), cooldownIconDesaturateOnCooldown = Gladdy:option({ type = "toggle", name = L["Desaturate Icon"], - order = 4, + order = 5, width = "full", }), cooldownIconAlphaOnCooldown = Gladdy:option({ @@ -741,7 +768,7 @@ function Cooldowns:GetOptions() name = L["Cooldown alpha on CD"], desc = L["Alpha of the icon when cooldown active"], desc = L["changes "], - order = 5, + order = 6, min = 0, max = 1, step = 0.1, @@ -750,12 +777,12 @@ function Cooldowns:GetOptions() headerCircle = { type = "header", name = L["Cooldowncircle"], - order = 6, + order = 10, }, cooldownDisableCircle = Gladdy:option({ type = "toggle", name = L["No Cooldown Circle"], - order = 8, + order = 11, width = "full", }), cooldownCooldownAlpha = Gladdy:option({ @@ -764,7 +791,7 @@ function Cooldowns:GetOptions() min = 0, max = 1, step = 0.1, - order = 9, + order = 12, width = "full", }), cooldownCooldownNumberAlpha = { @@ -773,7 +800,7 @@ function Cooldowns:GetOptions() min = 0, max = 1, step = 0.1, - order = 10, + order = 13, width = "full", set = function(info, value) Gladdy.db.cooldownFontColor.a = value @@ -785,10 +812,48 @@ function Cooldowns:GetOptions() }, }, }, + glow = { + type = "group", + name = L["Glow"], + order = 3, + args = { + header = { + type = "header", + name = L["Glow"], + order = 1, + }, + cooldownIconGlow = Gladdy:option({ + type = "toggle", + name = L["Glow Icon"], + desc = L["Glow the icon when cooldown active"], + order = 2, + width = "full", + }), + cooldownIconGlowColor = Gladdy:colorOption({ + disabled = function() return not Gladdy.db.cooldownIconGlow end, + type = "color", + hasAlpha = true, + name = L["Glow color"], + desc = L["Color of the glow"], + order = 3, + width = "full", + }), + resetGlow = { + type = "execute", + name = L["Reset Glow"], + desc = L["Reset Glow Color"], + func = function() + Gladdy.db.cooldownIconGlowColor = {r = 0.95, g = 0.95, b = 0.32, a = 1} + Gladdy:UpdateFrame() + end, + order = 3, + } + }, + }, font = { type = "group", name = L["Font"], - order = 3, + order = 4, args = { header = { type = "header", @@ -825,7 +890,7 @@ function Cooldowns:GetOptions() position = { type = "group", name = L["Position"], - order = 5, + order = 6, args = { header = { type = "header", @@ -889,7 +954,7 @@ function Cooldowns:GetOptions() border = { type = "group", name = L["Border"], - order = 4, + order = 5, args = { header = { type = "header", @@ -914,7 +979,7 @@ function Cooldowns:GetOptions() frameStrata = { type = "group", name = L["Frame Strata and Level"], - order = 6, + order = 7, args = { headerAuraLevel = { type = "header", diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index b47ff3c..12a3dd8 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -7,7 +7,6 @@ local CreateFrame = CreateFrame local GetTime = GetTime local Gladdy = LibStub("Gladdy") ---local DRData = LibStub("DRData-1.0-BCC") local DRData = LibStub("DRList-1.0") local L = Gladdy.L local function defaultCategories() diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 8a0d289..8d7cf78 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -146,7 +146,6 @@ local function getGradient(start, ending, percentage, factor) return start * abs(-2 * percentage + 1) + ending * factor end --- /run LibStub("Gladdy").modules["Health Bar"]:SetHealthStatusBarColor("arena1", 51, 100) local rMax, gMax, bMax, rMid, gMid, bMid, rMin, gMin, bMin, rNow, gNow, bNow, percentage, factor, stealthAlpha function Healthbar:SetHealthStatusBarColor(unit, health, healthMax) local button = Gladdy.buttons[unit] diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 4e9d648..f51c65c 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -77,6 +77,7 @@ function Pets:ResetUnit(unitId) end petFrame.healthBar:SetAlpha(0) petFrame.healthBar:SetScript("OnUpdate", nil) + petFrame.healthBar.portrait:SetTexture(nil) self:UnregisterEvent("UNIT_PET") end @@ -346,7 +347,7 @@ function Pets:SetHealthText(healthBar, health, healthMax) healthText = ("%d%%"):format(healthPercentage) end else - healthText = "DEAD" + healthText = "" end healthBar.healthText:SetText(healthText) diff --git a/Modules/RangeCheck.lua b/Modules/RangeCheck.lua index 023cda9..37f5b9b 100644 --- a/Modules/RangeCheck.lua +++ b/Modules/RangeCheck.lua @@ -357,8 +357,6 @@ function RangeCheck:GetSpells() end, set = function(_, value) Gladdy.db.rangeCheckDefaultSpells[class].min = tonumber(value) - --Gladdy.options.args["Range Check"].args.oorSpells.args[class].args.min.name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min) and format("|T%s:20|t %s", select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min))) - -- or "nil" Gladdy.options.args["Range Check"].args.oorSpells.args[class].args.headerMin.name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min) and format("|T%s:20|t %s - %d" .. L["yds"], select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(6, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min))) or "nil" end diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index 9606f86..b7f9da2 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -25,9 +25,6 @@ local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, { shadowsightTimerFrameLevel = 20, }) --- /run LibStub("Gladdy").modules["Shadowsight Timer"]:AURA_GAIN(nil, nil, 34709) --- /run LibStub("Gladdy").modules["Shadowsight Timer"].timerFrame1:SetAlpha(0) - function ShadowsightTimer:OnEvent(event, ...) self[event](self, ...) end diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index 942115d..e5e6ef0 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -374,11 +374,23 @@ function TotemPlates:ToggleAddon(nameplate, show) if addonFrames and #addonFrames > 0 then if show then for _,v in ipairs(addonFrames) do - v:Show() + if nameplate.unitFrame and nameplate.unitFrame.UpdateAllElements then + Gladdy:Debug("INFO", "TotemPlates:ToggleAddon - NAME_PLATE_UNIT_ADDED - nameplate.unitFrame:UpdateAllElements") + nameplate.unitFrame:UpdateAllElements("NAME_PLATE_UNIT_ADDED") + else + Gladdy:Debug("INFO", "TotemPlates:ToggleAddon - NAME_PLATE_UNIT_ADDED - Show") + v:Show() + end end else for _,v in ipairs(addonFrames) do - v:Hide() + if nameplate.unitFrame and nameplate.unitFrame.UpdateAllElements then + Gladdy:Debug("INFO", "TotemPlates:ToggleAddon - NAME_PLATE_UNIT_REMOVED - nameplate.unitFrame:UpdateAllElements") + nameplate.unitFrame:UpdateAllElements("NAME_PLATE_UNIT_REMOVED") + else + Gladdy:Debug("INFO", "TotemPlates:ToggleAddon - NAME_PLATE_UNIT_REMOVED - Hide") + v:Hide() + end end end end diff --git a/README.md b/README.md index c995a80..fd04a11 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ --- -## [v2.20-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.20-Release/Gladdy_Classic_v2.20-Beta.zip) +## [v2.20-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.20-Release/Gladdy_Classic_v2.20-Release.zip) ###### Please consider donating if you like my work @@ -79,6 +79,24 @@ Thank you! ### Changes +### v2.20-Release +- **Cooldowns** + - glow changed to PixelGlow + - glow color configurable + - improved tracking + - feign death cd tracking + - fixed Elemental Mastery and Presence of Mind tracking +- **Auras** + - improved **Aura** tracking + - stealthed unit **Aura** tracking improved + - fixed Berserking Wrath +- **Totemplates** + - ElvUI fix + - fix ManaSpringTotem +- fix Paladin **SpecDetection** +- fix DRList conflict with Diminish +- minor bugfixes/improvements + ### v2.20-Beta - **Wrath** & **BCC** support - different auras/DRs/Cooldowns/Buffs per expansion diff --git a/Util.lua b/Util.lua index 2f8b94b..3599d39 100644 --- a/Util.lua +++ b/Util.lua @@ -1,6 +1,9 @@ local pairs, ipairs = pairs, ipairs +local select = select +local type = type local floor = math.floor -local str_find, str_gsub, str_sub, tinsert = string.find, string.gsub, string.sub, table.insert +local str_find, str_gsub, str_sub, str_format = string.find, string.gsub, string.sub, string.format +local tinsert = table.insert local Gladdy = LibStub("Gladdy") local L = Gladdy.L local AuraUtil = AuraUtil @@ -179,4 +182,80 @@ function Gladdy:GetArenaUnit(unitCaster, unify) end end end +end + +function Gladdy:ShallowCopy(table) + local copy + if type(table) == 'table' then + copy = {} + for k,v in pairs(table) do + copy[k] = v + end + else -- number, string, boolean, etc + copy = table + end + return copy +end + +function Gladdy:DeepCopy(table) + local copy + if type(table) == 'table' then + copy = {} + for k,v in pairs(table) do + if type(v) == 'table' then + copy[k] = self:DeepCopy(v) + else -- number, string, boolean, etc + copy[k] = v + end + end + else -- number, string, boolean, etc + copy = table + end + return copy +end + +function Gladdy:AddEntriesToTable(table, entries) + for k,v in pairs(entries) do + if not table[k] then + table[k] = v + end + end +end + +function Gladdy:GetExceptionSpellName(spellID) + for k,v in pairs(Gladdy.exceptionNames) do + if k == spellID and Gladdy:GetImportantAuras()[v] and Gladdy:GetImportantAuras()[v].altName then + return Gladdy:GetImportantAuras()[v].altName + end + end + return select(1, GetSpellInfo(spellID)) +end + +local function toHex(color) + if not color or not color.r or not color.g or not color.b then + return "000000" + end + return str_format("%.2x%.2x%.2x", floor(color.r * 255), floor(color.g * 255), floor(color.b * 255)) +end +function Gladdy:SetTextColor(text, color) + return "|cff" .. toHex(color) .. text or "" .. "|r" +end + +function Gladdy:ColorAsArray(color) + return {color.r, color.g, color.b, color.a} +end + +function Gladdy:Dump(table, space) + if type(table) ~= "table" then + return + end + if not space then + space = "" + end + for k,v in pairs(table) do + Gladdy:Print(space .. k .. " - ", v) + if type(v) == "table" then + Gladdy:Dump(v, space .. " ") + end + end end \ No newline at end of file