itemcharges: Merge nested if statements
This commit is contained in:
@@ -567,13 +567,10 @@ public class ItemChargePlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onSpotAnimationChanged(SpotAnimationChanged event)
|
public void onSpotAnimationChanged(SpotAnimationChanged event)
|
||||||
{
|
{
|
||||||
if (event.getActor() == client.getLocalPlayer())
|
if (event.getActor() == client.getLocalPlayer() && client.getLocalPlayer().getSpotAnimation() == GraphicID.XERIC_TELEPORT)
|
||||||
{
|
{
|
||||||
if (client.getLocalPlayer().getSpotAnimation() == GraphicID.XERIC_TELEPORT)
|
final int xericCharges = Math.max(this.xericTalisman - 1, 0);
|
||||||
{
|
updateXericCharges(xericCharges);
|
||||||
final int xericCharges = Math.max(this.xericTalisman - 1, 0);
|
|
||||||
updateXericCharges(xericCharges);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,19 +60,17 @@ class ItemRecoilOverlay extends Overlay
|
|||||||
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
||||||
|
|
||||||
this.imagePanelComponent.getChildren().clear();
|
this.imagePanelComponent.getChildren().clear();
|
||||||
if (plugin.isShowrecoil())
|
if (plugin.isShowrecoil() && plugin.isRingOfRecoilAvailable())
|
||||||
{
|
{
|
||||||
if (plugin.isRingOfRecoilAvailable())
|
BufferedImage recoilImage = plugin.getRecoilRingImage();
|
||||||
{
|
imagePanelComponent.setBackgroundColor(plugin
|
||||||
BufferedImage recoilImage = plugin.getRecoilRingImage();
|
.isRingOfRecoilEquipped() ? ACTIVATED_BACKGROUND_COLOR : NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||||
imagePanelComponent.setBackgroundColor(plugin
|
imagePanelComponent.getChildren().add(new ImageComponent(recoilImage));
|
||||||
.isRingOfRecoilEquipped() ? ACTIVATED_BACKGROUND_COLOR : NOT_ACTIVATED_BACKGROUND_COLOR);
|
|
||||||
imagePanelComponent.getChildren().add(new ImageComponent(recoilImage));
|
|
||||||
|
|
||||||
imagePanelComponent.getChildren().add(tableComponent);
|
imagePanelComponent.getChildren().add(tableComponent);
|
||||||
return imagePanelComponent.render(graphics);
|
return imagePanelComponent.render(graphics);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user