Browse Source

/fishing command will now also display the bonus gained from lucky perk

TfT_02 12 years ago
parent
commit
1bf0cd1d15

+ 5 - 1
src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java

@@ -23,7 +23,11 @@ public class FishingCommand extends SkillCommand {
     protected void dataCalculations() {
         lootTier = Fishing.getFishingLootTier(profile);
         magicChance = percent.format((float) lootTier / 15);
-        shakeChance = String.valueOf(Fishing.getShakeChance(lootTier));
+        int dropChance = Fishing.getShakeChance(lootTier);
+        if (player.hasPermission("mcmmo.perks.lucky.fishing")) {
+            dropChance = (int) (dropChance * 1.25);
+        }
+        shakeChance = String.valueOf(dropChance);
     }
 
     @Override