From 718fe56cda261bdd776e494c409fd693fb286e4e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 30 Apr 2023 12:27:02 -0500 Subject: [PATCH] drops no longer announce on mob death && config drop rate used for mob equipment drop chance --- src/engine/loot/LootManager.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/engine/loot/LootManager.java b/src/engine/loot/LootManager.java index 137684ce..db8fcb0f 100644 --- a/src/engine/loot/LootManager.java +++ b/src/engine/loot/LootManager.java @@ -60,13 +60,15 @@ public class LootManager { RunBootySet(NPCManager._bootySetMap.get(mob.bootySet), mob, multiplier, inHotzone, fromDeath); } //lastly, check mobs inventory for godly or disc runes to send a server announcement - for (Item it : mob.getInventory()) { - ItemBase ib = it.getItemBase(); - if (ib.isDiscRune() || ib.getName().toLowerCase().contains("of the gods")) { - ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().getName() + " has found the " + ib.getName() + ". Are you tough enough to take it?"); - chatMsg.setMessageType(10); - chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); - DispatchMessage.dispatchMsgToAll(chatMsg); + if(!fromDeath) { + for (Item it : mob.getInventory()) { + ItemBase ib = it.getItemBase(); + if (ib.isDiscRune() || ib.getName().toLowerCase().contains("of the gods")) { + ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().getName() + " has found the " + ib.getName() + ". Are you tough enough to take it?"); + chatMsg.setMessageType(10); + chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); + DispatchMessage.dispatchMsgToAll(chatMsg); + } } } } @@ -79,7 +81,7 @@ public class LootManager { continue; float equipmentRoll = ThreadLocalRandom.current().nextFloat(); float dropChance = me.getDropChance(); - if (equipmentRoll < dropChance){ + if (equipmentRoll < dropChance * multiplier){ MobLoot ml = new MobLoot(mob, me.getItemBase(), false); mob.getCharItemManager().addItemToInventory(ml); }