--- 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