Files
wow-weakauras/NewAge/NameplateInfo/Hostility.lua
2025-05-16 10:02:52 +02:00

20 lines
601 B
Lua

--- NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(allstates, e, ...)
---@cast allstates allstates
print("Starting to process nameplates for hostility...")
for i = 1, 40 do
local unit = "nameplate" .. i
local hostile = UnitCanAttack("player", unit)
allstates[unit] = {
show = true,
changed = true,
resort = true,
hostile = hostile,
}
print("Processed nameplate " .. i .. " hostility: " .. tostring(hostile))
end
print("Finished processing nameplates for hostility.")
return true
end