Merge pull request #4667 from deathbeam/move-index-to-db
Move isOverlayOutdated to IndexDatabase
This commit is contained in:
@@ -43,7 +43,6 @@ import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.util.EnumConverter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.client.account.SessionManager;
|
||||
@@ -146,10 +145,6 @@ public class RuneLite
|
||||
@Nullable
|
||||
private Client client;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean overlayOutdated;
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
|
||||
@@ -42,7 +42,6 @@ import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.IndexDataBase;
|
||||
import net.runelite.api.MainBufferProvider;
|
||||
import net.runelite.api.RenderOverview;
|
||||
import net.runelite.api.WorldMapManager;
|
||||
@@ -275,13 +274,6 @@ public class Hooks implements Callbacks
|
||||
keyManager.processKeyTyped(keyEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void overlayLoadFailed(IndexDataBase indexDataBase, int archiveId, int fileId)
|
||||
{
|
||||
RuneLite runeLite = injector.getInstance(RuneLite.class);
|
||||
runeLite.setOverlayOutdated(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(MainBufferProvider mainBufferProvider, Graphics graphics, int x, int y)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.google.inject.Provides;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.events.ConfigChanged;
|
||||
import net.runelite.api.events.ScriptCallbackEvent;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
@@ -44,9 +43,6 @@ import net.runelite.client.plugins.PluginDescriptor;
|
||||
)
|
||||
public class ZoomPlugin extends Plugin
|
||||
{
|
||||
@Inject
|
||||
private RuneLite runeLite;
|
||||
|
||||
@Inject
|
||||
private Client client;
|
||||
|
||||
@@ -62,7 +58,7 @@ public class ZoomPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onScriptEvent(ScriptCallbackEvent event)
|
||||
{
|
||||
if (runeLite.isOverlayOutdated())
|
||||
if (client.getIndexScripts().isOverlayOutdated())
|
||||
{
|
||||
// if any cache overlay fails to load then assume at least one of the zoom scripts is outdated
|
||||
// and prevent zoom extending entirely.
|
||||
|
||||
Reference in New Issue
Block a user