-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I suggest using the cache module of runelite itself.
Something along the lines of:
public void dumpCache() throws IOException
{
Store store = new Store(DEFAULT_CACHE_DIR);
store.load();
Storage storage = store.getStorage();
store.getIndexes().forEach(index ->
{
log.debug("Dumping index " + (index.getId() + 1) + "/20");
index.getArchives().forEach(archive ->
{
try
{
byte[] archiveData = storage.loadArchive(archive);
if (index.getId() == 5)
CacheFiles.write(index.getId(), archive.getArchiveId(), archiveData);
else
{
archive.getFiles(archiveData).getFiles().forEach(fsFile ->
CacheFiles.write(index.getId(), archive.getArchiveId(), fsFile.getContents()));
}
}
catch (IOException e)
{
e.printStackTrace();
}
});
});
}And maybe detect an incomplete cache or wait until LOGIN_SCREEN as you have a full cache by that time.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels