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.ui.overlay.Overlay;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -71,7 +69,7 @@ public class XpGlobes extends Plugin
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onExperienceChanged(ExperienceChanged event)
|
||||
public void onExperienceChanged(ExperienceChanged event)
|
||||
{
|
||||
if (!config.enabled())
|
||||
{
|
||||
|
||||
@@ -46,11 +46,11 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
public class XpGlobesOverlay extends Overlay
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(XpGlobesOverlay.class);
|
||||
|
||||
private final XpGlobes plugin;
|
||||
private final Client client = RuneLite.getClient();
|
||||
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_HEIGHT = 40;
|
||||
@@ -157,8 +157,14 @@ public class XpGlobesOverlay extends Overlay
|
||||
private void drawSkillImage(Graphics2D graphics, XpGlobe xpGlobe, int x, int y)
|
||||
{
|
||||
BufferedImage skillImage = getSkillImage(xpGlobe);
|
||||
|
||||
if (skillImage == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
graphics.drawImage(
|
||||
getSkillImage(xpGlobe),
|
||||
skillImage,
|
||||
x + (DEFAULT_CIRCLE_WIDTH / 2) - (skillImage.getWidth() / 2),
|
||||
y + (DEFAULT_CIRCLE_HEIGHT / 2) - (skillImage.getHeight() / 2),
|
||||
null
|
||||
|
||||
Reference in New Issue
Block a user