forked from MagicBane/Server
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
465 B
21 lines
465 B
package engine.loot; |
|
|
|
import java.util.ArrayList; |
|
|
|
public class ItemTable { |
|
public ArrayList<ItemTableRow> rows = new ArrayList<>(); |
|
|
|
public ItemTableRow getRowForRange(int roll) { |
|
|
|
if (roll > 320) |
|
roll = 320; |
|
|
|
ItemTableRow outRow = null; |
|
|
|
for (ItemTableRow iteration : this.rows) |
|
if (roll >= iteration.minRoll && roll <= iteration.maxRoll) |
|
outRow = iteration; |
|
|
|
return outRow; |
|
} |
|
}
|
|
|