Files
wow-weakauras/WeakAuras/Projects/DK Bone Shield Stacks.lua

26 lines
725 B
Lua

--COMBAT_LOG_EVENT_UNFILTERED
function(e, ...)
local se = select(2, ...)
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_REFRESH" or se == "SPELL_AURA_APPLIED_DOSE" or se == "SPELL_AURA_REMOVED" or se == "SPELL_AURA_REMOVED_DOSE" then
local name = select(13, ...)
local caster = select(5, ...)
if caster == UnitName("player") and name == "Bone Shield" then
aura_env.stacks = 0
for i = 1, 40 do
local spellID = select(11, UnitBuff("player", i))
if spellID == 195181 then
aura_env.stacks = select(4, UnitBuff("player", i))
return true
end
end
end
end
end
--Duration
function()
return aura_env.stacks, 10, 1
end
--INIT
aura_env.stacks = 0