From e3e0094b43e39cccf69e55895b7b75c5d533226e Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 20 Feb 2021 00:05:47 +0000 Subject: [PATCH] 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 --- .../resources/org/openrs2/archive/V1__init.sql | 2 +- .../openrs2/archive/templates/caches/index.html | 14 +------------- .../org/openrs2/archive/templates/caches/show.html | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/archive/src/main/resources/org/openrs2/archive/V1__init.sql b/archive/src/main/resources/org/openrs2/archive/V1__init.sql index fdaa2ad1..7596edab 100644 --- a/archive/src/main/resources/org/openrs2/archive/V1__init.sql +++ b/archive/src/main/resources/org/openrs2/archive/V1__init.sql @@ -175,7 +175,7 @@ SELECT COUNT(*), COUNT(g.container_id), 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 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 ( diff --git a/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html b/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html index bd63ea56..7c03f445 100644 --- a/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html +++ b/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html @@ -18,7 +18,7 @@ Name Indexes Groups - Keys1 + Keys Links @@ -62,18 +62,6 @@ -

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

diff --git a/archive/src/main/resources/org/openrs2/archive/templates/caches/show.html b/archive/src/main/resources/org/openrs2/archive/templates/caches/show.html index c4c05781..0b64b121 100644 --- a/archive/src/main/resources/org/openrs2/archive/templates/caches/show.html +++ b/archive/src/main/resources/org/openrs2/archive/templates/caches/show.html @@ -46,7 +46,7 @@ - Keys1 + Keys Calculating...