pileindicators: Merge nested if statements
This commit is contained in:
@@ -121,9 +121,7 @@ public class PileIndicatorsPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
if (this.enablePlayers)
|
||||
{
|
||||
if ((client.getVar(Varbits.IN_WILDERNESS) > 0 && this.wildyOnlyPlayer) ^ (!this.wildyOnlyPlayer))
|
||||
if (this.enablePlayers && (client.getVar(Varbits.IN_WILDERNESS) > 0 && this.wildyOnlyPlayer) ^ (!this.wildyOnlyPlayer))
|
||||
{
|
||||
for (Player player : client.getPlayers())
|
||||
{
|
||||
@@ -133,7 +131,6 @@ public class PileIndicatorsPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pileList.size() == 0)
|
||||
{
|
||||
@@ -145,14 +142,11 @@ public class PileIndicatorsPlugin extends Plugin
|
||||
ArrayList<Actor> potentialStackArrayList = new ArrayList<>();
|
||||
for (Actor actorToCompareTo : pileList)
|
||||
{
|
||||
if (!potentialStackArrayList.contains(actorToCompareTo))
|
||||
{
|
||||
if (actor.getWorldLocation().distanceTo(actorToCompareTo.getWorldLocation()) == 0)
|
||||
if (!potentialStackArrayList.contains(actorToCompareTo) && actor.getWorldLocation().distanceTo(actorToCompareTo.getWorldLocation()) == 0)
|
||||
{
|
||||
potentialStackArrayList.add(actorToCompareTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (potentialStackArrayList.size() >= this.minimumPileSize)
|
||||
{
|
||||
outerArrayList.add(potentialStackArrayList);
|
||||
|
||||
Reference in New Issue
Block a user