From bdbfb61590d1164250d329b0ffb06e05263a8475 Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 21 May 2021 18:38:27 +0100 Subject: [PATCH] Ensure master index format is set to VERSIONED This ensures the server sends a master index compatible with the client even if all the indexes in the cache use the original Js5Index format. Signed-off-by: Graham --- .../main/kotlin/org/openrs2/cache/Js5MasterIndexProvider.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndexProvider.kt b/cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndexProvider.kt index 1084464637..f0d66bc3aa 100644 --- a/cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndexProvider.kt +++ b/cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndexProvider.kt @@ -7,6 +7,8 @@ public class Js5MasterIndexProvider @Inject constructor( private val store: Store ) : Provider { override fun get(): Js5MasterIndex { - return Js5MasterIndex.create(store) + val masterIndex = Js5MasterIndex.create(store) + masterIndex.format = MasterIndexFormat.VERSIONED + return masterIndex } }