Files
wow-weakauras/WeakAuras/Projects/ByExp/BFA/Anna Arrow.lua

27 lines
649 B
Lua

--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(e, unit)
if e == "NAME_PLATE_UNIT_ADDED" then
if aura_env.altlist[UnitName(unit)] then
local plate = C_NamePlate.GetNamePlateForUnit(unit)
if plate then
aura_env.region:SetAnchor("CENTER", plate, "CENTER")
aura_env.region:SetOffset(0, 50)
aura_env.region:Color(1, 1, 1, 1)
return true
end
end
elseif e == "NAME_PLATE_UNIT_REMOVED" then
if aura_env.altlist[UnitName(unit)] then
aura_env.region:ClearAllPoints()
aura_env.region:Color(1, 1, 1, 0)
return false
end
end
end
--INIT
aura_env.altlist =
{
["Elna"] = 1,
["Melna"] = 1,
}