From 462beb30b3a0548d47da528754392f0d4bfffd7f Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 15 Jun 2024 20:03:09 -0500 Subject: [PATCH] logging --- src/engine/gameManager/LootManager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 770ad82a..39604758 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -185,13 +185,12 @@ public enum LootManager { return null; if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) { + if(ThreadLocalRandom.current().nextInt(1,101) < 91) + return null; // cut down world drops rates of resources by 90% int amount = ThreadLocalRandom.current().nextInt(tableRow.minSpawn, tableRow.maxSpawn + 1); return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false); } - if(ItemBase.getItemBase(itemUUID).getType().equals(Enum.ItemType.RESOURCE)){ - if(ThreadLocalRandom.current().nextInt(1,101) < 91) - return null; // cut down world drops rates of resources by 90% - }else if(ItemBase.getItemBase(itemUUID).getType().equals(Enum.ItemType.RUNE)){ + if(ItemBase.getItemBase(itemUUID).getType().equals(Enum.ItemType.RUNE)){ int randomRune = rollRandomItem(itemTableId); if(randomRune != 0) { itemUUID = randomRune; @@ -225,6 +224,9 @@ public enum LootManager { if(mob.hasContractOrRune){ return null; } + if(ThreadLocalRandom.current().nextInt(1,101) < 66) + return null; // cut down world drops rates of resources by 65% + mob.hasContractOrRune = true; }