|
|
|
@ -116,10 +116,18 @@ public enum LootManager {
@@ -116,10 +116,18 @@ public enum LootManager {
|
|
|
|
|
private static void RunBootySet(ArrayList<BootySetEntry> entries, Mob mob) { |
|
|
|
|
|
|
|
|
|
float dropRate = NORMAL_DROP_RATE; |
|
|
|
|
|
|
|
|
|
//roll the geenric world drop table
|
|
|
|
|
GenerateLootDrop(mob, 1300); |
|
|
|
|
if(ThreadLocalRandom.current().nextInt(1, 10000) == 5000) { |
|
|
|
|
MobLoot extraLoot = rollForGlass(mob); |
|
|
|
|
if (extraLoot != null) { |
|
|
|
|
mob.getCharItemManager().addItemToInventory(extraLoot); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// Iterate all entries in this bootySet and process accordingly
|
|
|
|
|
|
|
|
|
|
boolean hasExtraRolled = false; |
|
|
|
|
for (BootySetEntry bse : entries) { |
|
|
|
|
|
|
|
|
|
switch (bse.bootyType) { |
|
|
|
|
case "GOLD": |
|
|
|
|
GenerateGoldDrop(mob, bse); |
|
|
|
@ -128,7 +136,7 @@ public enum LootManager {
@@ -128,7 +136,7 @@ public enum LootManager {
|
|
|
|
|
if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) |
|
|
|
|
GenerateLootDrop(mob, bse.genTable); //generate normal loot drop
|
|
|
|
|
if(mob.parentZone.getSafeZone() == 0) { |
|
|
|
|
if (ThreadLocalRandom.current().nextInt(1, 10000) < 10) { |
|
|
|
|
if (hasExtraRolled == false && ThreadLocalRandom.current().nextInt(1, 10000) < 5 * dropRate) { |
|
|
|
|
int roll = ThreadLocalRandom.current().nextInt(1, 101); |
|
|
|
|
MobLoot extraLoot = null; |
|
|
|
|
if (roll >= 1 && roll <= 50) { |
|
|
|
@ -137,12 +145,13 @@ public enum LootManager {
@@ -137,12 +145,13 @@ public enum LootManager {
|
|
|
|
|
if (roll >= 51 && roll <= 94) { |
|
|
|
|
extraLoot = rollForRune(bse.genTable, mob); |
|
|
|
|
} |
|
|
|
|
if (roll >= 95) { |
|
|
|
|
extraLoot = rollForGlass(mob); |
|
|
|
|
} |
|
|
|
|
//if (roll >= 95) {
|
|
|
|
|
// extraLoot = rollForGlass(mob);
|
|
|
|
|
//}
|
|
|
|
|
if (extraLoot != null) { |
|
|
|
|
mob.getCharItemManager().addItemToInventory(extraLoot); |
|
|
|
|
} |
|
|
|
|
hasExtraRolled = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
@ -492,7 +501,10 @@ public enum LootManager {
@@ -492,7 +501,10 @@ public enum LootManager {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static MobLoot rollForContract(int table, Mob mob){ |
|
|
|
|
GenTableEntry selectedRow = GenTableEntry.rollTable(table, 99, 1.0f); |
|
|
|
|
int roll = 99; |
|
|
|
|
if (table == 1900 || table == 1500) |
|
|
|
|
roll = 73; |
|
|
|
|
GenTableEntry selectedRow = GenTableEntry.rollTable(table, roll, 1.0f); |
|
|
|
|
if (selectedRow == null) |
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
@ -515,7 +527,11 @@ public enum LootManager {
@@ -515,7 +527,11 @@ public enum LootManager {
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
public static MobLoot rollForRune(int table, Mob mob){ |
|
|
|
|
GenTableEntry selectedRow = GenTableEntry.rollTable(table, 97, 1.0f); |
|
|
|
|
int roll = 97; |
|
|
|
|
if(table == 1900 || table == 1500){ |
|
|
|
|
roll = 77; |
|
|
|
|
} |
|
|
|
|
GenTableEntry selectedRow = GenTableEntry.rollTable(table, roll, 1.0f); |
|
|
|
|
if (selectedRow == null) |
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|