Add new code snippets

This commit is contained in:
2024-03-03 13:50:12 +01:00
commit 01b612a50b
409 changed files with 65292 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
--CLEU PLAYER_TARGET_CHANGED
function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
if (select(2, ...) == "SPELL_AURA_APPLIED" or select(2, ...) == "SPELL_AURA_REFRESH" or select(2, ...) == "SPELL_PERIODIC_DAMAGE") and select(5, ...) == UnitName("player") and select(13, ...) == "Ignite" then
return true
end
elseif e == "PLAYER_TARGET_CHANGED" then
return true
end
end
--DISPLAY
function()
local function UnitDebuffC(unit, spell)
for i = 1, 40 do
local name = UnitDebuff(unit, i, PLAYER)
if name then
if name == spell then
return UnitDebuff(unit, i, PLAYER)
end
else
return nil
end
end
end
local thing = select(16, UnitDebuffC("target", "Ignite"))
if thing then return thing else return 0 end
end