Browse Source

mob roll range formula

master
FatBoy-DOTC 2 years ago
parent
commit
dffc16f5ce
  1. 7
      src/engine/loot/LootManager.java

7
src/engine/loot/LootManager.java

@ -124,8 +124,11 @@ public class LootManager {
return null; return null;
} }
int itemTableId = selectedRow.itemTableID; int itemTableId = selectedRow.itemTableID;
int minRollRange = roll + mob.getParentZone().minLvl + mob.getLevel(); int minRollRange = mob.getLevel() + roll + mob.getParentZone().minLvl;
int maxRollRange = (roll + mob.getParentZone().maxLvl + mob.getLevel()) * 2; int maxRollRange = (mob.getLevel() * 2) + roll + (mob.getParentZone().maxLvl * 2);
if(maxRollRange > 320){
maxRollRange = 320;
}
int roll2 = new Random().nextInt(maxRollRange- minRollRange) + minRollRange; 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){

Loading…
Cancel
Save