|
|
@ -147,13 +147,22 @@ public class LootManager { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
int itemTableId = selectedRow.itemTableID; |
|
|
|
int itemTableId = selectedRow.itemTableID; |
|
|
|
int minRollRange = (mob.getLevel() * 3) + mob.getParentZone().minLvl; |
|
|
|
|
|
|
|
//add 20 to max roll range to make dwarven HA and Sage possible
|
|
|
|
//add 20 to max roll range to make dwarven HA and Sage possible
|
|
|
|
int maxRollRange = (mob.getLevel() * 3) + (mob.getParentZone().maxLvl * 2); |
|
|
|
int zonemin = 25; |
|
|
|
if (maxRollRange > 320) { |
|
|
|
int zonemax = 50; |
|
|
|
maxRollRange = 320; |
|
|
|
if(mob.getParentZone().minLvl != 0){ |
|
|
|
|
|
|
|
zonemax += mob.getParentZone().minLvl; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(mob.getParentZone().maxLvl != 0){ |
|
|
|
|
|
|
|
zonemax += mob.getParentZone().maxLvl; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
int minRollRange = (mob.getLevel() * 3) + zonemin; |
|
|
|
|
|
|
|
int maxRollRange = (mob.getLevel() * 3) + (zonemax * 2); |
|
|
|
|
|
|
|
int roll2 = new Random().nextInt(maxRollRange) + minRollRange; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (roll2 > 320) { |
|
|
|
|
|
|
|
roll2 = 320; |
|
|
|
} |
|
|
|
} |
|
|
|
int roll2 = new Random().nextInt(maxRollRange - minRollRange) + minRollRange; |
|
|
|
|
|
|
|
ItemTableRow tableRow = itemTables.get(itemTableId).getRowForRange(roll2); |
|
|
|
ItemTableRow tableRow = itemTables.get(itemTableId).getRowForRange(roll2); |
|
|
|
if (tableRow == null) { |
|
|
|
if (tableRow == null) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|