Skip version list entries with a version of zero

The client uses these to indicate files that don't exist.

Signed-off-by: Graham <gpe@openrs2.org>
Graham 3 years ago
parent 0cf1881db4
commit f4ae5540d7
  1. 4
      archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt

@ -1209,6 +1209,10 @@ public class CacheImporter @Inject constructor(
).use { stmt -> ).use { stmt ->
for ((indexId, files) in versionList.files.withIndex()) { for ((indexId, files) in versionList.files.withIndex()) {
for ((fileId, file) in files.withIndex()) { for ((fileId, file) in files.withIndex()) {
if (file.version == 0) {
continue
}
stmt.setLong(1, blobId) stmt.setLong(1, blobId)
stmt.setInt(2, indexId + 1) stmt.setInt(2, indexId + 1)
stmt.setInt(3, fileId) stmt.setInt(3, fileId)

Loading…
Cancel
Save