Random Disc On Droppers

This commit is contained in:
2024-03-04 07:04:13 -06:00
parent 4c0eb38889
commit 54414ecc3f
+12 -1
View File
@@ -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);
}
}
}
}