Randomize the treasure drop amounts instead of always dropping everything

For example, the guaranteed 5 diamonds will now be a 1-5 diamond drop.
This commit is contained in:
TfT_02 2014-01-18 19:15:38 +01:00
parent 9349416326
commit 748dba41dc

View File

@ -485,6 +485,10 @@ public class FishingManager extends SkillManager {
treasureDrop.setDurability((short) (Misc.getRandom().nextInt(maxDurability))); treasureDrop.setDurability((short) (Misc.getRandom().nextInt(maxDurability)));
} }
if (treasureDrop.getAmount() > 1) {
treasureDrop.setAmount(Misc.getRandom().nextInt(treasureDrop.getAmount()) + 1);
}
treasure.setDrop(treasureDrop); treasure.setDrop(treasureDrop);
return treasure; return treasure;