Skip to content

Commit 5ec9d65

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents bb0487c + a8e44c6 commit 5ec9d65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ public class TotalItemValue {
141141
// For each player on the ORDER team, calculate the total cost of their items and add it to the totalOrderCost
142142
for (Player player : orderPlayers) {
143143
totalOrderCost += player.getItems().stream()
144-
.mapToInt(item -> getItemGold(item.getItemID()))
144+
.mapToInt(item -> Math.toIntExact(getItemGold(item.getItemID()) * item.getCount()))
145145
.sum();
146146
}
147147

148148
// For each player on the CHAOS team, calculate the total cost of their items and add it to the totalChaosCost
149149
for (Player player : chaosPlayers) {
150150
totalChaosCost += player.getItems().stream()
151-
.mapToInt(item -> getItemGold(item.getItemID()))
151+
.mapToInt(item -> Math.toIntExact(getItemGold(item.getItemID()) * item.getCount()))
152152
.sum();
153153
}
154154

0 commit comments

Comments
 (0)