more checkstyle etc
This commit is contained in:
@@ -59,7 +59,6 @@ import net.runelite.client.menus.MenuManager;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginInstantiationException;
|
||||
import net.runelite.client.plugins.PluginManager;
|
||||
import net.runelite.client.plugins.config.ConfigPanel;
|
||||
import net.runelite.client.rs.ClientUpdateCheckMode;
|
||||
import net.runelite.client.task.Scheduler;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
@@ -86,7 +85,7 @@ public class RuneLite
|
||||
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
|
||||
public static final File PLUGIN_DIR = new File(RUNELITE_DIR, "plugins");
|
||||
public static final File SCREENSHOT_DIR = new File(RUNELITE_DIR, "screenshots");
|
||||
public static RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
|
||||
static final RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
|
||||
|
||||
|
||||
@Getter
|
||||
@@ -242,7 +241,7 @@ public class RuneLite
|
||||
|
||||
// The submessage is shown in case the connection is slow
|
||||
splashScreen.setMessage("Starting RuneLite Injector");
|
||||
splashScreen.setSubMessage( " ");
|
||||
splashScreen.setSubMessage(" ");
|
||||
|
||||
final long start = System.currentTimeMillis();
|
||||
|
||||
|
||||
@@ -80,9 +80,12 @@ public class RuneLiteProperties
|
||||
|
||||
public String getDiscordAppId()
|
||||
{
|
||||
if (RuneLitePlusPlugin.customPresenceEnabled) {
|
||||
if (RuneLitePlusPlugin.customPresenceEnabled)
|
||||
{
|
||||
return properties.getProperty(RuneLitePlusPlugin.rlPlusDiscordApp);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return properties.getProperty(DISCORD_APP_ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,12 +36,12 @@ import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.events.SessionClose;
|
||||
import net.runelite.client.events.SessionOpen;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.SessionClose;
|
||||
import net.runelite.client.events.SessionOpen;
|
||||
import net.runelite.client.util.LinkBrowser;
|
||||
import net.runelite.client.ws.WSClient;
|
||||
import net.runelite.http.api.account.AccountClient;
|
||||
|
||||
@@ -374,6 +374,7 @@ public class Hooks implements Callbacks
|
||||
|
||||
/**
|
||||
* Copy an image
|
||||
*
|
||||
* @param src
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
*/
|
||||
package net.runelite.client.config;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ConfigItemsGroup
|
||||
{
|
||||
|
||||
@@ -24,11 +24,10 @@
|
||||
*/
|
||||
package net.runelite.client.config;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
|
||||
import java.awt.Font;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@@ -106,7 +106,7 @@ public class DiscordService implements AutoCloseable
|
||||
discordEventHandlers.joinGame = this::joinGame;
|
||||
discordEventHandlers.spectateGame = this::spectateGame;
|
||||
discordEventHandlers.joinRequest = this::joinRequest;
|
||||
discordRPC.Discord_Initialize(runeLiteProperties.discordAppID, discordEventHandlers, true, null);
|
||||
discordRPC.Discord_Initialize(RuneLiteProperties.discordAppID, discordEventHandlers, true, null);
|
||||
executorService.scheduleAtFixedRate(discordRPC::Discord_RunCallbacks, 0, 2, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,26 +35,32 @@ for mouse motion.
|
||||
package net.runelite.client.flexo;
|
||||
|
||||
import com.github.joonasvali.naturalmouse.api.MouseMotionFactory;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import sun.awt.ComponentFactory;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.AWTException;
|
||||
import java.awt.Color;
|
||||
import java.awt.GraphicsDevice;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.Point;
|
||||
import java.awt.Robot;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.peer.RobotPeer;
|
||||
import java.util.Random;
|
||||
import java.util.logging.Logger;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Constants;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import sun.awt.ComponentFactory;
|
||||
|
||||
public class Flexo extends Robot {
|
||||
public class Flexo extends Robot
|
||||
{
|
||||
public ThreadGroup flexoThreads = new ThreadGroup("flexo");
|
||||
public static boolean isActive;
|
||||
public static double scale;
|
||||
public static Client client;
|
||||
public static ClientUI clientUI;
|
||||
public static int fixedWidth = 765;
|
||||
public static int fixedHeight = 503;
|
||||
public static int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
||||
public static int fixedHeight = Constants.GAME_FIXED_HEIGHT;
|
||||
public static boolean isStretched;
|
||||
public static int minDelay = 45;
|
||||
public static MouseMotionFactory currentMouseMotionFactory;
|
||||
@@ -62,18 +68,22 @@ public class Flexo extends Robot {
|
||||
private Thread holdKeyThread;
|
||||
private RobotPeer peer;
|
||||
|
||||
public Flexo() throws AWTException {
|
||||
if (GraphicsEnvironment.isHeadless()) {
|
||||
public Flexo() throws AWTException
|
||||
{
|
||||
if (GraphicsEnvironment.isHeadless())
|
||||
{
|
||||
throw new AWTException("headless environment");
|
||||
}
|
||||
init(GraphicsEnvironment.getLocalGraphicsEnvironment()
|
||||
.getDefaultScreenDevice());
|
||||
}
|
||||
|
||||
private void init(GraphicsDevice screen) throws AWTException {
|
||||
private void init(GraphicsDevice screen) throws AWTException
|
||||
{
|
||||
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
||||
if (toolkit instanceof ComponentFactory) {
|
||||
peer = ((ComponentFactory)toolkit).createRobot(this, screen);
|
||||
if (toolkit instanceof ComponentFactory)
|
||||
{
|
||||
peer = ((ComponentFactory) toolkit).createRobot(this, screen);
|
||||
RobotDisposer disposer = new RobotDisposer(peer);
|
||||
sun.java2d.Disposer.addRecord(anchor, disposer);
|
||||
}
|
||||
@@ -81,24 +91,35 @@ public class Flexo extends Robot {
|
||||
|
||||
private transient Object anchor = new Object();
|
||||
|
||||
static class RobotDisposer implements sun.java2d.DisposerRecord {
|
||||
static class RobotDisposer implements sun.java2d.DisposerRecord
|
||||
{
|
||||
private final RobotPeer peer;
|
||||
private RobotDisposer(RobotPeer peer) {
|
||||
|
||||
private RobotDisposer(RobotPeer peer)
|
||||
{
|
||||
this.peer = peer;
|
||||
}
|
||||
public void dispose() {
|
||||
if (peer != null) {
|
||||
|
||||
public void dispose()
|
||||
{
|
||||
if (peer != null)
|
||||
{
|
||||
peer.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void pauseMS(int delayMS) {
|
||||
private void pauseMS(int delayMS)
|
||||
{
|
||||
long initialMS = System.currentTimeMillis();
|
||||
while (System.currentTimeMillis()<initialMS+delayMS) {
|
||||
try {
|
||||
while (System.currentTimeMillis() < initialMS + delayMS)
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep(10);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -106,29 +127,39 @@ public class Flexo extends Robot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void mouseMove(int x, int y) {
|
||||
try {
|
||||
public synchronized void mouseMove(int x, int y)
|
||||
{
|
||||
try
|
||||
{
|
||||
//TODO: Must be better way to determine titlebar width
|
||||
currentMouseMotionFactory.build(ClientUI.frame.getX()+x+determineHorizontalOffset(), ClientUI.frame.getY()+y+determineVerticalOffset()).move();
|
||||
currentMouseMotionFactory.build(ClientUI.frame.getX() + x + determineHorizontalOffset(), ClientUI.frame.getY() + y + determineVerticalOffset()).move();
|
||||
this.delay(getMinDelay());
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void mouseMove(Point p) {
|
||||
public synchronized void mouseMove(Point p)
|
||||
{
|
||||
Point p2 = p;
|
||||
mouseMove((int)p.getX(), (int)p.getY());
|
||||
try {
|
||||
mouseMove((int) p.getX(), (int) p.getY());
|
||||
try
|
||||
{
|
||||
Thread.sleep(150);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void mousePress(int buttonID) {
|
||||
if (buttonID<1 || buttonID >5) {
|
||||
public synchronized void mousePress(int buttonID)
|
||||
{
|
||||
if (buttonID < 1 || buttonID > 5)
|
||||
{
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
@@ -136,8 +167,10 @@ public class Flexo extends Robot {
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
public synchronized void mousePressAndRelease(int buttonID) {
|
||||
if (buttonID<1 || buttonID >5) {
|
||||
public synchronized void mousePressAndRelease(int buttonID)
|
||||
{
|
||||
if (buttonID < 1 || buttonID > 5)
|
||||
{
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
@@ -148,24 +181,27 @@ public class Flexo extends Robot {
|
||||
}
|
||||
|
||||
//TODO: Symbols are nut supported at this time
|
||||
public synchronized void typeMessage(String message) {
|
||||
public synchronized void typeMessage(String message)
|
||||
{
|
||||
|
||||
Random r = new Random();
|
||||
char[] charArray = message.toCharArray();
|
||||
for (char c : charArray) {
|
||||
for (char c : charArray)
|
||||
{
|
||||
keyPress(KeyEvent.getExtendedKeyCodeForChar(c));
|
||||
this.delay(93+r.nextInt(getMinDelay()));
|
||||
this.delay(93 + r.nextInt(getMinDelay()));
|
||||
}
|
||||
keyPress(KeyEvent.VK_ENTER);
|
||||
this.delay(93+r.nextInt(getMinDelay()));
|
||||
this.delay(93 + r.nextInt(getMinDelay()));
|
||||
ClientUI.allowInput = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized void mouseRelease(int buttonID) {
|
||||
if (buttonID<1 || buttonID >5) {
|
||||
public synchronized void mouseRelease(int buttonID)
|
||||
{
|
||||
if (buttonID < 1 || buttonID > 5)
|
||||
{
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
@@ -173,19 +209,25 @@ public class Flexo extends Robot {
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
private int getMinDelay() {
|
||||
private int getMinDelay()
|
||||
{
|
||||
Random random = new Random();
|
||||
int random1 = random.nextInt(minDelay);
|
||||
if (random1 < minDelay/2)
|
||||
random1 = random.nextInt(minDelay/2) + minDelay/2+random.nextInt(minDelay/2);
|
||||
if (random1 < minDelay / 2)
|
||||
{
|
||||
random1 = random.nextInt(minDelay / 2) + minDelay / 2 + random.nextInt(minDelay / 2);
|
||||
}
|
||||
return random1;
|
||||
}
|
||||
|
||||
private int getWheelDelay() {
|
||||
private int getWheelDelay()
|
||||
{
|
||||
Random random = new Random();
|
||||
int random1 = random.nextInt(minDelay);
|
||||
if (random1 < minDelay/2)
|
||||
random1 = random.nextInt(minDelay/2) + minDelay/2+random.nextInt(minDelay/2);
|
||||
if (random1 < minDelay / 2)
|
||||
{
|
||||
random1 = random.nextInt(minDelay / 2) + minDelay / 2 + random.nextInt(minDelay / 2);
|
||||
}
|
||||
return random1;
|
||||
}
|
||||
|
||||
@@ -195,12 +237,13 @@ public class Flexo extends Robot {
|
||||
* @param wheelAmt number of "notches" to move the mouse wheel
|
||||
* Negative values indicate movement up/away from the user,
|
||||
* positive values indicate movement down/towards the user.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
@Override
|
||||
public synchronized void mouseWheel(int wheelAmt) {
|
||||
for (int i : new int[wheelAmt]) {
|
||||
public synchronized void mouseWheel(int wheelAmt)
|
||||
{
|
||||
for (int i : new int[wheelAmt])
|
||||
{
|
||||
peer.mouseWheel(wheelAmt);
|
||||
this.delay(getWheelDelay());
|
||||
}
|
||||
@@ -221,35 +264,47 @@ public class Flexo extends Robot {
|
||||
* @see java.awt.event.KeyEvent
|
||||
*/
|
||||
@Override
|
||||
public synchronized void keyPress(int keycode) {
|
||||
public synchronized void keyPress(int keycode)
|
||||
{
|
||||
peer.keyPress(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void keyRelease(int keycode) {
|
||||
public synchronized void keyRelease(int keycode)
|
||||
{
|
||||
peer.keyRelease(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
public synchronized void holdKey(int keycode, int timeMS) {
|
||||
new Thread(() -> {
|
||||
public synchronized void holdKey(int keycode, int timeMS)
|
||||
{
|
||||
new Thread(() ->
|
||||
{
|
||||
peer.keyPress(keycode);
|
||||
long startTime = System.currentTimeMillis();
|
||||
while ((startTime + timeMS) > System.currentTimeMillis()) { }
|
||||
while ((startTime + timeMS) > System.currentTimeMillis())
|
||||
{
|
||||
}
|
||||
peer.keyRelease(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}).start();
|
||||
}
|
||||
|
||||
public synchronized void holdKeyIndefinitely(int keycode) {
|
||||
holdKeyThread = new Thread(() -> {
|
||||
public synchronized void holdKeyIndefinitely(int keycode)
|
||||
{
|
||||
holdKeyThread = new Thread(() ->
|
||||
{
|
||||
pausedIndefinitely = true;
|
||||
peer.keyPress(keycode);
|
||||
while (pausedIndefinitely) {
|
||||
try {
|
||||
holdKeyThread.sleep(10);
|
||||
} catch (InterruptedException e) {
|
||||
while (pausedIndefinitely)
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep(10);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -261,21 +316,25 @@ public class Flexo extends Robot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getPixelColor(int x, int y) {
|
||||
public Color getPixelColor(int x, int y)
|
||||
{
|
||||
Color color = new Color(peer.getRGBPixel(x, y));
|
||||
return color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delay(int ms) {
|
||||
public void delay(int ms)
|
||||
{
|
||||
pauseMS(ms);
|
||||
}
|
||||
|
||||
public int determineHorizontalOffset() {
|
||||
public int determineHorizontalOffset()
|
||||
{
|
||||
return clientUI.getCanvasOffset().getX();
|
||||
}
|
||||
|
||||
public int determineVerticalOffset() {
|
||||
public int determineVerticalOffset()
|
||||
{
|
||||
return clientUI.getCanvasOffset().getY();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,45 +28,56 @@
|
||||
|
||||
package net.runelite.client.flexo;
|
||||
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.Random;
|
||||
import java.util.logging.Logger;
|
||||
import net.runelite.api.Constants;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
|
||||
public class FlexoMouse {
|
||||
public class FlexoMouse
|
||||
{
|
||||
|
||||
/*
|
||||
Should pass unstretched coords, handles all conversions here.
|
||||
*/
|
||||
public static Point getClickPoint(Rectangle rect)
|
||||
{
|
||||
if (rect!=null) {
|
||||
if (rect != null)
|
||||
{
|
||||
Random r = new Random();
|
||||
int x = -1;
|
||||
int y = -1;
|
||||
x = rect.x+r.nextInt(rect.width);
|
||||
y = rect.y+r.nextInt(rect.height);
|
||||
x = rect.x + r.nextInt(rect.width);
|
||||
y = rect.y + r.nextInt(rect.height);
|
||||
|
||||
if (Flexo.isStretched) {
|
||||
if (Flexo.isStretched)
|
||||
{
|
||||
double wScale;
|
||||
double hScale;
|
||||
|
||||
if (Flexo.client.isResized()) {
|
||||
wScale = (Flexo.client.getStretchedDimensions().width / Flexo.client.getRealDimensions().width);
|
||||
hScale = (Flexo.client.getStretchedDimensions().height / Flexo.client.getRealDimensions().height);
|
||||
int newX = (int)(x*wScale);
|
||||
int newY = (int)(y*hScale);
|
||||
if (newX>0 && newX< ClientUI.frame.getWidth()) {
|
||||
if (newY>0 && newY< ClientUI.frame.getHeight()) {
|
||||
if (Flexo.client.isResized())
|
||||
{
|
||||
wScale = (Flexo.client.getStretchedDimensions().width / (double) Flexo.client.getRealDimensions().width);
|
||||
hScale = (Flexo.client.getStretchedDimensions().height / (double) Flexo.client.getRealDimensions().height);
|
||||
int newX = (int) (x * wScale);
|
||||
int newY = (int) (y * hScale);
|
||||
if (newX > 0 && newX < ClientUI.frame.getWidth())
|
||||
{
|
||||
if (newY > 0 && newY < ClientUI.frame.getHeight())
|
||||
{
|
||||
return new Point(newX, newY);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
} else {
|
||||
if (x>0 && x< ClientUI.frame.getWidth()) {
|
||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x > 0 && x < ClientUI.frame.getWidth())
|
||||
{
|
||||
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||
{
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
@@ -74,28 +85,38 @@ public class FlexoMouse {
|
||||
return null;
|
||||
}
|
||||
|
||||
} else if (!Flexo.client.isResized()) {
|
||||
int fixedWidth = 765;
|
||||
}
|
||||
else if (!Flexo.client.isResized())
|
||||
{
|
||||
final int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
||||
int widthDif = ClientUI.frame.getWidth();
|
||||
|
||||
if (ClientUI.pluginToolbar.isVisible()) {
|
||||
if (ClientUI.pluginToolbar.isVisible())
|
||||
{
|
||||
widthDif -= ClientUI.pluginToolbar.getWidth();
|
||||
}
|
||||
if (ClientUI.pluginPanel!=null)
|
||||
if (ClientUI.pluginPanel != null)
|
||||
{
|
||||
widthDif -= ClientUI.pluginPanel.getWidth();
|
||||
}
|
||||
|
||||
widthDif -= fixedWidth;
|
||||
if (x+(widthDif/2)>0 && x+(widthDif/2)< ClientUI.frame.getWidth()) {
|
||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
||||
if (x + (widthDif / 2) > 0 && x + (widthDif / 2) < ClientUI.frame.getWidth())
|
||||
{
|
||||
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||
{
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
if (x>0 && x< ClientUI.frame.getWidth()) {
|
||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
||||
else
|
||||
{
|
||||
if (x > 0 && x < ClientUI.frame.getWidth())
|
||||
{
|
||||
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||
{
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
@@ -113,75 +134,89 @@ public class FlexoMouse {
|
||||
double wScale;
|
||||
double hScale;
|
||||
|
||||
if (Flexo.client.isResized()) {
|
||||
wScale = (Flexo.client.getStretchedDimensions().width / Flexo.client.getRealDimensions().width);
|
||||
hScale = (Flexo.client.getStretchedDimensions().height / Flexo.client.getRealDimensions().height);
|
||||
} else {
|
||||
wScale = ((double) Flexo.client.getStretchedDimensions().width) / Flexo.fixedWidth;
|
||||
hScale = ((double) Flexo.client.getStretchedDimensions().height) / Flexo.fixedHeight;
|
||||
if (Flexo.client.isResized())
|
||||
{
|
||||
wScale = (Flexo.client.getStretchedDimensions().width / (double) Flexo.client.getRealDimensions().width);
|
||||
hScale = (Flexo.client.getStretchedDimensions().height / (double) Flexo.client.getRealDimensions().height);
|
||||
}
|
||||
else
|
||||
{
|
||||
wScale = (Flexo.client.getStretchedDimensions().width) / (double) Flexo.fixedWidth;
|
||||
hScale = (Flexo.client.getStretchedDimensions().height) / (double) Flexo.fixedHeight;
|
||||
}
|
||||
|
||||
int xPadding = (int)rect.getWidth()/5;
|
||||
int yPadding = (int)rect.getHeight()/5;
|
||||
int xPadding = (int) rect.getWidth() / 5;
|
||||
int yPadding = (int) rect.getHeight() / 5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width-xPadding*2;
|
||||
clickRect.height = rect.height-yPadding*2;
|
||||
clickRect.x = rect.x+xPadding;
|
||||
clickRect.y = rect.y+yPadding;
|
||||
if (clickRect.width>0&&clickRect.height>0) {
|
||||
int x = clickRect.x+r.nextInt(clickRect.width);
|
||||
int y = clickRect.y+r.nextInt(clickRect.height);
|
||||
clickRect.width = rect.width - xPadding * 2;
|
||||
clickRect.height = rect.height - yPadding * 2;
|
||||
clickRect.x = rect.x + xPadding;
|
||||
clickRect.y = rect.y + yPadding;
|
||||
if (clickRect.width > 0 && clickRect.height > 0)
|
||||
{
|
||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||
double tScale = 1 + (Flexo.scale / 100);
|
||||
|
||||
if (Flexo.client.isResized()) {
|
||||
return new Rectangle((int)(clickRect.x * wScale), (int)(clickRect.y * wScale), (int)(clickRect.width * wScale), (int)(clickRect.getHeight()*hScale));
|
||||
} else {
|
||||
return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight()));
|
||||
if (Flexo.client.isResized())
|
||||
{
|
||||
return new Rectangle((int) (clickRect.x * wScale), (int) (clickRect.y * wScale), (int) (clickRect.width * wScale), (int) (clickRect.getHeight() * hScale));
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//Fixed, not stretched
|
||||
else if (!Flexo.client.isResized()) {
|
||||
else if (!Flexo.client.isResized())
|
||||
{
|
||||
int fixedWidth = 765;
|
||||
int widthDif = ClientUI.frame.getWidth();
|
||||
|
||||
if (ClientUI.pluginToolbar.isVisible()) {
|
||||
if (ClientUI.pluginToolbar.isVisible())
|
||||
{
|
||||
widthDif -= ClientUI.pluginToolbar.getWidth();
|
||||
}
|
||||
if (ClientUI.pluginPanel!=null)
|
||||
if (ClientUI.pluginPanel != null)
|
||||
{
|
||||
widthDif -= ClientUI.pluginPanel.getWidth();
|
||||
}
|
||||
|
||||
widthDif -= fixedWidth;
|
||||
int xPadding = (int)rect.getWidth()/5;
|
||||
int yPadding = (int)rect.getHeight()/5;
|
||||
int xPadding = (int) rect.getWidth() / 5;
|
||||
int yPadding = (int) rect.getHeight() / 5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width-xPadding;
|
||||
clickRect.height = rect.height-yPadding;
|
||||
clickRect.x = rect.x+xPadding;
|
||||
clickRect.y = rect.y+yPadding;
|
||||
if (clickRect.height>0&&clickRect.width>0) {
|
||||
clickRect.width = rect.width - xPadding;
|
||||
clickRect.height = rect.height - yPadding;
|
||||
clickRect.x = rect.x + xPadding;
|
||||
clickRect.y = rect.y + yPadding;
|
||||
if (clickRect.height > 0 && clickRect.width > 0)
|
||||
{
|
||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||
return new Rectangle((int) (clickRect.x), (int) (clickRect.y), (int) (clickRect.width), (int) (clickRect.getHeight()));
|
||||
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
//Resizable, not stretched
|
||||
else {
|
||||
int xPadding = (int)rect.getWidth()/5;
|
||||
int yPadding = (int)rect.getHeight()/5;
|
||||
else
|
||||
{
|
||||
int xPadding = (int) rect.getWidth() / 5;
|
||||
int yPadding = (int) rect.getHeight() / 5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width-xPadding*2;
|
||||
clickRect.height = rect.height-yPadding*2;
|
||||
clickRect.x = rect.x+xPadding;
|
||||
clickRect.y = rect.y+yPadding;
|
||||
if (clickRect.height>0&&clickRect.width>0) {
|
||||
int x = clickRect.x+r.nextInt(clickRect.width);
|
||||
int y = clickRect.y+r.nextInt(clickRect.height);
|
||||
return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight()));
|
||||
clickRect.width = rect.width - xPadding * 2;
|
||||
clickRect.height = rect.height - yPadding * 2;
|
||||
clickRect.x = rect.x + xPadding;
|
||||
clickRect.y = rect.y + yPadding;
|
||||
if (clickRect.height > 0 && clickRect.width > 0)
|
||||
{
|
||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,212 @@
|
||||
package net.runelite.client.game;
|
||||
|
||||
import lombok.Getter;
|
||||
import static net.runelite.api.NullObjectID.*;
|
||||
import static net.runelite.api.ObjectID.*;
|
||||
import static net.runelite.api.NullObjectID.NULL_25337;
|
||||
import static net.runelite.api.NullObjectID.NULL_26371;
|
||||
import static net.runelite.api.NullObjectID.NULL_26375;
|
||||
import static net.runelite.api.NullObjectID.NULL_26884;
|
||||
import static net.runelite.api.NullObjectID.NULL_26886;
|
||||
import static net.runelite.api.NullObjectID.NULL_29868;
|
||||
import static net.runelite.api.NullObjectID.NULL_29869;
|
||||
import static net.runelite.api.NullObjectID.NULL_29870;
|
||||
import static net.runelite.api.NullObjectID.NULL_31823;
|
||||
import static net.runelite.api.NullObjectID.NULL_31849;
|
||||
import static net.runelite.api.NullObjectID.NULL_33327;
|
||||
import static net.runelite.api.NullObjectID.NULL_33328;
|
||||
import static net.runelite.api.ObjectID.A_WOODEN_LOG;
|
||||
import static net.runelite.api.ObjectID.BALANCING_LEDGE_23548;
|
||||
import static net.runelite.api.ObjectID.BIG_WINDOW;
|
||||
import static net.runelite.api.ObjectID.BOULDER_27990;
|
||||
import static net.runelite.api.ObjectID.BROKEN_FENCE;
|
||||
import static net.runelite.api.ObjectID.BROKEN_FENCE_2618;
|
||||
import static net.runelite.api.ObjectID.BROKEN_RAFT;
|
||||
import static net.runelite.api.ObjectID.BROKEN_WALL_33344;
|
||||
import static net.runelite.api.ObjectID.CASTLE_WALL;
|
||||
import static net.runelite.api.ObjectID.CLIMBING_ROCKS;
|
||||
import static net.runelite.api.ObjectID.CLIMBING_ROCKS_11948;
|
||||
import static net.runelite.api.ObjectID.CLIMBING_ROCKS_11949;
|
||||
import static net.runelite.api.ObjectID.CREVICE_16465;
|
||||
import static net.runelite.api.ObjectID.CREVICE_16539;
|
||||
import static net.runelite.api.ObjectID.CREVICE_16543;
|
||||
import static net.runelite.api.ObjectID.CREVICE_19043;
|
||||
import static net.runelite.api.ObjectID.CREVICE_30198;
|
||||
import static net.runelite.api.ObjectID.CREVICE_9739;
|
||||
import static net.runelite.api.ObjectID.CREVICE_9740;
|
||||
import static net.runelite.api.ObjectID.CROSSBOW_TREE_17062;
|
||||
import static net.runelite.api.ObjectID.CRUMBLING_WALL_24222;
|
||||
import static net.runelite.api.ObjectID.DARK_TUNNEL_10047;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST_3938;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST_3939;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST_3998;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST_3999;
|
||||
import static net.runelite.api.ObjectID.FALLEN_TREE_33192;
|
||||
import static net.runelite.api.ObjectID.FENCE_16518;
|
||||
import static net.runelite.api.ObjectID.GAP;
|
||||
import static net.runelite.api.ObjectID.GAP_2831;
|
||||
import static net.runelite.api.ObjectID.GAP_29326;
|
||||
import static net.runelite.api.ObjectID.HOLE_16520;
|
||||
import static net.runelite.api.ObjectID.HOLE_30966;
|
||||
import static net.runelite.api.ObjectID.HOLE_31481;
|
||||
import static net.runelite.api.ObjectID.HOLE_31482;
|
||||
import static net.runelite.api.ObjectID.ICE_CHUNKS_31822;
|
||||
import static net.runelite.api.ObjectID.ICE_CHUNKS_31990;
|
||||
import static net.runelite.api.ObjectID.JUTTING_WALL_17002;
|
||||
import static net.runelite.api.ObjectID.LADDER_30938;
|
||||
import static net.runelite.api.ObjectID.LADDER_30939;
|
||||
import static net.runelite.api.ObjectID.LADDER_30940;
|
||||
import static net.runelite.api.ObjectID.LADDER_30941;
|
||||
import static net.runelite.api.ObjectID.LEAVES;
|
||||
import static net.runelite.api.ObjectID.LEAVES_3924;
|
||||
import static net.runelite.api.ObjectID.LEAVES_3925;
|
||||
import static net.runelite.api.ObjectID.LEDGE_33190;
|
||||
import static net.runelite.api.ObjectID.LITTLE_BOULDER;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16540;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16541;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16542;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16546;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16547;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16548;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_20882;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_20884;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_23274;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3929;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3930;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3931;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3932;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3933;
|
||||
import static net.runelite.api.ObjectID.LOOSE_RAILING;
|
||||
import static net.runelite.api.ObjectID.LOOSE_RAILING_2186;
|
||||
import static net.runelite.api.ObjectID.LOOSE_RAILING_28849;
|
||||
import static net.runelite.api.ObjectID.LOW_FENCE;
|
||||
import static net.runelite.api.ObjectID.MONKEYBARS_23566;
|
||||
import static net.runelite.api.ObjectID.MONKEYBARS_23567;
|
||||
import static net.runelite.api.ObjectID.MYSTERIOUS_PIPE;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_30767;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_30962;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_30964;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_16509;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_16511;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23140;
|
||||
import static net.runelite.api.ObjectID.ORNATE_RAILING;
|
||||
import static net.runelite.api.ObjectID.ORNATE_RAILING_17000;
|
||||
import static net.runelite.api.ObjectID.PILE_OF_RUBBLE_23563;
|
||||
import static net.runelite.api.ObjectID.PILE_OF_RUBBLE_23564;
|
||||
import static net.runelite.api.ObjectID.PILLAR_31561;
|
||||
import static net.runelite.api.ObjectID.PILLAR_31809;
|
||||
import static net.runelite.api.ObjectID.PIPE_21727;
|
||||
import static net.runelite.api.ObjectID.PIPE_21728;
|
||||
import static net.runelite.api.ObjectID.ROCKS;
|
||||
import static net.runelite.api.ObjectID.ROCKSLIDE_33184;
|
||||
import static net.runelite.api.ObjectID.ROCKSLIDE_33185;
|
||||
import static net.runelite.api.ObjectID.ROCKSLIDE_33191;
|
||||
import static net.runelite.api.ObjectID.ROCKS_14106;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16464;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16514;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16515;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16521;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16522;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16523;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16524;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16534;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16535;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16545;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16549;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16550;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16998;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16999;
|
||||
import static net.runelite.api.ObjectID.ROCKS_17042;
|
||||
import static net.runelite.api.ObjectID.ROCKS_19849;
|
||||
import static net.runelite.api.ObjectID.ROCKS_2231;
|
||||
import static net.runelite.api.ObjectID.ROCKS_27984;
|
||||
import static net.runelite.api.ObjectID.ROCKS_27985;
|
||||
import static net.runelite.api.ObjectID.ROCKS_27987;
|
||||
import static net.runelite.api.ObjectID.ROCKS_27988;
|
||||
import static net.runelite.api.ObjectID.ROCKS_31757;
|
||||
import static net.runelite.api.ObjectID.ROCKS_31758;
|
||||
import static net.runelite.api.ObjectID.ROCKS_31759;
|
||||
import static net.runelite.api.ObjectID.ROCKS_34396;
|
||||
import static net.runelite.api.ObjectID.ROCKS_34397;
|
||||
import static net.runelite.api.ObjectID.ROCKS_34741;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3748;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3790;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3791;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3803;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3804;
|
||||
import static net.runelite.api.ObjectID.ROCKS_6673;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26400;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26401;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26402;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26404;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26405;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26406;
|
||||
import static net.runelite.api.ObjectID.ROCK_16115;
|
||||
import static net.runelite.api.ObjectID.ROPESWING_23568;
|
||||
import static net.runelite.api.ObjectID.ROPESWING_23569;
|
||||
import static net.runelite.api.ObjectID.ROPE_ANCHOR;
|
||||
import static net.runelite.api.ObjectID.ROPE_ANCHOR_30917;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21306;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21307;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21308;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21309;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21310;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21311;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21312;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21313;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21314;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21315;
|
||||
import static net.runelite.api.ObjectID.RUBBER_CAP_MUSHROOM;
|
||||
import static net.runelite.api.ObjectID.SPIKEY_CHAIN;
|
||||
import static net.runelite.api.ObjectID.SPIKEY_CHAIN_16538;
|
||||
import static net.runelite.api.ObjectID.STAIRS_31485;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONES;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONES_23646;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONES_23647;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_10663;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_11768;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_13504;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_14917;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_14918;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_16466;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_16513;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_16533;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_19040;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_19042;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21738;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21739;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_29728;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_29729;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_29730;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_5948;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_5949;
|
||||
import static net.runelite.api.ObjectID.STEPS;
|
||||
import static net.runelite.api.ObjectID.STEPS_29993;
|
||||
import static net.runelite.api.ObjectID.STICKS;
|
||||
import static net.runelite.api.ObjectID.STILE;
|
||||
import static net.runelite.api.ObjectID.STILE_12982;
|
||||
import static net.runelite.api.ObjectID.STRANGE_FLOOR;
|
||||
import static net.runelite.api.ObjectID.STRANGE_FLOOR_16544;
|
||||
import static net.runelite.api.ObjectID.STRONG_TREE_17074;
|
||||
import static net.runelite.api.ObjectID.TIGHTGAP;
|
||||
import static net.runelite.api.ObjectID.TRELLIS_20056;
|
||||
import static net.runelite.api.ObjectID.TRIPWIRE;
|
||||
import static net.runelite.api.ObjectID.TUNNEL_30174;
|
||||
import static net.runelite.api.ObjectID.TUNNEL_30175;
|
||||
import static net.runelite.api.ObjectID.TUNNEL_30959;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16528;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16529;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16530;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_19032;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_19036;
|
||||
import static net.runelite.api.ObjectID.VINE_26880;
|
||||
import static net.runelite.api.ObjectID.VINE_26882;
|
||||
import static net.runelite.api.ObjectID.WALL_17047;
|
||||
import static net.runelite.api.ObjectID.WALL_17049;
|
||||
import static net.runelite.api.ObjectID.WALL_17050;
|
||||
import static net.runelite.api.ObjectID.WEATHERED_WALL;
|
||||
import static net.runelite.api.ObjectID.WEATHERED_WALL_16526;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
|
||||
@Getter
|
||||
@@ -72,8 +276,8 @@ public enum AgilityShortcut
|
||||
BRIMHAVEN_DUNGEON_LOG_BALANCE_RETURN(1, "Log Balance", null, LOG_BALANCE_20884),
|
||||
AGILITY_PYRAMID_ROCKS_WEST(1, "Rocks", null, CLIMBING_ROCKS_11948),
|
||||
CAIRN_ISLE_CLIMBING_ROCKS(1, "Rocks", null, CLIMBING_ROCKS),
|
||||
KARAMJA_GLIDER_LOG(1, "Log Balance", new WorldPoint(2906, 3050, 0), A_WOODEN_LOG ),
|
||||
FALADOR_CRUMBLING_WALL(5, "Crumbling Wall", new WorldPoint(2936, 3357, 0), CRUMBLING_WALL_24222 ),
|
||||
KARAMJA_GLIDER_LOG(1, "Log Balance", new WorldPoint(2906, 3050, 0), A_WOODEN_LOG),
|
||||
FALADOR_CRUMBLING_WALL(5, "Crumbling Wall", new WorldPoint(2936, 3357, 0), CRUMBLING_WALL_24222),
|
||||
RIVER_LUM_GRAPPLE_WEST(8, "Grapple Broken Raft", new WorldPoint(3245, 3179, 0), BROKEN_RAFT),
|
||||
RIVER_LUM_GRAPPLE_EAST(8, "Grapple Broken Raft", new WorldPoint(3258, 3179, 0), BROKEN_RAFT),
|
||||
CORSAIR_COVE_ROCKS(10, "Rocks", new WorldPoint(2545, 2871, 0), ROCKS_31757),
|
||||
@@ -141,7 +345,7 @@ public enum AgilityShortcut
|
||||
ISAFDAR_FOREST_OBSTACLES(56, "Trap", null, DENSE_FOREST_3938, DENSE_FOREST_3939, DENSE_FOREST_3998, DENSE_FOREST_3999, DENSE_FOREST, LEAVES, LEAVES_3924, LEAVES_3925, STICKS, TRIPWIRE),
|
||||
RELEKKA_EAST_FENCE(57, "Fence", new WorldPoint(2688, 3697, 0), BROKEN_FENCE),
|
||||
YANILLE_DUNGEON_MONKEY_BARS(57, "Monkey Bars", null, MONKEYBARS_23567),
|
||||
PHASMATYS_ECTOPOOL_SHORTCUT(58, "Weathered Wall", null , WEATHERED_WALL, WEATHERED_WALL_16526),
|
||||
PHASMATYS_ECTOPOOL_SHORTCUT(58, "Weathered Wall", null, WEATHERED_WALL, WEATHERED_WALL_16526),
|
||||
ELVEN_OVERPASS_CLIFF_SCRAMBLE(59, "Rocks", new WorldPoint(2345, 3300, 0), ROCKS_16514, ROCKS_16515),
|
||||
WILDERNESS_GWD_CLIMB_EAST(60, "Rocks", new WorldPoint(2943, 3770, 0), ROCKY_HANDHOLDS_26400, ROCKY_HANDHOLDS_26401, ROCKY_HANDHOLDS_26402, ROCKY_HANDHOLDS_26404, ROCKY_HANDHOLDS_26405, ROCKY_HANDHOLDS_26406),
|
||||
WILDERNESS_GWD_CLIMB_WEST(60, "Rocks", new WorldPoint(2928, 3760, 0), ROCKY_HANDHOLDS_26400, ROCKY_HANDHOLDS_26401, ROCKY_HANDHOLDS_26402, ROCKY_HANDHOLDS_26404, ROCKY_HANDHOLDS_26405, ROCKY_HANDHOLDS_26406),
|
||||
@@ -169,22 +373,22 @@ public enum AgilityShortcut
|
||||
TAVERLEY_DUNGEON_PIPE_BLUE_DRAGON(70, "Pipe Squeeze", new WorldPoint(2886, 9798, 0), OBSTACLE_PIPE_16509),
|
||||
TAVERLEY_DUNGEON_ROCKS_NORTH(70, "Rocks", new WorldPoint(2887, 9823, 0), ROCKS, ROCKS_14106),
|
||||
TAVERLEY_DUNGEON_ROCKS_SOUTH(70, "Rocks", new WorldPoint(2887, 9631, 0), ROCKS, ROCKS_14106),
|
||||
FOSSIL_ISLAND_HARDWOOD_NORTH(70, "Hole" , new WorldPoint(3713, 3827, 0), HOLE_31481, HOLE_31482),
|
||||
FOSSIL_ISLAND_HARDWOOD_SOUTH(70, "Hole" , new WorldPoint(3715, 3817, 0), HOLE_31481, HOLE_31482),
|
||||
FOSSIL_ISLAND_HARDWOOD_NORTH(70, "Hole", new WorldPoint(3713, 3827, 0), HOLE_31481, HOLE_31482),
|
||||
FOSSIL_ISLAND_HARDWOOD_SOUTH(70, "Hole", new WorldPoint(3715, 3817, 0), HOLE_31481, HOLE_31482),
|
||||
AL_KHARID_WINDOW(70, "Window", new WorldPoint(3293, 3158, 0), BROKEN_WALL_33344, BIG_WINDOW),
|
||||
GWD_SARADOMIN_ROPE_NORTH(70, "Rope Descent", new WorldPoint(2912, 5300, 0), NULL_26371),
|
||||
GWD_SARADOMIN_ROPE_SOUTH(70, "Rope Descent", new WorldPoint(2951, 5267, 0), NULL_26375),
|
||||
SLAYER_TOWER_ADVANCED_CHAIN_FIRST(71, "Spiked Chain (Floor 2)", new WorldPoint(3447, 3578, 0), SPIKEY_CHAIN ),
|
||||
SLAYER_TOWER_ADVANCED_CHAIN_FIRST(71, "Spiked Chain (Floor 2)", new WorldPoint(3447, 3578, 0), SPIKEY_CHAIN),
|
||||
SLAYER_TOWER_ADVANCED_CHAIN_SECOND(71, "Spiked Chain (Floor 3)", new WorldPoint(3446, 3576, 0), SPIKEY_CHAIN_16538),
|
||||
STRONGHOLD_SLAYER_CAVE_TUNNEL(72, "Tunnel", new WorldPoint(2431, 9806, 0), TUNNEL_30174, TUNNEL_30175),
|
||||
TROLL_STRONGHOLD_WALL_CLIMB(73, "Rocks", new WorldPoint(2841, 3694, 0), ROCKS_16464),
|
||||
ARCEUUS_ESSENSE_MINE_WEST(73, "Rock Climb", new WorldPoint(1742, 3853, 0), ROCKS_27984, ROCKS_27985 ),
|
||||
ARCEUUS_ESSENSE_MINE_WEST(73, "Rock Climb", new WorldPoint(1742, 3853, 0), ROCKS_27984, ROCKS_27985),
|
||||
LAVA_DRAGON_ISLE_JUMP(74, "Stepping Stone", new WorldPoint(3200, 3807, 0), STEPPING_STONE_14918),
|
||||
REVENANT_CAVES_DEMONS_JUMP(75, "Jump", new WorldPoint(3199, 10135, 0), PILLAR_31561),
|
||||
REVENANT_CAVES_ANKOU_EAST(75, "Jump", new WorldPoint(3201, 10195, 0), PILLAR_31561),
|
||||
REVENANT_CAVES_ANKOU_NORTH(75, "Jump", new WorldPoint(3180, 10209, 0), PILLAR_31561),
|
||||
ZUL_ANDRA_ISLAND_CROSSING(76, "Stepping Stone", new WorldPoint(2156, 3073, 0), STEPPING_STONE_10663),
|
||||
SHILO_VILLAGE_STEPPING_STONES( 77, "Stepping Stones", new WorldPoint(2863, 2974, 0), STEPPING_STONE_16466),
|
||||
SHILO_VILLAGE_STEPPING_STONES(77, "Stepping Stones", new WorldPoint(2863, 2974, 0), STEPPING_STONE_16466),
|
||||
KHARAZI_JUNGLE_VINE_CLIMB(79, "Vine", new WorldPoint(2897, 2939, 0), NULL_26884, NULL_26886),
|
||||
TAVERLEY_DUNGEON_SPIKED_BLADES(80, "Strange Floor", new WorldPoint(2877, 9813, 0), STRANGE_FLOOR),
|
||||
SLAYER_DUNGEON_CHASM_JUMP(81, "Spiked Blades", new WorldPoint(2770, 10003, 0), STRANGE_FLOOR_16544),
|
||||
|
||||
@@ -36,6 +36,7 @@ import javax.swing.JLabel;
|
||||
public class AsyncBufferedImage extends BufferedImage
|
||||
{
|
||||
private final List<Runnable> listeners = new CopyOnWriteArrayList<>();
|
||||
|
||||
public AsyncBufferedImage(int width, int height, int imageType)
|
||||
{
|
||||
super(width, height, imageType);
|
||||
|
||||
@@ -48,7 +48,116 @@ import static net.runelite.api.Constants.CLIENT_DEFAULT_ZOOM;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.ItemComposition;
|
||||
import net.runelite.api.ItemID;
|
||||
import static net.runelite.api.ItemID.*;
|
||||
import static net.runelite.api.ItemID.AGILITY_CAPE;
|
||||
import static net.runelite.api.ItemID.AGILITY_CAPET;
|
||||
import static net.runelite.api.ItemID.AGILITY_CAPET_13341;
|
||||
import static net.runelite.api.ItemID.AGILITY_CAPE_13340;
|
||||
import static net.runelite.api.ItemID.BOOTS_OF_LIGHTNESS;
|
||||
import static net.runelite.api.ItemID.BOOTS_OF_LIGHTNESS_89;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_11861;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13589;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13590;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13601;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13602;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13613;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13614;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13625;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13626;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13637;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13638;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13677;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13678;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_21076;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_21078;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_11853;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13581;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13582;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13593;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13594;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13605;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13606;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13617;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13618;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13629;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13630;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13669;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13670;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_21064;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_21066;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_11859;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13587;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13588;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13599;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13600;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13611;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13612;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13623;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13624;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13635;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13636;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13675;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13676;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_21073;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_21075;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_11851;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13579;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13580;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13591;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13592;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13603;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13604;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13615;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13616;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13627;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13628;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13667;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13668;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_21061;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_21063;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_11857;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13585;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13586;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13597;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13598;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13609;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13610;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13621;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13622;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13633;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13634;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13673;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13674;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_21070;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_21072;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_11855;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13583;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13584;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13595;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13596;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13607;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13608;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13619;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13620;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13631;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13632;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13671;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13672;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_21067;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_21069;
|
||||
import static net.runelite.api.ItemID.MAX_CAPE;
|
||||
import static net.runelite.api.ItemID.MAX_CAPE_13342;
|
||||
import static net.runelite.api.ItemID.PENANCE_GLOVES;
|
||||
import static net.runelite.api.ItemID.PENANCE_GLOVES_10554;
|
||||
import static net.runelite.api.ItemID.SPOTTED_CAPE;
|
||||
import static net.runelite.api.ItemID.SPOTTED_CAPE_10073;
|
||||
import static net.runelite.api.ItemID.SPOTTIER_CAPE;
|
||||
import static net.runelite.api.ItemID.SPOTTIER_CAPE_10074;
|
||||
import net.runelite.api.SpritePixels;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.api.events.PostItemComposition;
|
||||
@@ -258,6 +367,7 @@ public class ItemManager
|
||||
|
||||
/**
|
||||
* Invalidates internal item manager item composition cache (but not client item composition cache)
|
||||
*
|
||||
* @see Client#getItemCompositionCache()
|
||||
*/
|
||||
public void invalidateItemCompositionCache()
|
||||
@@ -303,6 +413,7 @@ public class ItemManager
|
||||
|
||||
/**
|
||||
* Look up an item's stats
|
||||
*
|
||||
* @param itemId item id
|
||||
* @return item stats
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,411 @@ import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import static net.runelite.api.ItemID.*;
|
||||
import static net.runelite.api.ItemID.ABYSSAL_TENTACLE;
|
||||
import static net.runelite.api.ItemID.ABYSSAL_WHIP;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD_100;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD_25;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD_50;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD_75;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_100;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_25;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_50;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_75;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_100;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_25;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_50;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_75;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF_100;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF_25;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF_50;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF_75;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_FURY;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_FURY_OR;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY1;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY2;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY3;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY5;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T1;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T2;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T3;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T5;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_TORTURE;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_TORTURE_OR;
|
||||
import static net.runelite.api.ItemID.ANCIENT_WYVERN_SHIELD;
|
||||
import static net.runelite.api.ItemID.ANCIENT_WYVERN_SHIELD_21634;
|
||||
import static net.runelite.api.ItemID.ANGUISH_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.ARCHERS_RING;
|
||||
import static net.runelite.api.ItemID.ARCHERS_RING_I;
|
||||
import static net.runelite.api.ItemID.ARMADYL_GODSWORD;
|
||||
import static net.runelite.api.ItemID.ARMADYL_GODSWORD_OR;
|
||||
import static net.runelite.api.ItemID.ARMADYL_GODSWORD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.BANDOS_GODSWORD;
|
||||
import static net.runelite.api.ItemID.BANDOS_GODSWORD_OR;
|
||||
import static net.runelite.api.ItemID.BANDOS_GODSWORD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.BERSERKER_RING;
|
||||
import static net.runelite.api.ItemID.BERSERKER_RING_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_1;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_10_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_1_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_2;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_2_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_3;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_3_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_4;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_4_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_5;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_5_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_6;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_6_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_7;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_7_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_8;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_8_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_9;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_9_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_I;
|
||||
import static net.runelite.api.ItemID.BLACK_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.BLACK_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.BONECRUSHER_NECKLACE;
|
||||
import static net.runelite.api.ItemID.BOTTOMLESS_COMPOST_BUCKET;
|
||||
import static net.runelite.api.ItemID.BOTTOMLESS_COMPOST_BUCKET_22997;
|
||||
import static net.runelite.api.ItemID.CRAWS_BOW;
|
||||
import static net.runelite.api.ItemID.CRAWS_BOW_U;
|
||||
import static net.runelite.api.ItemID.DARK_BOW;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_12765;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_12766;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_12767;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_12768;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_20408;
|
||||
import static net.runelite.api.ItemID.DARK_INFINITY_BOTTOMS;
|
||||
import static net.runelite.api.ItemID.DARK_INFINITY_COLOUR_KIT;
|
||||
import static net.runelite.api.ItemID.DARK_INFINITY_HAT;
|
||||
import static net.runelite.api.ItemID.DARK_INFINITY_TOP;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_100;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_25;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_50;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_75;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM_100;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM_25;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM_50;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM_75;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_100;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_25;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_50;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_75;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_100;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_25;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_50;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_75;
|
||||
import static net.runelite.api.ItemID.DRAGONBONE_NECKLACE;
|
||||
import static net.runelite.api.ItemID.DRAGONFIRE_SHIELD;
|
||||
import static net.runelite.api.ItemID.DRAGONFIRE_SHIELD_11284;
|
||||
import static net.runelite.api.ItemID.DRAGONFIRE_WARD;
|
||||
import static net.runelite.api.ItemID.DRAGONFIRE_WARD_22003;
|
||||
import static net.runelite.api.ItemID.DRAGON_BOOTS;
|
||||
import static net.runelite.api.ItemID.DRAGON_BOOTS_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_BOOTS_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_3140;
|
||||
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_DEFENDER_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_DEFENDER_T;
|
||||
import static net.runelite.api.ItemID.DRAGON_FULL_HELM;
|
||||
import static net.runelite.api.ItemID.DRAGON_FULL_HELM_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_FULL_HELM_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_KITESHIELD;
|
||||
import static net.runelite.api.ItemID.DRAGON_KITESHIELD_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_KITESHIELD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_LEGSSKIRT_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_PICKAXE;
|
||||
import static net.runelite.api.ItemID.DRAGON_PICKAXE_12797;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATEBODY;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATEBODY_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATEBODY_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATELEGS;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATELEGS_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATESKIRT;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATESKIRT_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_SCIMITAR;
|
||||
import static net.runelite.api.ItemID.DRAGON_SCIMITAR_OR;
|
||||
import static net.runelite.api.ItemID.DRAGON_SCIMITAR_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD;
|
||||
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.ENSOULED_ABYSSAL_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_ABYSSAL_HEAD_13508;
|
||||
import static net.runelite.api.ItemID.ENSOULED_AVIANSIE_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_AVIANSIE_HEAD_13505;
|
||||
import static net.runelite.api.ItemID.ENSOULED_BEAR_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_BEAR_HEAD_13463;
|
||||
import static net.runelite.api.ItemID.ENSOULED_BLOODVELD_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_BLOODVELD_HEAD_13496;
|
||||
import static net.runelite.api.ItemID.ENSOULED_CHAOS_DRUID_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_CHAOS_DRUID_HEAD_13472;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DAGANNOTH_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DAGANNOTH_HEAD_13493;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DEMON_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DEMON_HEAD_13502;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DOG_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DOG_HEAD_13469;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DRAGON_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DRAGON_HEAD_13511;
|
||||
import static net.runelite.api.ItemID.ENSOULED_ELF_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_ELF_HEAD_13481;
|
||||
import static net.runelite.api.ItemID.ENSOULED_GIANT_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_GIANT_HEAD_13475;
|
||||
import static net.runelite.api.ItemID.ENSOULED_GOBLIN_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_GOBLIN_HEAD_13448;
|
||||
import static net.runelite.api.ItemID.ENSOULED_HORROR_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_HORROR_HEAD_13487;
|
||||
import static net.runelite.api.ItemID.ENSOULED_IMP_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_IMP_HEAD_13454;
|
||||
import static net.runelite.api.ItemID.ENSOULED_KALPHITE_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_KALPHITE_HEAD_13490;
|
||||
import static net.runelite.api.ItemID.ENSOULED_MINOTAUR_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_MINOTAUR_HEAD_13457;
|
||||
import static net.runelite.api.ItemID.ENSOULED_MONKEY_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_MONKEY_HEAD_13451;
|
||||
import static net.runelite.api.ItemID.ENSOULED_OGRE_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_OGRE_HEAD_13478;
|
||||
import static net.runelite.api.ItemID.ENSOULED_SCORPION_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_SCORPION_HEAD_13460;
|
||||
import static net.runelite.api.ItemID.ENSOULED_TROLL_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_TROLL_HEAD_13484;
|
||||
import static net.runelite.api.ItemID.ENSOULED_TZHAAR_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_TZHAAR_HEAD_13499;
|
||||
import static net.runelite.api.ItemID.ENSOULED_UNICORN_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_UNICORN_HEAD_13466;
|
||||
import static net.runelite.api.ItemID.FEROCIOUS_GLOVES;
|
||||
import static net.runelite.api.ItemID.FROZEN_ABYSSAL_WHIP;
|
||||
import static net.runelite.api.ItemID.FURY_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE1;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE2;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE3;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE4;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE5;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE6;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE7;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE8;
|
||||
import static net.runelite.api.ItemID.GRANITE_MAUL;
|
||||
import static net.runelite.api.ItemID.GRANITE_MAUL_12848;
|
||||
import static net.runelite.api.ItemID.GRANITE_RING;
|
||||
import static net.runelite.api.ItemID.GRANITE_RING_I;
|
||||
import static net.runelite.api.ItemID.GREEN_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.GREEN_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_100;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_25;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_50;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_75;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM_100;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM_25;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM_50;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM_75;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_100;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_25;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_50;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_75;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_100;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_25;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_50;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_75;
|
||||
import static net.runelite.api.ItemID.HYDRA_LEATHER;
|
||||
import static net.runelite.api.ItemID.HYDRA_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.HYDRA_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.HYDRA_TAIL;
|
||||
import static net.runelite.api.ItemID.INFINITY_BOTTOMS;
|
||||
import static net.runelite.api.ItemID.INFINITY_BOTTOMS_20575;
|
||||
import static net.runelite.api.ItemID.INFINITY_HAT;
|
||||
import static net.runelite.api.ItemID.INFINITY_TOP;
|
||||
import static net.runelite.api.ItemID.INFINITY_TOP_10605;
|
||||
import static net.runelite.api.ItemID.INFINITY_TOP_20574;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF_100;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF_25;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF_50;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF_75;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW_100;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW_25;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW_50;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW_75;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_100;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_25;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_50;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_75;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_100;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_25;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_50;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_75;
|
||||
import static net.runelite.api.ItemID.KRAKEN_TENTACLE;
|
||||
import static net.runelite.api.ItemID.LAVA_BATTLESTAFF;
|
||||
import static net.runelite.api.ItemID.LAVA_BATTLESTAFF_21198;
|
||||
import static net.runelite.api.ItemID.LIGHT_INFINITY_BOTTOMS;
|
||||
import static net.runelite.api.ItemID.LIGHT_INFINITY_COLOUR_KIT;
|
||||
import static net.runelite.api.ItemID.LIGHT_INFINITY_HAT;
|
||||
import static net.runelite.api.ItemID.LIGHT_INFINITY_TOP;
|
||||
import static net.runelite.api.ItemID.MAGIC_SHORTBOW;
|
||||
import static net.runelite.api.ItemID.MAGIC_SHORTBOW_I;
|
||||
import static net.runelite.api.ItemID.MAGMA_HELM;
|
||||
import static net.runelite.api.ItemID.MAGMA_HELM_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.MALEDICTION_WARD;
|
||||
import static net.runelite.api.ItemID.MALEDICTION_WARD_12806;
|
||||
import static net.runelite.api.ItemID.NECKLACE_OF_ANGUISH;
|
||||
import static net.runelite.api.ItemID.NECKLACE_OF_ANGUISH_OR;
|
||||
import static net.runelite.api.ItemID.OCCULT_NECKLACE;
|
||||
import static net.runelite.api.ItemID.OCCULT_NECKLACE_OR;
|
||||
import static net.runelite.api.ItemID.OCCULT_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.ODIUM_WARD;
|
||||
import static net.runelite.api.ItemID.ODIUM_WARD_12807;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_1;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_2;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_4;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_5;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_6;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_7;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_8;
|
||||
import static net.runelite.api.ItemID.PURPLE_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.PURPLE_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.RED_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.RED_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING1;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING2;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING3;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING4;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING5;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING6;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING7;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING8;
|
||||
import static net.runelite.api.ItemID.RING_OF_SUFFERING;
|
||||
import static net.runelite.api.ItemID.RING_OF_SUFFERING_I;
|
||||
import static net.runelite.api.ItemID.RING_OF_SUFFERING_R;
|
||||
import static net.runelite.api.ItemID.RING_OF_SUFFERING_RI;
|
||||
import static net.runelite.api.ItemID.RING_OF_THE_GODS;
|
||||
import static net.runelite.api.ItemID.RING_OF_THE_GODS_I;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_1;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_2;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_3;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_4;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I1;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I2;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I3;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I4;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I5;
|
||||
import static net.runelite.api.ItemID.SANGUINESTI_STAFF;
|
||||
import static net.runelite.api.ItemID.SANGUINESTI_STAFF_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.SARADOMINS_BLESSED_SWORD;
|
||||
import static net.runelite.api.ItemID.SARADOMINS_TEAR;
|
||||
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD;
|
||||
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD_OR;
|
||||
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.SCYTHE_OF_VITUR;
|
||||
import static net.runelite.api.ItemID.SCYTHE_OF_VITUR_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.SEERS_RING;
|
||||
import static net.runelite.api.ItemID.SEERS_RING_I;
|
||||
import static net.runelite.api.ItemID.SERPENTINE_HELM;
|
||||
import static net.runelite.api.ItemID.SERPENTINE_HELM_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE1;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE2;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE3;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE5;
|
||||
import static net.runelite.api.ItemID.SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.STEAM_BATTLESTAFF;
|
||||
import static net.runelite.api.ItemID.STEAM_BATTLESTAFF_12795;
|
||||
import static net.runelite.api.ItemID.TANZANITE_HELM;
|
||||
import static net.runelite.api.ItemID.TANZANITE_HELM_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.THAMMARONS_SCEPTRE;
|
||||
import static net.runelite.api.ItemID.THAMMARONS_SCEPTRE_U;
|
||||
import static net.runelite.api.ItemID.TOME_OF_FIRE;
|
||||
import static net.runelite.api.ItemID.TOME_OF_FIRE_EMPTY;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS_100;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS_25;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS_50;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS_75;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM_100;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM_25;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM_50;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM_75;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_100;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_25;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_50;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_75;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_100;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_25;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_50;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_75;
|
||||
import static net.runelite.api.ItemID.TORTURE_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.TOXIC_BLOWPIPE;
|
||||
import static net.runelite.api.ItemID.TOXIC_BLOWPIPE_EMPTY;
|
||||
import static net.runelite.api.ItemID.TOXIC_STAFF_OF_THE_DEAD;
|
||||
import static net.runelite.api.ItemID.TOXIC_STAFF_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.TREASONOUS_RING;
|
||||
import static net.runelite.api.ItemID.TREASONOUS_RING_I;
|
||||
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SEAS;
|
||||
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SEAS_E;
|
||||
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SWAMP;
|
||||
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SWAMP_E;
|
||||
import static net.runelite.api.ItemID.TURQUOISE_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.TURQUOISE_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.TYRANNICAL_RING;
|
||||
import static net.runelite.api.ItemID.TYRANNICAL_RING_I;
|
||||
import static net.runelite.api.ItemID.UNCHARGED_TOXIC_TRIDENT;
|
||||
import static net.runelite.api.ItemID.UNCHARGED_TOXIC_TRIDENT_E;
|
||||
import static net.runelite.api.ItemID.UNCHARGED_TRIDENT;
|
||||
import static net.runelite.api.ItemID.UNCHARGED_TRIDENT_E;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD_100;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD_25;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD_50;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD_75;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL_100;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL_25;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL_50;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL_75;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM_100;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM_25;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM_50;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM_75;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_100;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_25;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_50;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_75;
|
||||
import static net.runelite.api.ItemID.VIGGORAS_CHAINMACE;
|
||||
import static net.runelite.api.ItemID.VIGGORAS_CHAINMACE_U;
|
||||
import static net.runelite.api.ItemID.VOLCANIC_ABYSSAL_WHIP;
|
||||
import static net.runelite.api.ItemID.WARRIOR_RING;
|
||||
import static net.runelite.api.ItemID.WARRIOR_RING_I;
|
||||
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD;
|
||||
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD_OR;
|
||||
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD_ORNAMENT_KIT;
|
||||
|
||||
/**
|
||||
* Converts untradeable items to it's tradeable counterparts
|
||||
|
||||
@@ -53,6 +53,7 @@ public class NPCManager
|
||||
|
||||
/**
|
||||
* Returns health for target NPC based on it's combat level and name
|
||||
*
|
||||
* @param name npc name
|
||||
* @param combatLevel npc combat level
|
||||
* @return health or null if HP is unknown
|
||||
|
||||
@@ -33,12 +33,12 @@ import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.FontID;
|
||||
import net.runelite.api.widgets.WidgetType;
|
||||
import net.runelite.api.widgets.JavaScriptCallback;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetPositionMode;
|
||||
import net.runelite.api.widgets.WidgetSizeMode;
|
||||
import net.runelite.api.widgets.WidgetTextAlignment;
|
||||
import net.runelite.api.widgets.WidgetType;
|
||||
import net.runelite.client.input.KeyListener;
|
||||
|
||||
@Slf4j
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
*/
|
||||
package net.runelite.client.menus;
|
||||
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
|
||||
import java.awt.Color;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.ui.JagexColors;
|
||||
import net.runelite.client.util.ColorUtil;
|
||||
|
||||
|
||||
@@ -59,11 +59,11 @@ public class BlackjackPlugin extends Plugin
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
private static long timeSinceKnockout;
|
||||
private static long timeSinceAggro;
|
||||
private long timeSinceKnockout;
|
||||
private long timeSinceAggro;
|
||||
|
||||
@Getter
|
||||
private static long currentGameTick;
|
||||
private long currentGameTick;
|
||||
|
||||
@Override
|
||||
public void configure(Binder binder)
|
||||
@@ -109,7 +109,7 @@ public class BlackjackPlugin extends Plugin
|
||||
public void onMenuEntryAdded(MenuEntryAdded menuEntryAdded)
|
||||
{
|
||||
String target = menuEntryAdded.getTarget().toLowerCase();
|
||||
if ((target.contains("bandit") | target.contains("menaphite thug")))
|
||||
if ((target.contains("bandit") || target.contains("menaphite thug")))
|
||||
{
|
||||
Quest quest = Quest.THE_FEUD;
|
||||
if (quest.getState(client) == QuestState.FINISHED)
|
||||
|
||||
@@ -99,7 +99,7 @@ class CombatLevelOverlay extends Overlay
|
||||
int prayerLevel = client.getRealSkillLevel(Skill.PRAYER);
|
||||
|
||||
// calculate initial required numbers
|
||||
double base = DEF_HP_MULT * (defenceLevel + hitpointsLevel + Math.floor(prayerLevel / 2));
|
||||
double base = DEF_HP_MULT * (defenceLevel + hitpointsLevel + Math.floor(prayerLevel / 2D));
|
||||
double melee = ATT_STR_MULT * (attackLevel + strengthLevel);
|
||||
double range = RANGE_MAGIC_MULT * Math.floor(rangedLevel * RANGE_MAGIC_LEVEL_MULT);
|
||||
double mage = RANGE_MAGIC_MULT * Math.floor(magicLevel * RANGE_MAGIC_LEVEL_MULT);
|
||||
|
||||
@@ -64,13 +64,10 @@ public class PrayerTracker
|
||||
{
|
||||
newTick.put(actor, new HashMap<>());
|
||||
}
|
||||
if (actor instanceof Player)
|
||||
{
|
||||
if (actor instanceof Player)
|
||||
{
|
||||
newTick.get(actor).put("PrayerIcon", ((Player) actor).getOverheadIcon() == null ? -1 : ((Player) actor).getOverheadIcon().ordinal());
|
||||
}
|
||||
}
|
||||
newTick.get(actor).put("SpotAnim", actor.getGraphic());
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.apache.commons.lang3.ArrayUtils;
|
||||
)
|
||||
public class FriendTaggingPlugin extends Plugin
|
||||
{
|
||||
public static ConcurrentHashMap<String, String> taggedFriends = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentHashMap<String, String> taggedFriends = new ConcurrentHashMap<>();
|
||||
|
||||
private static final String CONFIG_GROUP = "friendtagging";
|
||||
private static final int CHARACTER_LIMIT = 30;
|
||||
|
||||
@@ -214,13 +214,9 @@ public class ItemStatPlugin extends Plugin
|
||||
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL);
|
||||
closeButton.setAction(0, "Close");
|
||||
closeButton.setOnMouseOverListener((JavaScriptCallback) (ev) ->
|
||||
{
|
||||
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL_HOVERED);
|
||||
});
|
||||
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL_HOVERED));
|
||||
closeButton.setOnMouseLeaveListener((JavaScriptCallback) (ev) ->
|
||||
{
|
||||
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL);
|
||||
});
|
||||
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL));
|
||||
closeButton.setOnOpListener((JavaScriptCallback) (ev) -> resetGEInventory());
|
||||
closeButton.setHasListener(true);
|
||||
closeButton.revalidate();
|
||||
|
||||
@@ -266,9 +266,9 @@ public interface PlayerIndicatorsConfig extends Config
|
||||
description = "The location of the skull icon for skulled players",
|
||||
group = "Target Indicator"
|
||||
)
|
||||
default PlayerIndicatorsPlugin.minimapSkullLocations skullLocation()
|
||||
default PlayerIndicatorsPlugin.MinimapSkullLocations skullLocation()
|
||||
{
|
||||
return PlayerIndicatorsPlugin.minimapSkullLocations.AFTER_NAME;
|
||||
return PlayerIndicatorsPlugin.MinimapSkullLocations.AFTER_NAME;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
|
||||
@@ -97,7 +97,7 @@ public class PlayerIndicatorsMinimapOverlay extends Overlay
|
||||
{
|
||||
int width = graphics.getFontMetrics().stringWidth(name);
|
||||
int height = graphics.getFontMetrics().getHeight();
|
||||
if (config.skullLocation().equals(PlayerIndicatorsPlugin.minimapSkullLocations.AFTER_NAME))
|
||||
if (config.skullLocation().equals(PlayerIndicatorsPlugin.MinimapSkullLocations.AFTER_NAME))
|
||||
{
|
||||
OverlayUtil.renderImageLocation(graphics, new Point(minimapLocation.getX()
|
||||
+ width, minimapLocation.getY() - height),
|
||||
|
||||
@@ -217,7 +217,7 @@ public class PlayerIndicatorsOverlay extends Overlay
|
||||
{
|
||||
int width = graphics.getFontMetrics().stringWidth(name);
|
||||
int height = graphics.getFontMetrics().getHeight();
|
||||
if (config.skullLocation().equals(PlayerIndicatorsPlugin.minimapSkullLocations.AFTER_NAME))
|
||||
if (config.skullLocation().equals(PlayerIndicatorsPlugin.MinimapSkullLocations.AFTER_NAME))
|
||||
{
|
||||
OverlayUtil.renderImageLocation(graphics, new Point(textLocation.getX()
|
||||
+ width, textLocation.getY() - height),
|
||||
|
||||
@@ -365,7 +365,7 @@ public class PlayerIndicatorsPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
public enum minimapSkullLocations
|
||||
public enum MinimapSkullLocations
|
||||
{
|
||||
BEFORE_NAME,
|
||||
AFTER_NAME
|
||||
|
||||
@@ -100,6 +100,7 @@ public class PlayerInfoCustomIndicator extends InfoBox
|
||||
break;
|
||||
case SPECIAL:
|
||||
currLvl = client.getVar(VarPlayer.SPECIAL_ATTACK_PERCENT) / 1000.0F;
|
||||
break;
|
||||
case WORLD:
|
||||
currLvl = 1000; // hacky
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ public class IDAStarMM extends IDAStar
|
||||
Point locSwap = new Point(locBlank.getX(), locBlank.getY() + 1);
|
||||
swap(locBlank, locSwap);
|
||||
}
|
||||
else if (distY <= -1)
|
||||
else
|
||||
{
|
||||
Point locSwap = new Point(locBlank.getX(), locBlank.getY() - 1);
|
||||
swap(locBlank, locSwap);
|
||||
@@ -252,7 +252,7 @@ public class IDAStarMM extends IDAStar
|
||||
Point locSwap = new Point(locBlank.getX() + 1, locBlank.getY());
|
||||
swap(locBlank, locSwap);
|
||||
}
|
||||
else if (distX <= -1)
|
||||
else
|
||||
{
|
||||
Point locSwap = new Point(locBlank.getX() - 1, locBlank.getY());
|
||||
swap(locBlank, locSwap);
|
||||
|
||||
@@ -162,6 +162,7 @@ public class PyramidPlunderPlugin extends Plugin
|
||||
break;
|
||||
case LOADING:
|
||||
obstacles.clear();
|
||||
break;
|
||||
case LOGGED_IN:
|
||||
if (!isInRegion())
|
||||
{
|
||||
|
||||
@@ -817,7 +817,7 @@ public class RaidsPlugin extends Plugin
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if (seconds >= 3600)
|
||||
{
|
||||
builder.append((int) Math.floor(seconds / 3600) + ";");
|
||||
builder.append((int) Math.floor(seconds / 3600)).append(";");
|
||||
}
|
||||
seconds %= 3600;
|
||||
if (builder.toString().equals(""))
|
||||
@@ -842,7 +842,7 @@ public class RaidsPlugin extends Plugin
|
||||
tooltip = null;
|
||||
return;
|
||||
}
|
||||
builder.append("Upper level: " + secondsToTime(upperTime));
|
||||
builder.append("Upper level: ").append(secondsToTime(upperTime));
|
||||
if (middleTime == -1)
|
||||
{
|
||||
if (lowerTime == -1)
|
||||
@@ -852,12 +852,12 @@ public class RaidsPlugin extends Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.append("</br>Lower level: " + secondsToTime(lowerTime - upperTime));
|
||||
builder.append("</br>Lower level: ").append(secondsToTime(lowerTime - upperTime));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.append("</br>Middle level: " + secondsToTime(middleTime - upperTime));
|
||||
builder.append("</br>Middle level: ").append(secondsToTime(middleTime - upperTime));
|
||||
if (lowerTime == -1)
|
||||
{
|
||||
tooltip = builder.toString();
|
||||
@@ -865,7 +865,7 @@ public class RaidsPlugin extends Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.append("</br>Lower level: " + secondsToTime(lowerTime - middleTime));
|
||||
builder.append("</br>Lower level: ").append(secondsToTime(lowerTime - middleTime));
|
||||
}
|
||||
}
|
||||
if (raidTime == -1)
|
||||
@@ -873,7 +873,7 @@ public class RaidsPlugin extends Plugin
|
||||
tooltip = builder.toString();
|
||||
return;
|
||||
}
|
||||
builder.append("</br>Olm: " + secondsToTime(raidTime - lowerTime));
|
||||
builder.append("</br>Olm: ").append(secondsToTime(raidTime - lowerTime));
|
||||
tooltip = builder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public enum ThievingRoomType
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public static ThievingRoomType IdentifyByInstancePoint(InstancePoint point)
|
||||
public static ThievingRoomType identifyByInstancePoint(InstancePoint point)
|
||||
{
|
||||
for (ThievingRoomType type : ThievingRoomType.values())
|
||||
{
|
||||
|
||||
@@ -126,7 +126,7 @@ public class RaidsThievingPlugin extends Plugin
|
||||
|
||||
if (obj.getId() == RaidsThievingConstants.EMPTY_TROUGH)
|
||||
{
|
||||
ThievingRoomType type = ThievingRoomType.IdentifyByInstancePoint(absLoc);
|
||||
ThievingRoomType type = ThievingRoomType.identifyByInstancePoint(absLoc);
|
||||
|
||||
if (type != null)
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ public class RegenMeterOverlay extends Overlay
|
||||
g.setColor(RegenMeterOverlay.OVERLAY_COLOR);
|
||||
g.fillOval(
|
||||
bounds.x + OFFSET,
|
||||
bounds.y + (int) (bounds.height / 2 - (DIAMETER) / 2),
|
||||
bounds.y + (int) (bounds.height / 2D - (DIAMETER) / 2D),
|
||||
(int) DIAMETER, (int) DIAMETER);
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class RegenMeterOverlay extends Overlay
|
||||
}
|
||||
Rectangle bounds = widget.getBounds();
|
||||
|
||||
Arc2D.Double arc = new Arc2D.Double(bounds.x + OFFSET, bounds.y + (bounds.height / 2 - DIAMETER / 2), DIAMETER, DIAMETER, 90.d, -360.d * percent, Arc2D.OPEN);
|
||||
Arc2D.Double arc = new Arc2D.Double(bounds.x + OFFSET, bounds.y + (bounds.height / 2D - DIAMETER / 2D), DIAMETER, DIAMETER, 90.d, -360.d * percent, Arc2D.OPEN);
|
||||
final Stroke STROKE = new BasicStroke(2f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
|
||||
g.setStroke(STROKE);
|
||||
g.setColor(color);
|
||||
|
||||
@@ -228,11 +228,6 @@ public class RunecraftPlugin extends Plugin
|
||||
client.setMenuEntries(newEntries);
|
||||
}
|
||||
|
||||
private int searchIndex(MenuEntry[] entries, String option, String target)
|
||||
{
|
||||
return searchIndex(entries, option, target, false);
|
||||
}
|
||||
|
||||
private int searchIndex(MenuEntry[] entries, String option, String target, boolean contains)
|
||||
{
|
||||
for (int i = entries.length - 1; i >= 0; i--)
|
||||
|
||||
@@ -100,16 +100,16 @@ class RunedokuOverlay extends Overlay
|
||||
{
|
||||
if (!util.makeSimple(util.createTable(client)).contains(0))
|
||||
{
|
||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(widget.getBounds()), Color.GREEN);
|
||||
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(widget.getBounds()), Color.GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(widget.getBounds()), util.referenceColors(i));
|
||||
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(widget.getBounds()), util.referenceColors(i));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(widget.getBounds()), RED);
|
||||
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(widget.getBounds()), RED);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -134,17 +134,17 @@ class RunedokuOverlay extends Overlay
|
||||
{
|
||||
if (!util.makeSimple(util.createTable(client)).contains(0))
|
||||
{
|
||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(squareToHighlight.getBounds()), Color.GREEN);
|
||||
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(squareToHighlight.getBounds()), Color.GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(squareToHighlight.getBounds()), util.sudokuPieceToColor(simpleArr.get(iteration)));
|
||||
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(squareToHighlight.getBounds()), util.sudokuPieceToColor(simpleArr.get(iteration)));
|
||||
}
|
||||
iteration++;
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(squareToHighlight.getBounds()), RED);
|
||||
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(squareToHighlight.getBounds()), RED);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.runelite.api.Client;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetItem;
|
||||
|
||||
public class RunedokuUtil
|
||||
class RunedokuUtil
|
||||
{
|
||||
|
||||
private final RunedokuConfig config;
|
||||
@@ -20,7 +20,7 @@ public class RunedokuUtil
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
protected Color sudokuPieceToColor(int i)
|
||||
Color sudokuPieceToColor(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ public class RunedokuUtil
|
||||
}
|
||||
}
|
||||
|
||||
protected Color referenceColors(int i)
|
||||
Color referenceColors(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ public class RunedokuUtil
|
||||
* @param board
|
||||
* @return
|
||||
*/
|
||||
protected ArrayList<Integer> makeSimple(int[][] board)
|
||||
ArrayList<Integer> makeSimple(int[][] board)
|
||||
{
|
||||
ArrayList<Integer> list = new ArrayList<>();
|
||||
for (int i = 0; i < 9; i++)
|
||||
@@ -99,7 +99,7 @@ public class RunedokuUtil
|
||||
* @param rect
|
||||
* @return
|
||||
*/
|
||||
protected Polygon RectangleToPolygon(Rectangle rect)
|
||||
public static Polygon rectangleToPolygon(Rectangle rect)
|
||||
{
|
||||
int[] xpoints = {rect.x, rect.x + rect.width, rect.x + rect.width, rect.x};
|
||||
int[] ypoints = {rect.y, rect.y, rect.y + rect.height, rect.y + rect.height};
|
||||
@@ -113,7 +113,7 @@ public class RunedokuUtil
|
||||
* @return sudoku table that the client currently sees in a 2d array
|
||||
* @author gazivodag
|
||||
*/
|
||||
protected int[][] createTable(Client client)
|
||||
int[][] createTable(Client client)
|
||||
{
|
||||
int[][] myArr = new int[9][9];
|
||||
Widget sudokuScreen = client.getWidget(288, 131);
|
||||
|
||||
@@ -52,8 +52,8 @@ import net.runelite.client.ui.ClientUI;
|
||||
public class RuneLitePlusPlugin extends Plugin
|
||||
{
|
||||
public static boolean customPresenceEnabled = false;
|
||||
public static String rlPlusDiscordApp = "560644885250572289";
|
||||
public static String rlDiscordApp = "409416265891971072";
|
||||
public static final String rlPlusDiscordApp = "560644885250572289";
|
||||
public static final String rlDiscordApp = "409416265891971072";
|
||||
|
||||
@Inject
|
||||
public RuneLitePlusConfig config;
|
||||
|
||||
@@ -301,7 +301,8 @@ public class SlayerTaskPanel extends PluginPanel
|
||||
if (tasks.isEmpty() || isNewAssignment)
|
||||
{
|
||||
// new task so append it to the front of the list
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
SwingUtilities.invokeLater(() ->
|
||||
{
|
||||
TaskBox newBox = buildBox(slayerPlugin, tasksContainer, newData);
|
||||
newBox.update(true, newData.isPaused(), newData);
|
||||
});
|
||||
@@ -322,7 +323,8 @@ public class SlayerTaskPanel extends PluginPanel
|
||||
|
||||
// so this previous task is invalid so delete it then add in the new actually
|
||||
// correct task
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
SwingUtilities.invokeLater(() ->
|
||||
{
|
||||
tasksContainer.remove(tasks.get(0));
|
||||
tasks.remove(0);
|
||||
TaskBox newBox = buildBox(slayerPlugin, tasksContainer, newData);
|
||||
|
||||
@@ -80,7 +80,8 @@ class TaskBox extends JPanel
|
||||
container.setLayout(new BorderLayout());
|
||||
container.setBackground(ColorScheme.DARKER_GRAY_COLOR);
|
||||
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
SwingUtilities.invokeLater(() ->
|
||||
{
|
||||
BufferedImage taskImg = slayerPlugin.getImageForTask(Task.getTask(taskData.getTaskName()));
|
||||
JLabel taskIcon = new JLabel(new ImageIcon(taskImg));
|
||||
taskIcon.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
|
||||
@@ -42,7 +42,8 @@ public class TickCounterOverlay extends Overlay
|
||||
panelComponent.setBackgroundColor(config.bgColor());
|
||||
elems.add(TitleComponent.builder().text("Combat counter").color(config.titleColor()).build());
|
||||
List<Entry<String, Integer>> list = new ArrayList<>(plugin.activity.entrySet());
|
||||
list.sort((o1, o2) -> {
|
||||
list.sort((o1, o2) ->
|
||||
{
|
||||
int value = -Integer.compare(o1.getValue(), o2.getValue());
|
||||
if (value == 0)
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ public class WhaleWatchersPlugin extends Plugin
|
||||
{
|
||||
if (config.showDamageCounter())
|
||||
{
|
||||
if (!(event.getActor() == client.getLocalPlayer() |
|
||||
if (!(event.getActor() == client.getLocalPlayer() ||
|
||||
event.getActor() == client.getLocalPlayer().getInteracting()))
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -32,17 +32,14 @@ import com.google.common.reflect.TypeToken;
|
||||
import com.google.gson.Gson;
|
||||
import io.sigpipe.jbsdiff.InvalidHeaderException;
|
||||
import io.sigpipe.jbsdiff.Patch;
|
||||
|
||||
import java.applet.Applet;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.jar.Attributes;
|
||||
@@ -53,13 +50,10 @@ import java.util.jar.Manifest;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static net.runelite.client.rs.ClientUpdateCheckMode.AUTO;
|
||||
import static net.runelite.client.rs.ClientUpdateCheckMode.NONE;
|
||||
import static net.runelite.client.rs.ClientUpdateCheckMode.VANILLA;
|
||||
|
||||
import net.runelite.client.rs.mixins.MixinRunner;
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
import okhttp3.Request;
|
||||
@@ -72,6 +66,7 @@ public class ClientLoader
|
||||
{
|
||||
private final ClientConfigLoader clientConfigLoader;
|
||||
private ClientUpdateCheckMode updateCheckMode;
|
||||
|
||||
@Inject
|
||||
private ClientLoader(
|
||||
@Named("updateCheckMode") final ClientUpdateCheckMode updateCheckMode,
|
||||
|
||||
@@ -25,8 +25,18 @@
|
||||
|
||||
package net.runelite.client.rs.mixins;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Map;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.runelite.client.rs.mixins.transformers.*;
|
||||
import net.runelite.client.rs.mixins.transformers.AppendTransformer;
|
||||
import net.runelite.client.rs.mixins.transformers.DoNothingTransformer;
|
||||
import net.runelite.client.rs.mixins.transformers.InjectTransformer;
|
||||
import net.runelite.client.rs.mixins.transformers.InterfaceTransformer;
|
||||
import net.runelite.client.rs.mixins.transformers.OverwriteSanityCheck;
|
||||
import net.runelite.client.rs.mixins.transformers.OverwriteTransformer;
|
||||
import net.runelite.client.rs.mixins.transformers.PrependTransformer;
|
||||
import net.runelite.client.rs.mixins.transformers.ProtectTransformer;
|
||||
import net.runelite.client.rs.mixins.transformers.SanityChecker;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
@@ -34,9 +44,6 @@ import org.objectweb.asm.commons.ClassRemapper;
|
||||
import org.objectweb.asm.commons.Remapper;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Map;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class MixinRunner
|
||||
{
|
||||
|
||||
@@ -91,12 +91,12 @@ public class AppendTransformer extends ClassVisitor implements Opcodes
|
||||
{
|
||||
AbstractInsnNode inode = classMethod.instructions.getLast();
|
||||
|
||||
while(inode instanceof LabelNode || inode instanceof LineNumberNode)
|
||||
while (inode instanceof LabelNode || inode instanceof LineNumberNode)
|
||||
{
|
||||
inode = inode.getPrevious();
|
||||
}
|
||||
|
||||
if(RefUtils.isReturn(inode.getOpcode(), true))
|
||||
if (RefUtils.isReturn(inode.getOpcode(), true))
|
||||
{
|
||||
log.error("[Append] Can't append to {}.{}, requires typed return opcode", className, name);
|
||||
return super.visitMethod(access, name, descriptor, signature, exceptions);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class InjectTransformer extends ClassVisitor
|
||||
{
|
||||
return super.visitMethod(access, name, descriptor, signature, exceptions);
|
||||
}
|
||||
if (name.startsWith("prepend$") || name.startsWith("append$")||
|
||||
if (name.startsWith("prepend$") || name.startsWith("append$") ||
|
||||
(patching && name.startsWith("<")))
|
||||
{
|
||||
return null;
|
||||
|
||||
@@ -25,15 +25,14 @@
|
||||
|
||||
package net.runelite.client.rs.mixins.transformers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Slf4j
|
||||
public class InterfaceTransformer extends ClassVisitor implements Opcodes
|
||||
{
|
||||
@@ -53,14 +52,14 @@ public class InterfaceTransformer extends ClassVisitor implements Opcodes
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
|
||||
{
|
||||
className = name;
|
||||
if(patch != null)
|
||||
if (patch != null)
|
||||
{
|
||||
ClassReader reader = new ClassReader(patch);
|
||||
ClassNode pNode = new ClassNode();
|
||||
reader.accept(pNode, 0);
|
||||
if(pNode.interfaces != null && pNode.interfaces.size() != 0)
|
||||
if (pNode.interfaces != null && pNode.interfaces.size() != 0)
|
||||
{
|
||||
if(interfaces == null)
|
||||
if (interfaces == null)
|
||||
{
|
||||
interfaces = (String[]) pNode.interfaces.toArray(new String[0]);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
package net.runelite.client.rs.mixins.transformers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.util.RefUtils;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
@@ -33,8 +34,6 @@ import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@Slf4j
|
||||
public class OverwriteSanityCheck extends SanityChecker implements Opcodes
|
||||
{
|
||||
@@ -67,7 +66,7 @@ public class OverwriteSanityCheck extends SanityChecker implements Opcodes
|
||||
}
|
||||
}
|
||||
|
||||
if(methodNode == null)
|
||||
if (methodNode == null)
|
||||
{
|
||||
log.error("[OverwriteSanity] Failed to find original patch method for {}", check);
|
||||
return super.visitMethod(access, name, descriptor, signature, exceptions);
|
||||
|
||||
@@ -60,7 +60,7 @@ final class ClientPanel extends JPanel
|
||||
// and draw anywhere without it leaving artifacts
|
||||
if (client instanceof Client)
|
||||
{
|
||||
((Client)client).setGameDrawingMode(2);
|
||||
((Client) client).setGameDrawingMode(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public class ClientUI
|
||||
return;
|
||||
}
|
||||
|
||||
final Client client = (Client)this.client;
|
||||
final Client client = (Client) this.client;
|
||||
final ClientThread clientThread = clientThreadProvider.get();
|
||||
|
||||
// Keep scheduling event until we get our name
|
||||
@@ -615,6 +615,7 @@ public class ClientUI
|
||||
/**
|
||||
* Changes cursor for client window. Requires ${@link ClientUI#open(RuneLite)} to be called first.
|
||||
* FIXME: This is working properly only on Windows, Linux and Mac are displaying cursor incorrectly
|
||||
*
|
||||
* @param image cursor image
|
||||
* @param name cursor name
|
||||
*/
|
||||
@@ -632,6 +633,7 @@ public class ClientUI
|
||||
|
||||
/**
|
||||
* Resets client window cursor to default one.
|
||||
*
|
||||
* @see ClientUI#setCursor(BufferedImage, String)
|
||||
*/
|
||||
public void resetCursor()
|
||||
@@ -666,6 +668,7 @@ public class ClientUI
|
||||
|
||||
/**
|
||||
* Paint UI related overlays to target graphics
|
||||
*
|
||||
* @param graphics target graphics
|
||||
*/
|
||||
public void paintOverlays(final Graphics2D graphics)
|
||||
@@ -845,7 +848,7 @@ public class ClientUI
|
||||
|
||||
if (config.usernameInTitle() && (client instanceof Client))
|
||||
{
|
||||
final Player player = ((Client)client).getLocalPlayer();
|
||||
final Player player = ((Client) client).getLocalPlayer();
|
||||
|
||||
if (player != null && player.getName() != null)
|
||||
{
|
||||
|
||||
@@ -57,10 +57,10 @@ public class ContainableFrame extends JFrame
|
||||
if (containedInScreen)
|
||||
{
|
||||
Rectangle bounds = this.getGraphicsConfiguration().getBounds();
|
||||
x = Math.max(x, (int)bounds.getX());
|
||||
x = Math.min(x, (int)(bounds.getX() + bounds.getWidth() - this.getWidth()));
|
||||
y = Math.max(y, (int)bounds.getY());
|
||||
y = Math.min(y, (int)(bounds.getY() + bounds.getHeight() - this.getHeight()));
|
||||
x = Math.max(x, (int) bounds.getX());
|
||||
x = Math.min(x, (int) (bounds.getX() + bounds.getWidth() - this.getWidth()));
|
||||
y = Math.max(y, (int) bounds.getY());
|
||||
y = Math.min(y, (int) (bounds.getY() + bounds.getHeight() - this.getHeight()));
|
||||
}
|
||||
|
||||
super.setLocation(x, y);
|
||||
@@ -72,12 +72,12 @@ public class ContainableFrame extends JFrame
|
||||
if (containedInScreen)
|
||||
{
|
||||
Rectangle bounds = this.getGraphicsConfiguration().getBounds();
|
||||
width = Math.min(width, width - (int)bounds.getX() + x);
|
||||
x = Math.max(x, (int)bounds.getX());
|
||||
height = Math.min(height, height - (int)bounds.getY() + y);
|
||||
y = Math.max(y, (int)bounds.getY());
|
||||
width = Math.min(width, (int)(bounds.getX() + bounds.getWidth()) - x);
|
||||
height = Math.min(height, (int)(bounds.getY() + bounds.getHeight()) - y);
|
||||
width = Math.min(width, width - (int) bounds.getX() + x);
|
||||
x = Math.max(x, (int) bounds.getX());
|
||||
height = Math.min(height, height - (int) bounds.getY() + y);
|
||||
y = Math.max(y, (int) bounds.getY());
|
||||
width = Math.min(width, (int) (bounds.getX() + bounds.getWidth()) - x);
|
||||
height = Math.min(height, (int) (bounds.getY() + bounds.getHeight()) - y);
|
||||
}
|
||||
|
||||
super.setBounds(x, y, width, height);
|
||||
@@ -86,6 +86,7 @@ public class ContainableFrame extends JFrame
|
||||
/**
|
||||
* Expand frame by specified value. If the frame is going to be expanded outside of screen push the frame to
|
||||
* the side.
|
||||
*
|
||||
* @param value size to expand frame by
|
||||
*/
|
||||
public void expandBy(final int value)
|
||||
@@ -122,7 +123,7 @@ public class ContainableFrame extends JFrame
|
||||
if (!isFrameCloseToRightEdge() || isFrameCloseToLeftEdge())
|
||||
{
|
||||
// Move the window to the edge
|
||||
newWindowX = (int)(screenBounds.getX() + screenBounds.getWidth()) - getWidth();
|
||||
newWindowX = (int) (screenBounds.getX() + screenBounds.getWidth()) - getWidth();
|
||||
}
|
||||
|
||||
// Expand the window to the left as the user probably don't want the
|
||||
@@ -141,6 +142,7 @@ public class ContainableFrame extends JFrame
|
||||
/**
|
||||
* Contract frame by specified value. If new frame size is less than it's minimum size, force the minimum size.
|
||||
* If the frame was pushed from side before, restore it's original position.
|
||||
*
|
||||
* @param value value to contract frame by
|
||||
*/
|
||||
public void contractBy(final int value)
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* Grid layout implementation with support for cells with unequal size.
|
||||
*
|
||||
* <p>
|
||||
* See https://www.javaworld.com/article/2077486/core-java/java-tip-121--flex-your-grid-layout.html
|
||||
*/
|
||||
public class DynamicGridLayout extends GridLayout
|
||||
@@ -149,6 +149,7 @@ public class DynamicGridLayout extends GridLayout
|
||||
|
||||
/**
|
||||
* Calculate outer size of the layout based on it's children and sizer
|
||||
*
|
||||
* @param parent parent component
|
||||
* @param sizer functioning returning dimension of the child component
|
||||
* @return outer size
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
*/
|
||||
package net.runelite.client.ui;
|
||||
|
||||
import javax.swing.text.StyleContext;
|
||||
import java.awt.Font;
|
||||
import java.awt.FontFormatException;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.io.IOException;
|
||||
import javax.swing.text.StyleContext;
|
||||
|
||||
public class FontManager
|
||||
{
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
*/
|
||||
package net.runelite.client.ui;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Image;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageIO;
|
||||
@@ -36,7 +39,6 @@ import javax.swing.JPanel;
|
||||
import javax.swing.JProgressBar;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.plaf.basic.BasicProgressBarUI;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.RuneLiteProperties;
|
||||
@@ -64,6 +66,7 @@ public class RuneLiteSplashScreen
|
||||
/**
|
||||
* This is not done in the constructor in order to avoid processing in case the user chooses to not load
|
||||
* the splash screen.
|
||||
*
|
||||
* @param estimatedSteps steps until completion, used for the progress bar
|
||||
*/
|
||||
private void initLayout(final int estimatedSteps)
|
||||
@@ -183,6 +186,7 @@ public class RuneLiteSplashScreen
|
||||
|
||||
/**
|
||||
* Set the splash screen to be visible.
|
||||
*
|
||||
* @param estimatedSteps steps until completion, used for the progress bar
|
||||
*/
|
||||
public void open(final int estimatedSteps)
|
||||
@@ -226,7 +230,8 @@ public class RuneLiteSplashScreen
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (progressGoal!=progressBar.getMaximum()) {
|
||||
if (progressGoal != progressBar.getMaximum())
|
||||
{
|
||||
panel.remove(progressBar);
|
||||
panel.validate();
|
||||
final GridBagConstraints progressConstraints = new GridBagConstraints();
|
||||
|
||||
@@ -70,6 +70,7 @@ public class DimmableJPanel extends JPanel
|
||||
* Dimming sets all parts of this component with darker colors except for the central label
|
||||
* This is useful for showing that progress is paused
|
||||
* Setting dim to false will restore the original colors from before the component was dimmed.
|
||||
*
|
||||
* @param dimmed
|
||||
*/
|
||||
public void setDimmed(boolean dimmed)
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ThinProgressBar extends JPanel
|
||||
|
||||
public double getPercentage()
|
||||
{
|
||||
return (value * 100) / maximumValue;
|
||||
return (value * 100) / (double) maximumValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -62,6 +62,7 @@ public abstract class Overlay implements LayoutableRenderableEntity
|
||||
|
||||
/**
|
||||
* Overlay name, used for saving the overlay, needs to be unique
|
||||
*
|
||||
* @return overlay name
|
||||
*/
|
||||
public String getName()
|
||||
|
||||
@@ -41,8 +41,8 @@ import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.MenuAction;
|
||||
import net.runelite.api.events.MenuOptionClicked;
|
||||
import net.runelite.api.widgets.WidgetItem;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.api.widgets.WidgetItem;
|
||||
import net.runelite.client.config.ConfigGroup;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.config.RuneLiteConfig;
|
||||
|
||||
@@ -544,7 +544,7 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
bottomLeftPoint.y) : bottomRightPoint;
|
||||
|
||||
final Point canvasTopRightPoint = isResizeable ? new Point(
|
||||
(int)client.getRealDimensions().getWidth(),
|
||||
(int) client.getRealDimensions().getWidth(),
|
||||
0) : topRightPoint;
|
||||
|
||||
return new OverlayBounds(
|
||||
|
||||
@@ -37,7 +37,6 @@ import java.awt.image.BufferedImage;
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.TileObject;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
@@ -77,7 +76,7 @@ public class OverlayUtil
|
||||
graphics.setColor(color);
|
||||
graphics.rotate(angle, center.getX(), center.getY());
|
||||
graphics.drawRect(center.getX() - width / 2, center.getY() - height / 2, width, height);
|
||||
graphics.rotate(-angle , center.getX(), center.getY());
|
||||
graphics.rotate(-angle, center.getX(), center.getY());
|
||||
}
|
||||
|
||||
public static void renderTextLocation(Graphics2D graphics, Point txtLoc, String text, Color color)
|
||||
|
||||
@@ -101,8 +101,8 @@ public class WidgetOverlay extends Overlay
|
||||
int y = bounds.y;
|
||||
x = Math.max(parent.x, x);
|
||||
y = Math.max(parent.y, y);
|
||||
x = Math.min((int)parent.getMaxX() - bounds.width, x);
|
||||
y = Math.min((int)parent.getMaxY() - bounds.height, y);
|
||||
x = Math.min((int) parent.getMaxX() - bounds.width, x);
|
||||
y = Math.min((int) parent.getMaxY() - bounds.height, y);
|
||||
bounds.setLocation(x, y);
|
||||
return bounds;
|
||||
}
|
||||
@@ -123,8 +123,8 @@ public class WidgetOverlay extends Overlay
|
||||
int y = bounds.y;
|
||||
x = Math.max(parent.x, x);
|
||||
y = Math.max(parent.y, y);
|
||||
x = Math.min((int)parent.getMaxX() - bounds.width, x);
|
||||
y = Math.min((int)parent.getMaxY() - bounds.height, y);
|
||||
x = Math.min((int) parent.getMaxX() - bounds.width, x);
|
||||
y = Math.min((int) parent.getMaxY() - bounds.height, y);
|
||||
bounds.setLocation(x, y);
|
||||
widget.setOriginalX(0);
|
||||
widget.setOriginalY(0);
|
||||
|
||||
@@ -200,10 +200,7 @@ public class ArrowMinimapOverlay extends Overlay
|
||||
localPoint = new LocalPoint(localPoint.getX() + 1, localPoint.getY() + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
localPoint = npc.getLocalLocation();
|
||||
}
|
||||
localPoint = null;
|
||||
|
||||
renderMinimapArrow(graphics, arrowPoint, localPoint, localPlayerPos, worldPlayerPos);
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ import com.google.common.collect.Multimap;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.events.NpcSpawned;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
|
||||
@Singleton
|
||||
|
||||
@@ -32,6 +32,8 @@ import net.runelite.client.ui.overlay.RenderableEntity;
|
||||
public interface LayoutableRenderableEntity extends RenderableEntity
|
||||
{
|
||||
Rectangle getBounds();
|
||||
|
||||
void setPreferredLocation(Point position);
|
||||
|
||||
void setPreferredSize(Dimension dimension);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class PanelComponent implements LayoutableRenderableEntity
|
||||
int totalWidth = 0;
|
||||
|
||||
// Render all children
|
||||
for (int i = 0; i < children.size(); i ++)
|
||||
for (int i = 0; i < children.size(); i++)
|
||||
{
|
||||
final LayoutableRenderableEntity child = children.get(i);
|
||||
child.setPreferredLocation(new Point(x, y));
|
||||
|
||||
@@ -154,7 +154,7 @@ public class TooltipComponent implements RenderableEntity
|
||||
// Draw trailing text (after last tag)
|
||||
final TextComponent textComponent = new TextComponent();
|
||||
textComponent.setColor(nextColor);
|
||||
textComponent.setText(line.substring(begin, line.length()));
|
||||
textComponent.setText(line.substring(begin));
|
||||
textComponent.setPosition(new Point(lineX, textY + (i + 1) * textHeight - textDescent));
|
||||
textComponent.render(graphics);
|
||||
}
|
||||
@@ -194,7 +194,7 @@ public class TooltipComponent implements RenderableEntity
|
||||
}
|
||||
|
||||
// Include trailing text (after last tag)
|
||||
textWidth += metrics.stringWidth(line.substring(begin, line.length()));
|
||||
textWidth += metrics.stringWidth(line.substring(begin));
|
||||
|
||||
return textWidth;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class InfoBoxManager
|
||||
public void cull()
|
||||
{
|
||||
boolean culled = false;
|
||||
for (Iterator<InfoBox> it = infoBoxes.iterator(); it.hasNext();)
|
||||
for (Iterator<InfoBox> it = infoBoxes.iterator(); it.hasNext(); )
|
||||
{
|
||||
InfoBox box = it.next();
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ public class WorldMapOverlay extends Overlay
|
||||
|
||||
/**
|
||||
* Get the screen coordinates for a WorldPoint on the world map
|
||||
*
|
||||
* @param worldPoint WorldPoint to get screen coordinates of
|
||||
* @return Point of screen coordinates of the center of the world point
|
||||
*/
|
||||
|
||||
@@ -230,6 +230,7 @@ public class ColorUtil
|
||||
|
||||
/**
|
||||
* Creates color from passed object hash code
|
||||
*
|
||||
* @param object object with hashCode
|
||||
* @return color
|
||||
*/
|
||||
|
||||
@@ -38,9 +38,9 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.GrayFilter;
|
||||
import java.util.function.Predicate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.IndexedSprite;
|
||||
@@ -421,6 +421,7 @@ public class ImageUtil
|
||||
|
||||
/**
|
||||
* Converts the buffered image into a sprite image and returns it
|
||||
*
|
||||
* @param image The image to be converted
|
||||
* @param client Current client instance
|
||||
* @return The buffered image as a sprite image
|
||||
@@ -455,7 +456,7 @@ public class ImageUtil
|
||||
|
||||
/**
|
||||
* Converts an image into an {@code IndexedSprite} instance.
|
||||
*
|
||||
* <p>
|
||||
* The passed in image can only have at max 255 different colors.
|
||||
*
|
||||
* @param image The image to be converted
|
||||
|
||||
@@ -48,6 +48,7 @@ public class LinkBrowser
|
||||
/**
|
||||
* Tries to navigate to specified URL in browser. In case operation fails, displays message box with message
|
||||
* and copies link to clipboard to navigate to.
|
||||
*
|
||||
* @param url url to open
|
||||
* @return true if operation was successful
|
||||
*/
|
||||
@@ -131,6 +132,7 @@ public class LinkBrowser
|
||||
|
||||
/**
|
||||
* Open swing message box with specified message and copy data to clipboard
|
||||
*
|
||||
* @param message message to show
|
||||
*/
|
||||
private static void showMessageBox(final String message, final String data)
|
||||
|
||||
@@ -110,7 +110,7 @@ public class MenuUtil
|
||||
{
|
||||
Optional<MenuEntry> maybeEntry = stream.filter(e -> Text.standardize(e.getOption()).equals(option) &&
|
||||
Text.standardize(e.getTarget()).equals(target))
|
||||
/* autism */ .findFirst();
|
||||
/* autism */.findFirst();
|
||||
|
||||
return maybeEntry.orElse(null);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class MenuUtil
|
||||
{
|
||||
Optional<MenuEntry> maybeEntry = stream.filter(e -> Text.standardize(e.getOption()).contains(option) &&
|
||||
Text.standardize(e.getTarget()).contains(target))
|
||||
/* autism */ .findFirst();
|
||||
/* autism */.findFirst();
|
||||
|
||||
return maybeEntry.orElse(null);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package net.runelite.client.util;
|
||||
|
||||
import java.awt.Polygon;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.WorldType;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class MiscUtils
|
||||
{
|
||||
private static int[] abovePointsX = { 2944, 3392, 3392, 2944 };
|
||||
private static int[] abovePointsY = { 3523, 3523, 3971, 3971 };
|
||||
private static int[] belowPointsX = { 2944, 2944, 3264, 3264 };
|
||||
private static int[] belowPointsY = { 9918, 10360, 10360, 9918 };
|
||||
private static int[] abovePointsX = {2944, 3392, 3392, 2944};
|
||||
private static int[] abovePointsY = {3523, 3523, 3971, 3971};
|
||||
private static int[] belowPointsX = {2944, 2944, 3264, 3264};
|
||||
private static int[] belowPointsY = {9918, 10360, 10360, 9918};
|
||||
|
||||
private static Polygon abovePoly = new Polygon(abovePointsX, abovePointsY, abovePointsX.length);
|
||||
private static Polygon belowPoly = new Polygon(belowPointsX, belowPointsY, belowPointsX.length);
|
||||
@@ -21,7 +20,9 @@ public class MiscUtils
|
||||
private static boolean inWildy(WorldPoint point)
|
||||
{
|
||||
if (point == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return abovePoly.contains(point.getX(), point.getY()) || belowPoly.contains(point.getX(), point.getY());
|
||||
}
|
||||
@@ -29,23 +30,33 @@ public class MiscUtils
|
||||
public static int getWildernessLevelFrom(Client client, WorldPoint point)
|
||||
{
|
||||
if (client == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (point == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int x = point.getX();
|
||||
|
||||
if (point.getPlane() == 0 && (x < 2940 || x > 3391))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int y = point.getY();
|
||||
//v underground //v above ground
|
||||
int wildernessLevel = clamp(y > 6400 ? ((y - 9920) / 8) + 1 : ((y - 3520) / 8) + 1, 0, 56);
|
||||
|
||||
if (point.getPlane() > 0)
|
||||
{
|
||||
if (y < 9920)
|
||||
{
|
||||
wildernessLevel = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (client.getWorldType().stream().anyMatch(worldType -> worldType == WorldType.PVP || worldType == WorldType.HIGH_RISK))
|
||||
{
|
||||
@@ -70,7 +81,9 @@ public class MiscUtils
|
||||
Player localPlayer = client.getLocalPlayer();
|
||||
|
||||
if (localPlayer == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return inWildy(localPlayer.getWorldLocation());
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ public class PvPUtil
|
||||
|
||||
/**
|
||||
* Gets the wilderness level based on a world point
|
||||
*
|
||||
* @param point the point in the world to get the wilderness level for
|
||||
* @return the int representing the wilderness level
|
||||
*/
|
||||
@@ -48,6 +49,7 @@ public class PvPUtil
|
||||
|
||||
/**
|
||||
* Determines if another player is attackable based off of wilderness level and combat levels
|
||||
*
|
||||
* @param client The client of the local player
|
||||
* @param player the player to determine attackability
|
||||
* @return returns true if the player is attackable, false otherwise
|
||||
@@ -68,7 +70,7 @@ public class PvPUtil
|
||||
wildernessLevel = 15;
|
||||
}
|
||||
return Math.abs(client.getLocalPlayer().getCombatLevel() - player.getCombatLevel())
|
||||
< (getWildernessLevelFrom(client.getLocalPlayer().getWorldLocation())+ wildernessLevel);
|
||||
< (getWildernessLevelFrom(client.getLocalPlayer().getWorldLocation()) + wildernessLevel);
|
||||
}
|
||||
|
||||
public static int calculateRisk(Client client, ItemManager itemManager)
|
||||
|
||||
@@ -81,8 +81,8 @@ public class Text
|
||||
|
||||
/**
|
||||
* In addition to removing all tags, replaces nbsp with space, trims string and lowercases it
|
||||
* @param str The string to standardize
|
||||
*
|
||||
* @param str The string to standardize
|
||||
* @return The given `str` that is standardized
|
||||
*/
|
||||
public static String standardize(String str)
|
||||
|
||||
@@ -70,6 +70,7 @@ public enum WildernessLocation
|
||||
private final String name;
|
||||
@Getter
|
||||
private final WorldArea worldArea;
|
||||
|
||||
WildernessLocation(String name, Location location, int plane)
|
||||
{
|
||||
this.name = name;
|
||||
@@ -82,6 +83,7 @@ public enum WildernessLocation
|
||||
public int y;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Location(int x, int y, int x1, int y1)
|
||||
{
|
||||
this.x = x;
|
||||
|
||||
@@ -35,6 +35,7 @@ public class WorldUtil
|
||||
/**
|
||||
* Converts http-api world types to runelite-api world types
|
||||
* TODO: Find a better way to handle these to not have duplicate interfaces
|
||||
*
|
||||
* @param apiTypes http-api world types
|
||||
* @return runelite-api world types
|
||||
*/
|
||||
|
||||
@@ -34,9 +34,7 @@ import net.runelite.api.ChatMessageType;
|
||||
import static net.runelite.api.ChatMessageType.GAMEMESSAGE;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.MessageNode;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.events.ChatMessage;
|
||||
import net.runelite.api.events.GameTick;
|
||||
import net.runelite.api.events.VarbitChanged;
|
||||
|
||||
Reference in New Issue
Block a user