end |
end |
elseif event == "SPELL_PERIODIC_DAMAGE" and (sguid == UnitGUID("player")) then |
if type(CompactBars.db.profile.spells[spellid.."Dots"].ticktimer) == "string" then |
CompactBars.db.profile.spells[spellid.."Dots"].ticktimer = tostring(timestamp - tonumber(CompactBars.db.profile.spells[spellid.."Dots"].ticktimer)) |
local bcomma, acomma = string.match(tostring(CompactBars.db.profile.spells[spellid.."Dots"].ticktimer), "(%d)\.(%d)") |
if acomma then |
if tonumber(acomma) <= 4 then |
CompactBars.db.profile.spells[spellid.."Dots"].ticktimer = tonumber(bcomma) |
else |
CompactBars.db.profile.spells[spellid.."Dots"].ticktimer = tonumber(bcomma) + 1 |
if CompactBars.db.profile.spells[spellid.."Dots"] then |
if type(CompactBars.db.profile.spells[spellid.."Dots"].ticktimer) == "string" then |
CompactBars.db.profile.spells[spellid.."Dots"].ticktimer = tostring(timestamp - tonumber(CompactBars.db.profile.spells[spellid.."Dots"].ticktimer)) |
local bcomma, acomma = string.match(tostring(CompactBars.db.profile.spells[spellid.."Dots"].ticktimer), "(%d)\.(%d)") |
if acomma then |
if tonumber(acomma) <= 4 then |
CompactBars.db.profile.spells[spellid.."Dots"].ticktimer = tonumber(bcomma) |
else |
CompactBars.db.profile.spells[spellid.."Dots"].ticktimer = tonumber(bcomma) + 1 |
end |
end |
end |
else |
-- reset the timer to the maximum |
local bars = CompactBars.sb:GetBars() |
if bars and #bars ~= 0 then |
for _, bar in pairs(bars) do |
if bar and bar.data and bar.data.dguid == dguid and bar.data.spellid == spellid then |
if bar.ticker then |
bar.ticker.time = bar.ticker.maxtime |
break |
else |
-- reset the timer to the maximum |
local bars = CompactBars.sb:GetBars() |
if bars and #bars ~= 0 then |
for _, bar in pairs(bars) do |
if bar and bar.data and bar.data.dguid == dguid and bar.data.spellid == spellid then |
if bar.ticker then |
bar.ticker.time = bar.ticker.maxtime |
break |
end |
end |
end |
end |
end |
end |
|
end |
if info then |
deepDel(info) |