From b491090037a73cdc41e6059de27caf7d646bc5bb Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Thu, 27 Dec 2012 15:08:10 -0800 Subject: [PATCH] Repairing the Repair skill. --- src/main/java/com/gmail/nossr50/skills/repair/Repair.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java index 72fe9347f..ce14714fe 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java @@ -212,10 +212,10 @@ public class Repair { protected static short repairCalculate(Player player, int skillLevel, short durability, int repairAmount) { float bonus; if(skillLevel >= repairMasteryMaxBonusLevel) bonus = repairMasteryChanceMax; - else bonus = (skillLevel / repairMasteryMaxBonusLevel) * repairMasteryChanceMax; + else bonus = (((float) skillLevel) / ((float) repairMasteryMaxBonusLevel)) * ((float) repairMasteryChanceMax); if (permInstance.repairMastery(player)) { - bonus = (repairAmount * bonus); + bonus = (((float) repairAmount) * bonus); repairAmount += (int) bonus; }