Files
wow-weakauras/Complete Projects/BFA/Kindling.lua

24 lines
860 B
Lua

--CLEU SPELL_UPDATE_COOLDOWN
function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
if select(2, ...) == "SPELL_DAMAGE" and select(5, ...) == UnitName("player") and (select(13, ...) == "Fireball" or select(13, ...) == "Fire Blast" or select(13, ...) == "Pyroblast") and select(21, ...) == true and GetSpellCooldown("Combustion") > 0 then
if not aura_env.cd then aura_env.cd = 0 end
aura_env.cd = aura_env.cd + 1
return true
end
if select(2, ...) == "SPELL_CAST_SUCCESS" and select(5, ...) == UnitName("player") and select(13, ...) == "Combustion" then
aura_env.cd = 0
end
elseif e == "SPELL_UPDATE_COOLDOWN" then return true
end
end
--DISPLAY
function()
if not aura_env.cd then aura_env.cd = 0 end
if GetSpellCooldown("Combustion") > 0 then
return "|cfffd477b" .. aura_env.cd
else
return "|cff78cb00" .. aura_env.cd
end
end