From 748dba41dcbe452595a337268f79ea10cf8f5a55 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 18 Jan 2014 19:15:38 +0100 Subject: [PATCH] Randomize the treasure drop amounts instead of always dropping everything For example, the guaranteed 5 diamonds will now be a 1-5 diamond drop. --- .../java/com/gmail/nossr50/skills/fishing/FishingManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index d644efe33..1df238c01 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -485,6 +485,10 @@ public class FishingManager extends SkillManager { treasureDrop.setDurability((short) (Misc.getRandom().nextInt(maxDurability))); } + if (treasureDrop.getAmount() > 1) { + treasureDrop.setAmount(Misc.getRandom().nextInt(treasureDrop.getAmount()) + 1); + } + treasure.setDrop(treasureDrop); return treasure;