skillcalculator: Merge nested if statements
This commit is contained in:
@@ -331,14 +331,11 @@ public class BankedCalculator extends JPanel
|
||||
}
|
||||
|
||||
// One activity and rewards no xp ignore.
|
||||
if (activities.size() == 1)
|
||||
{
|
||||
if (activities.get(0).getXp() <= 0)
|
||||
if (activities.size() == 1 && activities.get(0).getXp() <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If it doesn't have any activities ignore it in the breakdown.
|
||||
if (activities.size() <= 0)
|
||||
@@ -448,9 +445,7 @@ public class BankedCalculator extends JPanel
|
||||
|
||||
// If had a previous selection and this item links to another check for item prevention change.
|
||||
// If there are changes adjust the Linked panel quantity as well
|
||||
if (cur != null && i.getLinkedItemId() != -1)
|
||||
{
|
||||
if (cur.isPreventLinked() != a.isPreventLinked())
|
||||
if (cur != null && i.getLinkedItemId() != -1 && cur.isPreventLinked() != a.isPreventLinked())
|
||||
{
|
||||
CriticalItem linked = CriticalItem.getByItemId(i.getLinkedItemId());
|
||||
CriticalItemPanel l = panelMap.get(linked);
|
||||
@@ -462,7 +457,6 @@ public class BankedCalculator extends JPanel
|
||||
l.recalculate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Total banked experience
|
||||
CriticalItemPanel p = panelMap.get(i);
|
||||
@@ -500,14 +494,12 @@ public class BankedCalculator extends JPanel
|
||||
|
||||
// This item has an activity selected and its preventing linked functionality?
|
||||
Activity selected = activityMap.get(i);
|
||||
if (selected != null && selected.isPreventLinked())
|
||||
{
|
||||
if (selected != null && selected.isPreventLinked()
|
||||
// If initial request is for this item
|
||||
if (!first)
|
||||
&& !first)
|
||||
{
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
// Add self to map
|
||||
int amount = criticalMap.getOrDefault(i, 0);
|
||||
|
||||
Reference in New Issue
Block a user