Browse Source

contract and rune drop work

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
9a570de54c
  1. 9
      src/engine/gameManager/LootManager.java

9
src/engine/gameManager/LootManager.java

@ -127,9 +127,8 @@ 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,101) < mob.level && mob.parentZone.getSafeZone() == 0) { if(mob.parentZone.getSafeZone() == 0) {
if (ThreadLocalRandom.current().nextInt(1, 10000) < mob.level) { if (ThreadLocalRandom.current().nextInt(1, 10000) < 10) {
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 <= 50) { if (roll >= 1 && roll <= 50) {
@ -146,7 +145,6 @@ public enum LootManager {
} }
} }
} }
}
break; break;
case "ITEM": case "ITEM":
GenerateInventoryDrop(mob, bse); GenerateInventoryDrop(mob, bse);
@ -333,6 +331,8 @@ public enum LootManager {
try { try {
MobLoot toAdd = getGenTableItem(tableID, mob); MobLoot toAdd = getGenTableItem(tableID, mob);
if(toAdd.getItemBase().getType().equals(Enum.ItemType.CONTRACT) || toAdd.getItemBase().getType().equals(Enum.ItemType.RUNE))
return;//block all contracts and runes that drop outside the confines of the new system
if (toAdd != null) { if (toAdd != null) {
toAdd.setIsID(true); toAdd.setIsID(true);
@ -340,7 +340,6 @@ public enum LootManager {
} }
} catch (Exception e) { } catch (Exception e) {
//TODO chase down loot generation error, affects roughly 2% of drops //TODO chase down loot generation error, affects roughly 2% of drops
int i = 0;
} }
} }

Loading…
Cancel
Save