flexo: MErge nested if statements
This commit is contained in:
@@ -172,9 +172,7 @@ public class FlexoPlugin extends Plugin
|
||||
{
|
||||
for (NPC npc : client.getNpcs())
|
||||
{
|
||||
if (npc != null)
|
||||
{
|
||||
if (npc.getConvexHull() != null)
|
||||
if (npc != null && npc.getConvexHull() != null)
|
||||
{
|
||||
Rectangle r = FlexoMouse.getClickArea(npc.getConvexHull().getBounds());
|
||||
this.clickAreas.add(r);
|
||||
@@ -184,7 +182,6 @@ public class FlexoPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.debugPlayers)
|
||||
{
|
||||
@@ -194,9 +191,7 @@ public class FlexoPlugin extends Plugin
|
||||
{
|
||||
for (Player player : client.getPlayers())
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
if (player.getConvexHull() != null)
|
||||
if (player != null && player.getConvexHull() != null)
|
||||
{
|
||||
Rectangle r = FlexoMouse.getClickArea(player.getConvexHull().getBounds());
|
||||
this.clickAreas.add(r);
|
||||
@@ -206,7 +201,6 @@ public class FlexoPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Could still use some improvement
|
||||
if (this.debugGroundItems)
|
||||
@@ -214,18 +208,14 @@ public class FlexoPlugin extends Plugin
|
||||
Flexo.isStretched = client.isStretchedEnabled();
|
||||
Flexo.scale = this.scalingFactor;
|
||||
|
||||
if (flexo != null)
|
||||
{
|
||||
if (GroundItemsPlugin.getCollectedGroundItems() != null)
|
||||
if (flexo != null && GroundItemsPlugin.getCollectedGroundItems() != null)
|
||||
{
|
||||
for (GroundItem gi : GroundItemsPlugin.getCollectedGroundItems().values())
|
||||
{
|
||||
if (gi != null)
|
||||
{
|
||||
LocalPoint lp = LocalPoint.fromWorld(client, gi.getLocation());
|
||||
if (lp != null)
|
||||
{
|
||||
if (Perspective.getCanvasTilePoly(client, lp) != null)
|
||||
if (lp != null && Perspective.getCanvasTilePoly(client, lp) != null)
|
||||
{
|
||||
Rectangle r1 = FlexoMouse.getClickArea(Perspective.getCanvasTilePoly(client, lp).getBounds());
|
||||
Rectangle r2 = FlexoMouse.getClickArea(r1);
|
||||
@@ -239,8 +229,6 @@ public class FlexoPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateMouseMotionFactory()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user