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)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().clear();
|
panelComponent.getChildren().clear();
|
||||||
int amuletID = 0;
|
if (plugin.isDisplayGloryOverlay())
|
||||||
try
|
|
||||||
{
|
|
||||||
amuletID = client.getLocalPlayer().getPlayerComposition().getEquipmentId(KitType.AMULET);
|
|
||||||
}
|
|
||||||
catch (NullPointerException e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
if (config.gloryWarning() && amuletID == ItemID.AMULET_OF_GLORY)
|
|
||||||
{
|
{
|
||||||
panelComponent.setBackgroundColor(Color.lightGray);
|
panelComponent.setBackgroundColor(Color.lightGray);
|
||||||
final AsyncBufferedImage gloryImage = itemManager.getImage(ItemID.AMULET_OF_GLORY);
|
final AsyncBufferedImage gloryImage = itemManager.getImage(ItemID.AMULET_OF_GLORY);
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public class WhaleWatchersPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onItemContainerChanged(ItemContainerChanged event)
|
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()
|
final int amuletID = ObjectUtils.defaultIfNull(client.getLocalPlayer()
|
||||||
.getPlayerComposition().getEquipmentId(KitType.AMULET), 0);
|
.getPlayerComposition().getEquipmentId(KitType.AMULET), 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user