|
|
@ -112,24 +112,26 @@ public enum LootManager { |
|
|
|
case "LOOT": |
|
|
|
case "LOOT": |
|
|
|
if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) |
|
|
|
if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) |
|
|
|
GenerateLootDrop(mob, bse.genTable); //generate normal loot drop
|
|
|
|
GenerateLootDrop(mob, bse.genTable); //generate normal loot drop
|
|
|
|
if(ThreadLocalRandom.current().nextInt(1, 20000) == 10000) { |
|
|
|
if(ThreadLocalRandom.current().nextInt(1,101) < mob.level && mob.parentZone.getSafeZone() == 0) { |
|
|
|
|
|
|
|
if (ThreadLocalRandom.current().nextInt(1, 20000) == 10000) { |
|
|
|
if (_genTables.containsKey(bse.genTable + 1)) { |
|
|
|
if (_genTables.containsKey(bse.genTable + 1)) { |
|
|
|
int roll = ThreadLocalRandom.current().nextInt(1,101); |
|
|
|
int roll = ThreadLocalRandom.current().nextInt(1, 101); |
|
|
|
MobLoot extraLoot = null; |
|
|
|
MobLoot extraLoot = null; |
|
|
|
if(roll >= 1 && roll <= 47){ |
|
|
|
if (roll >= 1 && roll <= 47) { |
|
|
|
extraLoot = rollForContract(bse.genTable + 1, mob); |
|
|
|
extraLoot = rollForContract(bse.genTable + 1, mob); |
|
|
|
} |
|
|
|
} |
|
|
|
if(roll >= 48 && roll <= 94){ |
|
|
|
if (roll >= 48 && roll <= 94) { |
|
|
|
extraLoot = rollForRune(bse.genTable + 1, mob); |
|
|
|
extraLoot = rollForRune(bse.genTable + 1, mob); |
|
|
|
} |
|
|
|
} |
|
|
|
if(roll >= 95){ |
|
|
|
if (roll >= 95) { |
|
|
|
extraLoot = rollForGlass(mob); |
|
|
|
extraLoot = rollForGlass(mob); |
|
|
|
} |
|
|
|
} |
|
|
|
if(extraLoot != null){ |
|
|
|
if (extraLoot != null) { |
|
|
|
mob.getCharItemManager().addItemToInventory(extraLoot); |
|
|
|
mob.getCharItemManager().addItemToInventory(extraLoot); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "ITEM": |
|
|
|
case "ITEM": |
|
|
|
GenerateInventoryDrop(mob, bse); |
|
|
|
GenerateInventoryDrop(mob, bse); |
|
|
@ -145,7 +147,7 @@ public enum LootManager { |
|
|
|
|
|
|
|
|
|
|
|
MobLoot outItem; |
|
|
|
MobLoot outItem; |
|
|
|
|
|
|
|
|
|
|
|
int genRoll = ThreadLocalRandom.current().nextInt(1,100 + 1); |
|
|
|
int genRoll = ThreadLocalRandom.current().nextInt(1,94 + 1); |
|
|
|
|
|
|
|
|
|
|
|
GenTableEntry selectedRow = GenTableEntry.rollTable(genTableID, genRoll, 1.0f); |
|
|
|
GenTableEntry selectedRow = GenTableEntry.rollTable(genTableID, genRoll, 1.0f); |
|
|
|
|
|
|
|
|
|
|
|