From 54414ecc3fb9df5b13eb4cdcf8a8a7fffa32908a Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 4 Mar 2024 07:04:13 -0600 Subject: [PATCH] Random Disc On Droppers --- src/engine/gameManager/LootManager.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 5e64e093..6b025d64 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -85,12 +85,23 @@ public enum LootManager { ItemBase ib = it.getItemBase(); if(ib == null) break; - if (ib.isDiscRune() || ib.getName().toLowerCase().contains("of the gods")) { + if (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(ib.isDiscRune()){ + ItemBase newDisc = ItemBase.getItemBase(ThreadLocalRandom.current().nextInt(3001,3049)); + if(newDisc != null){ + mob.getInventory().remove(it); + mob.getInventory().add(new MobLoot(mob,newDisc,true)); + ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().getName() + " has found the " + newDisc.getName() + ". Are you tough enough to take it?"); + chatMsg.setMessageType(10); + chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); + DispatchMessage.dispatchMsgToAll(chatMsg); + } + } } }