33 lines
714 B
Lua
33 lines
714 B
Lua
--UNIT_AURA
|
|
function(_,unit)
|
|
if UnitGroupRolesAssigned(unit) == "TANK" and UnitName(unit) ~= UnitName("player") then
|
|
local tank = UnitDetailedThreatSituation(unit, "boss1")
|
|
if not tank then
|
|
for k,v in pairs(aura_env.debuffs) do
|
|
if aura_env.UnitDebuffC(k, unit) then
|
|
return true
|
|
end
|
|
end
|
|
else
|
|
return false
|
|
end
|
|
end
|
|
end
|
|
|
|
--INIT
|
|
aura_env.debuffs =
|
|
{
|
|
["Sacred Blade"] = 1
|
|
}
|
|
aura_env.UnitDebuffC = function(spell, unit)
|
|
for i = 1, 40 do
|
|
local name = UnitDebuff(unit, i)
|
|
if name then
|
|
if name == spell then
|
|
return UnitDebuff(unit, i)
|
|
end
|
|
else
|
|
return nil
|
|
end
|
|
end
|
|
end |