forked from MagicBane/Server
hotzone roll tweaks
This commit is contained in:
@@ -93,7 +93,6 @@ public class LootManager {
|
||||
GenerateNormalLootDrop(mob, bse, multiplier, false);
|
||||
if (inHotzone && mob.level < 80) {
|
||||
if (generalItemTables.containsKey(bse.lootTable + 1)) {
|
||||
//GenerateHotzoneLootDrop(mob, bse, multiplier);
|
||||
hotzoneTable = bse.lootTable + 1;
|
||||
}
|
||||
}
|
||||
@@ -131,11 +130,11 @@ public class LootManager {
|
||||
}
|
||||
MobLoot outItem;
|
||||
int genRoll;
|
||||
if(isHotzone){
|
||||
genRoll = ThreadLocalRandom.current().nextInt(32) + 77;
|
||||
} else {
|
||||
//if(isHotzone){
|
||||
// genRoll = ThreadLocalRandom.current().nextInt(32) + 77;
|
||||
//} else {
|
||||
genRoll = new Random().nextInt(100) + 1;
|
||||
}
|
||||
//}
|
||||
GenTableRow selectedRow = generalItemTables.get(genTableID).getRowForRange(genRoll);
|
||||
if (selectedRow == null) {
|
||||
return null;
|
||||
@@ -212,7 +211,7 @@ public class LootManager {
|
||||
}
|
||||
public static void GenerateGoldDrop(Mob mob, BootySetEntry bse, float multiplier){
|
||||
int chanceRoll = ThreadLocalRandom.current().nextInt(100) + 1;
|
||||
if (chanceRoll > bse.dropChance) {
|
||||
if (chanceRoll > bse.dropChance * multiplier) {
|
||||
//early exit, failed to hit minimum chance roll OR booty was generated from mob's death
|
||||
return;
|
||||
}
|
||||
@@ -233,7 +232,7 @@ public class LootManager {
|
||||
return;
|
||||
}
|
||||
//iterate the booty tables and add items to mob inventory
|
||||
MobLoot toAdd = getGenTableItem(bse.lootTable, mob,inHotzone);
|
||||
MobLoot toAdd = getGenTableItem(bse.lootTable, mob,false);
|
||||
if (toAdd != null) {
|
||||
if(toAdd.getPrefix() == null && toAdd.getSuffix() == null){
|
||||
toAdd.setIsID(true);
|
||||
@@ -248,11 +247,6 @@ public class LootManager {
|
||||
}
|
||||
public static void GenerateHotzoneLootDrop(Mob mob, int tableID, float multiplier){
|
||||
int lootTableID = tableID;
|
||||
//int chanceRoll = ThreadLocalRandom.current().nextInt(100) + 1;
|
||||
//if (chanceRoll > bse.dropChance * multiplier) {
|
||||
//early exit, failed to hit minimum chance roll
|
||||
// return;
|
||||
//}
|
||||
MobLoot toAdd = getGenTableItem(lootTableID, mob, false);
|
||||
if (toAdd != null) {
|
||||
if (toAdd.getPrefix() != null && toAdd.getPrefix().isEmpty() == true && toAdd.getSuffix() != null && toAdd.getSuffix().isEmpty() == true) {
|
||||
|
||||
Reference in New Issue
Block a user