|
|
@ -200,9 +200,13 @@ public enum LootManager { |
|
|
|
|
|
|
|
|
|
|
|
if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) { |
|
|
|
if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) { |
|
|
|
int chance = ThreadLocalRandom.current().nextInt(1,101); |
|
|
|
int chance = ThreadLocalRandom.current().nextInt(1,101); |
|
|
|
if(chance > 5) |
|
|
|
if(chance > 10) |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
int amount = ThreadLocalRandom.current().nextInt(tableRow.minSpawn, tableRow.maxSpawn + 1); |
|
|
|
int amount = ThreadLocalRandom.current().nextInt((int)(tableRow.minSpawn * 0.5f), (int)((tableRow.maxSpawn + 1) * 0.5f)); |
|
|
|
|
|
|
|
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " HAS FOUND " + amount + " " + ItemBase.getItemBase(itemUUID).getName() + ". "); |
|
|
|
|
|
|
|
chatMsg.setMessageType(10); |
|
|
|
|
|
|
|
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); |
|
|
|
|
|
|
|
DispatchMessage.dispatchMsgToAll(chatMsg); |
|
|
|
return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false); |
|
|
|
return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|