forked from MagicBane/Server
audit command for drop rates
This commit is contained in:
@@ -127,15 +127,19 @@ public enum LootManager {
|
||||
float dropRate;
|
||||
|
||||
if (!mob.getSafeZone()) {
|
||||
int baseBound = 100000;
|
||||
int levelPenalty = (int) (Math.max(0, Math.abs(50 - mob.level)) * 0.01 * 100000);
|
||||
int totalRange = baseBound + levelPenalty;
|
||||
boolean allow = false;
|
||||
if(mob.level >= 50){
|
||||
totalRange = baseBound;
|
||||
//totalRange = baseBound;
|
||||
allow = true;
|
||||
}else{
|
||||
if((50 - mob.level) < ThreadLocalRandom.current().nextInt(0,101)){
|
||||
allow = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(allow) {
|
||||
// Roll within the adjusted range
|
||||
int specialCaseRoll = ThreadLocalRandom.current().nextInt(1, totalRange + 1);
|
||||
int specialCaseRoll = ThreadLocalRandom.current().nextInt(1, 100000 + 1);
|
||||
|
||||
// Special Case Contract Drop
|
||||
if (specialCaseRoll <= 400) { // 0.4% of the range
|
||||
@@ -162,6 +166,7 @@ public enum LootManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Iterate all entries in this bootySet and process accordingly
|
||||
for (BootySetEntry bse : entries) {
|
||||
|
||||
Reference in New Issue
Block a user