barrows: fix brothers slain overlay flashing
This was assuming there is always a tick between each frame to unhide the barrows potential
This commit is contained in:
@@ -61,18 +61,18 @@ public class BarrowsBrotherSlainOverlay extends OverlayPanel
|
|||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
// Do not display overlay if potential is null/hidden
|
final Widget barrowsBrothers = client.getWidget(WidgetInfo.BARROWS_BROTHERS);
|
||||||
final Widget potential = client.getWidget(WidgetInfo.BARROWS_POTENTIAL);
|
if (barrowsBrothers == null)
|
||||||
if (potential == null || potential.isHidden())
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide original overlay
|
// Hide original brother and potential overlays
|
||||||
final Widget barrowsBrothers = client.getWidget(WidgetInfo.BARROWS_BROTHERS);
|
barrowsBrothers.setHidden(true);
|
||||||
if (barrowsBrothers != null)
|
|
||||||
|
final Widget potential = client.getWidget(WidgetInfo.BARROWS_POTENTIAL);
|
||||||
|
if (potential != null)
|
||||||
{
|
{
|
||||||
barrowsBrothers.setHidden(true);
|
|
||||||
potential.setHidden(true);
|
potential.setHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user