From 8fb6c43c667609b75287d13c82c708ee6adb9d44 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 21 Aug 2023 19:21:50 -0500 Subject: [PATCH] alternative loot drop limitation --- src/engine/gameManager/LootManager.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 1e2da274..4162f94f 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -338,7 +338,7 @@ public enum LootManager { public static void GenerateEquipmentDrop(Mob mob) { //do equipment here - + int dropCount = 0; if (mob.getEquip() != null) for (MobEquipment me : mob.getEquip().values()) { @@ -353,11 +353,12 @@ public enum LootManager { MobLoot ml = new MobLoot(mob, me.getItemBase(), false); - if (ml != null) { + if (ml != null && dropCount < 1) { ml.setIsID(true); ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1)); mob.getCharItemManager().addItemToInventory(ml); - break; // Exit on first successful roll. + dropCount = 1; + //break; // Exit on first successful roll. } } }