Browse Source

Random Disc On Droppers

birdbane
FatBoy-DOTC 9 months ago
parent
commit
54414ecc3f
  1. 13
      src/engine/gameManager/LootManager.java

13
src/engine/gameManager/LootManager.java

@ -85,12 +85,23 @@ public enum LootManager { @@ -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);
}
}
}
}

Loading…
Cancel
Save