Skip to content

Commit

Permalink
Merge pull request #4124 from IllianiCBT/autoAwards_DoubleKillAwards
Browse files Browse the repository at this point in the history
Fixed Award Eligibility Tracker Issuing Double Scenario Kill Awards... again
  • Loading branch information
SJuliez authored Jun 6, 2024
2 parents aa73f42 + 01f2d46 commit a80ab64
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public void PostScenarioController(Campaign c, int scenarioId, HashMap<UUID, Int

if (processedData != null) {
allAwardData.put(allAwardDataKey, processedData);
allAwardDataKey++;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,6 @@ public static Map<Integer, List<Object>> ScenarioKillAwardsProcessor(Campaign ca
}
}

if (!eligibleAwardsBestable.isEmpty()) {
if (campaign.getCampaignOptions().isIssueBestAwardOnly()) {
int rollingQty = 0;

for (Award award : eligibleAwardsBestable) {
if (award.getQty() > rollingQty) {
rollingQty = award.getQty();
bestAward = award;
}
}

eligibleAwards.add(bestAward);
} else {
eligibleAwards.addAll(eligibleAwardsBestable);
}
}

return AutoAwardsController.prepareAwardData(person, eligibleAwards);
}
}

0 comments on commit a80ab64

Please sign in to comment.