|
|
@ -94,9 +94,10 @@ public class LootManager { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
for (BootySetEntry bse : entries) { |
|
|
|
for (BootySetEntry bse : entries) { |
|
|
|
int roll = ThreadLocalRandom.current().nextInt(101); |
|
|
|
int roll; |
|
|
|
switch (bse.bootyType) { |
|
|
|
switch (bse.bootyType) { |
|
|
|
case "GOLD": |
|
|
|
case "GOLD": |
|
|
|
|
|
|
|
roll = ThreadLocalRandom.current().nextInt(101); |
|
|
|
if (roll > (bse.dropChance * multiplier)) { |
|
|
|
if (roll > (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
|
|
|
|
break; |
|
|
|
break; |
|
|
@ -109,8 +110,10 @@ public class LootManager { |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "LOOT": |
|
|
|
case "LOOT": |
|
|
|
|
|
|
|
roll = ThreadLocalRandom.current().nextInt(101); |
|
|
|
|
|
|
|
float dropChance = bse.dropChance * multiplier; |
|
|
|
if (roll > (bse.dropChance * multiplier)) { |
|
|
|
if (roll > (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
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
//iterate the booty tables and add items to mob inventory
|
|
|
|
//iterate the booty tables and add items to mob inventory
|
|
|
@ -119,14 +122,12 @@ public class LootManager { |
|
|
|
mob.getCharItemManager().addItemToInventory(toAdd); |
|
|
|
mob.getCharItemManager().addItemToInventory(toAdd); |
|
|
|
} |
|
|
|
} |
|
|
|
if (inHotzone) { |
|
|
|
if (inHotzone) { |
|
|
|
int lootTableID = bse.lootTable; |
|
|
|
|
|
|
|
if (generalItemTables.containsKey(bse.lootTable + 1)) { |
|
|
|
if (generalItemTables.containsKey(bse.lootTable + 1)) { |
|
|
|
lootTableID = bse.lootTable + 1; |
|
|
|
int lootTableID = bse.lootTable + 1; |
|
|
|
} |
|
|
|
|
|
|
|
MobLoot toAddHZ = getGenTableItem(lootTableID, mob); |
|
|
|
MobLoot toAddHZ = getGenTableItem(lootTableID, mob); |
|
|
|
if (toAddHZ != null) |
|
|
|
if (toAddHZ != null) |
|
|
|
mob.getCharItemManager().addItemToInventory(toAddHZ); |
|
|
|
mob.getCharItemManager().addItemToInventory(toAddHZ); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "ITEM": |
|
|
|
case "ITEM": |
|
|
|