itemcharges: Merge nested if statements
This commit is contained in:
@@ -567,13 +567,10 @@ public class ItemChargePlugin extends Plugin
|
||||
@Subscribe
|
||||
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);
|
||||
|
||||
this.imagePanelComponent.getChildren().clear();
|
||||
if (plugin.isShowrecoil())
|
||||
if (plugin.isShowrecoil() && plugin.isRingOfRecoilAvailable())
|
||||
{
|
||||
if (plugin.isRingOfRecoilAvailable())
|
||||
{
|
||||
BufferedImage recoilImage = plugin.getRecoilRingImage();
|
||||
imagePanelComponent.setBackgroundColor(plugin
|
||||
.isRingOfRecoilEquipped() ? ACTIVATED_BACKGROUND_COLOR : NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||
imagePanelComponent.getChildren().add(new ImageComponent(recoilImage));
|
||||
BufferedImage recoilImage = plugin.getRecoilRingImage();
|
||||
imagePanelComponent.setBackgroundColor(plugin
|
||||
.isRingOfRecoilEquipped() ? ACTIVATED_BACKGROUND_COLOR : NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||
imagePanelComponent.getChildren().add(new ImageComponent(recoilImage));
|
||||
|
||||
imagePanelComponent.getChildren().add(tableComponent);
|
||||
return imagePanelComponent.render(graphics);
|
||||
}
|
||||
imagePanelComponent.getChildren().add(tableComponent);
|
||||
return imagePanelComponent.render(graphics);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user