Add totem ticker

This commit is contained in:
2024-11-18 00:19:38 +01:00
parent 0e28e39c2e
commit ad7e3e2ebb
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
--- CLEU:SPELL_SUMMON:UNIT_DIED TOTEM_TICK
function(event, name)
if event == "TOTEM_TICK" and name == aura_env.totem then
--print(aura_env.totem .. " Tick")
if aura_env.alive then
WeakAuras.timer:ScheduleTimer(WeakAuras.ScanEvents, 3, "TOTEM_TICK", aura_env.totem)
end
return true
end
--print(arg2, arg7, aura_env.totem)
if arg2 == "SPELL_SUMMON" and arg7 == aura_env.totem then
--print(aura_env.totem .. " Summoned")
WeakAuras.timer:ScheduleTimer(WeakAuras.ScanEvents, 3, "TOTEM_TICK", aura_env.totem)
aura_env.alive = true
return true
end
if arg2 == "UNIT_DIED" and arg7 == aura_env.totem then
--print(aura_env.totem .. " Died")
aura_env.alive = false
return false
end
return false
end

View File

@@ -0,0 +1,2 @@
aura_env.alive = false
aura_env.totem = aura_env.config.totem or "Tremor Totem"