exeption spellnames

This commit is contained in:
Sumsebrum 2022-08-07 05:38:25 +02:00
parent 9d03fa5ff3
commit 5f5b0841fc
4 changed files with 44 additions and 39 deletions

View File

@ -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,

View File

@ -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 }

View File

@ -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])

View File

@ -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 = {