From 9ce0bbc32a37864aff5ad8ff172054af1269bb1a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 04:47:12 +0200 Subject: [PATCH 01/29] DRList-1.0 update --- Libs/DRList-1.0/DRList-1.0.lua | 2 +- Libs/DRList-1.0/Spells.lua | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) 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) From 128f32f57f7d576867e6b670cc7503c42c63eea8 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 05:07:40 +0200 Subject: [PATCH 02/29] reset pet portrait texture + pet DEAD text disabled --- Modules/Pets.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) From 391e149b6de0667ed7e6ac6a08a26799baaaa331 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 05:37:44 +0200 Subject: [PATCH 03/29] totemplates --- Constants_BCC.lua | 298 +----------------------------------- Constants_Wrath.lua | 286 +--------------------------------- Constants_shared.lua | 330 ++++++++++++++++++++++++++++++++++++++++ Gladdy_BCC.toc | 2 +- Gladdy_Wrath.toc | 2 +- Modules/TotemPlates.lua | 16 +- Util.lua | 49 ++++++ 7 files changed, 407 insertions(+), 576 deletions(-) diff --git a/Constants_BCC.lua b/Constants_BCC.lua index bdfa87e..7fcbc4a 100644 --- a/Constants_BCC.lua +++ b/Constants_BCC.lua @@ -1121,333 +1121,45 @@ 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 } 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..68169b5 100644 --- a/Constants_Wrath.lua +++ b/Constants_Wrath.lua @@ -1067,211 +1067,27 @@ 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 +1098,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..a0ebcfb 100644 --- a/Constants_shared.lua +++ b/Constants_shared.lua @@ -292,4 +292,334 @@ 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 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 + [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 + [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/Gladdy_BCC.toc b/Gladdy_BCC.toc index aafb2b6..a55ee64 100644 --- a/Gladdy_BCC.toc +++ b/Gladdy_BCC.toc @@ -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..4fb786e 100644 --- a/Gladdy_Wrath.toc +++ b/Gladdy_Wrath.toc @@ -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/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/Util.lua b/Util.lua index 2f8b94b..cc80e47 100644 --- a/Util.lua +++ b/Util.lua @@ -1,4 +1,6 @@ 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 Gladdy = LibStub("Gladdy") @@ -179,4 +181,51 @@ 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 \ No newline at end of file From bc40bbce0a0024f6a2c071e3ce6d1924193ca072 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 05:37:54 +0200 Subject: [PATCH 04/29] spec detection --- Constants_Wrath.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua index 68169b5..a8f1f02 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 From 9d03fa5ff36fbf1c4e9597b5a55903492bcc39a0 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 05:38:12 +0200 Subject: [PATCH 05/29] fix paladin spec detection --- EventListener.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventListener.lua b/EventListener.lua index 3e4cace..d195108 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -362,7 +362,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"]}) From 5f5b0841fcedd5b97faf027e9ea6fb9b3250ff8b Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 05:38:25 +0200 Subject: [PATCH 06/29] exeption spellnames --- Constants_BCC.lua | 2 +- Constants_shared.lua | 25 +++++++++++++++++++++++++ EventListener.lua | 38 ++++++++++++++++---------------------- Modules/Auras.lua | 18 ++---------------- 4 files changed, 44 insertions(+), 39 deletions(-) diff --git a/Constants_BCC.lua b/Constants_BCC.lua index 7fcbc4a..363c5e0 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, diff --git a/Constants_shared.lua b/Constants_shared.lua index a0ebcfb..d0f1c77 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 } diff --git a/EventListener.lua b/EventListener.lua index d195108..4df9719 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -77,6 +77,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,6 +113,9 @@ 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 @@ -226,25 +234,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 @@ -288,6 +277,10 @@ function EventListener:UNIT_AURA(unit, isFullUpdate, updatedAuras) 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,9 +298,6 @@ 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:SendMessage("AURA_GAIN", unit, auraType, spellID, spellName, texture, duration, expirationTime, count, dispelType, i, unitCaster) end end @@ -338,6 +328,10 @@ 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 self:DetectSpec(unit, Gladdy.specSpells[spellName]) diff --git a/Modules/Auras.lua b/Modules/Auras.lua index da9ede8..7261642 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -596,10 +596,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 @@ -1242,14 +1238,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 +1311,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 = { From 8442bfd1dfaf988e3c97b93be70c26ac33d7fcae Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 06:00:25 +0200 Subject: [PATCH 07/29] cooldown constants exception names --- Constants_Wrath.lua | 6 +++--- Modules/Cooldowns.lua | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua index a8f1f02..bc209d6 100644 --- a/Constants_Wrath.lua +++ b/Constants_Wrath.lua @@ -788,7 +788,7 @@ 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 @@ -849,7 +849,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 }, @@ -893,7 +893,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 = { diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 21de6ab..79cd911 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -85,8 +85,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 From 51143988be2b270fb209fb0567fc8b16b1e3c73c Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 06:00:40 +0200 Subject: [PATCH 08/29] cooldown glow fix --- EventListener.lua | 19 +++++++++++++++++-- Modules/Cooldowns.lua | 13 ++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 4df9719..1cbc399 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -118,12 +118,16 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() end if destUnit then -- cooldown - if (Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName]) then + if (srcUnit and 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 - Cooldowns:AURA_FADE(destUnit, spellID) + if unit then + Gladdy:Debug("INFO", "EL:CL:SPELL_AURA_REMOVED (destUnit)", "Cooldowns:AURA_FADE", unit, spellId) + Cooldowns:AURA_FADE(unit, spellId) + end end -- diminish tracker if Gladdy.buttons[destUnit] and Gladdy.db.drEnabled and extraSpellId == AURA_TYPE_DEBUFF then @@ -190,6 +194,17 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() 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 diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 79cd911..2fd54e5 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 @@ -373,6 +374,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 @@ -419,7 +423,7 @@ function Cooldowns:AURA_GAIN(_, auraType, spellID, spellName, _, duration, _, _, 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) + icon.timer = C_Timer.NewTimer(duration, function() LCG.ButtonGlow_Stop(icon) end) end end end @@ -432,6 +436,10 @@ function Cooldowns:AURA_FADE(unit, spellID) local cooldownFrame = Gladdy.buttons[unit].spellCooldownFrame for _,icon in pairs(cooldownFrame.icons) do if (icon.spellId == spellID) then + Gladdy:Debug("INFO", "Cooldowns:AURA_FADE", "LCG.ButtonGlow_Stop") + if icon.timer then + icon.timer:Cancel() + end LCG.ButtonGlow_Stop(icon) end end @@ -492,6 +500,9 @@ local function resetIcon(icon) icon.cooldown:Hide() icon.cooldownFont:SetText("") icon:SetScript("OnUpdate", nil) + if icon.timer then + icon.timer:Cancel() + end --LCG.ButtonGlow_Stop(icon) end From 6161fcc7e3bcf16e2cacee4e27fbd6d3c46e95bf Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 06:00:53 +0200 Subject: [PATCH 09/29] do not trigger cooldown again if active and timeleft > threshold --- Modules/Cooldowns.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 2fd54e5..de51655 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -456,6 +456,9 @@ function Cooldowns:CooldownStart(button, spellId, duration, start) end for _,icon in pairs(button.spellCooldownFrame.icons) do if (icon.spellId == spellId) then + if not start and icon.active and icon.timeLeft > Gladdy:GetCooldownList()[button.class][spellId].cd/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 @@ -465,7 +468,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) @@ -484,6 +486,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 @@ -617,7 +620,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 From b714c065f6dfc6a733c985c4a1cc5fda1e7e36be Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 06:01:36 +0200 Subject: [PATCH 10/29] cooldown tracking extended --- EventListener.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 1cbc399..6a0052b 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -146,6 +146,8 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if (Gladdy.buttons[destUnit] and eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then if not Gladdy:isFeignDeath(destUnit) then Gladdy:SendMessage("UNIT_DEATH", destUnit) + else + Cooldowns:CooldownUsed(destUnit, Gladdy.buttons[destUnit].class, 5384) end end -- spec detection @@ -177,14 +179,14 @@ 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) + Gladdy:Debug("INFO", eventType, "- CooldownUsed", srcUnit, "spellID:", spellID) Cooldowns:CooldownUsed(srcUnit, unitClass, spellId) end end From 709cc7fd86e0bc3b4015cb699bb0a1d2157a93ca Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 06:02:00 +0200 Subject: [PATCH 11/29] aura tracking per unit --- EventListener.lua | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 6a0052b..f831442 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() @@ -281,6 +285,13 @@ 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 for i = 1, 2 do if not Gladdy.buttons[unit].class or not Gladdy.buttons[unit].race then Gladdy:SpotEnemy(unit, false) @@ -318,6 +329,31 @@ function EventListener:UNIT_AURA(unit, isFullUpdate, updatedAuras) 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) + 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) From e45118484ba0d69bc916ef4bf699689eba537979 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 06:02:18 +0200 Subject: [PATCH 12/29] exeption names for auras --- Constants_Wrath.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua index bc209d6..9eb7ca2 100644 --- a/Constants_Wrath.lua +++ b/Constants_Wrath.lua @@ -490,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, @@ -615,7 +615,7 @@ local importantAuras = { priority = 9, spellID = 6346, }, - [GetSpellInfo(50334)] = {-- Berserk + [GetSpellInfo(50334) .. "Feral"] = {-- Berserk track = AURA_TYPE_BUFF, priority = 20, spellID = 50334, @@ -679,6 +679,16 @@ 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 From 048fbb55e771e46dd53c8e41de6832c093cd1c85 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 06:07:59 +0200 Subject: [PATCH 13/29] cleanup --- Modules/Auras.lua | 2 -- Modules/Cooldowns.lua | 14 ++------------ Modules/Diminishings.lua | 1 - Modules/Healthbar.lua | 1 - Modules/RangeCheck.lua | 2 -- Modules/ShadowsightTimer.lua | 3 --- 6 files changed, 2 insertions(+), 21 deletions(-) diff --git a/Modules/Auras.lua b/Modules/Auras.lua index 7261642..fea6135 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -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 diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index de51655..72781b9 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -115,7 +115,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) @@ -126,7 +125,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) @@ -264,7 +263,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) @@ -359,7 +357,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) @@ -403,10 +401,6 @@ 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 @@ -450,7 +444,6 @@ end --------------------- function Cooldowns:CooldownStart(button, spellId, duration, start) - -- starts timer frame if not duration or duration == nil or type(duration) ~= "number" then return end @@ -526,13 +519,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 @@ -545,7 +536,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 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/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 From 70acab71e91aba88ce1b04f45fbad849d988b64b Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 06:29:17 +0200 Subject: [PATCH 14/29] fix mana spring totem --- Constants_BCC.lua | 9 +++++++++ Constants_Wrath.lua | 6 ------ Constants_shared.lua | 9 --------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Constants_BCC.lua b/Constants_BCC.lua index 363c5e0..9ade501 100644 --- a/Constants_BCC.lua +++ b/Constants_BCC.lua @@ -1133,6 +1133,15 @@ local totemData = { local totemSpellIdToPulse = { [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("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 + [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 = { diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua index 9eb7ca2..29856cd 100644 --- a/Constants_Wrath.lua +++ b/Constants_Wrath.lua @@ -1091,12 +1091,6 @@ local totemData = { local totemSpellIdToPulse = { [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("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 } local totemNpcIdsToTotemData = { diff --git a/Constants_shared.lua b/Constants_shared.lua index d0f1c77..57cb2bd 100644 --- a/Constants_shared.lua +++ b/Constants_shared.lua @@ -386,15 +386,6 @@ local totemSpellIdToPulse = { [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 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 - [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 [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, From f29985a06eafed7fe314c76b26b61455bed32625 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 07:08:14 +0200 Subject: [PATCH 15/29] fix cooldown trigger twice --- Modules/Cooldowns.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 72781b9..deb541b 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -447,9 +447,17 @@ function Cooldowns:CooldownStart(button, spellId, duration, start) 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 > Gladdy:GetCooldownList()[button.class][spellId].cd/2 then + if not start and icon.active and icon.timeLeft > cooldown/2 then return -- do not trigger cooldown again end icon.active = true From 045d7349453ee3e0c93662a42563398e4798a044 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 07:08:48 +0200 Subject: [PATCH 16/29] go around wierd arenapet bug with hunter --- EventListener.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index f831442..305c813 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -386,7 +386,7 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(...) 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 @@ -397,7 +397,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 From 342be5dcd041f4678d69fa93ce1b82d5dcad1a79 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 17:28:04 +0200 Subject: [PATCH 17/29] mana spring totem fix --- Constants_BCC.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Constants_BCC.lua b/Constants_BCC.lua index 9ade501..e6937d7 100644 --- a/Constants_BCC.lua +++ b/Constants_BCC.lua @@ -1123,6 +1123,7 @@ local totemData = { -- Fire -- Water [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("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, -- Earth -- Air [string_lower("Grace of Air Totem")] = {id = 8835,texture = select(3, GetSpellInfo(8835)), color = {r = 0, g = 0, b = 0, a = 1}}, From 39d730116fd73df815113b9d8e2ed8916a8b4a81 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 20:00:12 +0200 Subject: [PATCH 18/29] elemental mastery + Presence of Mind start CD when buff fades --- EventListener.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 305c813..fc9e029 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -189,14 +189,14 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() else unitClass = Gladdy.buttons[srcUnit].race end - if spellID ~= 16188 and spellID ~= 17116 then -- Nature's Swiftness CD starts when buff fades + if spellID ~= 16188 and spellID ~= 17116 and spellID ~= 16166 and spellID ~= 12043 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 From fe1b613aac323583a138a2ee93dae0861b8babe4 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 20:01:25 +0200 Subject: [PATCH 19/29] add typhoon to balance druid CDs --- Constants_Wrath.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua index 29856cd..1d09dcc 100644 --- a/Constants_Wrath.lua +++ b/Constants_Wrath.lua @@ -587,7 +587,7 @@ local importantAuras = { }, [GetSpellInfo(54428)] = { -- Divine Plea track = AURA_TYPE_BUFF, - priority = 20, + priority = 15, spellID = 54428, }, [GetSpellInfo(31821)] = { -- Aura mastery @@ -802,6 +802,7 @@ local cooldownList = { [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 From 88959d988c81e76a09a070a892c35c2a409a1fd2 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 20:01:43 +0200 Subject: [PATCH 20/29] correct wyvern sting CD --- Constants_BCC.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Constants_BCC.lua b/Constants_BCC.lua index e6937d7..008d0f3 100644 --- a/Constants_BCC.lua +++ b/Constants_BCC.lua @@ -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 From 4b5ec6767f99d66f3a3e5578e34d14a272e527d2 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 7 Aug 2022 20:02:55 +0200 Subject: [PATCH 21/29] fix shadowsight aura type --- Constants_BCC.lua | 4 ++-- Constants_Wrath.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Constants_BCC.lua b/Constants_BCC.lua index 008d0f3..e34756c 100644 --- a/Constants_BCC.lua +++ b/Constants_BCC.lua @@ -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, }, diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua index 1d09dcc..ea3893a 100644 --- a/Constants_Wrath.lua +++ b/Constants_Wrath.lua @@ -692,9 +692,9 @@ local importantAuras = { --- Alt Stuff [GetSpellInfo(34709)] = { -- Shadowsight Buff - track = AURA_TYPE_BUFF, + track = AURA_TYPE_DEBUFF, duration = 15, - priority = 15, + priority = 9, magic = true, spellID = 34709, }, From 9c4eed673f956f8359daee932b25d49c1e49eaf8 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 17 Aug 2022 14:10:24 +0200 Subject: [PATCH 22/29] add Bladestorm and fix Berserking --- Constants_Wrath.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua index ea3893a..3fca03b 100644 --- a/Constants_Wrath.lua +++ b/Constants_Wrath.lua @@ -91,7 +91,7 @@ local specBuffs = { -- DRUID [GetSpellInfo(24932)] = L["Feral"], -- Leader of the Pack [GetSpellInfo(16975)] = L["Feral"], -- Predatory Strikes - [GetSpellInfo(50334) .. "Feral"] = 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 @@ -176,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) .. "Feral"] = 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 @@ -615,11 +615,16 @@ local importantAuras = { priority = 9, spellID = 6346, }, - [GetSpellInfo(50334) .. "Feral"] = {-- 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 From d385692cdcb7399e794003807c61bd6f19cbdcac Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 17 Aug 2022 14:19:35 +0200 Subject: [PATCH 23/29] fix LibCustomGlow-1.0 --- Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 From 8e97bb32c69bc476f99002700f1c5170bfe3218f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 17 Aug 2022 14:22:05 +0200 Subject: [PATCH 24/29] cooldown change to PixelGlow --- Modules/Cooldowns.lua | 101 +++++++++++++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 26 deletions(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index deb541b..8bb398c 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -60,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, @@ -153,6 +154,9 @@ function Cooldowns:CreateIcon() 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 @@ -165,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) @@ -212,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) @@ -337,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() @@ -345,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 @@ -357,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) + Cooldowns:AURA_GAIN(_, AURA_TYPE_BUFF, 22812, "Barkskin", _, 20, _, _, _, _, unit, true) end function Cooldowns:UpdateTestCooldowns(unit) @@ -403,7 +416,7 @@ end 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 @@ -415,16 +428,21 @@ 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) - icon.timer = 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 @@ -434,7 +452,7 @@ function Cooldowns:AURA_FADE(unit, spellID) if icon.timer then icon.timer:Cancel() end - LCG.ButtonGlow_Stop(icon) + LCG.PixelGlow_Stop(icon.glow) end end end @@ -507,7 +525,7 @@ local function resetIcon(icon) if icon.timer then icon.timer:Cancel() end - --LCG.ButtonGlow_Stop(icon) + LCG.PixelGlow_Stop(icon.glow) end function Cooldowns:CooldownReady(button, spellId, frame) @@ -739,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({ @@ -757,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, @@ -766,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({ @@ -780,7 +791,7 @@ function Cooldowns:GetOptions() min = 0, max = 1, step = 0.1, - order = 9, + order = 12, width = "full", }), cooldownCooldownNumberAlpha = { @@ -789,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 @@ -801,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", @@ -841,7 +890,7 @@ function Cooldowns:GetOptions() position = { type = "group", name = L["Position"], - order = 5, + order = 6, args = { header = { type = "header", @@ -905,7 +954,7 @@ function Cooldowns:GetOptions() border = { type = "group", name = L["Border"], - order = 4, + order = 5, args = { header = { type = "header", @@ -930,7 +979,7 @@ function Cooldowns:GetOptions() frameStrata = { type = "group", name = L["Frame Strata and Level"], - order = 6, + order = 7, args = { headerAuraLevel = { type = "header", From a4ee8219a6be0d977777e3ed633afac36f6ad851 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 17 Aug 2022 14:22:34 +0200 Subject: [PATCH 25/29] cooldown tracking, aura handling + feign death cd tracking improved --- EventListener.lua | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index fc9e029..d280e99 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -61,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)) @@ -121,18 +120,6 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() spellName = Gladdy.exceptionNames[spellID] end if destUnit then - -- cooldown - if (srcUnit and 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 (destUnit)", "Cooldowns:AURA_FADE", unit, spellId) - Cooldowns:AURA_FADE(unit, spellId) - end - end -- diminish tracker if Gladdy.buttons[destUnit] and Gladdy.db.drEnabled and extraSpellId == AURA_TYPE_DEBUFF then if (eventType == "SPELL_AURA_REMOVED") then @@ -150,8 +137,6 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if (Gladdy.buttons[destUnit] and eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then if not Gladdy:isFeignDeath(destUnit) then Gladdy:SendMessage("UNIT_DEATH", destUnit) - else - Cooldowns:CooldownUsed(destUnit, Gladdy.buttons[destUnit].class, 5384) end end -- spec detection @@ -174,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 @@ -189,7 +173,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() else unitClass = Gladdy.buttons[srcUnit].race end - if spellID ~= 16188 and spellID ~= 17116 and spellID ~= 16166 and spellID ~= 12043 then -- Nature's Swiftness CD starts when buff fades + 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 @@ -207,7 +191,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() spellId = spellID end if unit then - Gladdy:Debug("INFO", "EL:CL:SPELL_AURA_REMOVED (srcUnit)", "Cooldowns:AURA_FADE", unit, spellId) + --Gladdy:Debug("INFO", "EL:CL:SPELL_AURA_REMOVED (srcUnit)", "Cooldowns:AURA_FADE", unit, spellId) Cooldowns:AURA_FADE(unit, spellId) end end @@ -225,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) @@ -236,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 @@ -292,13 +278,15 @@ function EventListener:UNIT_AURA(unit, isFullUpdate, updatedAuras) 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 @@ -326,6 +314,7 @@ 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 + 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 @@ -337,8 +326,11 @@ function EventListener:UNIT_AURA(unit, isFullUpdate, updatedAuras) 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) + --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 From ed0b601467908472d7b118b64a96d0815cd2f6ea Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 17 Aug 2022 14:22:52 +0200 Subject: [PATCH 26/29] add default button atrribute --- Frame.lua | 2 ++ 1 file changed, 2 insertions(+) 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() From afd5647807b071633a3c0f933155c638d39d5a67 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 17 Aug 2022 14:23:28 +0200 Subject: [PATCH 27/29] add force hide aura when timer runs out even in stealth --- Modules/Auras.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Auras.lua b/Modules/Auras.lua index fea6135..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("") @@ -633,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 From 8b766c23d283865bbd893b4824860453554cb6d9 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 17 Aug 2022 14:24:09 +0200 Subject: [PATCH 28/29] Util - color array - rgb to hexcolor - dump table --- Util.lua | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Util.lua b/Util.lua index cc80e47..3599d39 100644 --- a/Util.lua +++ b/Util.lua @@ -2,7 +2,8 @@ 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 @@ -228,4 +229,33 @@ function Gladdy:GetExceptionSpellName(spellID) 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 From 971016e2497f7246f0704dd32af1c37d38cd9512 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 17 Aug 2022 14:32:04 +0200 Subject: [PATCH 29/29] v2.20-Release + Readme + Changelog --- Gladdy.lua | 4 ++-- Gladdy.toc | 2 +- Gladdy_BCC.toc | 2 +- Gladdy_Wrath.toc | 2 +- README.md | 20 +++++++++++++++++++- 5 files changed, 24 insertions(+), 6 deletions(-) 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 a55ee64..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 diff --git a/Gladdy_Wrath.toc b/Gladdy_Wrath.toc index 4fb786e..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 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