ItemContainer !=InventoryID (#163)

* ItemContainer !=InventoryID

* Change overlay to use isDisplayGloryOverlay
This commit is contained in:
sdburns1998
2019-05-01 23:59:47 +02:00
committed by Tyler Bochard
parent e7c7ece8e6
commit 92f677727d
2 changed files with 2 additions and 11 deletions

View File

@@ -52,16 +52,7 @@ public class WhaleWatchersGloryOverlay extends Overlay
public Dimension render(Graphics2D graphics)
{
panelComponent.getChildren().clear();
int amuletID = 0;
try
{
amuletID = client.getLocalPlayer().getPlayerComposition().getEquipmentId(KitType.AMULET);
}
catch (NullPointerException e)
{
}
if (config.gloryWarning() && amuletID == ItemID.AMULET_OF_GLORY)
if (plugin.isDisplayGloryOverlay())
{
panelComponent.setBackgroundColor(Color.lightGray);
final AsyncBufferedImage gloryImage = itemManager.getImage(ItemID.AMULET_OF_GLORY);

View File

@@ -142,7 +142,7 @@ public class WhaleWatchersPlugin extends Plugin
@Subscribe
public void onItemContainerChanged(ItemContainerChanged event)
{
if (config.gloryWarning() && event.getItemContainer().equals(InventoryID.EQUIPMENT))
if (config.gloryWarning() && event.getItemContainer() == client.getItemContainer(InventoryID.EQUIPMENT))
{
final int amuletID = ObjectUtils.defaultIfNull(client.getLocalPlayer()
.getPlayerComposition().getEquipmentId(KitType.AMULET), 0);