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,30 @@
--EVERY FRAME
function()
local focusmax = UnitPowerMax("player")
local time = GetTime()
local star, dur = GetSpellCooldown(61304)
local regen = GetPowerRegen()
if dur > 0 and aura_env.spell == "Arcane Shot" then
aura_env.newfocus = aura_env.focus + dur * regen + 8
end
if dur > 0 and aura_env.spell ~= "Arcane Shot" then
aura_env.newfocus = aura_env.focus + dur * regen
end
return aura_env.newfocus, focusmax, 1
end
--COMBAT_LOG_EVENT_UNFILTERED
function(...)
local se = select(3, ...)
if se == "SPELL_CAST_SUCCESS" then
local caster = select(6, ...)
aura_env.spell = select(14, ...)
if caster == UnitName("player") then
aura_env.focus = UnitPower("player")
end
end
end
--INIT
aura_env.focus = 0
aura_env.newfocus = 0