From 9a570de54c4760a7ec3b8a7688ccd8b2b663b503 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 13 Mar 2024 20:03:32 -0500 Subject: [PATCH] contract and rune drop work --- src/engine/gameManager/LootManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index ce892711..759dac23 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -127,9 +127,8 @@ public enum LootManager { case "LOOT": if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) GenerateLootDrop(mob, bse.genTable); //generate normal loot drop - if(ThreadLocalRandom.current().nextInt(1,101) < mob.level && mob.parentZone.getSafeZone() == 0) { - if (ThreadLocalRandom.current().nextInt(1, 10000) < mob.level) { - if (_genTables.containsKey(bse.genTable + 1)) { + if(mob.parentZone.getSafeZone() == 0) { + if (ThreadLocalRandom.current().nextInt(1, 10000) < 10) { int roll = ThreadLocalRandom.current().nextInt(1, 101); MobLoot extraLoot = null; if (roll >= 1 && roll <= 50) { @@ -144,7 +143,6 @@ public enum LootManager { if (extraLoot != null) { mob.getCharItemManager().addItemToInventory(extraLoot); } - } } } break; @@ -333,6 +331,8 @@ public enum LootManager { try { 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) { toAdd.setIsID(true); @@ -340,7 +340,6 @@ public enum LootManager { } } catch (Exception e) { //TODO chase down loot generation error, affects roughly 2% of drops - int i = 0; } }