Rename and cleanup baby hydra plugin (#331)
This commit is contained in:
@@ -29,7 +29,7 @@ import net.runelite.client.config.ConfigGroup;
|
|||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
|
||||||
@ConfigGroup("hydra")
|
@ConfigGroup("hydra")
|
||||||
public interface HydraConfig extends Config
|
public interface BabyHydraConfig extends Config
|
||||||
{
|
{
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
@@ -33,17 +33,15 @@ import net.runelite.client.ui.overlay.OverlayPriority;
|
|||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
|
||||||
public class HydraIndicatorOverlay extends Overlay
|
public class BabyHydraIndicatorOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private final HydraConfig config;
|
private final BabyHydraPlugin plugin;
|
||||||
private final HydraPlugin plugin;
|
|
||||||
|
|
||||||
private final PanelComponent panelComponent = new PanelComponent();
|
private final PanelComponent panelComponent = new PanelComponent();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private HydraIndicatorOverlay(HydraConfig config, HydraPlugin plugin)
|
private BabyHydraIndicatorOverlay(BabyHydraPlugin plugin)
|
||||||
{
|
{
|
||||||
this.config = config;
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
||||||
setPriority(OverlayPriority.MED);
|
setPriority(OverlayPriority.MED);
|
||||||
@@ -53,16 +51,11 @@ public class HydraIndicatorOverlay extends Overlay
|
|||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
if (!config.PrayerHelper())
|
if (plugin.getHydra() != null)
|
||||||
{
|
{
|
||||||
return null;
|
if (plugin.getHydras().containsKey(plugin.getHydra().getIndex()))
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin.Hydra != null)
|
|
||||||
{
|
|
||||||
if (plugin.hydras.containsKey(plugin.Hydra.getIndex()))
|
|
||||||
{
|
{
|
||||||
int val = plugin.hydras.get(plugin.Hydra.getIndex());
|
int val = plugin.getHydras().get(plugin.getHydra().getIndex());
|
||||||
if (val != 0)
|
if (val != 0)
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().clear();
|
panelComponent.getChildren().clear();
|
||||||
@@ -37,37 +37,29 @@ import net.runelite.client.ui.overlay.OverlayLayer;
|
|||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
|
||||||
|
|
||||||
public class HydraOverlay extends Overlay
|
public class BabyHydraOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private final HydraConfig config;
|
private final BabyHydraConfig config;
|
||||||
private final HydraPlugin plugin;
|
private final BabyHydraPlugin plugin;
|
||||||
private final PanelComponent panelComponent = new PanelComponent();
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private HydraOverlay(HydraConfig config, HydraPlugin plugin)
|
private BabyHydraOverlay(BabyHydraConfig config, BabyHydraPlugin plugin)
|
||||||
{
|
{
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||||
setPosition(OverlayPosition.DYNAMIC);
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
setPriority(OverlayPriority.MED);
|
setPriority(OverlayPriority.MED);
|
||||||
panelComponent.setPreferredSize(new Dimension(150, 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
if (!config.TextIndicator())
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (NPC hydra : client.getNpcs())
|
for (NPC hydra : client.getNpcs())
|
||||||
{
|
{
|
||||||
if (hydra == null || hydra.getName() == null)
|
if (hydra == null || hydra.getName() == null)
|
||||||
@@ -76,38 +68,41 @@ public class HydraOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
if (hydra.getName().equalsIgnoreCase("Hydra"))
|
if (hydra.getName().equalsIgnoreCase("Hydra"))
|
||||||
{
|
{
|
||||||
if (plugin.hydras.containsKey(hydra.getIndex()))
|
if (plugin.getHydras().containsKey(hydra.getIndex()))
|
||||||
{
|
{
|
||||||
int val = plugin.hydras.get(hydra.getIndex());
|
int val = plugin.getHydras().get(hydra.getIndex());
|
||||||
if (val != 0)
|
if (val != 0)
|
||||||
{
|
{
|
||||||
if (config.BoldText())
|
if (config.BoldText())
|
||||||
{
|
{
|
||||||
graphics.setFont(FontManager.getRunescapeBoldFont());
|
graphics.setFont(FontManager.getRunescapeBoldFont());
|
||||||
}
|
}
|
||||||
if (plugin.hydraattacks.containsKey(hydra.getIndex()))
|
if (plugin.getHydraattacks().containsKey(hydra.getIndex()))
|
||||||
{
|
{
|
||||||
int attack = plugin.hydraattacks.get(hydra.getIndex());
|
int attack = plugin.getHydraattacks().get(hydra.getIndex());
|
||||||
if (attack == 8261)
|
|
||||||
|
Point textLocation = hydra.getCanvasTextLocation(graphics, "TEMP!!", hydra.getLogicalHeight() + 100);
|
||||||
|
|
||||||
|
if (textLocation != null && attack == 8261)
|
||||||
{
|
{
|
||||||
if (val == 3)
|
if (val == 3)
|
||||||
{
|
{
|
||||||
OverlayUtil.renderTextLocation(graphics, hydra.getCanvasTextLocation(graphics, "MAGE", hydra.getLogicalHeight() + 100), "MAGE", Color.BLUE);
|
OverlayUtil.renderTextLocation(graphics, textLocation, "MAGE", Color.BLUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OverlayUtil.renderTextLocation(graphics, hydra.getCanvasTextLocation(graphics, "RANGE", hydra.getLogicalHeight() + 100), "RANGE", Color.GREEN);
|
OverlayUtil.renderTextLocation(graphics, textLocation, "RANGE", Color.GREEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (attack == 8262)
|
else if (textLocation != null && attack == 8262)
|
||||||
{
|
{
|
||||||
if (val == 3)
|
if (val == 3)
|
||||||
{
|
{
|
||||||
OverlayUtil.renderTextLocation(graphics, hydra.getCanvasTextLocation(graphics, "RANGE", hydra.getLogicalHeight() + 100), "RANGE", Color.GREEN);
|
OverlayUtil.renderTextLocation(graphics, textLocation, "RANGE", Color.GREEN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OverlayUtil.renderTextLocation(graphics, hydra.getCanvasTextLocation(graphics, "MAGE", hydra.getLogicalHeight() + 100), "MAGE", Color.BLUE);
|
OverlayUtil.renderTextLocation(graphics, textLocation, "MAGE", Color.BLUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,10 +28,12 @@ import com.google.inject.Provides;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import lombok.Getter;
|
||||||
import net.runelite.api.Actor;
|
import net.runelite.api.Actor;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.events.AnimationChanged;
|
import net.runelite.api.events.AnimationChanged;
|
||||||
|
import net.runelite.api.events.ConfigChanged;
|
||||||
import net.runelite.api.events.NpcDespawned;
|
import net.runelite.api.events.NpcDespawned;
|
||||||
import net.runelite.api.events.NpcSpawned;
|
import net.runelite.api.events.NpcSpawned;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
@@ -43,58 +45,103 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Hydra Helper",
|
name = "Hydra Helper",
|
||||||
description = "Hydra Helper",
|
description = "Overlays for small hydras",
|
||||||
tags = {"Hydra", "Helper"},
|
tags = {"Hydra", "Helper", "you", "probably", "want", "the", "other", "one"},
|
||||||
type = PluginType.PVM
|
type = PluginType.PVM
|
||||||
)
|
)
|
||||||
public class HydraPlugin extends Plugin
|
public class BabyHydraPlugin extends Plugin
|
||||||
{
|
{
|
||||||
@Inject
|
@Inject
|
||||||
private OverlayManager overlayManager;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private HydraConfig config;
|
private BabyHydraConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private HydraOverlay HydraOverlay;
|
private BabyHydraOverlay hydraOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private HydraPrayOverlay HydraPrayOverlay;
|
private BabyHydraPrayOverlay hydraPrayOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private HydraIndicatorOverlay HydraIndicatorOverlay;
|
private BabyHydraIndicatorOverlay hydraIndicatorOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
HydraConfig provideConfig(ConfigManager configManager)
|
BabyHydraConfig provideConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
return configManager.getConfig(HydraConfig.class);
|
return configManager.getConfig(BabyHydraConfig.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Integer, Integer> hydras = new HashMap<>();
|
@Getter
|
||||||
Map<Integer, Integer> hydraattacks = new HashMap<>();
|
private Map<Integer, Integer> hydras = new HashMap<>();
|
||||||
NPC Hydra;
|
|
||||||
|
@Getter
|
||||||
|
private Map<Integer, Integer> hydraattacks = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private NPC hydra;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp() throws Exception
|
||||||
{
|
{
|
||||||
overlayManager.add(HydraOverlay);
|
if (config.TextIndicator())
|
||||||
overlayManager.add(HydraPrayOverlay);
|
{
|
||||||
overlayManager.add(HydraIndicatorOverlay);
|
overlayManager.add(hydraOverlay);
|
||||||
|
}
|
||||||
|
if (config.PrayerHelper())
|
||||||
|
{
|
||||||
|
overlayManager.add(hydraPrayOverlay);
|
||||||
|
overlayManager.add(hydraIndicatorOverlay);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown() throws Exception
|
||||||
{
|
{
|
||||||
overlayManager.remove(HydraOverlay);
|
overlayManager.remove(hydraOverlay);
|
||||||
overlayManager.remove(HydraPrayOverlay);
|
overlayManager.remove(hydraPrayOverlay);
|
||||||
overlayManager.remove(HydraIndicatorOverlay);
|
overlayManager.remove(hydraIndicatorOverlay);
|
||||||
hydras.clear();
|
hydras.clear();
|
||||||
hydraattacks.clear();
|
hydraattacks.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onConfigChanged(ConfigChanged event)
|
||||||
|
{
|
||||||
|
if (!event.getGroup().equals("hydra"))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.getKey().equals("textindicators"))
|
||||||
|
{
|
||||||
|
if (Boolean.parseBoolean(event.getNewValue()))
|
||||||
|
{
|
||||||
|
overlayManager.add(hydraOverlay);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
overlayManager.remove(hydraOverlay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (event.getKey().equals("prayerhelper"))
|
||||||
|
{
|
||||||
|
if (Boolean.parseBoolean(event.getNewValue()))
|
||||||
|
{
|
||||||
|
overlayManager.add(hydraPrayOverlay);
|
||||||
|
overlayManager.add(hydraIndicatorOverlay);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
overlayManager.remove(hydraPrayOverlay);
|
||||||
|
overlayManager.remove(hydraIndicatorOverlay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onNpcSpawned(NpcSpawned event)
|
public void onNpcSpawned(NpcSpawned event)
|
||||||
{
|
{
|
||||||
@@ -130,59 +177,65 @@ public class HydraPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
Actor monster = event.getActor();
|
Actor monster = event.getActor();
|
||||||
Actor local = client.getLocalPlayer();
|
Actor local = client.getLocalPlayer();
|
||||||
if (monster instanceof NPC)
|
if (!(monster instanceof NPC))
|
||||||
{
|
{
|
||||||
NPC hydra = (NPC) monster;
|
return;
|
||||||
if (hydra.getCombatLevel() != 0 && hydra.getName() != null)
|
}
|
||||||
{
|
NPC hydra = (NPC) monster;
|
||||||
if (hydra.getName().equalsIgnoreCase("Hydra"))
|
|
||||||
{
|
|
||||||
if (hydras.containsKey(hydra.getIndex()))
|
|
||||||
{
|
|
||||||
if (hydra.getAnimation() == 8261 || hydra.getAnimation() == 8262)
|
|
||||||
{
|
|
||||||
if (hydra.getInteracting().equals(local))
|
|
||||||
{
|
|
||||||
Hydra = hydra;
|
|
||||||
}
|
|
||||||
if (hydraattacks.containsKey(hydra.getIndex()))
|
|
||||||
{
|
|
||||||
int lastattack = hydraattacks.get(hydra.getIndex());
|
|
||||||
hydraattacks.replace(hydra.getIndex(), hydra.getAnimation());
|
|
||||||
|
|
||||||
if (lastattack != hydra.getAnimation())
|
if (hydra.getCombatLevel() == 0 || hydra.getName() == null)
|
||||||
{
|
{
|
||||||
hydras.replace(hydra.getIndex(), 2);
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
if (!hydra.getName().equalsIgnoreCase("Hydra") || !hydras.containsKey(hydra.getIndex()))
|
||||||
int currval = hydras.get(hydra.getIndex());
|
{
|
||||||
if (currval == 1)
|
return;
|
||||||
{
|
}
|
||||||
hydras.replace(hydra.getIndex(), 3);
|
|
||||||
}
|
if (hydra.getAnimation() != 8261 && hydra.getAnimation() != 8262)
|
||||||
else
|
{
|
||||||
{
|
return;
|
||||||
hydras.replace(hydra.getIndex(), currval - 1);
|
}
|
||||||
}
|
|
||||||
}
|
if (hydra.getInteracting().equals(local))
|
||||||
}
|
{
|
||||||
else
|
this.hydra = hydra;
|
||||||
{
|
}
|
||||||
hydraattacks.put(hydra.getIndex(), hydra.getAnimation());
|
|
||||||
int currval = hydras.get(hydra.getIndex());
|
if (hydraattacks.containsKey(hydra.getIndex()))
|
||||||
if (currval == 1)
|
{
|
||||||
{
|
int lastattack = hydraattacks.get(hydra.getIndex());
|
||||||
hydras.replace(hydra.getIndex(), 3);
|
hydraattacks.replace(hydra.getIndex(), hydra.getAnimation());
|
||||||
}
|
|
||||||
else
|
if (lastattack != hydra.getAnimation())
|
||||||
{
|
{
|
||||||
hydras.replace(hydra.getIndex(), currval - 1);
|
hydras.replace(hydra.getIndex(), 2);
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
}
|
{
|
||||||
}
|
int currval = hydras.get(hydra.getIndex());
|
||||||
|
if (currval == 1)
|
||||||
|
{
|
||||||
|
hydras.replace(hydra.getIndex(), 3);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hydras.replace(hydra.getIndex(), currval - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hydraattacks.put(hydra.getIndex(), hydra.getAnimation());
|
||||||
|
int currval = hydras.get(hydra.getIndex());
|
||||||
|
if (currval == 1)
|
||||||
|
{
|
||||||
|
hydras.replace(hydra.getIndex(), 3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hydras.replace(hydra.getIndex(), currval - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,56 +40,58 @@ import net.runelite.client.ui.overlay.components.ComponentConstants;
|
|||||||
import net.runelite.client.ui.overlay.components.ImageComponent;
|
import net.runelite.client.ui.overlay.components.ImageComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
|
||||||
public class HydraPrayOverlay extends Overlay
|
public class BabyHydraPrayOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private final HydraConfig config;
|
private final BabyHydraPlugin plugin;
|
||||||
private final HydraPlugin plugin;
|
|
||||||
|
|
||||||
private static final Color NOT_ACTIVATED_BACKGROUND_COLOR = new Color(150, 0, 0, 150);
|
private static final Color NOT_ACTIVATED_BACKGROUND_COLOR = new Color(150, 0, 0, 150);
|
||||||
|
private BufferedImage PRAY_MAGE;
|
||||||
private final SpriteManager spriteManager;
|
private BufferedImage PRAY_RANGED;
|
||||||
private final PanelComponent imagePanelComponent = new PanelComponent();
|
private final PanelComponent imagePanelComponent = new PanelComponent();
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SpriteManager spriteManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private HydraPrayOverlay(HydraConfig config, HydraPlugin plugin, SpriteManager spriteManager)
|
private BabyHydraPrayOverlay(BabyHydraPlugin plugin, SpriteManager spriteManager)
|
||||||
{
|
{
|
||||||
this.config = config;
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
this.spriteManager = spriteManager;
|
||||||
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
||||||
setPriority(OverlayPriority.HIGH);
|
setPriority(OverlayPriority.HIGH);
|
||||||
this.spriteManager = spriteManager;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
if (!config.PrayerHelper())
|
if (PRAY_MAGE == null)
|
||||||
{
|
{
|
||||||
return null;
|
PRAY_MAGE = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MAGIC, 0);
|
||||||
|
}
|
||||||
|
if (PRAY_RANGED == null)
|
||||||
|
{
|
||||||
|
PRAY_RANGED = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MISSILES, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.Hydra != null)
|
if (plugin.getHydra() != null)
|
||||||
{
|
{
|
||||||
if (plugin.hydras.containsKey(plugin.Hydra.getIndex()))
|
if (plugin.getHydras().containsKey(plugin.getHydra().getIndex()))
|
||||||
{
|
{
|
||||||
int val = plugin.hydras.get(plugin.Hydra.getIndex());
|
int val = plugin.getHydras().get(plugin.getHydra().getIndex());
|
||||||
if (val != 0)
|
if (val != 0)
|
||||||
{
|
{
|
||||||
if (plugin.hydraattacks.containsKey(plugin.Hydra.getIndex()))
|
if (plugin.getHydraattacks().containsKey(plugin.getHydra().getIndex()))
|
||||||
{
|
{
|
||||||
int attack = plugin.hydraattacks.get(plugin.Hydra.getIndex());
|
int attack = plugin.getHydraattacks().get(plugin.getHydra().getIndex());
|
||||||
if (attack == 8261)
|
if (attack == 8261)
|
||||||
{
|
{
|
||||||
if (val == 3)
|
if (val == 3)
|
||||||
{
|
{
|
||||||
final BufferedImage prayerImage = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MAGIC, 0);
|
|
||||||
|
|
||||||
imagePanelComponent.getChildren().clear();
|
imagePanelComponent.getChildren().clear();
|
||||||
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));
|
imagePanelComponent.getChildren().add(new ImageComponent(PRAY_MAGE));
|
||||||
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MAGIC)
|
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MAGIC)
|
||||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||||
@@ -98,10 +100,8 @@ public class HydraPrayOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final BufferedImage prayerImage = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MISSILES, 0);
|
|
||||||
|
|
||||||
imagePanelComponent.getChildren().clear();
|
imagePanelComponent.getChildren().clear();
|
||||||
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));
|
imagePanelComponent.getChildren().add(new ImageComponent(PRAY_RANGED));
|
||||||
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MISSILES)
|
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MISSILES)
|
||||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||||
@@ -113,10 +113,8 @@ public class HydraPrayOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
if (val == 3)
|
if (val == 3)
|
||||||
{
|
{
|
||||||
final BufferedImage prayerImage = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MISSILES, 0);
|
|
||||||
|
|
||||||
imagePanelComponent.getChildren().clear();
|
imagePanelComponent.getChildren().clear();
|
||||||
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));
|
imagePanelComponent.getChildren().add(new ImageComponent(PRAY_RANGED));
|
||||||
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MISSILES)
|
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MISSILES)
|
||||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||||
@@ -125,10 +123,8 @@ public class HydraPrayOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final BufferedImage prayerImage = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MAGIC, 0);
|
|
||||||
|
|
||||||
imagePanelComponent.getChildren().clear();
|
imagePanelComponent.getChildren().clear();
|
||||||
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));
|
imagePanelComponent.getChildren().add(new ImageComponent(PRAY_MAGE));
|
||||||
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MAGIC)
|
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MAGIC)
|
||||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||||
Reference in New Issue
Block a user