Remove empty loc group special case

Some non-empty loc groups are also unreachable, so I think this was
quite deceptive - e.g. on some OSRS revisions, we'll probably never hit
100% of the keys even if we exclude empty loc groups.

We can include the empty loc flag in the list of missing keys on the
per-cache pages instead.

Signed-off-by: Graham <gpe@openrs2.org>
bzip2
Graham 4 years ago
parent aa7b59e4b9
commit e3e0094b43
  1. 2
      archive/src/main/resources/org/openrs2/archive/V1__init.sql
  2. 14
      archive/src/main/resources/org/openrs2/archive/templates/caches/index.html
  3. 2
      archive/src/main/resources/org/openrs2/archive/templates/caches/show.html

@ -175,7 +175,7 @@ SELECT
COUNT(*), COUNT(*),
COUNT(g.container_id), COUNT(g.container_id),
COUNT(*) FILTER (WHERE c.encrypted), COUNT(*) FILTER (WHERE c.encrypted),
COUNT(*) FILTER (WHERE c.key_id IS NOT NULL OR (c.empty_loc IS NOT NULL AND c.empty_loc)) COUNT(*) FILTER (WHERE c.key_id IS NOT NULL)
FROM master_index_valid_indexes v FROM master_index_valid_indexes v
JOIN index_groups ig ON ig.container_id = v.container_id JOIN index_groups ig ON ig.container_id = v.container_id
LEFT JOIN groups g ON g.archive_id = v.archive_id AND g.group_id = ig.group_id AND ( LEFT JOIN groups g ON g.archive_id = v.archive_id AND g.group_id = ig.group_id AND (

@ -18,7 +18,7 @@
<th>Name</th> <th>Name</th>
<th>Indexes</th> <th>Indexes</th>
<th>Groups</th> <th>Groups</th>
<th>Keys<sup><a href="#empty-locs">1</a></sup></th> <th>Keys</th>
<th>Links</th> <th>Links</th>
</tr> </tr>
</thead> </thead>
@ -62,18 +62,6 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<p>
<sup id="empty-locs">1</sup> Map squares in the middle of the
sea are unreachable by normal players, making it impossible to
obtain the keys for their loc groups. However, the loc groups
for these map squares are empty. As XTEA does not hide the
length of the compressed data, this service infers which
encrypted loc groups are empty and includes them in the number
of valid keys, regardless of whether the key is known or not.
After downloading a cache from this service, a cache editor may
be used to replace the empty encrypted loc groups with
unencrypted replacements.
</p>
</main> </main>
</body> </body>
</html> </html>

@ -46,7 +46,7 @@
</td> </td>
</tr> </tr>
<tr class="thead-dark"> <tr class="thead-dark">
<th>Keys<sup><a href="/caches#empty-locs">1</a></sup></th> <th>Keys</th>
<td th:class="${cache.groupStats}? (${cache.groupStats.allKeysValid}? 'table-success' : 'table-warning')" <td th:class="${cache.groupStats}? (${cache.groupStats.allKeysValid}? 'table-success' : 'table-warning')"
th:text="${cache.groupStats}? ${#numbers.formatInteger(cache.groupStats.validKeys, 1, 'COMMA')} + ' / ' + ${#numbers.formatInteger(cache.groupStats.keys, 1, 'COMMA')} + ' (' + ${#numbers.formatPercent(cache.groupStats.validKeysFraction, 1, 2)} + ')' : 'Calculating...'"> th:text="${cache.groupStats}? ${#numbers.formatInteger(cache.groupStats.validKeys, 1, 'COMMA')} + ' / ' + ${#numbers.formatInteger(cache.groupStats.keys, 1, 'COMMA')} + ' (' + ${#numbers.formatPercent(cache.groupStats.validKeysFraction, 1, 2)} + ')' : 'Calculating...'">
Calculating... Calculating...

Loading…
Cancel
Save