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