xp globes: remove double call to getSkillImage
This commit is contained in:
@@ -33,10 +33,8 @@ import net.runelite.client.events.ExperienceChanged;
|
|||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
|
|
||||||
import java.time.Duration;
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -71,7 +69,7 @@ public class XpGlobes extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
private void onExperienceChanged(ExperienceChanged event)
|
public void onExperienceChanged(ExperienceChanged event)
|
||||||
{
|
{
|
||||||
if (!config.enabled())
|
if (!config.enabled())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
public class XpGlobesOverlay extends Overlay
|
public class XpGlobesOverlay extends Overlay
|
||||||
{
|
{
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(XpGlobesOverlay.class);
|
||||||
|
|
||||||
private final XpGlobes plugin;
|
private final XpGlobes plugin;
|
||||||
private final Client client = RuneLite.getClient();
|
private final Client client = RuneLite.getClient();
|
||||||
private final XpGlobesConfig config;
|
private final XpGlobesConfig config;
|
||||||
private static final Logger logger = LoggerFactory.getLogger(XpGlobesOverlay.class);
|
|
||||||
|
|
||||||
private static final int DEFAULT_CIRCLE_WIDTH = 40;
|
private static final int DEFAULT_CIRCLE_WIDTH = 40;
|
||||||
private static final int DEFAULT_CIRCLE_HEIGHT = 40;
|
private static final int DEFAULT_CIRCLE_HEIGHT = 40;
|
||||||
@@ -157,8 +157,14 @@ public class XpGlobesOverlay extends Overlay
|
|||||||
private void drawSkillImage(Graphics2D graphics, XpGlobe xpGlobe, int x, int y)
|
private void drawSkillImage(Graphics2D graphics, XpGlobe xpGlobe, int x, int y)
|
||||||
{
|
{
|
||||||
BufferedImage skillImage = getSkillImage(xpGlobe);
|
BufferedImage skillImage = getSkillImage(xpGlobe);
|
||||||
|
|
||||||
|
if (skillImage == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
graphics.drawImage(
|
graphics.drawImage(
|
||||||
getSkillImage(xpGlobe),
|
skillImage,
|
||||||
x + (DEFAULT_CIRCLE_WIDTH / 2) - (skillImage.getWidth() / 2),
|
x + (DEFAULT_CIRCLE_WIDTH / 2) - (skillImage.getWidth() / 2),
|
||||||
y + (DEFAULT_CIRCLE_HEIGHT / 2) - (skillImage.getHeight() / 2),
|
y + (DEFAULT_CIRCLE_HEIGHT / 2) - (skillImage.getHeight() / 2),
|
||||||
null
|
null
|
||||||
|
|||||||
Reference in New Issue
Block a user