buffs debuffs updated testmode - only show auras that are enabled
This commit is contained in:
parent
755a3e52b5
commit
23b9e2dfae
@ -1,7 +1,7 @@
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
local select, lower, ceil, tremove, tinsert, pairs, ipairs, tostring = select, string.lower, ceil, tremove, tinsert, pairs, ipairs, tostring
|
local select, lower, ceil, tremove, tinsert, pairs, ipairs, tostring, random = select, string.lower, ceil, tremove, tinsert, pairs, ipairs, tostring, math.random
|
||||||
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
local auraTypes = {AURA_TYPE_BUFF, AURA_TYPE_DEBUFF}
|
local auraTypes = {AURA_TYPE_BUFF, AURA_TYPE_DEBUFF}
|
||||||
|
|
||||||
@ -134,28 +134,30 @@ end
|
|||||||
|
|
||||||
function BuffsDebuffs:Test(unit)
|
function BuffsDebuffs:Test(unit)
|
||||||
if Gladdy.db.buffsEnabled then
|
if Gladdy.db.buffsEnabled then
|
||||||
if unit == "arena1" or unit == "arena3" then
|
local spellSchools = { "physical", "magic", "curse", "poison", "disease", "immune" }
|
||||||
|
|
||||||
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
|
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 1943, AURA_TYPE_DEBUFF, 12, 12, 1, "physical", select(3, GetSpellInfo(1943)), 1)
|
local i = 1
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 18647, AURA_TYPE_DEBUFF, 10, 10, 1, "immune", select(3, GetSpellInfo(18647)), 2)
|
for spellID, enabled in pairs(Gladdy.db.trackedDebuffs) do
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 27218, AURA_TYPE_DEBUFF, 9, 9, 1, "curse", select(3, GetSpellInfo(27218)), 3)
|
if i > 4 then
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 27216, AURA_TYPE_DEBUFF, 9, 9, 1, "magic", select(3, GetSpellInfo(27216)), 4)
|
break
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 27189, AURA_TYPE_DEBUFF, 9, 9, 5, "poison", select(3, GetSpellInfo(27189)), 5)
|
end
|
||||||
|
if enabled then
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 33076, AURA_TYPE_BUFF, 15, 15, 1, "magic", select(3, GetSpellInfo(33076)), 1)
|
BuffsDebuffs:AddOrRefreshAura(unit, spellID, AURA_TYPE_DEBUFF, 15, 15, random(1,5), spellSchools[random(1,6)], select(3, GetSpellInfo(spellID)), i)
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 26980, AURA_TYPE_BUFF, 12, 12, 5, "magic", select(3, GetSpellInfo(26980)), 2)
|
i = i + 1
|
||||||
else
|
end
|
||||||
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
end
|
||||||
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
i = 1
|
||||||
|
for spellID, enabled in pairs(Gladdy.db.trackedBuffs) do
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 12, 12, 1, "poison", select(3, GetSpellInfo(1943)), 1)
|
if i > 4 then
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 10, 10, 2, "magic", select(3, GetSpellInfo(1)), 2)
|
break
|
||||||
|
end
|
||||||
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_BUFF, 28093, select(1, GetSpellInfo(28093)), select(3, GetSpellInfo(28093)), 10, GetTime() + 10, 1, "physical")
|
if enabled then
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 5, AURA_TYPE_DEBUFF, 12, 12, 3, "physical", select(3, GetSpellInfo(27009)), 1)
|
BuffsDebuffs:AddOrRefreshAura(unit, spellID, AURA_TYPE_BUFF, 15, 15, random(1,5), spellSchools[random(1,6)], select(3, GetSpellInfo(spellID)), i)
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 5, AURA_TYPE_DEBUFF, 11, 11, 4, "disease", select(3, GetSpellInfo(11426)), 2)
|
i = i + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user