ItemContainer !=InventoryID (#163)
* ItemContainer !=InventoryID * Change overlay to use isDisplayGloryOverlay
This commit is contained in:
committed by
Tyler Bochard
parent
e7c7ece8e6
commit
92f677727d
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user