34 lines
1022 B
Lua
34 lines
1022 B
Lua
--NAME_PLATE_UNIT_REMOVED NAME_PLATE_UNIT_ADDED ADD_KOS
|
|
function(e, u)
|
|
if e == "NAME_PLATE_UNIT_ADDED" then
|
|
if WeakAurasSaved.CustomTrash.KoSList[UnitName(u)] == 1 then
|
|
aura_env.koslist[UnitName(u)] = 1
|
|
return true
|
|
end
|
|
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
|
if WeakAurasSaved.CustomTrash.KoSList[UnitName(u)] == 1 and aura_env.koslist[UnitName(u)] == 1 then
|
|
aura_env.koslist[UnitName(u)] = nil
|
|
return true
|
|
end
|
|
elseif e == "ADD_KOS" then
|
|
if not WeakAurasSaved.CustomTrash.KoSList[u] and u then
|
|
WeakAurasSaved.CustomTrash.KoSList[u] = 1
|
|
end
|
|
end
|
|
end
|
|
|
|
--DISPLAY
|
|
function()
|
|
local output = ""
|
|
for k, v in pairs(aura_env.koslist) do
|
|
if v == 1 then
|
|
output = output .. k .. "\n"
|
|
end
|
|
end
|
|
return output
|
|
end
|
|
|
|
--INIT
|
|
aura_env.koslist = {}
|
|
if not WeakAurasSaved.CustomTrash.KoSList then WeakAurasSaved.CustomTrash.KoSList = {} end
|